03.03 BGP之MPLS路由


BGP之MPLS路由

本實驗涉及的內容:

  1. ISIS的基本配置;
  2. MPLS 的基本配置;
  3. VRF的基本配置;
  4. MP-BGP的基本配置。

注意:在實際應用過程中,EBGP鄰居必須要加密。凡是屬於邊界或者處於“公網”上的設備一定要做好安全防護措施。

<code>PE1配置:
ip vpn-instance vpna
ipv4-family
route-distinguisher 100:1
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
#
ip vpn-instance vpnb
ipv4-family
route-distinguisher 100:2
vpn-target 222:2 export-extcommunity
vpn-target 222:2 import-extcommunity
#
mpls lsr-id 5.5.5.5
mpls
#
mpls ldp
#
isis 2
network-entity 49.0001.0005.0005.0005.00
#
interface GigabitEthernet0/0/0
ip binding vpn-instance vpna
ip address 15.1.1.5 255.255.255.0
#
interface GigabitEthernet0/0/1
ip binding vpn-instance vpnb
ip address 25.1.1.5 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 56.1.1.5 255.255.255.0
isis enable 2
mpls
mpls ldp
#
interface LoopBack0
ip address 5.5.5.5 255.255.255.255
isis enable 2
#
bgp 567
router-id 5.5.5.5
peer 7.7.7.7 as-number 567
peer 7.7.7.7 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 7.7.7.7 enable
#
ipv4-family vpnv4
policy vpn-target
peer 7.7.7.7 enable
#
ipv4-family vpn-instance vpna
peer 15.1.1.1 as-number 100
#
ipv4-family vpn-instance vpnb
peer 25.1.1.2 as-number 200
#

P配置:
mpls lsr-id 6.6.6.6
mpls
#
mpls ldp
#
isis 2
network-entity 49.0001.0006.0006.0006.00
#
interface GigabitEthernet0/0/1
ip address 67.1.1.6 255.255.255.0
isis enable 2
mpls
mpls ldp
#
interface GigabitEthernet0/0/2
ip address 56.1.1.6 255.255.255.0
isis enable 2
mpls
mpls ldp
#
interface LoopBack0
ip address 6.6.6.6 255.255.255.255
isis enable 2
#

PE2配置:
ip vpn-instance vpna
ipv4-family
route-distinguisher 200:1
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
#
ip vpn-instance vpnb
ipv4-family
route-distinguisher 200:2
vpn-target 222:2 export-extcommunity
vpn-target 222:2 import-extcommunity
#
mpls lsr-id 7.7.7.7
mpls
#
mpls ldp
#
isis 2
network-entity 49.0001.0007.0007.0007.00
#
interface GigabitEthernet0/0/0
ip binding vpn-instance vpna
ip address 37.1.1.7 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 67.1.1.7 255.255.255.0
isis enable 2
mpls
mpls ldp
#
interface GigabitEthernet0/0/2
ip binding vpn-instance vpnb
ip address 47.1.1.7 255.255.255.0
#
interface LoopBack0
ip address 7.7.7.7 255.255.255.255
isis enable 2
#
bgp 567
router-id 7.7.7.7
peer 5.5.5.5 as-number 567
peer 5.5.5.5 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 5.5.5.5 enable
#
ipv4-family vpnv4
policy vpn-target
peer 5.5.5.5 enable
#
ipv4-family vpn-instance vpna
peer 37.1.1.3 as-number 300
#
ipv4-family vpn-instance vpnb
peer 47.1.1.4 as-number 400
#

CE1配置:
interface GigabitEthernet0/0/0
ip address 15.1.1.1 255.255.255.0
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
bgp 100
router-id 1.1.1.1
peer 15.1.1.5 as-number 567
#
ipv4-family unicast
undo synchronization
network 1.1.1.1 255.255.255.255
peer 15.1.1.5 enable
#

CE2配置:
interface GigabitEthernet0/0/1
ip address 25.1.1.2 255.255.255.0
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
bgp 200
router-id 2.2.2.2
peer 25.1.1.5 as-number 567
#
ipv4-family unicast
undo synchronization
network 2.2.2.2 255.255.255.255
peer 25.1.1.5 enable
#

CE3配置:
interface GigabitEthernet0/0/0
ip address 37.1.1.3 255.255.255.0
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
bgp 300
router-id 3.3.3.3
peer 37.1.1.7 as-number 567
#
ipv4-family unicast
undo synchronization
network 3.3.3.3 255.255.255.255
peer 37.1.1.7 enable
#

CE4配置:
interface GigabitEthernet0/0/2
ip address 47.1.1.4 255.255.255.0
#
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
#
bgp 400
router-id 4.4.4.4
peer 47.1.1.7 as-number 567
#
ipv4-family unicast
undo synchronization
network 4.4.4.4 255.255.255.255
peer 47.1.1.7 enable
#/<code>


分享到:


相關文章: