好消息,超酷的在线虚拟网络实验室上线了!点击开始实验

为获得更好的浏览效果,建议您使用 Firefox 或者 Chrome 浏览器



MSR绯诲垪璺敱鍣

MPLS L3VPN璺ㄥ煙鏂规B鍔熻兘鐨勯厤缃

 

鍏抽敭璇嶏細MSR;MPLS;L3VPN;璺ㄥ煙;OptionB

 

涓銆缁勭綉闇姹

peAasbrAAS1peBasbrBAS2peApeB閮戒笅鎸傜潃vpnavpnb鐨勭珯鐐癸紝peA涓嬫寕vpnavpnb绔欑偣1peB涓嬫寕vpnavpnb绔欑偣2

璁惧娓呭崟锛MSR绯诲垪璺敱鍣4

浜屻佺粍缃戝浘锛

涓夈侀厤缃楠わ細

璁惧鍜岀増鏈細MSR绯诲垪銆Version 5.20, Release 1509

peA閰嶇疆锛

#

 router id 3.3.3.3

#

ip vpn-instance vpna

 route-distinguisher 3:1

 vpn-target 1:1 export-extcommunity

 vpn-target 1:1 import-extcommunity

#

ip vpn-instance vpnb

 route-distinguisher 3:2

 vpn-target 2:2 export-extcommunity

 vpn-target 2:2 import-extcommunity

#

mpls lsr-id 3.3.3.3

#

mpls

#

mpls ldp

#

interface Ethernet0/0

 port link-mode route

 ip address 1.3.0.3 255.255.255.0

 mpls

 mpls ldp

#

interface Ethernet0/1

 port link-mode route

 ip binding vpn-instance vpna

 ip address 192.168.1.1 255.255.255.0

#

interface Ethernet1/0

 port link-mode route

 ip binding vpn-instance vpnb

 ip address 172.32.1.1 255.255.255.0

#

interface LoopBack0

 ip address 3.3.3.3 255.255.255.255

#

bgp 1

 undo synchronization

 peer 1.1.1.1 as-number 1

 peer 1.1.1.1 connect-interface LoopBack0

 #

 ipv4-family vpnv4

  peer 1.1.1.1 enable

 #

 ipv4-family vpn-instance vpna

  import-route direct

 #

 ipv4-family vpn-instance vpnb

  import-route direct

#

ospf 1

 area 0.0.0.0

  network 3.3.3.3 0.0.0.0

  network 1.3.0.0 0.0.0.255

#

asbrA閰嶇疆

router id 1.1.1.1

#

mpls lsr-id 1.1.1.1

#

mpls

#

mpls ldp

#

interface Ethernet0/0

 port link-mode route

 ip address 1.2.0.1 255.255.255.0

 mpls                       //浣胯兘MPLS娴侀噺杞彂鑳藉姏

#

interface Ethernet0/1

 port link-mode route

 ip address 1.3.0.1 255.255.255.0

 mpls

 mpls ldp

#

interface LoopBack0

 ip address 1.1.1.1 255.255.255.255

#

bgp 1

undo synchronization

 peer 1.2.0.2 as-number 2   //寤虹珛EBGP杩炴帴

 peer 3.3.3.3 as-number 1

 peer 3.3.3.3 connect-interface LoopBack0

 #

 ipv4-family vpnv4

  undo policy vpn-target    //鍙栨秷vpn-target绛栫暐

  peer 3.3.3.3 enable

  peer 1.2.0.2 enable       //EBGP閭诲眳鍙vpn鎵鏈vpn璺敱

#

ospf 1

 area 0.0.0.0

  network 1.1.1.1 0.0.0.0

  network 1.3.0.0 0.0.0.255

#

asbrB閰嶇疆锛

#

 router id 2.2.2.2

#

mpls lsr-id 2.2.2.2

#

mpls

#

mpls ldp

#

interface Ethernet0/0

 port link-mode route

 ip address 1.2.0.2 255.255.255.0

 mpls                       //浣胯兘MPLS娴侀噺杞彂鑳藉姏

#

interface Ethernet0/1

 port link-mode route

 ip address 2.4.0.2 255.255.255.0

 mpls

 mpls ldp

#

interface LoopBack0

 ip address 2.2.2.2 255.255.255.255

#

bgp 2

 undo synchronization

peer 1.2.0.1 as-number 1   //寤虹珛EBGP杩炴帴

 peer 4.4.4.4 as-number 2

 peer 4.4.4.4 connect-interface LoopBack0

 #

 ipv4-family vpnv4

  undo policy vpn-target //鍙栨秷vpn-target绛栫暐

  peer 4.4.4.4 enable

  peer 1.2.0.1 enable    //EBGP閭诲眳鍙vpn鎵鏈vpn璺敱

#

ospf 1

 area 0.0.0.0

  network 2.2.2.2 0.0.0.0

  network 2.4.0.0 0.0.0.255

#

peB閰嶇疆锛

router id 4.4.4.4

#

ip vpn-instance vpna

 route-distinguisher 4:1

 vpn-target 1:1 export-extcommunity

 vpn-target 1:1 import-extcommunity

#

ip vpn-instance vpnb

 route-distinguisher 4:2

 vpn-target 2:2 export-extcommunity

 vpn-target 2:2 import-extcommunity

#

mpls lsr-id 4.4.4.4

#

mpls

#

mpls ldp

#

interface Ethernet0/0

 port link-mode route

 ip address 2.4.0.4 255.255.255.0

 mpls

 mpls ldp

#

interface Ethernet0/1

 port link-mode route

 ip binding vpn-instance vpna

 ip address 192.168.2.1 255.255.255.0

#

interface Ethernet1/0

 port link-mode route

 ip binding vpn-instance vpnb

 ip address 172.32.2.1 255.255.255.0

#

interface LoopBack0

 ip address 4.4.4.4 255.255.255.255

#

bgp 2

 undo synchronization

 peer 2.2.2.2 as-number 2

 peer 2.2.2.2 connect-interface LoopBack0

 #

 ipv4-family vpnv4

  peer 2.2.2.2 enable

 #

 ipv4-family vpn-instance vpna

  import-route direct

 #

 ipv4-family vpn-instance vpnb

  import-route direct

#

ospf 1

 area 0.0.0.0

  network 4.4.4.4 0.0.0.0

  network 2.4.0.0 0.0.0.255

#

鍥涖閰嶇疆鍏抽敭鐐

1.      asbr闂寸殑鐩磋繛閾捐矾蹇呴』瑕佷娇鑳MPLS杞彂鑳藉姏锛

2.      asbr闂磋寤虹珛MP-EBGP杩炴帴锛岄厤缃被浼间簬鏅L3VPNMP-IBGP杩炴帴锛

3.      asbr鍙互涓嶇敤閰嶇疆vpn瀹炰緥锛岄渶瑕佸湪bgpvpnv4瑙嗗浘涓嬪彇娑vpn-target绛栫暐銆

X Close
X Close