您的位置:首页 > 其它

组播Multicast 5 RP冗余和MSDP

2016-07-08 19:38 302 查看
session 1 RP冗余

MSDP:组播源发现协议

       组播源发现协议(MSDP)描述了一种连接多 PIM-SM(PIM-SM
: PIM Sparse Mode) 域的机制。每种 PIM-SM 域都使用自己独立的 RP ,它并不依赖于其它域内的 RP 。也就是组播域间的通信协议,让不同组播域之间的RP建立通信。

 

一、利用MSDP让相同域的多个RP做冗余

       组播域内只能有一个RP,因为每个共享树内都只能有且只有一个RP(逻辑上)。默认情况下spares-mode模式中不同共享树之间的RP不能通信,所以不同共享树之间的源与客户端也就不能通信。所以在同一个共享树中要想有多个RP做冗余就需要使用MSDP让(不同共享树)RP之间相互通信。



       拓扑中组播域内有2个RP,分别为R2与R3的loopback0接口,其中两个RP相互做冗余。在不使用MSDP的情况下,R2-source-recevie1形成一颗共享树,树根为R2,R3-receive2形成一颗共享树,树根为R3。定义了source在R2的共享树上(其实就是始发流量,这里我们ping的始发流量定义为了source),那么这里就有两颗共享树,所以第一个共享树中的源的流量是无法发送到第二课共享树中的recevie2客户端上的。

整体配置如下:

1、底层配置,使用eigrp协议做底层的unicast路由

R1#show run | s eigrp

router eigrp 1

 network 12.1.1.0 0.0.0.255

 network 13.1.1.0 0.0.0.255

 no auto-summary

R1#

 

R2#show run | s eigrp

router eigrp 1

 network 2.2.2.2 0.0.0.0                            loop1口ip用作MSDP源地址(后面有)

 network 12.1.1.0 0.0.0.255

 network 13.1.1.0 0.0.0.255

 network 100.1.1.1 0.0.0.0                        loop0口ip用作RP地址

 network 192.168.1.0

 network 192.168.2.0

 no auto-summary

R2#

 

R3#show run | s eigrp

router eigrp 1

 network 3.3.3.3 0.0.0.0                             loop1口ip用作MSDP源地址(后面有)

 network 13.1.1.0 0.0.0.255

 network 100.1.1.1 0.0.0.0                         loop0口ip用作RP地址

 network 192.168.3.0

 no auto-summary

R3#

 

source(config)#no ip routing

source(config)#ip default-gateway 192.168.2.1

 

receive1(config)#no ip routing
receive1(config)#ip default-gateway 192.168.1.1

 

receive1(config)#no ip routing
receive1(config)#ip default-gateway 192.168.3.1

 

2、R1、R2、R3启用PIM的spares-mode共享树模式,RP地址为100.1.1.1(R2、R3形成冗余都使用loop0口ip:100.1.1.1作为RP)

R1#show run interface s0/0

Building configuration...

Current configuration : 102 bytes

!

interface Serial0/0

 ip address 12.1.1.1 255.255.255.0

 ip pim sparse-mode

 clock rate 2000000

end

R1#

R1#show run interface s0/1

Building configuration...

Current configuration : 102 bytes

!

interface Serial0/1

 ip address 13.1.1.1 255.255.255.0

 ip pim sparse-mode

 clock rate 2000000

end

R1#

 

R2#show run interface s0/0

Building configuration...

Current configuration : 102 bytes

!

interface Serial0/0

 ip address 12.1.1.2 255.255.255.0

 ip pim sparse-mode

 clock rate 2000000

end

R2#show run interface f0/0

Building configuration...

Current configuration : 116 bytes

!

interface FastEthernet0/0

 ip address 192.168.1.1 255.255.255.0

 ip pim sparse-mode

 duplex auto

 speed auto

end

R2#show run interface f0/1

Building configuration...

Current configuration : 116 bytes

!

interface FastEthernet0/1

 ip address 192.168.2.1 255.255.255.0

 ip pim sparse-mode

 duplex auto

 speed auto

end

R2#

 

R3#show run interface s0/1

Building configuration...

Current configuration : 102 bytes

!

interface Serial0/1

 ip address 13.1.1.3 255.255.255.0

 ip pim sparse-mode

 clock rate 2000000

end

R3#show run interface f0/0

Building configuration...

Current configuration : 116 bytes

!

interface FastEthernet0/0

 ip address 192.168.3.1 255.255.255.0

 ip pim sparse-mode

 duplex auto

 speed auto

end

R3#

       使用静态RP指定R2、R3的loopback0接口ip为RP,并且相互形成冗余。R2、R3的loop0接口ip都为100.1.1.1,因为一个组播域内只能指定一个RP地址,至于选择哪个共享树的RP来做根,由R1选择。相当有一个组播域内在没有使用MSDP的冗余RP环境内会让RP形成不同的共享树从而隔离组播流量。

R2#show run interface loopback 0

Building configuration...

Current configuration : 65 bytes

!

interface Loopback0

 ip address 100.1.1.1 255.255.255.255

end

R2(config)# ip pim rp-address 100.1.1.1 

 

R3#show run interface loopback 0

Building configuration...

Current configuration : 65 bytes

!

interface Loopback0

 ip address 100.1.1.1 255.255.255.255

end

R3(config)#ip pim rp-address 100.1.1.1

 

R1#show ip route eigrp

     2.0.0.0/32 is subnetted, 1 subnets

D       2.2.2.2 [90/2297856] via 12.1.1.2, 01:25:32, Serial0/0

     100.0.0.0/32 is subnetted, 1 subnets
D       100.1.1.1 [90/2297856] via 13.1.1.3, 02:42:35, Serial0/1

                         [90/2297856] via 12.1.1.2, 02:42:35, Serial0/0        在R1上已经形成了到达2个RP的负载均衡

     3.0.0.0/32 is subnetted, 1 subnets

D       3.3.3.3 [90/2297856] via 13.1.1.3, 01:25:16, Serial0/1

D    192.168.1.0/24 [90/2195456] via 12.1.1.2, 02:49:13, Serial0/0

D    192.168.2.0/24 [90/2195456] via 12.1.1.2, 02:49:11, Serial0/0

D    192.168.3.0/24 [90/2195456] via 13.1.1.3, 02:49:46, Serial0/1

R1#

这时2颗PIM的spares-mode的共享树已经形成,但是由于2个RP之间没有形成冗余,还是相当于两颗共享树,那么此时source的流量只有同一颗共享树内的receive1可以收到,另外一颗共享树内的receive2不能接收到source的流量的,因为receive2与source不在同一颗共享树内。

source#ping 224.1.1.1

Type escape sequence to abort.

Sending 1, 100-byte ICMP Echos to 224.1.1.1, timeout is 2 seconds:

Reply to request 0 from 192.168.1.2, 40 ms              只有receive1可以收到source的组播ping流量

R2#show ip pim rp

Group: 224.1.1.1, RP: 100.1.1.1, uptime 00:18:45, expires never

Group: 224.0.1.40, RP: 100.1.1.1, uptime 00:18:45, expires never

R2#

R3#show ip pim rp

Group: 224.1.1.1, RP: 100.1.1.1, uptime 00:19:09, expires never

Group: 224.0.1.40, RP: 100.1.1.1, uptime 00:19:09, expires never

R3#

source#

R1#show ip pim rp

Group: 224.0.1.40, RP: 100.1.1.1, uptime 00:04:36, expires never

R1#

3、在RP之间使用MSDP协议让不同共享树RP之间冗余

R2(config)#interface loopback 1

R2(config-if)#ip address 2.2.2.2 255.255.255.255

R2(config-if)#exit

R2(config)#ip msdp peer 3.3.3.3 connect-source loopback 1          使用msdp与R3建立RP对等体,指定使用loopback1接口ip发起tcp连接(类似于BGP的对等体tcp连接)与R3形成RP冗余

R2(config-if)#exit

 

R3(config)#interface loopback 1

R3(config-if)#ip address 3.3.3.3 255.255.255.255
R3(config-if)#exit
R3(config)#ip msdp peer 2.2.2.2 connect-source loopback 1          使用msdp与R2建立RP对等体,指定使用loopback1接口ip发起tcp连接(如果不用connect-source loopback 1来指定loop1接口的ip来发送tcp的话就需要使用ip msdp originator-id loopback 1来指定tcp发送源接口ip)     

R3(config-if)#exit

 

共享树之间的RP对等体已经建立完成,这时可以让receive2通过对等体RP实现与不同共享树中的source进行组播流量的通信:

source#ping 224.1.1.1

Type escape sequence to abort.

Sending 1, 100-byte ICMP Echos to 224.1.1.1, timeout is 2 seconds:

Reply to request 0 from 192.168.3.2, 36 ms                      source已经可以收到receive2的组播流量

Reply to request 0 from 192.168.1.2, 40 ms

source#

 

在R3与R2两个RP都可以看到(S G)表项

R3#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

(*, 224.1.1.1), 04:15:34/stopped, RP 100.1.1.1, flags: SJC

  Incoming interface: Null, RPF nbr 0.0.0.0

  Outgoing interface list:

    FastEthernet0/0, Forward/Sparse, 04:15:34/00:02:31

(192.168.2.2, 224.1.1.1), 00:00:59/00:02:00, flags: M

  Incoming interface: Serial0/1, RPF nbr 13.1.1.1

  Outgoing interface list:

    FastEthernet0/0, Forward/Sparse, 00:00:59/00:02:31

(*, 224.0.1.40), 01:36:34/00:02:50, RP 100.1.1.1, flags: SJCL

  Incoming interface: Null, RPF nbr 0.0.0.0

  Outgoing interface list:

    Serial0/1, Forward/Sparse, 00:56:27/00:02:50

R3#

 

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

(*, 224.1.1.1), 04:16:36/stopped, RP 100.1.1.1, flags: SJC

  Incoming interface: Null, RPF nbr 0.0.0.0

  Outgoing interface list:

    FastEthernet0/0, Forward/Sparse, 04:16:21/00:02:57

(192.168.2.2, 224.1.1.1), 00:01:34/00:02:05, flags: TA

  Incoming interface: FastEthernet0/1, RPF nbr 0.0.0.0

  Outgoing interface list:

    Serial0/0, Forward/Sparse, 00:01:34/00:02:55

    FastEthernet0/0, Forward/Sparse, 00:01:36/00:02:55

(*, 224.0.1.40), 01:37:19/stopped, RP 100.1.1.1, flags: SJCL

  Incoming interface: Null, RPF nbr 0.0.0.0

  Outgoing interface list:

    Serial0/0, Forward/Sparse, 00:57:22/00:00:09

R2#

 

冗余检测:R2上将RP接口down,再看source是否能和receive2组播通信

R2#show run interface loopback 0

Building configuration...

Current configuration : 75 bytes

!

interface Loopback0

 ip address 100.1.1.1 255.255.255.255

 shutdown

end

R2#

 

R1#show ip route eigrp

     2.0.0.0/32 is subnetted, 1 subnets

D       2.2.2.2 [90/2297856] via 12.1.1.2, 03:05:22, Serial0/0
     100.0.0.0/32 is subnetted, 1 subnets

D       100.1.1.1 [90/2297856] via 13.1.1.3, 00:06:00, Serial0/1              R2的loopback0已经被shutdown,R1上已经没有去往R2的loopback0的路由了,只有通过13.1.1.3去往R3的loop0的路由了

     3.0.0.0/32 is subnetted, 1 subnets

D       3.3.3.3 [90/2297856] via 13.1.1.3, 03:05:06, Serial0/1

D    192.168.1.0/24 [90/2195456] via 12.1.1.2, 04:29:03, Serial0/0

D    192.168.2.0/24 [90/2195456] via 12.1.1.2, 04:29:01, Serial0/0

D    192.168.3.0/24 [90/2195456] via 13.1.1.3, 04:29:36, Serial0/1

R1#

 

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

(*, 224.0.1.40), 00:00:02/00:02:57, RP 100.1.1.1, flags: SJPCL

  Incoming interface: Serial0/0, RPF nbr 12.1.1.1

  Outgoing interface list: Null

R2#

R2的组播路由表也清空,现在用source发组播ping到224.1.1.1检测receive2是否可以回应组播流量

source#ping 224.1.1.1

Type escape sequence to abort.

Sending 1, 100-byte ICMP Echos to 224.1.1.1, timeout is 2 seconds:

Reply to request 0 from 192.168.3.2, 24 ms                       依然可以收到receive2的组播回应,形成RP冗余

Reply to request 0 from 192.168.1.2, 28 ms

source#

 

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

(*, 224.1.1.1), 00:01:09/stopped, RP 100.1.1.1, flags: SJCF

  Incoming interface: Serial0/0, RPF nbr 12.1.1.1

  Outgoing interface list:

    FastEthernet0/0, Forward/Sparse, 00:01:09/00:02:20

(192.168.2.2, 224.1.1.1), 00:01:09/00:03:21, flags: FT

  Incoming interface: FastEthernet0/1, RPF nbr 0.0.0.0, Registering

  Outgoing interface list:

    Serial0/0, Forward/Sparse, 00:01:09/00:03:17, A

    FastEthernet0/0, Forward/Sparse, 00:01:10/00:02:18

(*, 224.0.1.40), 00:01:15/00:01:44, RP 100.1.1.1, flags: SJPCL

  Incoming interface: Serial0/0, RPF nbr 12.1.1.1

  Outgoing interface list: Null

R2#

 

session 2 使用MSDP协议实现域间组播

MSDP:组播源发现协议

       组播源发现协议(MSDP)描述了一种连接多 PIM-SM(PIM-SM
: PIM Sparse Mode) 域的机制。每种 PIM-SM 域都使用自己独立的 RP ,它并不依赖于其它域内的 RP 。也就是组播域间的通信协议,让不同组播域之间的RP建立通信。

在两个BGPAS之间通过MSDP实现组播流量的传递。



 左边BGP区域AS为123,右边BGP区域AS为456,两边组播pim的RP分别是R2与R5,通过MSDP让source与receive组播通信。

 配置如下:

source#show run int s0/0

Building configuration...

Current configuration : 134 bytes

!

interface Serial0/0

 ip address 192.168.1.2 255.255.255.0

 no ip route-cache

 ip igmp join-group 224.1.1.1

 clock rate 2000000

end

source#

source(config)#no ip routing

source(config)#ip default-gateway 192.168.1.1

 

 

R2-RP1#show run int s0/0

Building configuration...

Current configuration : 105 bytes

!

interface Serial0/0

 ip address 192.168.1.1 255.255.255.0

 ip pim sparse-mode

 clock rate 2000000

end

R2-RP1#show run int s0/1

Building configuration...

Current configuration : 102 bytes

!

interface Serial0/1

 ip address 23.1.1.2 255.255.255.0

 ip pim sparse-mode

 clock rate 2000000

end

R2-RP1#show run interface lo0

Building configuration...

Current configuration : 63 bytes

!

interface Loopback0

 ip address 2.2.2.2 255.255.255.255

end

R2-RP1#

R2-RP1#show run | s bgp 

router bgp 123

 no synchronization

 bgp log-neighbor-changes

 network 2.2.2.2 mask 255.255.255.255

 network 23.1.1.0 mask 255.255.255.0

 network 192.168.1.0

 neighbor 23.1.1.3 remote-as 123

 no auto-summary

R2-RP1#

R2-RP1(config)#ip pim rp-address 2.2.2.2

R2-RP1(config)#ip msdp peer 5.5.5.5 connect-source Loopback0

 

R3#show run int s0/1

Building configuration...

Current configuration : 102 bytes

!

interface Serial0/1

 ip address 23.1.1.3 255.255.255.0

 ip pim sparse-mode

 clock rate 2000000

end

R3#show run int s0/2

Building configuration...

Current configuration : 102 bytes

!

interface Serial0/2

 ip address 34.1.1.3 255.255.255.0

 ip pim sparse-mode

 clock rate 2000000

end

R3#
R3#show run | s bgp
router bgp 123
 no
synchronization
 bgp
log-neighbor-changes
 network
23.1.1.0 mask 255.255.255.0
 network
34.1.1.0 mask 255.255.255.0
 neighbor
23.1.1.2 remote-as 123
 neighbor
34.1.1.4 remote-as 456
 no
auto-summary
R3#

 

R4#show run int s0/2

Building configuration...

Current configuration : 102 bytes

!

interface Serial0/2

 ip address 34.1.1.4 255.255.255.0

 ip pim sparse-mode

 clock rate 2000000

end

R4#show run int s0/0

Building configuration...

Current configuration : 102 bytes

!

interface Serial0/0

 ip address 45.1.1.4 255.255.255.0

 ip pim sparse-mode

 clock rate 2000000

end

R4#

R4#show run | s bgp

router bgp 456

 no synchronization

 bgp log-neighbor-changes

 network 34.1.1.0 mask 255.255.255.0

 network 45.1.1.0 mask 255.255.255.0

 neighbor 34.1.1.3 remote-as 123

 neighbor 45.1.1.5 remote-as 456

 no auto-summary

R4#

 

R5-RP2#show run interface s0/0

Building configuration...

Current configuration : 102 bytes

!

interface Serial0/0

 ip address 45.1.1.5 255.255.255.0

 ip pim sparse-mode

 clock rate 2000000

end

R5-RP2#show run interface s0/1

Building configuration...

Current configuration : 104 bytes

!

interface Serial0/1

 ip address 172.16.1.1 255.255.255.0

 ip pim sparse-mode

 clock rate 2000000

end

R5-RP2#show run interface lo0

Building configuration...

Current configuration : 63 bytes

!

interface Loopback0

 ip address 5.5.5.5 255.255.255.255

end

R5-RP2#

R5-RP2#show run | s bgp

router bgp 456

 no synchronization

 bgp log-neighbor-changes

 network 5.5.5.5 mask 255.255.255.255

 network 45.1.1.0 mask 255.255.255.0

 network 172.16.1.0 mask 255.255.255.0

 neighbor 45.1.1.4 remote-as 456

 no auto-summary

R5-RP2#

R5-RP2(config)#ip pim rp-address 5.5.5.5

R5-RP2(config)#ip msdp peer 2.2.2.2 connect-source loopback 0

 

 receive#show run interface s0/1

Building configuration...

Current configuration : 133 bytes

!

interface Serial0/1

 ip address 172.16.1.2 255.255.255.0

 no ip route-cache

 ip igmp join-group 224.1.1.1

 clock rate 2000000

end

receive#

 

source#ping 224.1.1.1

Type escape sequence to abort.

Sending 1, 100-byte ICMP Echos to 224.1.1.1, timeout is 2 seconds:

Reply to request 0 from 172.16.1.2, 12 ms

source#

 

R5-RP2#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

(*, 224.1.1.1), 09:22:38/stopped, RP 5.5.5.5, flags: SJC

  Incoming interface: Null, RPF nbr 0.0.0.0

  Outgoing interface list:

    Serial0/1, Forward/Sparse, 09:22:38/00:02:10

(192.168.1.2, 224.1.1.1), 00:00:55/00:02:04, flags: M

  Incoming interface: Serial0/0, RPF nbr 45.1.1.4

  Outgoing interface list:

    Serial0/1, Forward/Sparse, 00:00:55/00:02:10

(*, 224.0.1.40), 09:22:46/00:02:33, RP 5.5.5.5, flags: SJCL

  Incoming interface: Null, RPF nbr 0.0.0.0

  Outgoing interface list:

    Serial0/0, Forward/Sparse, 09:22:46/00:02:33

R5-RP2#
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: