Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Cisco Switching Black Book - Sean Odom, Hanson Nottingham.pdf
Скачиваний:
87
Добавлен:
24.05.2014
Размер:
2.89 Mб
Скачать

Time to Live

Using the IP time to live (TTL) field is an important IGMP topic. The TTL field is a value in an IP packet that tells a network router whether the packet has been in the network too long and should be discarded. A multicast datagram with a TTL of 0 is allowed only on the same host. A TTL of 1 (the default value) is allowed only on the local subnet. If a higher TTL is set, the router is allowed to forward the packet.

By increasing the TTL value, a multicast application can look further from its origin for a server. This process works in the following manner: The host first sends a multicast message with a TTL of 1. If it doesn’t receive a response, it sends a multicast message with a TTL of 2, then 3, and so on, until it reaches its limit. In this manner, the application can locate the nearest server that can be reached.

You can also change the multicast TTL value on a router’s interface to prevent multicast traffic from leaving your network. If you set the TTL value higher than the multicast application’s TTL value, the traffic will never leave the network.

Multicast at Layer 2

You must be wondering by now why we keep talking about routers when this book’s title is Cisco Switching Black Book. Let’s get down to how multicast behaves in a switch environment. As you are well aware, the difference between a hub and a switch is how the device forwards the frames out the ports: A hub will forward a frame out every port except the receiving port, whereas a switch will forward the frame to the ports based on the destination MAC address.

A switch accomplishes this task by comparing the destination MAC address with a forwarding table. This forwarding table is populated by looking at the source MAC addresses of frames sent between every port and keeping track of the port from which the frame arrived. This information creates a forwarding table that is usually kept in Content Addressable Memory (the table is commonly referred to as a CAM table). When the switch receives a frame with a destination MAC address that is not in the forwarding table, it has no choice but to send it out every port in hopes that it will reach its destination. This usually happens in two situations: when the destination MAC address has not been seen before, or when the destination MAC address is a broadcast/multicast address.

If the MAC address has never been seen before, the switch will eventually receive a frame with that MAC address as the source; the address will then be put into the forwarding table. This process takes a little time. If the MAC address is a broadcast/multicast address, the switch will never see a frame with that MAC address as the source address. If you have multicast traffic, this situation will turn your Catalyst 5000 into a very expensive hub. To overcome this problem, Cisco has the following solutions:

IGMP snooping

Cisco Group Management Protocol (CGMP)

Router Group Management Protocol (RGMP)

GARP Multicast Registration Protocol (GMRP)

IGMP Snooping

IGMP snooping works as its name implies: The switch snoops on the traffic between the host and the multicast router. When the switch sees an IGMP report from a host for a multicast group, it associates that port with the multicast MAC address in the CAM table. When the switch sees an IGMP leave group message, it removes the port from the association.

Note The source port must also be added to the association for that multicast group in the CAM table.

147

This process looks simple. As a host joins the multicast group, its port number is added to the CAM table; as the host leaves, its port is removed from the CAM table. However, this entire process forgets about the switch’s processor. The switch must also receive the multicasts in order to receive the join and leave messages. If a steady stream of multicast traffic is received by the switch, the processor will be so busy checking the multicast traffic that it will have no time to process any other traffic. To overcome this problem, Cisco redesigned its switch to enable the ports to examine frames for Layer 3 information. When the port sees an IGMP frame, the frame will only be forwarded to the processor. This way, the processor will see all the IGMP traffic but will not receive any non−IGMP multicast traffic.

Let’s look at the entire process. When a host broadcasts an IGMP report, the report is processed by the switch and sent out to every port. The router will begin to send multicast traffic to the switch. The switch will add the source port to the CAM table along with the first port. As more hosts send IGMP reports, their ports are added to the forwarding table. When the router sends a general query to the switch, the switch will send the multicast to every port. All the multicast group members will send a reply to the router (all IGMP replies are sent to the processor). The processor will send one IGMP report to the router so that it will continue to receive the multicast traffic. When a host sends a leave group message, the switch sends a general query out the same port to ensure that no other host wishes to receive the multicast (if the port is connected to another switch/hub). It will remove the port from the CAM table if it does not get a reply.

IGMP snooping is very efficient and is vendor independent. Unfortunately, it is only available for the enterprise class Catalyst switches.

Cisco Group Management Protocol

Cisco Group Management Protocol (CGMP) is a lightweight Layer 2 protocol that will only work between a Cisco router and a Cisco switch. CGMP is supported by almost the full line of routers and switches. A router and a switch utilize CGMP to communicate the multicast member states in the CAM table entries. The router communicates with the host using IGMP, but these IGMP messages are ignored by the switch.

When a host sends a membership report to the multicast router, the router sends a CGMP message to the switch with the host’s MAC address and the multicast MAC address. The CGMP switch uses the host’s MAC address to look up the port. Depending on the CGMP message, the switch will either remove the port from or add it to the CAM table of the specific multicast MAC address.

This entire process moves the administration of the multicast from the switch to the router. The switch only has to follow the instructions and add/remove MAC addresses from the CAM table (which is what it is designed to do).

Tip When you enable the router’s interface with CGMP, ensure that the CGMP−enabled switch is already connected to that interface. When CGMP is enabled on the router, the router will send an assign router port message to the switch.

Router Group Management Protocol

Router Group Management Protocol (RGMP) is used by the switch to manage the multicast router. It is supported by Catalyst enterprise LAN switches. It lets a switch reduce multicast traffic by sending multicasts to the routers that are configured to receive them.

All the routers on the network must support RGMP and have PIM−SM running. IGMP snooping must also be enabled on the switch. The router sends a hello packet to the switch. The hello packet tells the switch when it will receive multicast traffic. This message is called an RGMP join. When the router wants to stop receiving multicast traffic, it sends an RGMP leave message to the switch. These messages greatly reduce the multicast traffic on the network.

148

Соседние файлы в предмете Программирование