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?
-
1If it does not have the correct MAC it will not even get picked up by the NIC. It is has then all sort of checksum errors are likely and varied responses are possible. However starting a program in your computer is extremely unlikely. You will certainly not suddenly see a browser starting up. Not even if the whole index.html file fitted in a single (1500-ish byte) packet. – Hennes Jan 26 '13 at 19:18
2 Answers
In almost all cases, it is ignored.

- 100,734
- 32
- 197
- 329
-
-
You can capture all traffic with something like Wireshark or Netmon, but it's not going to magically make your browser pop up. The kind of unsolicited packets that aren't ignored are typically broadcasts like WOL, but the machine still needs to be configured to accept them. – MDMarra Jan 26 '13 at 19:21
-
You can run you network card in promiscuous mode and log all traffic (e.g. using tcpdump). – Hennes Jan 26 '13 at 19:21
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 RST
(reset), asking the sender to consider the connection abnormally terminated.

- 31,449
- 2
- 55
- 84