m×××的基本配置

R1:

ip multicast-routing
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
ip pim sparse-mode
!
interface FastEthernet1/0
ip address 12.1.1.1 255.255.255.0
ip pim sparse-mode
duplex auto
speed auto
!
router ospf 1
router-id 1.1.1.1
network 0.0.0.0 255.255.255.255 area 0
!
ip pim rp-address 1.1.1.1   //定义一个企业网内的RP

 

R2:
ip vrf A 
rd 1:1
mdt default 239.255.1.1 //默认MDT组
mdt data 232.0.1.0 0.0.0.255 threshold 1 //数据MDT组,阀值为1kbps
  route-target export 1:1
route-target import 1:1
!
ip multicast-routing  //启用ISP内的组播
ip multicast-routing vrf A  //针对特定MVRF启用组播
!
mpls label range 200 299
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
ip pim sparse-mode
!
interface FastEthernet1/0
ip vrf forwarding A
ip address 12.1.1.2 255.255.255.0
ip pim sparse-mode
duplex auto
speed auto
!
interface FastEthernet1/1
ip address 23.1.1.2 255.255.255.0
ip pim sparse-mode
duplex auto
speed auto
mpls ip
!
router ospf 2 vrf A
redistribute bgp 1 subnets
network 12.1.1.2 0.0.0.0 area 0
!
router ospf 1
router-id 2.2.2.2
network 2.2.2.2 0.0.0.0 area 0
network 23.1.1.2 0.0.0.0 area 0
!
router bgp 1
bgp router-id 2.2.2.2
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 3.3.3.3 remote-as 1
neighbor 3.3.3.3 update-source Loopback0
neighbor 4.4.4.4 remote-as 1
neighbor 4.4.4.4 update-source Loopback0
!
address-family ipv4
  neighbor 3.3.3.3 activate
exit-address-family
!
address-family ***v4
  neighbor 4.4.4.4 activate
  neighbor 4.4.4.4 send-community extended
exit-address-family
!
 address-family ipv4 mdt           //**mdt对等体
  neighbor 4.4.4.4 activate
exit-address-family
!
address-family ipv4 vrf A
  redistribute ospf 2 match internal external 1 external 2
exit-address-family
!
ip pim rp-address 2.2.2.2  //ISP内RP
ip pim vrf A rp-address 1.1.1.1 //MVRF域内RP
!
mpls ldp router-id Loopback0

 

R3:

ip multicast-routing
!
mpls label range 300 399
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet1/0
ip address 23.1.1.3 255.255.255.0
ip pim sparse-mode
duplex auto
speed auto
!
interface FastEthernet1/1
ip address 34.1.1.3 255.255.255.0
ip pim sparse-mode
duplex auto
speed auto
!
router ospf 1
mpls ldp autoconfig area 0
router-id 3.3.3.3
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 1
bgp router-id 3.3.3.3
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 update-source Loopback0
neighbor 4.4.4.4 remote-as 1
neighbor 4.4.4.4 update-source Loopback0
!
address-family ipv4
  neighbor 2.2.2.2 activate
  neighbor 2.2.2.2 route-reflector-client
  neighbor 4.4.4.4 activate
  neighbor 4.4.4.4 route-reflector-client
exit-address-family
!
ip pim rp-address 2.2.2.2
!
mpls ldp router-id Loopback0

 

R4:

ip vrf A 
rd 1:1
mdt default 239.255.1.1
mdt data 232.0.1.0 0.0.0.255 threshold 1
  route-target export 1:1
route-target import 1:1
!
ip multicast-routing
ip multicast-routing vrf A
!
multilink bundle-name authenticated
mpls label range 400 499
!
interface Loopback0
ip address 4.4.4.4 255.255.255.255
ip pim sparse-mode
!
interface FastEthernet1/0
ip address 34.1.1.4 255.255.255.0
ip pim sparse-mode
duplex auto
speed auto
mpls ip
!
interface FastEthernet1/1
ip vrf forwarding A
ip address 45.1.1.4 255.255.255.0
ip pim sparse-mode
duplex auto
speed auto
!
router ospf 2 vrf A
redistribute bgp 1 subnets
network 45.1.1.4 0.0.0.0 area 0
!
router ospf 1
router-id 4.4.4.4
network 4.4.4.4 0.0.0.0 area 0
network 34.1.1.4 0.0.0.0 area 0
!
router bgp 1
bgp router-id 4.4.4.4
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 update-source Loopback0
neighbor 3.3.3.3 remote-as 1
neighbor 3.3.3.3 update-source Loopback0
!
address-family ipv4
  neighbor 3.3.3.3 activate
exit-address-family
!
address-family ***v4
  neighbor 2.2.2.2 activate
  neighbor 2.2.2.2 send-community extended
exit-address-family
!
address-family ipv4 mdt
  neighbor 2.2.2.2 activate
exit-address-family
!
address-family ipv4 vrf A
  redistribute ospf 2 match internal external 1 external 2
exit-address-family
!
ip pim rp-address 2.2.2.2
ip pim vrf A rp-address 1.1.1.1
!
mpls ldp router-id Loopback0

 

R5:

ip multicast-routing
!
interface Loopback0
ip address 5.5.5.5 255.255.255.255
ip pim sparse-mode
 ip igmp join-group 224.1.1.1   //加入组224.1.1.1
!
interface FastEthernet1/0
ip address 45.1.1.5 255.255.255.0
ip pim sparse-mode
duplex auto
speed auto
!
router ospf 1
router-id 5.5.5.5
network 0.0.0.0 255.255.255.255 area 0
!
ip pim rp-address 1.1.1.1  //企业内部RP

ISP内使用GRE封装组播包

m×××的基本配置

 

外层源为PE路由器BGP对等体地址,目的为default MDT组地址,GRE封装客户组播数据包,源12.1.1.1,目的224.1.1.1

m×××的基本配置

m×××的基本配置