组播数据利用 MPLS私有专用网络+GRE+单播路由实现跨区域视频通信

示例图

解释链接

一、基本需求:

1.有A公司和B公司希望总部与分支机构之间建立BGP MPLS VPN连接,以实现内部私网的统一规划。
2.B公司规划的私网地址为192.168.0.0-192.168.4.0 /24
  其中总部的私网地址段为192.168.4.0 /24,私网内部采用OSPF路由协议实现通信。
3.A公司规划的私网地址为192.168.0.0-192.168.8.0 /24
  总部的私网地址段为192.168.8.0 /24
  上海分部的私网地址段为192.168.0.0-192.168.3.0 /24
  郑州分部的私网地址段为192.168.4.0-192.168.7.0/24
  私网内部采用OSPFISIS路由协议实现通信。A公司希望分部能与总部通信,分部之间能通信
4.请完成规划与配置:

①、A、B两公司除了能够实现分部与总部互联外,还希望能够访问Internet,如何实现?

②、A公司希望能够在全公司实现视频会议,如何实现?

二、说明

1.LSW4LSW5是没有任何配置的。

三、相关配置

LSW1

 sysname LSW1
#
vlan batch 2 to 4
#
multicast routing-enable
#
interface Vlanif2
 ip address 192.168.1.1 255.255.255.0 
 pim sm
 igmp enable
#
interface Vlanif3
 ip address 192.168.2.1 255.255.255.0 
 igmp enable
#
interface Vlanif4
 ip address 192.168.3.2 255.255.255.0 
 pim sm
#
interface GigabitEthernet0/0/2
 port link-type access
 port default vlan 4
#
interface GigabitEthernet0/0/10
 port link-type access
 port default vlan 2
#
interface GigabitEthernet0/0/11
 port link-type access
 port default vlan 3
#
interface LoopBack0
 ip address 10.10.10.1 255.255.255.255 
#
ospf 2 router-id 10.10.10.1 
 area 0.0.0.0 
  network 192.168.1.0 0.0.0.255 
  network 192.168.2.0 0.0.0.255 
  network 192.168.3.0 0.0.0.255 
#
user-interface con 0
user-interface vty 0 4
#
return 

LSW2

sysname LSW2
#
vlan batch 2 to 4
#
interface Vlanif2
 ip address 192.168.0.1 255.255.255.0 
#
interface Vlanif3
 ip address 192.168.1.1 255.255.255.0 
#
interface Vlanif4
 ip address 192.168.4.2 255.255.255.0 
#
interface GigabitEthernet0/0/2
 port link-type access
 port default vlan 4
#
interface GigabitEthernet0/0/10
 port link-type access
 port default vlan 2
#
interface GigabitEthernet0/0/11
 port link-type access
 port default vlan 3
#
ip route-static 0.0.0.0 0.0.0.0 192.168.4.1
#
return 

LSW3

sysname LSW3
#
vlan batch 2 to 3
#
multicast routing-enable
#
interface Vlanif2
 ip address 192.168.4.1 255.255.255.0 
 pim sm
 igmp enable
#
interface Vlanif3
 ip address 192.168.7.2 255.255.255.0 
 pim sm
#
interface GigabitEthernet0/0/1
 port link-type access
 port default vlan 2
#
interface GigabitEthernet0/0/2
 port link-type access
 port default vlan 3
#
ospf 2 
 area 0.0.0.0 
  network 192.168.7.2 0.0.0.0 
  network 192.168.4.0 0.0.0.255 
#
return 

AR2

sysname AR2
#
mpls lsr-id 22.22.22.22
mpls
#
mpls ldp
#
interface GigabitEthernet0/0/0
 ip address 12.1.1.2 255.255.255.0 
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/1
 ip address 22.1.1.1 255.255.255.0 
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/2
 ip address 23.1.1.1 255.255.255.0 
 mpls
 mpls ldp
#
interface LoopBack0
 ip address 22.22.22.22 255.255.255.255 
#
ospf 1 router-id 22.22.22.22 
 area 0.0.0.0 
  network 12.1.1.2 0.0.0.0 
  network 22.1.1.1 0.0.0.0 
  network 22.22.22.22 0.0.0.0 
  network 23.1.1.1 0.0.0.0 
#
return

AR4

sysname AR4
#
multicast routing-enable
#
interface GigabitEthernet0/0/0
 ip address 14.1.1.2 255.255.255.0 
 pim sm
#
interface GigabitEthernet0/0/2
 ip address 192.168.3.1 255.255.255.0 
 pim sm
#
interface LoopBack0
 ip address 4.4.4.4 255.255.255.255 
#
ospf 2 router-id 14.1.1.2 
 area 0.0.0.0 
  network 4.4.4.4 0.0.0.0 
  network 14.1.1.2 0.0.0.0 
  network 192.168.3.0 0.0.0.255 
#
return

AR5

sysname AR5
#
interface GigabitEthernet0/0/1
 ip address 15.1.1.2 255.255.255.0 
#
interface GigabitEthernet0/0/2
 ip address 192.168.4.1 255.255.255.0 
#
interface LoopBack0
 ip address 5.5.5.5 255.255.255.255 
#
ospf 3 router-id 5.5.5.5 
 import-route direct
 import-route static
 area 0.0.0.0 
  network 5.5.5.5 0.0.0.0 
  network 15.1.1.2 0.0.0.0 
#
ip route-static 0.0.0.0 0.0.0.0 192.168.4.2
#
return

AR6

sysname AR6
#
multicast routing-enable
#
interface GigabitEthernet0/0/0
 ip address 26.1.1.2 255.255.255.0 
 pim sm
#
interface GigabitEthernet0/0/2
 ip address 192.168.8.1 255.255.255.0 
 pim sm
#
interface LoopBack0
 ip address 6.6.6.6 255.255.255.255 
#
ospf 2 router-id 6.6.6.6 
 import-route direct
 area 0.0.0.0 
  network 6.6.6.6 0.0.0.0 
  network 26.1.1.2 0.0.0.0 
#
return

AR7

sysname AR7
#
interface GigabitEthernet0/0/0
 ip address 27.1.1.2 255.255.255.0 
#
interface GigabitEthernet0/0/2
 ip address 192.168.4.1 255.255.255.0 
#
interface LoopBack0
 ip address 7.7.7.7 255.255.255.255 
#
ospf 3 router-id 7.7.7.7 
 import-route direct
 area 0.0.0.0 
  network 7.7.7.7 0.0.0.0 
  network 27.1.1.2 0.0.0.0 
#
return

AR8

sysname AR8
#
multicast routing-enable
#
interface GigabitEthernet0/0/0
 ip address 38.1.1.2 255.255.255.0 
 pim sm
#
interface GigabitEthernet0/0/2
 ip address 192.168.7.1 255.255.255.0 
 pim sm
#
interface LoopBack0
 ip address 8.8.8.8 255.255.255.255 
#
ospf 2 router-id 8.8.8.8 
 area 0.0.0.0 
  network 8.8.8.8 0.0.0.0 
  network 38.1.1.2 0.0.0.0 
  network 192.168.7.1 0.0.0.0 
#
return

PE1

sysname PE1
#
ip -instance a
 ipv4-family
  route-distinguisher 1:1
  -target 1:1 export-extcommunity
  -target 2:2 5:5 import-extcommunity
  multicast routing-enable
#
ip -instance b
 ipv4-family
  route-distinguisher 2:2
  -target 3:3 export-extcommunity
  -target 4:4 import-extcommunity
#
mpls lsr-id 1.1.1.1
mpls
#
mpls ldp
#
interface GigabitEthernet0/0/0
 ip address 12.1.1.1 255.255.255.0 
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/1
 ip binding -instance b
 ip address 15.1.1.1 255.255.255.0 
#
interface GigabitEthernet1/0/0
 ip binding -instance a
 ip address 14.1.1.1 255.255.255.0 
 pim sm
#
interface LoopBack0
 ip address 1.1.1.1 255.255.255.255 
#
interface LoopBack1
 ip binding -instance a
 ip address 11.1.1.1 255.255.255.255 
#
interface Tunnel0/0/1
 ip binding -instance a
 ip address 10.10.10.1 255.255.255.0 
 tunnel-protocol gre
 source 11.1.1.1
 destination -instance a 22.1.1.1
 pim sm
#
bgp 1000
 router-id 1.1.1.1
 peer 2.2.2.2 as-number 1000 
 peer 2.2.2.2 connect-interface LoopBack0
 peer 3.3.3.3 as-number 1000 
 peer 3.3.3.3 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  undo peer 2.2.2.2 enable
  undo peer 3.3.3.3 enable
 # 
 ipv4-family v4
  policy -target
  peer 2.2.2.2 enable
  peer 3.3.3.3 enable
 #
 ipv4-family -instance a 
  network 11.1.1.1 255.255.255.255 
  import-route ospf 2
 #
 ipv4-family -instance b 
  import-route ospf 3
#
ospf 1 router-id 1.1.1.1 
 area 0.0.0.0 
  network 1.1.1.1 0.0.0.0 
  network 12.1.1.1 0.0.0.0 
#
ospf 2 router-id 14.1.1.1 -instance a
 import-route bgp
 area 0.0.0.0 
  network 10.10.10.0 0.0.0.255 
  network 14.1.1.1 0.0.0.0 
#
ospf 3 router-id 15.1.1.1 -instance b
 import-route bgp
 area 0.0.0.0 
  network 15.1.1.1 0.0.0.0 
#
pim -instance a
 c-bsr GigabitEthernet1/0/0
 c-rp GigabitEthernet1/0/0
#
return

PE2

sysname PE2
#
ip -instance a
 ipv4-family
  route-distinguisher 3:3
  -target 2:2 export-extcommunity
  -target 1:1 5:5 import-extcommunity
  multicast routing-enable
#
ip -instance b
 ipv4-family
  route-distinguisher 4:4
  -target 4:4 export-extcommunity
  -target 3:3 import-extcommunity
#
mpls lsr-id 2.2.2.2
mpls
#
mpls ldp
#
interface GigabitEthernet0/0/1
 ip address 22.1.1.2 255.255.255.0 
 mpls
 mpls ldp
#
interface GigabitEthernet1/0/0
 ip binding -instance a
 ip address 26.1.1.1 255.255.255.0 
 pim sm
#
interface GigabitEthernet2/0/0
 ip binding -instance b
 ip address 27.1.1.1 255.255.255.0 
#
interface LoopBack0
 ip address 2.2.2.2 255.255.255.255 
#
interface LoopBack1
 ip binding -instance a
 ip address 22.1.1.1 255.255.255.255 
#
interface LoopBack2
 ip binding -instance a
 ip address 22.2.1.1 255.255.255.255 
#
interface Tunnel0/0/1
 ip binding -instance a
 ip address 10.10.10.2 255.255.255.0 
 tunnel-protocol gre
 source 22.1.1.1
 destination -instance a 11.1.1.1
 pim sm
#
interface Tunnel0/0/2
 ip binding -instance a
 ip address 10.10.11.3 255.255.255.0 
 tunnel-protocol gre
 source 22.2.1.1
 destination -instance a 33.1.1.1
 pim sm
#
bgp 1000
 router-id 2.2.2.2
 peer 1.1.1.1 as-number 1000 
 peer 1.1.1.1 connect-interface LoopBack0
 peer 3.3.3.3 as-number 1000 
 peer 3.3.3.3 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  undo peer 1.1.1.1 enable
  undo peer 3.3.3.3 enable
 #
 ipv6-family unicast
  undo synchronization
 # 
 ipv4-family v4
  policy -target
  peer 1.1.1.1 enable
  peer 3.3.3.3 enable
 #
 ipv4-family -instance a 
  network 22.1.1.1 255.255.255.255 
  network 22.2.1.1 255.255.255.255 
  import-route ospf 2
 #
 ipv4-family -instance b 
  import-route ospf 3
#
ospf 1 router-id 2.2.2.2 
 area 0.0.0.0 
  network 2.2.2.2 0.0.0.0 
  network 22.1.1.2 0.0.0.0 
#
ospf 2 router-id 26.1.1.1 -instance a
 import-route bgp
 area 0.0.0.0 
  network 10.10.10.0 0.0.0.255 
  network 10.10.11.3 0.0.0.0 
  network 26.1.1.1 0.0.0.0 
#
ospf 3 router-id 27.1.1.1 -instance b
 import-route bgp
 area 0.0.0.0 
  network 27.1.1.1 0.0.0.0 
#
pim -instance a
 c-bsr GigabitEthernet1/0/0
 c-rp GigabitEthernet1/0/0
#
return

PE3

 sysname PE3
#
ip -instance a
 ipv4-family
  route-distinguisher 5:5
  -target 5:5 export-extcommunity
  -target 1:1 2:2 import-extcommunity
  multicast routing-enable
#
mpls lsr-id 3.3.3.3
mpls
#
mpls ldp
#
interface GigabitEthernet0/0/0
 ip binding -instance a
 ip address 38.1.1.1 255.255.255.0 
 pim sm
#
interface GigabitEthernet0/0/2
 ip address 23.1.1.2 255.255.255.0 
 mpls
 mpls ldp
#
interface LoopBack0
 ip address 3.3.3.3 255.255.255.255 
#
interface LoopBack1
 ip binding -instance a
 ip address 33.1.1.1 255.255.255.255 
#
interface Tunnel0/0/2
 ip binding -instance a
 ip address 10.10.12.1 255.255.255.0 
 tunnel-protocol gre
 source 33.1.1.1
 destination -instance a 22.2.1.1
#
bgp 1000
 router-id 3.3.3.3
 peer 1.1.1.1 as-number 1000 
 peer 1.1.1.1 connect-interface LoopBack0
 peer 2.2.2.2 as-number 1000 
 peer 2.2.2.2 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 1.1.1.1 enable
  undo peer 2.2.2.2 enable
 # 
 ipv4-family v4
  policy -target
  peer 1.1.1.1 enable
  peer 2.2.2.2 enable
 #
 ipv4-family -instance a 
  network 33.1.1.1 255.255.255.255 
  import-route ospf 2
#
ospf 1 router-id 3.3.3.3 
 area 0.0.0.0 
  network 3.3.3.3 0.0.0.0 
  network 23.1.1.2 0.0.0.0 
#
ospf 2 router-id 38.1.1.1 -instance a
 import-route bgp
 area 0.0.0.0 
  network 10.10.12.1 0.0.0.0 
  network 38.1.1.1 0.0.0.0 
#
pim -instance a
 c-bsr GigabitEthernet0/0/0
 c-rp GigabitEthernet0/0/0
#
return

你可能感兴趣的:(MPSL)