Thursday, December 11, 2014

Multicast - BGP and MSDP

Overview

BGP has capabilities extensions to allow the distribution of multicast routing information between BGP speakers. This capability coupled with MSDP allows receivers in one AS to join and receive multicast traffic from sources in another AS.

Concepts tested
  • Basic BGP configuration
  • BGP Multicast address family configuration
  • BSR border configuration
  • MSDP peering configuration
  • Cross AS multicast traffic design and configuratino
  • Verification of configuration
Topology







Lab Tasks
  • Configure R1, R2, and R3 as a separate PIM SM domain with R1 as the BSR RP and agent
  • Configure R6, R5, and R4 as a seperate PIM SM domain with R6 as the BSR RP and agent
  • Establish eBGP peering between R2 and R4 and between R3 and R5 respectively.
  • Ensure multicast routes are exchanged via BGP
  • Multicast traffic should prefer using the path between R3 and R5 when sourced from AS 100
  • Ensure that PIM BSR messages are stopped at the ingress/egress of R2 and R3 between AS's
  • Establish an MSDP connection between the two autonomous systems using R1 and R6 as peering endpoints using their loopbacks as source interfaces.
  • Test that AS 200 multicast receivers can join and receive multicast traffic from AS 100 sources
GNS3 v1.1.2 configuration file, requires IOS v15 for the 7200 router: Link


Solution

R1(config)#ip multicast-routing
R1(config)#int loopback 0
R1(config-if)#ip pim sparse-mode
R1(config-if)#exit
R1(config)#ip pim bsr-candidate loopback 0
R1(config)#ip pim rp-candidate loopback 0
R1(config)#int g0/0
R1(config-if)#ip pim sparse-mode
R1(config-if)#exit
R1(config)#int g1/0
R1(config-if)#ip pim sparse-mode
R1(config-if)#exit
R1(config)#int g2/0
R1(config-if)#ip pim sparse-mode
R1(config-if)#exit
R1(config)#router bgp 100
R1(config-router)# bgp log-neighbor-changes
R1(config-router)# neighbor pBGP peer-group
R1(config-router)# neighbor pBGP remote-as 100
R1(config-router)# neighbor 120.0.21.2 peer-group pBGP
R1(config-router)# neighbor 120.0.31.3 peer-group pBGP
R1(config-router)# neighbor 120.0.18.8 peer-group pBGP
R1(config-router)# address-family ipv4
R1(config-router-af)#redistribute ospf 1
R1(config-router-af)#  neighbor pBGP route-reflector-client
R1(config-router-af)#  neighbor pBGP next-hop-self
R1(config-router-af)#  neighbor 120.0.21.2 activate
R1(config-router-af)#  neighbor 120.0.31.3 activate
R1(config-router-af)#  neighbor 120.0.18.8 activate
R1(config-router-af)#network 1.1.1.0 mask 255.255.255.0
R1(config-router-af)# exit-address-family
R1(config-router)# address-family ipv4 multicast
R1(config-router-af)#  neighbor pBGP route-reflector-client
R1(config-router-af)#  neighbor pBGP next-hop-self
R1(config-router-af)#  neighbor 120.0.21.2 activate
R1(config-router-af)#  neighbor 120.0.31.3 activate
R1(config-router-af)# neighbor 120.0.18.8 activate
R1(config-router-af)#redistribute ospf 1
R1(config-router-af)# exit-address-family
R1(config)#ip msdp peer 6.6.6.6 connect-source loopback 0 remote-as 200
R1(config-router)#end



R2(config)#ip multicast-routing
R2(config)#int g0/0
R2(config-if)#ip pim sparse-mode
R2(config-if)#exit
R2(config)#int g1/0
R2(config-if)#ip pim sparse-mode
R2(config-if)#ip pim bsr-border
R2(config-if)#exit
R2(config)#route-map PREFER_R3_MCAST
R2(config-route-map)#set as-path prepend 100 100 100
R2(config-route-map)#exit
R2(config)#router bgp 100
R2(config-router)# bgp log-neighbor-changes
R2(config-router)# neighbor 120.0.21.1 remote-as 100
R2(config-router)# neighbor 120.0.24.4 remote-as 200
R2(config-router)# address-family ipv4
R2(config-router-af)#  neighbor 120.0.21.1 activate
R2(config-router-af)#  neighbor 120.0.24.4 activate
R2(config-router-af)#  neighbor 120.0.21.1 next-hop-self
R2(config-router-af)# exit-address-family
R2(config-router)# address-family ipv4 multicast
R2(config-router-af)#  redistribute ospf 1
R2(config-router-af)#  neighbor 120.0.21.1 activate
R2(config-router-af)#  neighbor 120.0.24.4 activate
R2(config-router-af)#  neighbor 120.0.21.1 next-hop-self
R2(config-router-af)#neighbor 120.0.24.4 route-map PREFER_R3_MCAST out
R2(config-router-af)# exit-address-family
R2(config-router)#end


R3(config)#ip multicast-routing
R3(config)#int g0/0
R3(config-if)#ip pim sparse-mode
R3(config-if)#exit
R3(config)#int g1/0
R3(config-if)#ip pim sparse-mode
R3(config-if)#ip pim bsr-border
R3(config-if)#exit
R3(config)#router bgp 100
R3(config-router)# bgp log-neighbor-changes
R3(config-router)# neighbor 120.0.31.1 remote-as 100
R3(config-router)# neighbor 120.0.35.5 remote-as 200
R3(config-router)# address-family ipv4
R3(config-router-af)#  neighbor 120.0.31.1 activate
R3(config-router-af)#  neighbor 120.0.35.5 activate
R3(config-router-af)#  neighbor 120.0.31.1 next-hop-self
R3(config-router-af)# exit-address-family
R3(config-router)# address-family ipv4 multicast
R3(config-router-af)#  redistribute ospf 1
R3(config-router-af)#  neighbor 120.0.31.1 activate
R3(config-router-af)#  neighbor 120.0.35.5 activate
R3(config-router-af)#  neighbor 120.0.31.1 next-hop-self
R3(config-router-af)# exit-address-family
R3(config-router)#end


R8(config)#ip multicast-routing
R8(config)#int g0/0
R8(config-if)#ip pim sparse-mode
R8(config-if)#end
R8(config)#router bgp 100
R8(config-router)# neighbor pBGP peer-group
R8(config-router)# neighbor pBGP remote-as 200
R8(config-router)# neighbor 120.0.18.1 remote 200
R8(config-router)#address-family ipv4 multicast
R8(config-router-af)# neighbor 120.0.18.1 activate
R8(config-router-af)#end

R6(config)#ip multicast-routing
R6(config)#int loopback 0
R6(config-if)#ip pim sparse-mode
R6(config-if)#exit
R6(config)#ip pim bsr-candidate loopback 0
R6(config)#ip pim rp-candidate loopback 0
R6(config)#int g0/0
R6(config-if)#ip pim sparse-mode
R6(config-if)#exit
R6(config)#int g1/0
R6(config-if)#ip pim sparse-mode
R6(config-if)#exit
R6(config)#int g2/0
R6(config-if)#ip pim sparse-mode
R6(config-if)#exit
R6(config)#router bgp 200
R6(config-router)# bgp log-neighbor-changes
R6(config-router)# neighbor pBGP peer-group
R6(config-router)# neighbor pBGP remote-as 200
R6(config-router)# neighbor 120.0.46.4 peer-group pBGP
R6(config-router)# neighbor 120.0.56.5 peer-group pBGP
R6(config-router)# neighbor 120.0.67.7 peer-group pBGP
R6(config-router)# address-family ipv4
R6(config-router-af)#  neighbor pBGP route-reflector-client
R6(config-router-af)#  neighbor pBGP next-hop-self
R6(config-router-af)#  neighbor 120.0.46.4 activate
R6(config-router-af)#  neighbor 120.0.56.5 activate
R6(config-router-af)#  neighbor 120.0.67.7 activate
R6(config-router-af)# exit-address-family
R6(config-router)# address-family ipv4 multicast
R6(config-router-af)#  neighbor pBGP route-reflector-client
R6(config-router-af)#  neighbor pBGP next-hop-self
R6(config-router-af)#  neighbor 120.0.46.4 activate
R6(config-router-af)#  neighbor 120.0.56.5 activate
R6(config-router-af)# neighbor 120.0.67.7 activate
R6(config-router-af)# exit-address-family
R6(config-router)#end
R6(config)#ip msdp peer 1.1.1.1 connect-source loopback 0 remote-as 100



R4(config)#ip multicast-routing
R4(config)#int g0/0
R4(config-if)#ip pim sparse-mode
R4(config-if)#exit
R4(config)#int g1/0
R4(config-if)#ip pim sparse-mode
R4(config-if)#exit
R4(config)#route-map PREFER_R5_MCAST
R4(config-route-map)#set as-path prepend 200 200 200
R4(config-route-map)#exit
R4(config)#router bgp 200
R4(config-router)# bgp log-neighbor-changes
R4(config-router)# neighbor 120.0.46.6 remote-as 200
R4(config-router)# neighbor 120.0.24.2 remote-as 100
R4(config-router)# address-family ipv4
R4(config-router-af)#  neighbor 120.0.46.6 activate
R4(config-router-af)#  neighbor 120.0.46.6 next-hop-self
R4(config-router-af)#  neighbor 120.0.24.2 activate
R4(config-router-af)# exit-address-family
R4(config-router)# address-family ipv4 multicast
R4(config-router-af)#  redistribute ospf 1
R4(config-router-af)#  neighbor 120.0.46.6 activate
R4(config-router-af)#  neighbor 120.0.24.2 activate
R4(config-router-af)# exit-address-family
R4(config-router)#end


R5(config)#ip multicast-routing
R5(config)#int g0/0
R5(config-if)#ip pim sparse-mode
R5(config-if)#exit
R5(config)#int g1/0
R5(config-if)#ip pim sparse-mode
R5(config-if)#exit
R5(config)#router bgp 200
R5(config-router)# bgp log-neighbor-changes
R5(config-router)# neighbor 120.0.56.6 remote-as 200
R5(config-router)# neighbor 120.0.35.3 remote-as 100
R5(config-router)# address-family ipv4
R5(config-router-af)#  neighbor 120.0.56.6 activate
R5(config-router-af)#  neighbor 120.0.56.6 next-hop-self
R5(config-router-af)#  neighbor 120.0.35.3 activate
R5(config-router-af)# exit-address-family
R5(config-router)# address-family ipv4 multicast
R5(config-router-af)#  redistribute ospf 1
R5(config-router-af)#  neighbor 120.0.56.6 activate
R5(config-router-af)#  neighbor 120.0.35.3 activate
R5(config-router-af)# exit-address-family
R5(config-router)#end


R7(config)#ip multicast-routing
R7(config)#int g0/0
R7(config-if)#ip pim sparse-mode
R7(config-if)#end
R7(config)#router bgp 200
R7(config-router)# neighbor pBGP peer-group
R7(config-router)# neighbor pBGP remote-as 200
R7(config-router)# neighbor 120.0.67.6 remote 200
R7(config-router)#address-family ipv4 multicast
R7(config-router-af)# neighbor 120.0.67.6 activate
R7(config-router-af)#end


Verification

R1#sh ip msdp peer
MSDP Peer 6.6.6.6 (?), AS 200 (configured AS)
  Connection status:
    State: Up, Resets: 1, Connection source: Loopback0 (1.1.1.1)
    Uptime(Downtime): 00:03:21, Messages sent/received: 4/6
    Output messages discarded: 0
    Connection and counters cleared 00:53:22 ago
    Elapsed time since last message: 00:00:36
    Local Address of connection: 1.1.1.1
    Local Port: 15608, Remote Port: 639
  SA Filtering:
    Input (S,G) filter: none, route-map: none
    Input RP filter: none, route-map: none
    Output (S,G) filter: none, route-map: none
    Output RP filter: none, route-map: none
  SA-Requests:
    Input filter: none
  Peer ttl threshold: 0
  SAs learned from this peer: 1
  Number of connection transitions to Established state: 2
    Input queue size: 0, Output queue size: 0
  MD5 signature protection on MSDP TCP connection: not enabled
  Message counters:
    RPF Failure count: 0
    SA Messages in/out: 5/0
    SA Requests in: 0
    SA Responses out: 0
    Data Packets in/out: 1/0

R6#sh ip msdp peer
MSDP Peer 1.1.1.1 (?), AS 100 (configured AS)
  Connection status:
    State: Up, Resets: 1, Connection source: Loopback0 (6.6.6.6)
    Uptime(Downtime): 00:06:53, Messages sent/received: 11/7
    Output messages discarded: 0
    Connection and counters cleared 00:57:05 ago
  SA Filtering:
    Input (S,G) filter: none, route-map: none
    Input RP filter: none, route-map: none
    Output (S,G) filter: none, route-map: none
    Output RP filter: none, route-map: none
  SA-Requests:
    Input filter: none
  Peer ttl threshold: 0
  SAs learned from this peer: 0
  Number of connection transitions to Established state: 2
    Input queue size: 0, Output queue size: 0
  MD5 signature protection on MSDP TCP connection: not enabled
  Message counters:
    RPF Failure count: 0
    SA Messages in/out: 0/7
    SA Requests in: 0
    SA Responses out: 0
    Data Packets in/out: 0/2


R8(config)#int g0/0
R8(config-if)#ip igmp join-group 239.1.1.1

R7#ping 239.1.1.1 rep 1000
Type escape sequence to abort.
Sending 1000, 100-byte ICMP Echos to 239.1.1.1, timeout is 2 seconds:

Reply to request 0 from 120.0.18.8, 140 ms
Reply to request 1 from 120.0.18.8, 136 ms
Reply to request 2 from 120.0.18.8, 112 ms
Reply to request 3 from 120.0.18.8, 144 ms

R8#sh ip mroute 239.1.1.1

(*, 239.1.1.1), 00:03:39/stopped, RP 1.1.1.1, flags: SJPCL
  Incoming interface: GigabitEthernet0/0, RPF nbr 120.0.18.1
  Outgoing interface list: Null

(120.0.67.7, 239.1.1.1), 00:00:42/00:02:18, flags: PLTX
  Incoming interface: GigabitEthernet0/0, RPF nbr 120.0.18.1, Mbgp
  Outgoing interface list: Null


R1#debug ip msdp detail

*Dec 11 08:06:29.339: MSDP(0): WAVL Insert SA Source 120.0.67.7 Group 239.1.1.1 RP 6.6.6.6 Successful
*Dec 11 08:06:25.787: MSDP(0): Forward decapsulated SA data for (120.0.67.7, 239.1.1.1) on GigabitEthernet2/0







No comments:

Post a Comment