Thursday, April 9, 2009

RIPv1 Broadcasts

This week in one of my CCNA Routing classes, while discussing the operation of Distance Vector routing protocols, there was some good discussion (and debate) going on as to how RIP broadcast would be handled by each host on the local LAN network. Some students were of the impression that the frame would not be processed at all if the host device wasn’t running RIP. Others thought it would be processed and discarded at layer 2; some thought it would be discarded at layer 3; others were not sure what layer would actually discard the update if RIP protocol wasn’t running on the device.

I want to share with you an explanation of what happens to that RIP update when it reaches the host device. It comes from, Chapter 12, Broadcasting and Multicasting, http://www.uic.rsu.ru/doc/inet/tcp_stevens/broadcas.htm.

In the document, the author explains to us that the interface card sees every frame that passes by on the cable and makes a decision whether to receive the frame and pass it to the device driver of that host machine. There are exceptions (promiscuous mode), but normally the interface card passes to the device driver only frames addressed specifically to the host device, multicast frames destined for a particular group on that host device, or broadcast frames meant for everyone on the cable.

Once that decision is made (filtering decision) and the interface card of that device decides to keep the frame, it is passed to the device driver where the frame checksum calculation is performed to check the frame for errors. If no frame errors are detected, the frame undergoes additional filtering by the device driver. One of the first things to be checked is the protocol field in the frame header. Because this frame is carrying an IP payload (RIP uses IP), the frame is passed to layer 3. IP performs more filtering, based off of the source and destination IP addresses, and, because it is a UDP datagram, passes it to the Transport Layer, UDP protocol for additional processing.

You guessed it, more filtering at layer 4! Now the port numbers are checked. If no process is currently using the destination port number (port 520 for RIP), the datagram will be discarded and an ICMP port unreachable message will be generated. If the UDP datagram has a checksum error, UDP will discard it with no message returned to the sender.

As the author will tell you, the problem with broadcasting RIP v1 updates is that there is considerable overhead for each of these hosts. All hosts must process the broadcast all the way up to layer 4 of the stack, regardless if they are running RIP v1 or not.

No comments:

Post a Comment