documentation:examples:multicast_with_pim-dm
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Next revision | |||
— | documentation:examples:multicast_with_pim-dm [2017/06/18 00:06] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Multicast with PIM-DM ====== | ||
+ | This lab show a multicast routing example using PIM Dense Mode. | ||
+ | |||
+ | <note warning> | ||
+ | Broken: Debug in progress | ||
+ | </ | ||
+ | ===== Presentation ===== | ||
+ | |||
+ | ==== Network diagram ==== | ||
+ | |||
+ | Here is the logical and physical view: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ===== Setting-up the lab ===== | ||
+ | |||
+ | ==== Downloading BSD Router Project images ==== | ||
+ | |||
+ | Download BSDRP serial image (prevent to have to use an X display) on Sourceforge. | ||
+ | |||
+ | ==== Download Lab scripts ===== | ||
+ | |||
+ | More information on these BSDRP lab scripts available on [[documentation: | ||
+ | |||
+ | Start the lab with 4 routers using emulated e1000 NIC (vtnet interfaces didn't support multicast-routing on FreeBSD): | ||
+ | < | ||
+ | tools/ | ||
+ | BSD Router Project (http:// | ||
+ | Setting-up a virtual lab with 4 VM(s): | ||
+ | - Working directory: /tmp/BSDRP | ||
+ | - Each VM have 1 core(s) and 256M RAM | ||
+ | - Emulated NIC: e1000 | ||
+ | - Switch mode: bridge + tap | ||
+ | - 0 LAN(s) between all VM | ||
+ | - Full mesh Ethernet links between each VM | ||
+ | VM 1 have the following NIC: | ||
+ | - em0 connected to VM 2 | ||
+ | - em1 connected to VM 3 | ||
+ | - em2 connected to VM 4 | ||
+ | VM 2 have the following NIC: | ||
+ | - em0 connected to VM 1 | ||
+ | - em1 connected to VM 3 | ||
+ | - em2 connected to VM 4 | ||
+ | VM 3 have the following NIC: | ||
+ | - em0 connected to VM 1 | ||
+ | - em1 connected to VM 2 | ||
+ | - em2 connected to VM 4 | ||
+ | VM 4 have the following NIC: | ||
+ | - em0 connected to VM 1 | ||
+ | - em1 connected to VM 2 | ||
+ | - em2 connected to VM 3 | ||
+ | For connecting to VM' | ||
+ | - VM 1 : cu -l /dev/nmdm1B | ||
+ | - VM 2 : cu -l /dev/nmdm2B | ||
+ | - VM 3 : cu -l /dev/nmdm3B | ||
+ | - VM 4 : cu -l /dev/nmdm4B | ||
+ | </ | ||
+ | |||
+ | ===== Routers configuration ===== | ||
+ | |||
+ | ==== Router 1 ==== | ||
+ | |||
+ | Configurating, | ||
+ | < | ||
+ | sysrc hostname=R1 | ||
+ | sysrc gateway_enable=no | ||
+ | sysrc ipv6_gateway_enable=no | ||
+ | sysrc ifconfig_em0=" | ||
+ | sysrc defaultrouter=" | ||
+ | hostname R1 | ||
+ | service netif restart | ||
+ | service routing restart | ||
+ | config save | ||
+ | </ | ||
+ | ==== Router 2 ==== | ||
+ | |||
+ | < | ||
+ | sysrc hostname=R2 | ||
+ | sysrc ifconfig_em0=" | ||
+ | sysrc ifconfig_em1=" | ||
+ | sysrc defaultrouter=" | ||
+ | sysrc pimdd_enable=yes | ||
+ | cp / | ||
+ | hostname R2 | ||
+ | service netif restart | ||
+ | service routing restart | ||
+ | service pimdd start | ||
+ | config save | ||
+ | </ | ||
+ | ==== Router 3 ==== | ||
+ | |||
+ | < | ||
+ | sysrc hostname=R3 | ||
+ | sysrc ifconfig_em1=" | ||
+ | sysrc ifconfig_em2=" | ||
+ | sysrc defaultrouter=" | ||
+ | sysrc pimdd_enable=yes | ||
+ | cp / | ||
+ | hostname R3 | ||
+ | service netif restart | ||
+ | service routing restart | ||
+ | service pimdd start | ||
+ | config save | ||
+ | </ | ||
+ | ==== Router 4 ==== | ||
+ | |||
+ | < | ||
+ | sysrc hostname=R4 | ||
+ | sysrc gateway_enable=NO | ||
+ | sysrc ipv6_gateway_enable=NO | ||
+ | sysrc ifconfig_em2=" | ||
+ | sysrc defaultrouter=" | ||
+ | hostname R4 | ||
+ | service netif restart | ||
+ | service routing restart | ||
+ | config save | ||
+ | </ | ||
+ | |||
+ | ===== Checking pimdd behavior ===== | ||
+ | |||
+ | ==== Generating VIF ==== | ||
+ | |||
+ | Does the pimdd had correctly generated VIF ? | ||
+ | |||
+ | < | ||
+ | [root@R2]~# netstat -g | ||
+ | |||
+ | IPv4 Virtual Interface Table | ||
+ | | ||
+ | 0 | ||
+ | 1 | ||
+ | |||
+ | IPv4 Multicast Forwarding Table is empty | ||
+ | |||
+ | |||
+ | IPv6 Multicast Interface Table is empty | ||
+ | |||
+ | IPv6 Multicast Forwarding Table is empty | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | [root@R3]~# netstat -g | ||
+ | |||
+ | IPv4 Virtual Interface Table | ||
+ | | ||
+ | 0 | ||
+ | 1 | ||
+ | |||
+ | IPv4 Multicast Forwarding Table is empty | ||
+ | |||
+ | |||
+ | IPv6 Multicast Interface Table is empty | ||
+ | |||
+ | IPv6 Multicast Forwarding Table is empty | ||
+ | </ | ||
+ | |||
+ | => There are VIF for all PIM-DM enabled interface | ||
+ | |||
+ | ==== Does PIM daemon locally register to PIM mcast group ? ==== | ||
+ | |||
+ | PIM router need to register to 224.0.0.13 mcast group, check if all PIM routers correctly display this group on their enabled interfaces: | ||
+ | |||
+ | < | ||
+ | [root@R2]~# ifmcstat | ||
+ | em0: | ||
+ | inet 10.0.12.2 | ||
+ | igmpv2 | ||
+ | group 224.0.0.2 mode exclude | ||
+ | mcast-macaddr 01: | ||
+ | group 224.0.0.13 mode exclude | ||
+ | mcast-macaddr 01: | ||
+ | inet6 fe80:: | ||
+ | mldv2 flags=2< | ||
+ | group ff01::1%em0 scopeid 0x1 mode exclude | ||
+ | mcast-macaddr 33: | ||
+ | group ff02:: | ||
+ | mcast-macaddr 33: | ||
+ | group ff02:: | ||
+ | mcast-macaddr 33: | ||
+ | group ff02::1%em0 scopeid 0x1 mode exclude | ||
+ | mcast-macaddr 33: | ||
+ | group ff02:: | ||
+ | mcast-macaddr 33: | ||
+ | inet 10.0.12.2 | ||
+ | igmpv2 | ||
+ | group 224.0.0.1 mode exclude | ||
+ | mcast-macaddr 01: | ||
+ | em1: | ||
+ | inet 10.0.23.2 | ||
+ | igmpv2 | ||
+ | group 224.0.0.2 mode exclude | ||
+ | mcast-macaddr 01: | ||
+ | group 224.0.0.13 mode exclude | ||
+ | mcast-macaddr 01: | ||
+ | inet6 fe80:: | ||
+ | mldv2 flags=2< | ||
+ | group ff01::1%em1 scopeid 0x2 mode exclude | ||
+ | mcast-macaddr 33: | ||
+ | group ff02:: | ||
+ | mcast-macaddr 33: | ||
+ | group ff02:: | ||
+ | mcast-macaddr 33: | ||
+ | group ff02::1%em1 scopeid 0x2 mode exclude | ||
+ | mcast-macaddr 33: | ||
+ | group ff02:: | ||
+ | mcast-macaddr 33: | ||
+ | inet 10.0.23.2 | ||
+ | igmpv2 | ||
+ | group 224.0.0.1 mode exclude | ||
+ | mcast-macaddr 01: | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | [root@R3]~# ifmcstat | ||
+ | em1: | ||
+ | inet 10.0.23.3 | ||
+ | igmpv2 | ||
+ | group 224.0.0.2 mode exclude | ||
+ | mcast-macaddr 01: | ||
+ | group 224.0.0.13 mode exclude | ||
+ | mcast-macaddr 01: | ||
+ | inet6 fe80:: | ||
+ | mldv2 flags=2< | ||
+ | group ff01::1%em1 scopeid 0x2 mode exclude | ||
+ | mcast-macaddr 33: | ||
+ | group ff02:: | ||
+ | mcast-macaddr 33: | ||
+ | group ff02:: | ||
+ | mcast-macaddr 33: | ||
+ | group ff02::1%em1 scopeid 0x2 mode exclude | ||
+ | mcast-macaddr 33: | ||
+ | group ff02:: | ||
+ | mcast-macaddr 33: | ||
+ | inet 10.0.23.3 | ||
+ | igmpv2 | ||
+ | group 224.0.0.1 mode exclude | ||
+ | mcast-macaddr 01: | ||
+ | em2: | ||
+ | inet 10.0.34.3 | ||
+ | igmpv2 | ||
+ | group 224.0.0.2 mode exclude | ||
+ | mcast-macaddr 01: | ||
+ | group 224.0.0.13 mode exclude | ||
+ | mcast-macaddr 01: | ||
+ | inet6 fe80:: | ||
+ | mldv2 flags=2< | ||
+ | group ff01::1%em2 scopeid 0x3 mode exclude | ||
+ | mcast-macaddr 33: | ||
+ | group ff02:: | ||
+ | mcast-macaddr 33: | ||
+ | group ff02:: | ||
+ | mcast-macaddr 33: | ||
+ | group ff02::1%em2 scopeid 0x3 mode exclude | ||
+ | mcast-macaddr 33: | ||
+ | group ff02:: | ||
+ | mcast-macaddr 33: | ||
+ | inet 10.0.34.3 | ||
+ | igmpv2 | ||
+ | group 224.0.0.1 mode exclude | ||
+ | mcast-macaddr 01: | ||
+ | </ | ||
+ | |||
+ | We correctly sees mcast group 224.0.0.13 subscribed on PIM enabled interfaces. | ||
+ | |||
+ | ===== Testing ===== | ||
+ | |||
+ | ==== Enable IPerf server on R4 (mcast receiver) ==== | ||
+ | |||
+ | This IPerf server will listen the 239.1.1.1 multicast group | ||
+ | < | ||
+ | [root@R4]~# iperf -s -u -B 239.1.1.1 -i 1 | ||
+ | ------------------------------------------------------------ | ||
+ | Server listening on UDP port 5001 | ||
+ | Binding to local address 239.1.1.1 | ||
+ | Joining multicast group 239.1.1.1 | ||
+ | Receiving 1470 byte datagrams | ||
+ | UDP buffer size: 41.1 KByte (default) | ||
+ | ------------------------------------------------------------ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ==== IPerf client on R1 (mcast sender) ==== | ||
+ | |||
+ | Start an iperf client to 239.1.1.1. | ||
+ | |||
+ | < | ||
+ | [root@R1]~# iperf -c 239.1.1.1 -u -T 32 -t 300 -i 1 | ||
+ | ------------------------------------------------------------ | ||
+ | Client connecting to 239.1.1.1, UDP port 5001 | ||
+ | Sending 1470 byte datagrams | ||
+ | Setting multicast TTL to 32 | ||
+ | UDP buffer size: 9.00 KByte (default) | ||
+ | ------------------------------------------------------------ | ||
+ | [ 3] local 10.0.12.1 port 34390 connected with 239.1.1.1 port 5001 | ||
+ | [ ID] Interval | ||
+ | [ 3] 0.0- 1.0 sec 128 KBytes | ||
+ | [ 3] 1.0- 2.0 sec 128 KBytes | ||
+ | [ 3] 2.0- 3.0 sec 128 KBytes | ||
+ | [ 3] 0.0- 3.0 sec 385 KBytes | ||
+ | [ 3] Sent 268 datagrams | ||
+ | </ | ||
+ | |||
+ | Now check than R4 receive the iperf trafic send by R1: | ||
+ | |||
+ | < | ||
+ | Nothing !? | ||
+ | </ | ||
+ | |||
+ | ==== Troubleshooting ==== | ||
+ | |||
+ | === Multicast table on R2 === | ||
+ | |||
+ | What's the status of multicast table of the first router: | ||
+ | < | ||
+ | [root@router]~# | ||
+ | |||
+ | IPv4 Virtual Interface Table | ||
+ | | ||
+ | 0 | ||
+ | 1 | ||
+ | |||
+ | IPv4 Multicast Forwarding Table | ||
+ | | ||
+ | | ||
+ | |||
+ | |||
+ | IPv6 Multicast Interface Table is empty | ||
+ | |||
+ | IPv6 Multicast Forwarding Table is empty | ||
+ | </ | ||
+ | |||
+ | => it correctly detect a multicast source comming from VIF 0 (em0) but didn't forward packet toward R3: Why ? | ||
+ | |||
+ | === Using R3 as a subscriber === | ||
+ | |||
+ | Starting an iperf receiver on R3 and check if it received mcast traffic by re-starting ipferf on R1. | ||
+ | |||
+ | Status of mcast routing table on R2: | ||
+ | |||
+ | < | ||
+ | [root@R2]~# netstat -g | ||
+ | |||
+ | IPv4 Virtual Interface Table | ||
+ | | ||
+ | 0 | ||
+ | 1 | ||
+ | |||
+ | IPv4 Multicast Forwarding Table | ||
+ | | ||
+ | | ||
+ | |||
+ | |||
+ | IPv6 Multicast Interface Table is empty | ||
+ | |||
+ | IPv6 Multicast Forwarding Table is empty | ||
+ | </ | ||
+ | |||
+ | => R2 correctly received AND forward mcast traffic from VIF0 (em0) to VIF1 (em1) | ||
+ | |||
+ | and R3 correctly receive mcast traffic: | ||
+ | < | ||
+ | ------------------------------------------------------------ | ||
+ | [ 3] local 239.1.1.1 port 5001 connected with 10.0.12.1 port 11166 | ||
+ | [ ID] Interval | ||
+ | [ 3] 0.0- 1.0 sec 128 KBytes | ||
+ | [ 3] 1.0- 2.0 sec 128 KBytes | ||
+ | [ 3] 2.0- 3.0 sec 128 KBytes | ||
+ | [ 3] 3.0- 4.0 sec 128 KBytes | ||
+ | [ 3] 4.0- 5.0 sec 128 KBytes | ||
+ | [ 3] 5.0- 6.0 sec 128 KBytes | ||
+ | [ 3] 6.0- 7.0 sec 129 KBytes | ||
+ | [ 3] 7.0- 8.0 sec 128 KBytes | ||
+ | </ | ||
+ | |||
+ | => Need to found why R2 didn't forward traffic to a next-hop-PIM router. | ||
+ | |||
+ | To dig, error on R2 pimd daemon: | ||
+ | < | ||
+ | Jun 7 09:22:48 router pimdd[1483]: | ||
+ | Jun 7 09:22:48 router pimdd[1483]: | ||
+ | Jun 7 09:23:07 router pimdd[1483]: | ||
+ | Jun 7 09:23:07 router pimdd[1483]: | ||
+ | Jun 7 09:23:17 router pimdd[1483]: | ||
+ | Jun 7 09:23:17 router pimdd[1483]: | ||
+ | </ | ||
+ | |||
+ | This problem is linked to the [[https:// |
documentation/examples/multicast_with_pim-dm.txt · Last modified: 2019/11/06 09:20 by olivier