How does the multicast (PIM sparse mode) work with MSDP? 

 

In this post, I will generate the multicast environment with Nx9000v on GNS3. I will handle the multicast with PIM sparse mode.

 

1. Pre-requiste for Test environments

 

I will produce this environment to generate the multicast.

Before I make Multicast environment, I need to prepare NAT for outbound traffic and Multicast test scripts. This is the sample configuration for NAT outbound traffic.

conf t

feature dhcp

feature nat

!

ip nat translation max-entries 1023

!

no ip dhcp relay

no ipv6 dhcp relay

!

inter eth 1/9

no sw

ip add dhcp

ip nat out

no shut

exit

inter et 1/7

no sw

ip add 100.15.5.17/16

ip nat ins

no shut

exit

inter et 1/8

no sw

ip add 100.25.5.18/16

ip nat ins

no shut

exit

!

ip acc 1

10 per ip any any

exit

!

ip nat inside source list 1 interface et1/9 overload

ip route 10.0.0.0/24 100.15.1.17

ip route 10.0.0.0/24 100.25.2.18

ip route 20.0.0.0/24 100.15.1.17

ip route 20.0.0.0/24 100.25.2.18

ip route 100.0.0.0/8 100.15.1.17

ip route 100.0.0.0/8 100.25.2.18

ip route 1.1.1.1/32 100.15.1.17

ip route 1.1.1.1/32 100.25.2.18

ip route 2.2.2.2/32 100.15.1.17

ip route 2.2.2.2/32 100.25.2.18

ip route 3.3.3.3/32 100.15.1.17

ip route 3.3.3.3/32 100.25.2.18

ip route 4.4.4.4/32 100.15.1.17

ip route 4.4.4.4/32 100.25.2.18

end

!

Also I attach the multicast example below

mcast-receiver.py
0.00MB
mcast-sender.py
0.00MB

 

 

2. Configuration for default environment.

 

2-1. Configure Core swtich/router  

 

I will make full-mesh connectivity. There are four switch/router. I will name as s1, s2, s3 and s4. On those switch/router, I will run OSPF routing to announce loopback addresses for Router ID and RP point. 

s1

s2

s3

s4

conf t
!
switchname s1
!
feature ospf
router ospf 1
router-id 1.1.1.1
exit
!
inter lo 0
ip add 1.1.1.1/32
ip router ospf 1 area 0.0.0.0
no shut
exit
!
inter et 1/7
no sw
ip add 100.15.1.17/16
no shut
exit
!
inter et 1/1
no sw
ip add 100.12.1.11/16
ip router ospf 1 area 0.0.0.0
no shut
exit
!
inter et 1/2
no sw
ip add 100.13.1.12/16
ip router ospf 1 area 0.0.0.0
no shut
exit
!
inter et 1/3
no sw
ip add 100.14.1.13/16
ip router ospf 1 area 0.0.0.0
no shut
exit
!
ip route 0.0.0.0/0 100.15.5.17
ip route 0.0.0.0/0 100.12.2.11 100
end
!

conf t
!
switchname s2
!
feature ospf
router ospf 1
router-id 2.2.2.2
exit
!
inter lo 0
ip add 2.2.2.2/32
ip router ospf 1 area 0.0.0.0
no shut
exit
!
inter et 1/8
no sw
ip add 100.25.2.18/16
no shut
exit
!
inter et 1/1
no sw
ip add 100.12.2.11/16
ip router ospf 1 area 0.0.0.0
no shut
exit
!
inter et 1/2
no sw
ip add 100.24.2.12/16
ip router ospf 1 area 0.0.0.0
no shut
exit
!
inter et 1/3
no sw
ip add 100.23.2.13/16
ip router ospf 1 area 0.0.0.0
no shut
exit
!
ip route 0.0.0.0/0 100.25.5.18
ip route 0.0.0.0/0 100.12.1.11 100
end
!

conf t
!
switchname s3
!
feature ospf
router ospf 1
router-id 3.3.3.3
exit
!
inter lo 0
ip add 3.3.3.3/32
ip router ospf 1 area 0.0.0.0
no shut
exit
!
inter et 1/1
no sw
ip add 100.34.3.11/16
ip router ospf 1 area 0.0.0.0
no shut
exit
!
inter et 1/2
no sw
ip add 100.13.3.12/16
ip router ospf 1 area 0.0.0.0
no shut
exit
!
inter et 1/3
no sw
ip add 100.23.3.13/16
ip router ospf 1 area 0.0.0.0
no shut
exit
!
ip route 0.0.0.0/0 1.1.1.1
ip route 0.0.0.0/0 2.2.2.2
!
vlan 10
name vlan10
exit
!
feature interface-vlan
inter vlan10
no shut
ip add 10.0.0.1/24
exit
!
inter et 1/7, et 1/8
sw mode ac
sw ac vlan 10
no shut
exit
!

----------------------------------
!
conf t
!
inter vlan 10
ip router ospf 1 area 0.0.0.0
exit
!
---------------------------------- 
conf t
!
feature pim
!
ip pim rp-address 99.99.99.99
!
inter eth 1/1, eth 1/2, eth 1/3
ip pim sparse-mode
exit
!
inter vlan 10
ip pim sparse-mode
exit
!

conf t
!
switchname s4
!
feature ospf
router ospf 1
router-id 4.4.4.4
exit
!
inter lo 0
ip add 4.4.4.4/32
ip router ospf 1 area 0.0.0.0
no shut
exit
!
inter et 1/1
no sw
ip add 100.34.4.11/16
ip router ospf 1 area 0.0.0.0
no shut
exit
!
inter et 1/2
no sw
ip add 100.24.4.12/16
ip router ospf 1 area 0.0.0.0
no shut
exit
!
inter et 1/3
no sw
ip add 100.14.4.13/16
ip router ospf 1 area 0.0.0.0
no shut
exit
!
ip route 0.0.0.0/0 1.1.1.1
ip route 0.0.0.0/0 2.2.2.2
!
vlan 20
name vlan20
exit
!
feature interface-vlan
inter vlan20
no shut
ip add 20.0.0.1/24
exit
!
inter et 1/7
sw mode ac
sw ac vlan 20
no shut
exit
!

----------------------------------
!
conf t
!
inter vlan 20
ip router ospf 1 area 0.0.0.0
exit
!
---------------------------------- 
conf t
!
feature pim
!
ip pim rp-address 99.99.99.99
!
inter eth 1/1, eth 1/2, eth 1/3
ip pim sparse-mode
exit
!
inter vlan 20
ip pim sparse-mode
exit
!

In s1 and s2, there are 2 kinds of loopback addresses. One is for the switch/router ID, the other is for the RP address. For loopback address for RP, I will utilize "ghost loopback address" method. Please look at the loopback interface 1 in s1 and s2.

s1 s2

conf t
!
feature pim
!
inter lo 1
ip address 99.99.99.99/32
ip router ospf 1 area 0.0.0.0
ip ospf network point
ip pim sparse-mode
no shutdown
exit
!
ip pim rp-address 99.99.99.99
!
inter eth 1/1, eth 1/2, eth 1/3
ip pim sparse-mode
exit
!

conf t
!
feature pim
!
inter lo 1
ip address 99.99.99.99/24
ip router ospf 1 area 0.0.0.0
ip ospf network point
ip pim sparse-mode
no shutdown
exit
!
ip pim rp-address 99.99.99.99
!
inter eth 1/1, eth 1/2, eth 1/3
ip pim sparse-mode
exit
!

S1 is the main RP server in normal status. However, it will be changed to s2 when S1 is failed without IP address change. Because of this, I need MSDP (Multicast Source Discovery Protocol). I will handle in later. To announce the network with subnet of loopback interface into OSPF, "Point to Point" is necesary. Now I can see the routing table on S3 and S4 switch/router.

s3# show ip route ospf-1 s4# show ip route ospf-1

1.1.1.1/32, ubest/mbest: 1/0
    *via 100.13.1.12, Eth1/2, [110/41], 3d00h, ospf-1, intra
2.2.2.2/32, ubest/mbest: 1/0
    *via 100.23.2.13, Eth1/3, [110/41], 3d00h, ospf-1, intra
4.4.4.4/32, ubest/mbest: 1/0
    *via 100.34.4.11, Eth1/1, [110/41], 3d00h, ospf-1, intra
20.0.0.0/24, ubest/mbest: 1/0
    *via 100.34.4.11, Eth1/1, [110/80], 03:33:46, ospf-1, intra
99.99.99.0/24, ubest/mbest: 1/0
    *via 100.23.2.13, Eth1/3, [110/41], 00:44:41, ospf-1, intra
99.99.99.99/32, ubest/mbest: 1/0
    *via 100.13.1.12, Eth1/2, [110/41], 00:44:41, ospf-1, intra
100.12.0.0/16, ubest/mbest: 2/0
    *via 100.13.1.12, Eth1/2, [110/80], 3d00h, ospf-1, intra
    *via 100.23.2.13, Eth1/3, [110/80], 3d00h, ospf-1, intra
100.14.0.0/16, ubest/mbest: 2/0
    *via 100.13.1.12, Eth1/2, [110/80], 3d00h, ospf-1, intra
    *via 100.34.4.11, Eth1/1, [110/80], 3d00h, ospf-1, intra
100.24.0.0/16, ubest/mbest: 2/0
    *via 100.23.2.13, Eth1/3, [110/80], 3d00h, ospf-1, intra
    *via 100.34.4.11, Eth1/1, [110/80], 3d00h, ospf-1, intra

1.1.1.1/32, ubest/mbest: 1/0
    *via 100.14.1.13, Eth1/3, [110/41], 3d00h, ospf-1, intra
2.2.2.2/32, ubest/mbest: 1/0
    *via 100.24.2.12, Eth1/2, [110/41], 3d00h, ospf-1, intra
3.3.3.3/32, ubest/mbest: 1/0
    *via 100.34.3.11, Eth1/1, [110/41], 3d00h, ospf-1, intra
10.0.0.0/24, ubest/mbest: 1/0
    *via 100.34.3.11, Eth1/1, [110/80], 03:34:26, ospf-1, intra
99.99.99.0/24, ubest/mbest: 1/0
    *via 100.24.2.12, Eth1/2, [110/41], 00:45:13, ospf-1, intra
99.99.99.99/32, ubest/mbest: 1/0
    *via 100.14.1.13, Eth1/3, [110/41], 00:45:13, ospf-1, intra
100.12.0.0/16, ubest/mbest: 2/0
    *via 100.14.1.13, Eth1/3, [110/80], 3d00h, ospf-1, intra
    *via 100.24.2.12, Eth1/2, [110/80], 3d00h, ospf-1, intra
100.13.0.0/16, ubest/mbest: 2/0
    *via 100.14.1.13, Eth1/3, [110/80], 3d00h, ospf-1, intra
    *via 100.34.3.11, Eth1/1, [110/80], 3d00h, ospf-1, intra
100.23.0.0/16, ubest/mbest: 2/0
    *via 100.24.2.12, Eth1/2, [110/80], 3d00h, ospf-1, intra
    *via 100.34.3.11, Eth1/1, [110/80], 3d00h, ospf-1, intra

In red text above, "100.100.100.100" is the RP address for multicast. At this time, the destination should be s1. It will be changed to s2 by "100.100.100.0/24", when s1 is failed.


2-2. Configure the Host (PC, Labtop) network.

 

s3 and s4 is the gateway for each host network. In my scenario, I will use "10.0.0.0/24" for PC1 and "20.0.0.0/24" for PC2.

I have already done for the gateway above.

S3

S4

!

conf t

!

inter vlan 10

ip router ospf 1 area 0.0.0.0

exit

!

inter eth 1/1, eth 1/2, eth 1/3

ip pim sparse-mode

exit

!

inter vlan 10

ip pim sparse-mode

exit

!

!

conf t

!

inter vlan 20

ip router ospf 1 area 0.0.0.0

exit

!

inter eth 1/1, eth 1/2, eth 1/3

ip pim sparse-mode

exit

!

inter vlan 20

ip pim sparse-mode

exit

!

Now I will configure the PC network interface. In my case I will use "Ubuntu Desktop". In this instruction, I can see how to install "ubuntu" in GNS3. After installation, I can open the console like below.

After login, I can set the network interface like below. I need to update file in "/etc/network/interfaces".

After set both of hosts, I can send ICMP packet each other.

 

However, there is one more thing necessary. To Join and receive the multicast packet. I need to define the IGMP version on Linux host sometimes. This instruction will be helpful.

echo "2" >> /proc/sys/net/ipv4/conf/<interface>/force_igmp_version

In my case, Host 2 and Host 3 will be receiver, therefore it will be like below

 

3. Configuraton for Multicast environment.

 

3-1. Configure for default multicast 

 

In fact, I have already done for multicast routing, if you follow sample configuration. This instruction will be helpful to understand how to configure.

S1 S2 S3 S4

conf t

!

feature pim

!

inter lo 1

ip address 99.99.99.99/32

ip router ospf 1 area 0.0.0.0

ip ospf network point

ip pim sparse-mode

no shutdown

exit

!

ip pim rp-address 99.99.99.99

!

inter eth 1/1, eth 1/2, eth 1/3

ip pim sparse-mode

exit

!

conf t

!

feature pim

!

inter lo 1

ip address 99.99.99.99/24

ip router ospf 1 area 0.0.0.0

ip ospf network point

ip pim sparse-mode

no shutdown

exit

!

ip pim rp-address 99.99.99.99

!

inter eth 1/1, eth 1/2, eth 1/3

ip pim sparse-mode

exit

!

conf t

!

feature pim

!

ip pim rp-address 99.99.99.99

!

inter eth 1/1, eth 1/2, eth 1/3

ip pim sparse-mode

exit

!

inter vlan 10

ip pim sparse-mode

exit

!

conf t

!

feature pim

!

ip pim rp-address 99.99.99.99

!

inter eth 1/1, eth 1/2, eth 1/3

ip pim sparse-mode

exit

!

inter vlan 20

ip pim sparse-mode

exit

!

Now, I can test multicast routing with sample script. I can get the result like below.

I success to send multicast traffic. However, I still leave MSDP. "99.99.99.99" is the RP which is S1. I worry the S1 fail situation. MSDP is one of good solution. Please read next step.

 

3-2. Configure for MSDP.

 

Before, I configure for MSDP. Any information was not shared each other. (S1 and S2 are peer connection for MSDP). I run command "show ip msdp route" and "show ip msdp sa-cache".

Because of this, the routing information should be registered again on S2, when S1 is failed. Now, I will follow this instruction. At first, I will MSDP configuration to share source information between s1 and s2.

In above, there is "ip msdp cache-sa-state" command for caching. However, there is no command in Nx9000v in my case. Therefore, my configuration should be below.

s1 s2

feature msdp

ip msdp originator-id loopback0

ip msdp peer 1.1.1.2 connect-source loopback0

feature msdp

ip msdp originator-id loopback0

ip msdp peer 1.1.1.1 connect-source loopback0

I can check the status with "show ip msdp summary

I can also verify the status with again "show ip msdp route" and "show ip msdp sa-cache".

In fact, I can not understand this effect.

 

3-3. Verify the MSDP effect.

 

Before MSDP configuration, I will shutodown loopback 1 (RP) of S1 switch/router. In S2 switch/router, there is no multicast source information.

After sender request, the source information is updated. This is normal case

Now, I will configure MSDP. I will shutdown loopback 1 of switch/router S1 again. In S2,

Multicast routing information is updated directly.

 

Sample Configurations

S1
0.00MB
S2
0.00MB
S3
0.00MB
S4
0.00MB
S5
0.00MB

 

Reference

 

[ 1 ] https://www.osboxes.org/ubuntu/#ubuntu-14_04-vmware

[ 2 ] https://docs.gns3.com/1RpM21DdgL2pCNtIrw6e9Yf52tRjYZIe46LMeESl-jy4/

[ 3 ] https://www.cisco.com/c/en/us/td/docs/ios/12_2/ip/configuration/guide/fipr_c/1cfmsdp.html#wp1000963

[ 4 ] https://createnetech.tistory.com/40?category=672584

[ 5 ] https://pymotw.com/2/socket/multicast.html

[ 6 ] https://sites.google.com/site/miclinuxcorner/technology/multicast-routing

[ 7 ] https://www.cisco.com/c/en/us/support/docs/ip/ip-multicast/9356-48.html#msdp

+ Recent posts