Archive for category Switching

Multicast Question #1 – Answered

So the first question was:

* If the host is receiving data for group 239.0.1.23, which router (A or B) is forwarding the data to SW1 and the host?

Answer: Let’s consider the Sparse Mode case first. In Sparse Mode, the receivers must express their interest in joining the group through IGMP. So the answer to this is simply the router to which the IGMP packet was sent to. It is this router that sends the PIM join message toward the RP. So which router does the host send the IGMP packet to? When a host decides that it wants to join a multicast stream, it sends an IGMP membership report. The destination address that it uses to send the membership report to is the group address that the host wishes to join. So we still haven’t answered the question! Time for alittle experimentation with GNS3.

R1#show ip mroute
IP Multicast Routing Table
Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,
L - Local, P - Pruned, R - RP-bit set, F - Register flag,
T - SPT-bit set, J - Join SPT, M - MSDP created entry,
X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
U - URD, I - Received Source Specific Host Report,
Z - Multicast Tunnel, z - MDT-data group sender,
Y - Joined MDT-data group, y - Sending to MDT-data group
Outgoing interface flags: H - Hardware switched, A - Assert winner
Timers: Uptime/Expires
Interface state: Interface, Next-Hop or VCD, State/Mode
(*, 239.0.1.23), 06:52:35/00:02:05, RP 0.0.0.0, flags: SJC
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
FastEthernet0/0, Forward/Sparse, 00:01:05/00:02:05

R1 is forwarding group traffic out toward the host through interface Fa0/0.

R2#show ip pim neighbor
PIM Neighbor Table
Mode: B - Bidir Capable, DR - Designated Router, N - Default DR Priority,
S - State Refresh Capable
Neighbor                      Interface                                   Uptime/Expires              Ver   DR
Address                                                                                                                                                                             Prio/Mode
10.0.1.254                 FastEthernet0/0    07:05:52/00:01:31     v2    1 / DR S

Why did R1 get chosen? Look at the PIM DR for the segment. Remember that the PIM DR is based upon two values:

  1. The DR Priority (the default is 1 and highest wins)
  2. The IP address (highest IP address wins)

So the DR by default would be R1 because it’s IP address is higher. To test that theory, let’s set the priority of R2 to 100 so it becomes the DR.

R2#config t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#int f0/0
R2(config-if)#ip pim dr-priority 100

Now look at the PIM Neighbors on both R1 and R2 to verify that R2 is now the DR:

R1#show ip pim neighbor
PIM Neighbor Table
Mode: B - Bidir Capable, DR - Designated Router, N - Default DR Priority,
S - State Refresh Capable
Neighbor          Interface                                Uptime/Expires           Ver            DR
Address                                                     Prio/Mode
10.0.1.253             FastEthernet0/0              00:10:25/00:01:41     v2               100/ DR S
R2#show ip pim neighbor
PIM Neighbor Table
Mode: B - Bidir Capable, DR - Designated Router, N - Default DR Priority,
S - State Refresh Capable
Neighbor           Interface                    Uptime/Expires                Ver           DR
Address                                                                                                                                                                          Prio/Mode
10.0.1.254               FastEthernet0/0        00:10:20/00:01:43     v2      1 / S

R2 is now the DR and has a priority of 100! The final step is to verify that it’s forwarding traffic for the group:

R2#show ip mroute
IP Multicast Routing Table
Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,
L - Local, P - Pruned, R - RP-bit set, F - Register flag,
T - SPT-bit set, J - Join SPT, M - MSDP created entry,
X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
U - URD, I - Received Source Specific Host Report,
Z - Multicast Tunnel, z - MDT-data group sender,
Y - Joined MDT-data group, y - Sending to MDT-data group
Outgoing interface flags: H - Hardware switched, A - Assert winner
Timers: Uptime/Expires
Interface state: Interface, Next-Hop or VCD, State/Mode
(*, 239.0.1.23), 00:04:16/00:02:17, RP 0.0.0.0, flags: SJC
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
FastEthernet0/0, Forward/Sparse, 00:04:16/00:02:17

R2 is indeed now forwarding group traffic from 239.0.1.23 out F0/0 toward the host.

What about the Dense Mode solution, you cry? Remember that in Dense Mode, the routers just spew the data out all of their multicast interfaces. So assuming that R1 and R2 both get added to the tree, they will both want to send data out their Fa0/0 interfaces toward the host. This of course makes the assumption that the Fa0/0 interface on both R1 and R2 pass the RPF check (more on that to come).  PIM Dense Mode is smart enough to realize that both routers sending the multicast stream into the LAN segment means that each host will receive multiple copies of the same data.  To stop this, the PIM routers detect each other and decide on one router to forward the stream on the segment using Assert messages.  Essentially, the routers decide which router has the lowest administrative distance to the source.  In the event that they have same administrative distance (which is likely), the lowest metric in that unicast routing protocol wins.  If they have the same metric, the router with the highest IP address wins.  Thus, R1 would win.   The winner of the Assert process can be seen with an ‘A’ in the ’show ip mroute’ command.

(192.168.0.1, 239.0.1.23), 00:00:02/00:02:57, flags: T
Incoming interface: FastEthernet0/1, RPF nbr 0.0.0.0
Outgoing interface list:
FastEthernet0/0, Forward/Dense, 00:00:02/00:00:00, A

No Comments

Dot1Q Tunneling

To configure a switchport for Dot1Q tunneling:

SW(config-if)# switchport access vlan vlan-id
SW(config-if)# switchport mode dot1q-tunnel
(optional) SW(config)# vlan dot1q tag native

Example:
SW(config)# int f0/1
SW(config-if)# switchport access vlan 37
SW(config-if)# switchport mode dot1q-tunnel
SW(config)# vlan dot1q tag native

This example configures interface FastEthernet0/1 to be a dot1Q tunnel port. The customer which is connected to this port (identified by VLAN 37) will be able to send trunked packets to the switch, which will be tagged using the customers tagging scheme. The VLAN 37 tag will be added to the customer’s tagged frame, which will allow it to communicate to other VLAN 37 devices. Once the frame is sent out of an interface toward the CPE device, the VLAN 37 tag will be removed, leaving only the customer’s VLAN tagged frame.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

To enable the tunneling of Layer-2 protocols through the dot1Q tunnel, you must add these additional commands:

SW(config-if)# l2protocol-tunnel [cdp | stp | vtp]

This will allow the Layer-2 protocols of CDP, STP, and VTP to be sent through the dot1Q tunnel and received on the remote end.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

NOTE: It is important to keep in mind that the word tunneling should automatically set off alarms about MTU issues. When you tunnel a frame (or a packet), you are adding additional bytes. So if you have a host that sends a frame totaling 1504 bytes (the extra 4 bytes are due to 802.1Q), the additional 802.1Q bytes will create a frame that exceeds the MTU of ethernet. To increase the allowable MTU on a switch, issue the following commands:

SW(config)# system mtu
or
SW(config)# system mtu jumbo

The first command is for FastEthernet links and the second is for GigabitEthernet links.

No Comments