本文共 8204 字,大约阅读时间需要 27 分钟。
要求:1. R1,R2,R3配置ospf 并把所有接口加入到area 0 2.配置R1为rp,配置R2为映射代理,把R3加入239.3.3.3组 步骤一:在每个路由器上配置1个loopback 口,并 配置三台路由器接口使其连通。 R1(config)# interface Loopback0 R1(config-if)# ip address 30.1.1.1 255.255.255.0 R1(config)# interface Serial0 R1(config-if)# ip address 10.1.1.1 255.255.255.0 R1(config-if)# clockrate 64000 R1(config-if)#no shutdown R2(config)#interface Loopback0 R2(config-if)# ip address 40.1.1.1 255.255.255.0 R2(config)#interface Serial0 R2(config-if)# ip address 20.1.1.1 255.255.255.0 R2(config-if)#clockrate 64000 R2(config-if)#no shutdown R2(config)#interface Serial1 R2(config-if)# ip address 10.1.1.2 255.255.255.0 R2(config-if)#no shutdown R3(config)#interface Loopback0 R3(config-if)# ip address 50.1.1.1 255.255.255.0 R3(config)#interface Serial1 R3(config-if)# ip address 20.1.1.2 255.255.255.0 R3(config-if)#no shutdown R1(config-router)# network 10.1.1.0 0.0.0.255 area 0 R1(config-router)# network 30.1.1.0 0.0.0.255 area 0 R2(config-router)#network 10.1.1.0 0.0.0.255 area 0 R2(config-router)# network 20.1.1.0 0.0.0.255 area 0 R2(config-router)# network 40.1.1.0 0.0.0.255 area 0 R3(config-router)# network 20.1.1.0 0.0.0.255 area 0 R3(config-router)# network 50.1.1.0 0.0.0.255 area 0 步骤三:配置R1为rp,配置R2为映射代理,把R3加入239.3.3.3组 R1(config)#ip multicast-routing à启用多播协议 R1(config)# interface Loopback0 R1(config-if)# ip pim sparse-mode à接口PIM模式为稀疏 R1(config)# interface Serial0 R1(config-if)# ip pim sparse-mode R1(config)# ip pim send-rp-announce Loopback0 scope 5 à指定R1为RP R2(config)#ip multicast-routing R2(config)# interface Loopback0 R2(config-if)# ip pim sparse-mode R2(config)# interface Serial0 R2(config-if)# ip pim sparse-mode R2(config)# interface Serial1 R2(config-if)# ip pim sparse-mode R2(config)# ip pim send-rp-discovery Loopback0 scope 5 à将R2指定为映射代理 R3(config)#ip multicast-routing R3(config)# interface Loopback0 R3(config-if)# ip pim sparse-mode R3(config-if)# ip igmp join-group 239.3.3.3 à将此接口加入到组239.3.3.3 R3(config)# interface Serial1 R3(config-if)# ip pim sparse-mode R1#sh ip mroute 239.3.3.3 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 Y - Joined MDT-data group, y - Sending to MDT-data group Outgoing interface flags: H - Hardware switched Interface state: Interface, Next-Hop or VCD, State/Mode (*, 239.3.3.3), 00:37:56/stopped, RP 30.1.1.1, flags: S Incoming interface: Null, RPF nbr 0.0.0.0 Serial0, Forward/Sparse, 00:37:56/00:03:07 (10.1.1.1, 239.3.3.3), 00:00:04/00:02:56, flags: P à学来对端的基于源的多播路由 Incoming interface: Serial0, RPF nbr 0.0.0.0 Outgoing interface list: Null (30.1.1.1, 239.3.3.3), 00:00:04/00:03:28, flags: T Incoming interface: Loopback0, RPF nbr 0.0.0.0 Serial0, Forward/Sparse, 00:00:05/00:03:24 (50.1.1.1, 239.3.3.3), 00:00:12/00:03:17, flags: PX Incoming interface: Serial0, RPF nbr 10.1.1.2 Outgoing interface list: Null R2#sh ip mroute 239.3.3.3 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 Y - Joined MDT-data group, y - Sending to MDT-data group Outgoing interface flags: H - Hardware switched Interface state: Interface, Next-Hop or VCD, State/Mode (*, 239.3.3.3), 00:43:06/stopped, RP 30.1.1.1, flags: SF Incoming interface: Serial1, RPF nbr 10.1.1.1 Serial0, Forward/Sparse, 00:42:48/00:03:02 (20.1.1.1, 239.3.3.3), 00:00:22/00:03:07, flags: T Incoming interface: Serial0, RPF nbr 0.0.0.0, Registering Serial1, Forward/Sparse, 00:00:22/00:03:07 (40.1.1.1, 239.3.3.3), 00:00:23/00:03:08, flags: FT Incoming interface: Loopback0, RPF nbr 0.0.0.0, Registering Serial0, Forward/Sparse, 00:00:24/00:03:06 (50.1.1.1, 239.3.3.3), 00:01:39/00:01:53, flags: Incoming interface: Serial0, RPF nbr 20.1.1.2 Serial1, Forward/Sparse, 00:01:39/00:01:53 R3#sh ip mroute 239.3.3.3 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 Y - Joined MDT-data group, y - Sending to MDT-data group Outgoing interface flags: H - Hardware switched Interface state: Interface, Next-Hop or VCD, State/Mode (*, 239.3.3.3), 00:46:06/stopped, RP 30.1.1.1, flags: SJCLF Incoming interface: Serial1, RPF nbr 20.1.1.1 Loopback0, Forward/Sparse, 00:46:06/00:02:27 (50.1.1.1, 239.3.3.3), 00:03:54/00:03:06, flags: LFT Incoming interface: Loopback0, RPF nbr 0.0.0.0, Registering Serial1, Forward/Sparse, 00:00:32/00:02:58 Address Interface Ver/ Nbr Query DR DR 10.1.1.1 Serial0 v2/S 1 30 1 0.0.0.0 Address Interface Ver/ Nbr Query DR DR 30.1.1.1 Loopback0 v2/S 0 30 1 30.1.1.1 Address Interface Ver/ Nbr Query DR DR 20.1.1.1 Serial0 v2/S 1 30 1 0.0.0.0 Address Interface Ver/ Nbr Query DR DR 10.1.1.2 Serial1 v2/S 1 30 1 0.0.0.0 Address Interface Ver/ Nbr Query DR DR 40.1.1.1 Loopback0 v2/S 0 30 1 40.1.1.1 Address Interface Ver/ Nbr Query DR DR 20.1.1.2 Serial1 v2/S 1 30 1 0.0.0.0 Address Interface Ver/ Nbr Query DR DR 50.1.1.1 Loopback0 v2/S 0 30 1 50.1.1.1 Neighbor Interface Uptime/Expires Ver DR 10.1.1.2 Serial0 01:59:55/00:01:38 v2 1 / S Neighbor Interface Uptime/Expires Ver DR 20.1.1.2 Serial0 02:00:36/00:01:17 v2 1 / S 10.1.1.1 Serial1 02:03:04/00:01:21 v2 1 / S Neighbor Interface Uptime/Expires Ver DR 20.1.1.1 Serial1 02:03:21/00:01:35 v2 1 / S This system is an RP (Auto-RP) Info source: 40.1.1.1 (?), elected via Auto-RP Uptime: 00:43:36, expires: 00:02:59 This system is an RP-mapping agent (Loopback0) Info source: 30.1.1.1 (?), elected via Auto-RP Uptime: 00:48:13, expires: 00:02:44 Info source: 40.1.1.1 (?), elected via Auto-RP Uptime: 00:50:26, expires: 00:02:03 Type escape sequence to abort. Sending 1, 100-byte ICMP Echos to 239.3.3.3, timeout is 2 seconds: Reply to request 0 from 20.1.1.2, 80 ms à此显示为已通 Reply to request 0 from 20.1.1.2, 112 ms Type escape sequence to abort. Sending 1, 100-byte ICMP Echos to 239.3.3.3, timeout is 2 seconds: Reply to request 0 from 20.1.1.2, 56 ms Reply to request 0 from 20.1.1.2, 136 ms Reply to request 0 from 20.1.1.2, 80 ms Type escape sequence to abort. Sending 1, 100-byte ICMP Echos to 239.3.3.3, timeout is 2 seconds: Reply to request 0 from 50.1.1.1, 8 ms 本文转自hexianguo 51CTO博客,原文链接: http://blog.51cto.com/xghe110/88948 ,如需转载请自行联系原作者