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

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



MSR绯诲垪璺敱鍣

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

 

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

 

涓銆缁勭綉闇姹

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 4.4.4.4 as-number 2                     //peB寤虹珛EBGP杩炴帴

 peer 1.1.1.1 as-number 1

 peer 4.4.4.4 ebgp-max-hop 64                 //鏀寔澶氳烦EBGP杩炴帴

 peer 4.4.4.4 connect-interface LoopBack0     //浣跨敤鐜洖鍙h繛鎺

 peer 1.1.1.1 label-route-capability          //浣胯兘鏍囩璺敱鑳藉姏

 peer 1.1.1.1 connect-interface LoopBack0

 #

 ipv4-family vpnv4

  peer 4.4.4.4 enable                         //peB浜ゆ崲vpn璺敱

 #

 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

#

acl number 2000             //瀹氫箟ACL鐢ㄤ簬璺敱绛栫暐

 rule 0 permit source 3.3.3.3 0

 rule 5 deny

#

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

network 3.3.3.3 255.255.255.255         //寮曞叆peA璺敱

 undo synchronization

 peer 1.2.0.2 as-number 2

 peer 3.3.3.3 as-number 1

 peer 1.2.0.2 route-policy asbrB export  //搴旂敤璺敱绛栫暐

 peer 1.2.0.2 label-route-capability     //浣胯兘鏍囩璺敱鑳藉姏

 peer 3.3.3.3 route-policy peA export    //搴旂敤璺敱绛栫暐

 peer 3.3.3.3 label-route-capability     //浣胯兘鏍囩璺敱鑳藉姏

 peer 3.3.3.3 connect-interface LoopBack0

#

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

#

route-policy asbrB permit node 0          //asbrB鐨勮矾鐢辩瓥鐣

 if-match acl 2000                        //鍖归厤鏉′欢

 apply mpls-label                         //鍒嗘爣绛炬搷浣

route-policy peA permit node 0            //peA鐨勮矾鐢辩瓥鐣

 if-match mpls-label                      //鍖归厤鏉′欢

 apply mpls-label                         //鍒嗘爣绛

#

asbrB閰嶇疆锛

#

 router id 2.2.2.2

#

mpls lsr-id 2.2.2.2

#

mpls

#

mpls ldp

#

acl number 2000             //瀹氫箟ACL鐢ㄤ簬璺敱绛栫暐

 rule 0 permit source 4.4.4.4 0

 rule 5 deny

#

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

network 4.4.4.4 255.255.255.255           //寮曞叆peB璺敱

 undo synchronization

 peer 1.2.0.1 as-number 1

 peer 4.4.4.4 as-number 2

 peer 1.2.0.1 route-policy asbrA export    //搴旂敤璺敱绛栫暐

 peer 1.2.0.1 label-route-capability       //浣胯兘鏍囩璺敱鑳藉姏

 peer 4.4.4.4 route-policy peB export      //搴旂敤璺敱绛栫暐

 peer 4.4.4.4 label-route-capability       //浣胯兘鏍囩璺敱鑳藉姏

 peer 4.4.4.4 connect-interface LoopBack0

#

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

#

route-policy asbrA permit node 0           //asbrA鐨勮矾鐢辩瓥鐣

 if-match acl 2000                         //鍖归厤鏉′欢

 apply mpls-label                          //鍒嗘爣绛炬搷浣

route-policy peB permit node 0             //peB鐨勮矾鐢辩瓥鐣

 if-match mpls-label                       //鍖归厤鏉′欢

 apply mpls-label                          //鍒嗘爣绛

#

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 3.3.3.3 as-number 1                 //peA寤虹珛EBGP杩炴帴

 peer 2.2.2.2 as-number 2

 peer 3.3.3.3 ebgp-max-hop 64             //鏀寔澶氳烦EBGP杩炴帴

 peer 3.3.3.3 connect-interface LoopBack0 //浣跨敤鐜洖鍙h繛鎺

 peer 2.2.2.2 label-route-capability      //浣胯兘鏍囩璺敱鑳藉姏

 peer 2.2.2.2 connect-interface LoopBack0

 #

 ipv4-family vpnv4

  peer 3.3.3.3 enable                     //peA浜ゆ崲vpn璺敱

 #

 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涓婅閰嶇疆鍖归厤pe鐜洖鎺ュ彛鍦板潃鐨ACL銆佸asbrpe鐨勮矾鐢辩瓥鐣ワ紱

2.      asbr闂翠笉浼犻vpn璺敱锛屼絾鏄湪bgp涓寮曞叆pe鐜洖鎺ュ彛璺敱锛

3.      asbr涓婅浠旂粏閰嶇疆璺敱绛栫暐锛

4.      asbr闂村拰asbr-pe闂撮兘瑕佷娇鑳bgp璺敱鏍囩鑳藉姏锛

5.      pe闂村缓绔嬪璺EBGP杩炴帴蹇呴』瑕佹敞鎰忓璺抽夐」锛

6.      pe闂寸殑澶氳烦EBGP杩炴帴蹇呴』浣跨敤鐜洖鎺ュ彛寤虹珛杩炴帴銆

X Close
X Close