I have been wondering this for a few days. I basically understand how networks and packets work. But what happens when an unexpected packet arrives? Like, when I didn't send a request for a website's index, but it sends the index to my machine anyways ? Does my browser pop up? Does it ignore it? Anyway to actually catch it?
closed as off topic by EEAA, Michael Hampton♦, Chopper3, Jay, Greg Askew Jan 26 '13 at 19:40
Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.
It can't work that way. Part of the process of a web server sending you a web page is you requesting that web page. There's just no way for it to happen without your request. Your question is like "What happens if McDonald's gives me food at the drive through without me ordering any?" Well, if you didn't order any food, you're not going to be at the drive through window.
For example, when you request a web page, one of the first things your browser does is associate a local port with a connection to that web server. That must happen first or there's simply no way to send any data to the browser at all.
Without an assigned local port, your computer will assume that the packet is erroneous. This can actually happen. For example, if a machine reboots and then receives packets intended for connections lost in the reboot or if your Internet connection gets assigned an IP address that previously belonged to someone else and you get packets for their session. Your computer will try to match the packets to a local session, fail, and send back a