天天看點

IPv6 BGP/MPLS 虛拟專用網絡 Option C2

一.實驗拓撲圖

1.Option C2拓撲圖

二.實驗目的

1.配置IPv6 BGP/MPLS 虛拟專用網絡 Option C2
           

三.IPv6 BGP/MPLS 虛拟專用網絡 Option C2

1.AS内的接口位址可以是IPv4位址,底層路由協定可以是OSPF,ISIS等。
2.ASBR之間的接口位址,是IPv6位址,用于vpnv6關系的建立。
           

四.簡單配置

1.CE_1

sysname CE-1
#
undo info-center enable
#
ipv6 
#
interface GigabitEthernet0/0/0
 ipv6 enable 
 ip address 10.0.11.1 255.255.255.0 
 ipv6 address 2000::1/64 
#
interface LoopBack1
 ipv6 enable 
 ip address 1.1.1.1 255.255.255.255 
 ipv6 address 1:1::1/128 
#
bgp 65001
 peer 10.0.11.2 as-number 100 
 peer 2000::2 as-number 100 
 #
 ipv4-family unicast
  undo synchronization
  network 1.1.1.1 255.255.255.255 
  peer 10.0.11.2 enable
 #
 ipv6-family unicast
  undo synchronization
  network 1:1::1 128 
  peer 2000::2 enable
#
return 
           

2.PE_1

sysname PE-1
#
undo info-center enable
#
ipv6 
#
ip vpn-instance 1
 ipv4-family
  route-distinguisher 1:1
  vpn-target 1:1 export-extcommunity
  vpn-target 1:1 import-extcommunity
 ipv6-family
  route-distinguisher 1:1
  vpn-target 1:1 export-extcommunity
  vpn-target 1:1 import-extcommunity
#
mpls lsr-id 2.2.2.2
mpls
#
mpls ldp
#
interface GigabitEthernet0/0/0
 ip binding vpn-instance 1
 ipv6 enable 
 ip address 10.0.11.2 255.255.255.0 
 ipv6 address 2000::2/64 
#
interface GigabitEthernet0/0/1
 ip address 10.0.12.1 255.255.255.0 
 mpls
 mpls ldp
#
interface LoopBack1
 ip address 2.2.2.2 255.255.255.255 
#
bgp 100
 router-id 2.2.2.2
 peer 4.4.4.4 as-number 100 
 peer 4.4.4.4 connect-interface LoopBack1
 peer 7.7.7.7 as-number 200 
 peer 7.7.7.7 ebgp-max-hop 10 
 peer 7.7.7.7 connect-interface LoopBack1
 #
 ipv4-family unicast
  undo synchronization
  network 2.2.2.2 255.255.255.255 
  peer 4.4.4.4 enable
  peer 4.4.4.4 route-policy PE-AS export
  peer 4.4.4.4 label-route-capability
  peer 7.7.7.7 enable
 #
 ipv6-family unicast
  undo synchronization
  peer 4.4.4.4 enable
  peer 4.4.4.4 route-policy PE-AS export
  peer 4.4.4.4 label-route-capability
 # 
 ipv4-family vpnv4
  policy vpn-target
  peer 7.7.7.7 enable
 #
 ipv4-family vpn-instance 1 
  peer 10.0.11.1 as-number 65001 
 # 
 ipv6-family vpnv6
  policy vpn-target
  peer 7.7.7.7 enable
 #
 ipv6-family vpn-instance 1 
  peer 2000::1 as-number 65001 
#
ospf 1 
 area 0.0.0.1 
  network 10.0.12.0 0.0.0.255 
  network 2.2.2.2 0.0.0.0 
#
route-policy PE-AS permit node 10 
 apply mpls-label
#
return 
           

3.P_1

sysname P-1
#
undo info-center enable
#
mpls lsr-id 3.3.3.3
mpls
#
mpls ldp
#
interface GigabitEthernet0/0/0
 ip address 10.0.13.1 255.255.255.0 
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/1
 ip address 10.0.12.2 255.255.255.0 
 mpls
 mpls ldp
#
interface LoopBack1
 ip address 3.3.3.3 255.255.255.255 
#
ospf 1 
 area 0.0.0.1 
  network 10.0.12.0 0.0.0.255 
  network 10.0.13.0 0.0.0.255 
  network 3.3.3.3 0.0.0.0 
#
return 
           

4.ASBR_1

sysname ASBR-1
#
undo info-center enable
#
ipv6 
#
mpls lsr-id 4.4.4.4
mpls
#
mpls ldp
#
interface GigabitEthernet0/0/0
 ip address 10.0.13.2 255.255.255.0 
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/1
 ipv6 enable 
 ip address 10.0.14.1 255.255.255.0 
 ipv6 address 2001::1/64 
 mpls
#
interface LoopBack1
 ip address 4.4.4.4 255.255.255.0 
#
bgp 100
 peer 2.2.2.2 as-number 100 
 peer 2.2.2.2 connect-interface LoopBack1
 peer 10.0.14.2 as-number 200 
 peer 2001::2 as-number 200 
 #
 ipv4-family unicast
  undo synchronization
  peer 2.2.2.2 enable
  peer 2.2.2.2 route-policy AS-PE export
  peer 2.2.2.2 label-route-capability
  peer 10.0.14.2 enable
  peer 10.0.14.2 route-policy AS-AS export
  peer 10.0.14.2 label-route-capability
 #
 ipv6-family unicast
  undo synchronization
  peer 2.2.2.2 enable
  peer 2.2.2.2 route-policy AS-PE export
  peer 2.2.2.2 label-route-capability
  peer 2001::2 enable
  peer 2001::2 route-policy AS-AS export
#
ospf 1 
 area 0.0.0.1 
  network 10.0.13.0 0.0.0.255 
  network 4.4.4.4 0.0.0.0 
#
route-policy AS-AS permit node 10 
 apply mpls-label
#
route-policy AS-PE permit node 10 
 if-match mpls-label 
 apply mpls-label
#
return 
           

5.ASBR_2

sysname ASBR-2
#
undo info-center enable
#
ipv6 
#
mpls lsr-id 5.5.5.5
mpls
#
mpls ldp
#
interface GigabitEthernet0/0/0
 ip address 10.0.15.1 255.255.255.0 
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/1
 ipv6 enable 
 ip address 10.0.14.2 255.255.255.0 
 ipv6 address 2001::2/64 
 mpls
#
interface LoopBack1
 ip address 5.5.5.5 255.255.255.255 
#
bgp 200
 peer 7.7.7.7 as-number 200 
 peer 7.7.7.7 connect-interface LoopBack1
 peer 10.0.14.1 as-number 100 
 peer 2001::1 as-number 100 
 #
 ipv4-family unicast
  undo synchronization
  peer 7.7.7.7 enable
  peer 7.7.7.7 route-policy AS-PE export
  peer 7.7.7.7 label-route-capability
  peer 10.0.14.1 enable
  peer 10.0.14.1 route-policy AS-AS export
  peer 10.0.14.1 label-route-capability
 #
 ipv6-family unicast
  undo synchronization
  peer 7.7.7.7 enable
  peer 7.7.7.7 route-policy AS-PE export
  peer 7.7.7.7 label-route-capability
  peer 2001::1 enable
  peer 2001::1 route-policy AS-AS export
#
ospf 1 
 area 0.0.0.1 
  network 10.0.15.0 0.0.0.255 
  network 5.5.5.5 0.0.0.0 
#
route-policy AS-AS permit node 10 
 apply mpls-label
#
route-policy AS-PE permit node 10 
 if-match mpls-label 
 apply mpls-label
#
return 
           

6.P_2

sysname P-2
#
undo info-center enable
#
mpls lsr-id 6.6.6.6
mpls
#
mpls ldp
#
interface GigabitEthernet0/0/0
 ip address 10.0.15.2 255.255.255.0 
 mpls
 mpls ldp
#
interface GigabitEthernet0/0/1
 ip address 10.0.16.1 255.255.255.0 
 mpls
 mpls ldp
#
interface LoopBack1
 ip address 6.6.6.6 255.255.255.255 
#
ospf 1 
 area 0.0.0.1 
  network 10.0.15.0 0.0.0.255 
  network 6.6.6.6 0.0.0.0 
  network 10.0.16.0 0.0.0.255 
#
return 
           

7.PE_2

sysname PE-2
#
undo info-center enable
#
ipv6 
#
ip vpn-instance 1
 ipv4-family
  route-distinguisher 1:1
  vpn-target 1:1 export-extcommunity
  vpn-target 1:1 import-extcommunity
 ipv6-family
  route-distinguisher 1:1
  vpn-target 1:1 export-extcommunity
  vpn-target 1:1 import-extcommunity
#
mpls lsr-id 7.7.7.7
mpls
#
mpls ldp
#
interface GigabitEthernet0/0/0
 ip binding vpn-instance 1
 ipv6 enable 
 ip address 10.0.17.1 255.255.255.0 
 ipv6 address 2002::1/64 
#
interface GigabitEthernet0/0/1
 ip address 10.0.16.2 255.255.255.0 
 mpls
 mpls ldp
#
interface LoopBack1
 ip address 7.7.7.7 255.255.255.255 
#
bgp 200
 peer 2.2.2.2 as-number 100 
 peer 2.2.2.2 ebgp-max-hop 10 
 peer 2.2.2.2 connect-interface LoopBack1
 peer 5.5.5.5 as-number 200 
 peer 5.5.5.5 connect-interface LoopBack1
 #
 ipv4-family unicast
  undo synchronization
  network 7.7.7.7 255.255.255.255 
  peer 2.2.2.2 enable
  peer 5.5.5.5 enable
  peer 5.5.5.5 route-policy PE-AS export
  peer 5.5.5.5 label-route-capability
 #
 ipv6-family unicast
  undo synchronization
  peer 5.5.5.5 enable
  peer 5.5.5.5 route-policy PE-AS export
  peer 5.5.5.5 label-route-capability
 # 
 ipv4-family vpnv4
  policy vpn-target
  peer 2.2.2.2 enable
 #
 ipv4-family vpn-instance 1 
  peer 10.0.17.2 as-number 65002 
 # 
 ipv6-family vpnv6
  policy vpn-target
  peer 2.2.2.2 enable
 #
 ipv6-family vpn-instance 1 
  peer 2002::2 as-number 65002 
#
ospf 1 
 area 0.0.0.1 
  network 10.0.16.0 0.0.0.255 
  network 7.7.7.7 0.0.0.0 
#
route-policy PE-AS permit node 10 
 apply mpls-label
#
return 
           

8.CE_2

sysname CE-2
#
undo info-center enable
#
ipv6 
#
interface GigabitEthernet0/0/0
 ipv6 enable 
 ip address 10.0.17.2 255.255.255.0 
 ipv6 address 2002::2/64 
#
interface LoopBack1
 ipv6 enable 
 ip address 8.8.8.8 255.255.255.255 
 ipv6 address 8:8::8/128 
#
bgp 65002
 peer 10.0.17.1 as-number 200 
 peer 2002::1 as-number 200 
 #
 ipv4-family unicast
  undo synchronization
  network 8.8.8.8 255.255.255.255 
  peer 10.0.17.1 enable
 #
 ipv6-family unicast
  undo synchronization
  network 8:8::8 128 
  peer 2002::1 enable
#
return 
           

繼續閱讀