跨域组播---BGP+MSDP

拓扑:

实际物理图:

SW配置:

interface FastEthernet1/0
 switchport mode trunk
 duplex full
 speed 100
!
interface FastEthernet1/1
 switchport mode trunk
 duplex full
 speed 100
!
interface FastEthernet1/2
 switchport mode trunk
 duplex full
 speed 100
!
interface FastEthernet1/3
 switchport mode trunk
 duplex full
 speed 100
!
interface FastEthernet1/6
 switchport mode trunk
 duplex full
 speed 100
!
interface FastEthernet1/7
 switchport mode trunk
 duplex full
 speed 100

R2配置:

ip multicast-routing

interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
no ip address
speed 100
full-duplex
!
interface FastEthernet0/0.23
encapsulation dot1Q 23
ip address 23.1.1.2 255.255.255.0
ip pim sparse-dense-mode
!
interface FastEthernet0/0.29
encapsulation dot1Q 29
ip address 29.1.1.2 255.255.255.0
ip pim sparse-dense-mode
!
router ospf 100
router-id 2.2.2.2
log-adjacency-changes
passive-interface FastEthernet0/0.23
network 2.2.2.2 0.0.0.0 area 0
network 29.1.1.0 0.0.0.255 area 0
!
router bgp 100
bgp router-id 2.2.2.2
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 9.9.9.9 remote-as 100
neighbor 9.9.9.9 update-source Loopback0
neighbor 23.1.1.3 remote-as 200
!
address-family ipv4
neighbor 9.9.9.9 activate
neighbor 9.9.9.9 next-hop-self
neighbor 23.1.1.3 activate
no auto-summary
no synchronization
exit-address-family
ip pim rp-address 2.2.2.2
ip msdp peer 23.1.1.3 connect-source FastEthernet0/0.23

R3配置:

ip multicast-routing

interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
no ip address
speed 100
full-duplex
!
interface FastEthernet0/0.23
encapsulation dot1Q 23
ip address 23.1.1.3 255.255.255.0
ip pim sparse-dense-mode
!
interface FastEthernet0/0.34
encapsulation dot1Q 34
ip address 34.1.1.3 255.255.255.0
ip pim sparse-dense-mode
!
router ospf 200
router-id 3.3.3.3
log-adjacency-changes
passive-interface FastEthernet0/0.23
network 3.3.3.3 0.0.0.0 area 0
network 34.1.1.0 0.0.0.255 area 0
!
router bgp 200
bgp router-id 3.3.3.3
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 4.4.4.4 remote-as 200
neighbor 4.4.4.4 update-source Loopback0
neighbor 23.1.1.2 remote-as 100
!
address-family ipv4
neighbor 4.4.4.4 activate
neighbor 23.1.1.2 activate
no auto-summary
no synchronization
exit-address-family
ip pim rp-address 3.3.3.3
ip msdp peer 23.1.1.2 connect-source FastEthernet0/0.23

R4配置:

ip multicast-routing

interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface FastEthernet0/0
no ip address
speed 100
full-duplex
!
interface FastEthernet0/0.34
encapsulation dot1Q 34
ip address 34.1.1.4 255.255.255.0
ip pim sparse-dense-mode
!
interface FastEthernet0/0.45
encapsulation dot1Q 45
ip address 45.1.1.4 255.255.255.0
ip pim sparse-dense-mode
!
router ospf 200
router-id 4.4.4.4
log-adjacency-changes
network 4.4.4.4 0.0.0.0 area 0
network 34.1.1.0 0.0.0.255 area 0
!
router bgp 200
bgp router-id 4.4.4.4
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 3.3.3.3 remote-as 200
neighbor 3.3.3.3 update-source Loopback0
!
address-family ipv4
neighbor 3.3.3.3 activate
no auto-summary
no synchronization
network 45.1.1.0 mask 255.255.255.0
exit-address-family
ip pim rp-address 3.3.3.3

R9配置:

ip multicast-routing

interface Loopback0
 ip address 9.9.9.9 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 speed 100
 full-duplex
!
interface FastEthernet0/0.29
 encapsulation dot1Q 29
 ip address 29.1.1.9 255.255.255.0
 ip pim sparse-dense-mode
!
interface FastEthernet0/0.89
 encapsulation dot1Q 89
 ip address 89.1.1.9 255.255.255.0
 ip pim sparse-dense-mode
!
router ospf 100
 router-id 9.9.9.9
 log-adjacency-changes
 network 9.9.9.9 0.0.0.0 area 0
 network 29.1.1.0 0.0.0.255 area 0
!
router bgp 100
 bgp router-id 9.9.9.9
 no bgp default ipv4-unicast
 bgp log-neighbor-changes
 neighbor 2.2.2.2 remote-as 100
 neighbor 2.2.2.2 update-source Loopback0
 !
 address-family ipv4
  neighbor 2.2.2.2 activate
  no auto-summary
  no synchronization
 exit-address-family
!
ip pim rp-address 2.2.2.2

R8配置:

no ip routing

interface FastEthernet0/0.89
encapsulation dot1Q 89
ip address 89.1.1.8 255.255.255.0
no ip route-cache
ip igmp join-group 239.1.1.1
!
ip default-gateway 89.1.1.9

R5配置:

no ip routing

interface FastEthernet0/0.45
encapsulation dot1Q 45
ip address 45.1.1.5 255.255.255.0
no ip route-cache
!
ip default-gateway 45.1.1.4

验证:

 

你可能感兴趣的:(BGP,组播,MSDP)