国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 網絡通信 > 正文

Cisco IOS Cookbook 中文精簡版第二十六章MPLS

2019-11-04 23:17:34
字體:
來源:轉載
供稿:網友

26.1.  配置基本的MPLS P路由器

提問 配置MPLS核心網絡里面的P路由器

回答

Router-P1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-P1(config)#ip cef

Router-P1(config)#mpls ip

Router-P1(config)#interface FastEthernet0/0

Router-P1(config-if)#description connection to Router-PE2

Router-P1(config-if)#ip address 10.1.2.11 255.255.255.0

Router-P1(config-if)#mpls ip

Router-P1(config-if)#exit

Router-P1(config)#interface Serial0/0

Router-P1(config-if)#description connection to Router-PE1

Router-P1(config-if)#ip address 10.1.1.14 255.255.255.252

Router-P1(config-if)#mpls ip

Router-P1(config-if)#exit

Router-P1(config)#interface Serial0/1

Router-P1(config-if)#description connection to Router-PE3

Router-P1(config-if)#ip address 10.1.1.10 255.255.255.252

Router-P1(config-if)#mpls ip

Router-P1(config-if)#exit

Router-P1(config)#interface Loopback0

Router-P1(config-if)#ip address 10.0.0.11 255.255.255.255

Router-P1(config-if)#exit

Router-P1(config)#router ospf 99

Router-P1(config-router)#router-id 10.0.0.11

Router-P1(config-router)#network 10.0.0.0 0.255.255.255 area 0

Router-P1(config-router)#exit

Router-P1(config)#end

Router-P1#

注釋 對于P路由器就是啟用CEF和在端口啟用MPLS,對于tag-switching ip instead 和mpls ip兩個命令都基本一致,對于是否配置ldp或者tdp也不是必要的,路由器會自動適應。有三個驗證命令:

Router-P1#show mpls interfaces

Interface              IP            Tunnel   Operational

FastEthernet0/0        Yes (tdp)     No       Yes

Serial0/0              Yes (tdp)     No       Yes

Serial0/1              Yes (tdp)     No       Yes

Router-P1#show mpls ldp neighbor

    Peer TDP Ident: 10.0.0.2:0; Local TDP Ident 10.0.0.11:0

        TCP connection: 10.0.0.2.711 - 10.0.0.11.28185

        State: Oper; PIEs sent/rcvd: 0/82; Downstream

        Up time: 01:04:45

        TDP discovery sources:

          Serial0/0, Src IP addr: 10.1.1.13

        Addresses bound to peer TDP Ident:

          10.0.0.2        10.1.1.2        10.1.1.13

Router-P1#show mpls forwarding-table

Local  Outgoing    PRefix            Bytes tag  Outgoing   Next Hop

tag    tag or VC   or Tunnel Id      switched   interface

16     Pop tag     10.0.0.2/32       7697       Se0/0      point2point

17     Pop tag     10.1.1.0/30       0          Se0/0      point2point

18     Pop tag     10.0.0.3/32       6685       Se0/1      point2point

進入討論組討論。

26.2.  配置基本的MPLS PE路由器

提問 配置MPLS網絡的運營商邊界路由器來互聯用戶網絡

回答

配置三臺PE路由器

Router-PE1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-PE1(config)#ip cef

Router-PE1(config)#mpls ip

Router-PE1(config)#interface Serial0/0

Router-PE1(config-if)#description Connection to Router-P1

Router-PE1(config-if)#ip address 10.1.1.13 255.255.255.252

Router-PE1(config-if)#mpls ip

Router-PE1(config-if)#exit

Router-PE1(config)#interface Loopback0

Router-PE1(config-if)#ip address 10.0.0.2 255.255.255.255

Router-PE1(config-if)#exit

Router-PE1(config)#router ospf 99

Router-PE1(config-router)#router-id 10.0.0.2

Router-PE1(config-router)#network 10.0.0.0 0.255.255.255 area 0

Router-PE1(config-router)#exit

Router-PE1(config)#ip vrf NetworkA

Router-PE1(config-vrf)#rd 100:1

Router-PE1(config-vrf)#route-target eXPort 100:1

Router-PE1(config-vrf)#route-target import 100:1

Router-PE1(config-vrf)#exit

Router-PE1(config)#ip vrf NetworkB

Router-PE1(config-vrf)#rd 100:2

Router-PE1(config-vrf)#route-target export 100:2

Router-PE1(config-vrf)#route-target import 100:2

Router-PE1(config-vrf)#exit

Router-PE1(config)#interface Ethernet0/0

Router-PE1(config-if)#description connection to customer A, site 1

Router-PE1(config-if)#ip vrf forwarding NetworkA

Router-PE1(config-if)#ip address 192.168.1.1 255.255.255.0

Router-PE1(config-if)#exit

Router-PE1(config)#interface Ethernet0/1

Router-PE1(config-if)#description connection to customer B, site 1

Router-PE1(config-if)#ip vrf forwarding NetworkB

Router-PE1(config-if)#ip address 192.168.11.1 255.255.255.0

Router-PE1(config-if)#exit

Router-PE1(config)#router bgp 100

Router-PE1(config-router)#bgp log-neighbor-changes

Router-PE1(config-router)#neighbor 10.0.0.3 remote-as 100

Router-PE1(config-router)#neighbor 10.0.0.3 update-source Loopback0

Router-PE1(config-router)#neighbor 10.0.0.4 remote-as 100

Router-PE1(config-router)#neighbor 10.0.0.4 update-source Loopback0

Router-PE1(config-router)#address-family ipv4 vrf NetworkA

Router-PE1(config-router-af)#no auto-summary

Router-PE1(config-router-af)#no synchronization

Router-PE1(config-router-af)#redistribute connected

Router-PE1(config-router-af)#exit-address-family

Router-PE1(config-router)#adress-family ipv4 vrf NetworkB

Router-PE1(config-router-af)#no auto-summary

Router-PE1(config-router-af)#no synchronization

Router-PE1(config-router-af)#redistribute connected

Router-PE1(config-router-af)#exit-address-family

Router-PE1(config-router)#address-family vpnv4

Router-PE1(config-router-af)#neighbor 10.0.0.3 activate

Router-PE1(config-router-af)#neighbor 10.0.0.3 send-community extended

Router-PE1(config-router-af)#neighbor 10.0.0.4 activate

Router-PE1(config-router-af)#neighbor 10.0.0.4 send-community extended

Router-PE1(config-router-af)#exit-address-family

Router-PE1(config-router)#exit

Router-PE1(config)#end

Router-PE1#

Router-PE2#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-PE2(config)#ip cef

Router-PE2(config)#mpls ip

Router-PE2(config)#interface FastEthernet0/0

Router-PE2(config-if)#no ip address

Router-PE2(config-if)#exit

Router-PE2(config)#interface FastEthernet0/0.1

Router-PE2(config-if)#description Connection to Router-P1

Router-PE2(config-if)#encapsulation dot1Q 10

Router-PE2(config-if)#ip address 10.1.2.4 255.255.255.0

Router-PE2(config-if)#mpls ip

Router-PE2(config-if)#exit

Router-PE2(config)#interface Loopback0

Router-PE2(config-if)#ip address 10.0.0.3 255.255.255.255

Router-PE2(config-if)#exit

Router-PE2(config)#router ospf 99

Router-PE2(config-router)#router-id 10.0.0.3

Router-PE2(config-router)#network 10.0.0.0 0.255.255.255 area 0

Router-PE2(config-router)#exit

Router-PE2(config)#ip vrf NetworkA

Router-PE2(config-vrf)#rd 100:1

Router-PE2(config-vrf)#route-target export 100:1

Router-PE2(config-vrf)#route-target import 100:1

Router-PE2(config-vrf)#exit

Router-PE2(config)#ip vrf NetworkB

Router-PE2(config-vrf)#rd 100:2

Router-PE2(config-vrf)#route-target export 100:2

Router-PE2(config-vrf)#route-target import 100:2

Router-PE2(config-vrf)#exit

Router-PE2(config)#interface FastEthernet0/0.2

Router-PE2(config-if)#description Connection to customer A, site 2

Router-PE2(config-if)#encapsulation dot1Q 102

Router-PE2(config-if)#ip address 192.168.3.1 255.255.255.0

Router-PE2(config-if)#mpls ip

Router-PE2(config-if)#exit

Router-PE2(config)#router bgp 100

Router-PE2(config-router)#bgp log-neighbor-changes

Router-PE2(config-router)#neighbor 10.0.0.2 remote-as 100

Router-PE2(config-router)#neighbor 10.0.0.2 update-source Loopback0

Router-PE2(config-router)#neighbor 10.0.0.3 remote-as 100

Router-PE2(config-router)#neighbor 10.0.0.3 update-source Loopback0

Router-PE2(config-router)#address-family ipv4 vrf NetworkA

Router-PE2(config-router-af)#no auto-summary

Router-PE2(config-router-af)#no synchronization

Router-PE2(config-router-af)#redistribute connected

Router-PE2(config-router-af)#exit-address-family

Router-PE2(config-router)#address-family vpnv4

Router-PE2(config-router-af)#neighbor 10.0.0.2 activate

Router-PE2(config-router-af)#neighbor 10.0.0.2 send-community extended

Router-PE2(config-router-af)#neighbor 10.0.0.4 activate

Router-PE2(config-router-af)#neighbor 10.0.0.4 send-community extended

Router-PE2(config-router-af)#exit-address-family

Router-PE2(config-router)#exit

Router-PE2(config)#end

Router-PE2#

Router-PE3#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-PE3(config)#ip cef

Router-PE3(config)#mpls ip

Router-PE3(config)#interface Serial0/0

Router-PE3(config-if)#description Connection to Router-P1

Router-PE3(config-if)#ip address 10.1.1.9 255.255.255.252

Router-PE3(config-if)#mpls ip

Router-PE3(config-if)#exit

Router-PE3(config)#interface Loopback0

Router-PE3(config-if)#ip address 10.0.0.3 255.255.255.255

Router-PE3(config-if)#exit

Router-PE3(config)#router ospf 99

Router-PE3(config-router)#router-id 10.0.0.3

Router-PE3(config-router)#network 10.0.0.0 0.255.255.255 area 0

Router-PE3(config-router)#exit

Router-PE3(config)#ip vrf NetworkA

Router-PE3(config-vrf)#rd 100:1

Router-PE3(config-vrf)#route-target export 100:1

Router-PE3(config-vrf)#route-target import 100:1

Router-PE3(config-vrf)#exit

Router-PE3(config)#ip vrf NetworkB

Router-PE3(config-vrf)#rd 100:2

Router-PE3(config-vrf)#route-target export 100:2

Router-PE3(config-vrf)#route-target import 100:2

Router-PE3(config-vrf)#exit

Router-PE3(config)#interface Ethernet0/0

Router-PE3(config-if)#description connection to customer A, site 3

Router-PE3(config-if)#ip vrf forwarding NetworkA

Router-PE3(config-if)#ip address 192.168.2.1 255.255.255.0

Router-PE3(config-if)#exit

Router-PE3(config)#interface Ethernet0/1

Router-PE3(config-if)#description connection to customer B, site 2

Router-PE3(config-if)#ip vrf forwarding NetworkB

Router-PE3(config-if)#ip address 192.168.10.1 255.255.255.0

Router-PE3(config-if)#exit

Router-PE3(config)#router bgp 100

Router-PE3(config-router)#bgp log-neighbor-changes

Router-PE3(config-router)#neighbor 10.0.0.2 remote-as 100

Router-PE3(config-router)#neighbor 10.0.0.2 update-source Loopback0

Router-PE3(config-router)#neighbor 10.0.0.4 remote-as 100

Router-PE3(config-router)#neighbor 10.0.0.4 update-source Loopback0

Router-PE3(config-router)#address-family ipv4 vrf NetworkA

Router-PE3(config-router-af)#no auto-summary

Router-PE3(config-router-af)#no synchronization

Router-PE3(config-router-af)#redistribute connected

Router-PE3(config-router-af)#exit-address-family

Router-PE3(config-router)#adress-family ipv4 vrf NetworkB

Router-PE3(config-router-af)#no auto-summary

Router-PE3(config-router-af)#no synchronization

Router-PE3(config-router-af)#redistribute connected

Router-PE3(config-router-af)#exit-address-family

Router-PE3(config-router)#address-family vpnv4

Router-PE3(config-router-af)#neighbor 10.0.0.2 activate

Router-PE3(config-router-af)#neighbor 10.0.0.2 send-community extended

Router-PE3(config-router-af)#neighbor 10.0.0.4 activate

Router-PE3(config-router-af)#neighbor 10.0.0.4 send-community extended

Router-PE3(config-router-af)#exit-address-family

Router-PE3(config-router)#exit

Router-PE3(config)#end

Router-PE3#

注釋 對于PE路由器首先是類似P路由器的基本MPLS配置,然后是配置了兩個客戶網絡的VRF,其中rd用來作為MP BGP發布此VRF路由的標簽,route target用來告訴MP BGP那個rd與之共享路由。在關聯接口和VRF的時候要先配置ip vrf forwarding命令然后配置IP地址,通過show ip vrf來驗證。然后就是MP-BGP的配置,這里和平常BGP配置最大的不同就是必須有send-community extended的配置,因為VRF的信息是通過這個值來宣告的,兩個驗證命令show ip route vrf NetworkA和ping vrf NetworkA 192.168.2.9 source 192.168.1.1

進入討論組討論。

26.3.  配置基本的MPLS CE路由器

提問 配置客戶網絡的邊界路由器

回答

Router-CE-A1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-CE-A1(config)#interface FastEthernet0/0.1

Router-CE-A1(config-if)#encapsulation dot1Q 101

Router-CE-A1(config-if)#ip address 192.168.1.5 255.255.255.0

Router-CE-A1(config-if)#exit

Router-CE-A1(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.1

Router-CE-A1(config)# exit

Router-CE-A1#

注釋 CE路由器沒有非凡的配置,只是需要到MPLS網絡的路由而已,這里使用的是靜態路由,使用其他動態路由協議也可以,這樣兩個不同的站點可以互通路由表

26.4.  配置ATM網絡的MPLS

提問 配置運行于ATM網絡上的MPLS

回答

根據ATM交換機性能的不同大概有兩種配置,一種是不參與MPLS只是基本的信元傳遞

Router-PE1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-PE1(config)#ip cef

Router-PE1(config)#mpls ip

Router-PE1(config)#interface ATM1/0

Router-PE1(config-if)#no ip address

Router-PE1(config-if)#exit

Router-PE1(config)#interface ATM1/0.1 mpls

Router-PE1(config-if)#ip address 10.1.1.2 255.255.255.252

Router-PE1(config-if)#mpls ip

Router-PE1(config-if)#exit

Router-PE1(config)#end

Router-PE1#

Router-PE3#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-PE3(config)#ip cef

Router-PE3(config)#mpls ip

Router-PE3(config)#interface ATM1/0

Router-PE3(config-if)#no ip address

Router-PE3(config-if)#exit

Router-PE3(config)#interface ATM1/0.1 mpls

Router-PE3(config-if)#ip address 10.1.1.1 255.255.255.252

Router-PE3(config-if)#mpls ip

Router-PE3(config-if)#exit

Router-PE3(config)#end

Router-PE3#

ATM switch 交換機需要配置兩個PVCs: 一個用于控制VC一個用戶數據VC:

Switch-P2#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Switch-P2(config)#interface ATM0/1/2

Switch-P2(config-if)#no ip address

Switch-P2(config-if)#exit

Switch-P2(config)#interface ATM0/1/3

Switch-P2(config-if)#no ip address

Switch-P2(config-if)#atm pvc 0 32 interface ATM0/1/2 0 32

Switch-P2(config-if)#atm pvc 1 33 interface ATM0/1/2 1 33

Switch-P2(config-if)#exit

Switch-P2(config)#end

Switch-P2#

另一種新的ATM交換機可以參與類似P路由器那樣的MPLS包轉發

Router-PE1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-PE1(config)#ip cef

Router-PE1(config)#mpls ip

Router-PE1(config)#interface ATM1/0

Router-PE1(config-if)#no ip address

Router-PE1(config-if)#exit

Router-PE1(config)#interface ATM1/0.1 mpls

Router-PE1(config-if)#ip address 10.1.1.2 255.255.255.252

Router-PE1(config-if)#mpls ip

Router-PE1(config-if)#exit

Router-PE1(config)#end

Router-PE1#

Router-PE3#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-PE3(config)#ip cef

Router-PE3(config)#mpls ip

Router-PE3(config)#interface ATM1/0

Router-PE3(config-if)#no ip address

Router-PE3(config-if)#exit

Router-PE3(config)#interface ATM1/0.1 mpls

Router-PE3(config-if)#ip address 10.1.1.6 255.255.255.252

Router-PE3(config-if)#mpls ip

Router-PE3(config-if)#exit

Router-PE3(config)#end

Router-PE3#

Switch-P2#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Switch-P2(config)#ip cef

Switch-P2(config)#mpls ip

Switch-P2(config)#interface ATM0/1/2

Switch-P2(config-if)#ip address 10.1.1.5 255.255.255.252

Switch-P2(config-if)#mpls ip

Switch-P2(config-if)#exit

Switch-P2(config)#interface ATM0/1/3

Switch-P2(config-if)#ip address 10.1.1.1 255.255.255.252

Switch-P2(config-if)#mpls ip

Switch-P2(config-if)#exit

Switch-P2(config)#interface Loopback0

Switch-P2(config-if)#ip address 10.0.0.1 255.255.255.255

Switch-P2(config-if)#exit

Switch-P2(config)#router ospf 99

Switch-P2(config-router)#router-id 10.0.0.1

Switch-P2(config-router)#network 10.0.0.0 0.255.255.255 area 0

Switch-P2(config-router)#exit

Switch-P2(config)#end

Switch-P2#

注釋 注重這里的配置是不全的是,只是和ATM有關的配置。第一種方式由于VC的配置所以擴展性不強,而另一種參與了IGP所以增強了擴展性

進入討論組討論。

26.5.  PE-CE 之間運行RIP

提問 PE和CE路由器之間啟用RIP路由協議

回答

Router-CE-A2#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-CE-A2(config)#router rip

Router-CE-A2(config-router)#version 2

Router-CE-A2(config-router)#network 10.0.0.0

Router-CE-A2(config-router)#network 192.168.3.0

Router-CE-A2(config-router)#end

Router-CE-A2#

Router-PE2#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-PE2(config)#router rip

Router-PE2(config-router)#version 2

Router-PE2(config-router)#address-family ipv4 vrf NetworkA

Router-PE2(config-router-af)#version 2

Router-PE2(config-router-af)#redistribute bgp 100 metric 4

Router-PE2(config-router-af)#network 192.168.3.0

Router-PE2(config-router-af)#exit-address-family

Router-PE2(config-router)#exit

Router-PE2(config)#router bgp 100

Router-PE2(config-router)#address-family ipv4 vrf NetworkA

Router-PE2(config-router-af)#redistribute rip metric 4

Router-PE2(config-router-af)#end

Router-PE2#

 

注釋 這里需要注重的是RIP不是全局啟用的,只是在特定的VRF下面的配置address-family ipv4 vrf NetworkA,另外需要配置RIP和MP-BGP之間的路由再分布。這里的再分布和傳統再分布不同的是,分布到IGP的路由不是標記為外部路由的

26.6.  PE-CE之間運行OSPF

提問 PE和CE路由器之間啟用OSPF路由協議

回答

兩個不同站點的CE路由器

Router-CE-A1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-CE-A1(config)#router ospf 55

Router-CE-A1(config-router)#network 192.168.1.0 0.0.0.255 area 0

Router-CE-A1(config-router)#network 192.168.5.0 0.0.0.255 area 0

Router-CE-A1(config-router)#end

Router-CE-A1#

Router-CE-A2#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-CE-A2(config)#router ospf 55

Router-CE-A2(config-router)#network 192.168.3.0 0.0.0.255 area 0

Router-CE-A2(config-router)#end

Router-CE-A2#

兩個相應站點的PE路由器

Router-PE1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-PE1(config)#router ospf 155 vrf NetworkA

Router-PE1(config-router)#redistribute bgp 100 subnets

Router-PE1(config-router)#network 192.168.1.0 0.0.0.255 area 0

Router-PE1(config-router)#exit

Router-PE1(config)#router bgp 100

Router-PE1(config-router)#address-family ipv4 vrf NetworkA

Router-PE1(config-router-af)#redistribute ospf 155

Router-PE1(config-router-af)#exit-address-family

Router-PE1(config-router)#end

Router-PE1#

Router-PE2#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-PE2(config)#router ospf 155 vrf NetworkA

Router-PE2(config-router)#redistribute bgp 100 subnets

Router-PE2(config-router)#network 192.168.3.0 0.0.0.255 area 0

Router-PE2(config-router)#exit

Router-PE2(config)#router bgp 100

Router-PE2(config-router)#address-family ipv4 vrf NetworkA

Router-PE2(config-router-af)#redistribute ospf 155

Router-PE2(config-router-af)#exit-address-family

Router-PE2(config-router)#end

Router-PE2#

注釋 這里只是和路由相關的配置,其他配置略去。12.2(8)T以后有shamlink這種特性來通過類似虛擬鏈路的方式修改OSPF的路由條目,從inter-area路由變為intra-area路由,

Router-PE1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-PE1(config)#interface Loopback155

Router-PE1(config-if)#ip vrf forwarding NetworkA

Router-PE1(config-if)#ip address 192.168.155.1 255.255.255.255

Router-PE1(config-if)#exit

Router-PE1(config)#router ospf 155 vrf NetworkA

Router-PE1(config-router)#area 0 sham-link 192.168.155.1 192.168.155.2 cost 10

Router-PE1(config-router)#redistribute bgp 100 subnets

Router-PE1(config-router)#network 192.168.1.0 0.0.0.255 area 0

Router-PE1(config-router)#end

Router-PE1#

Router-PE2#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-PE2(config)#interface Loopback155

Router-PE2(config-if)#ip vrf forwarding NetworkA

Router-PE2(config-if)#ip address 192.168.155.2 255.255.255.255

Router-PE2(config-if)#exit

Router-PE2(config)#router ospf 155 vrf NetworkA

Router-PE2(config-router)#area 0 sham-link 192.168.155.2 192.168.155.1 cost 10

Router-PE2(config-router)#redistribute bgp 100 subnets

Router-PE2(config-router)#network 192.168.3.0 0.0.0.255 area 0

Router-PE2(config-router)#end

Router-PE2#

26.7.  PE-CE之間運行EIGRP

提問 PE和CE路由器之間啟用EIGRP路由協議

回答

Router-CE-A1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-CE-A1(config)#router eigrp 156

Router-CE-A1(config-router)#network 192.168.1.0

Router-CE-A1(config-router)#network 192.168.5.0

Router-CE-A1(config-router)#no auto-summary

Router-CE-A1(config-router)#end

Router-CE-A1#

Router-CE-A2#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-CE-A2(config)#router eigrp 156

Router-CE-A2(config-router)#network 10.0.0.0

Router-CE-A2(config-router)#network 192.168.3.0

Router-CE-A2(config-router)#no auto-summary

Router-CE-A2(config-router)#end

Router-CE-A2#

Router-PE1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-PE1(config)#router eigrp 1001

Router-PE1(config-router)#no auto-summary

Router-PE1(config-router)#address-family ipv4 vrf NetworkA

Router-PE1(config-router-af)#redistribute bgp 100 metric 10000 10 255 1 1500

Router-PE1(config-router-af)#network 192.168.1.0

Router-PE1(config-router-af)#no auto-summary

Router-PE1(config-router-af)#autonomous-system 156

Router-PE1(config-router-af)#exit-address-family

Router-PE1(config-router)#exit

Router-PE1(config)#router bgp 100

Router-PE1(config-router)#address-family ipv4 vrf NetworkA

Router-PE1(config-router-af)#redistribute eigrp 156

Router-PE1(config-router-af)#exit-address-family

Router-PE1(config-router)#exit

Router-PE1(config)#end

Router-PE1#

Router-PE2#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-PE2(config)#router eigrp 1001

Router-PE2(config-router)#auto-summary

Router-PE2(config-router)#address-family ipv4 vrf NetworkA

Router-PE2(config-router-af)#redistribute bgp 100 metric 10000 10 255 1 1500

Router-PE2(config-router-af)#network 192.168.3.0

Router-PE2(config-router-af)#no auto-summary

Router-PE2(config-router-af)#autonomous-system 156

Router-PE2(config-router-af)#exit-address-family

Router-PE2(config-router)#end

Router-PE2#

注釋 注重的是VRF中自治域系統的配置和相應再分發是選擇的AS配置,要確保PE和CE的一致,對PE這里有兩個EIGRP的AS號

進入討論組討論。

26.8.  PE-CE之間運行BGP

提問 PE和CE路由器之間啟用BGP路由協議

回答

Router-CE-A1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-CE-A1(config)#router bgp 65535

Router-CE-A1(config-router)#neighbor 192.168.1.1 remote-as 100

Router-CE-A1(config-router)#redistribute ospf 155

Router-CE-A1(config-router)#no synchronization

Router-CE-A1(config-router)#no auto-summary

Router-CE-A1(config-router)#exit

Router-CE-A1(config)#router ospf 155

Router-CE-A1(config-router)#redistribute bgp 65535 subnets

Router-CE-A1(config-router)#network 192.168.5.0 0.0.0.255 area 0

Router-CE-A1(config-router)#end

Router-CE-A1#

Router-CE-A2#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-CE-A2(config)#router bgp 65534

Router-CE-A2(config-router)#neighbor 192.168.3.1 remote-as 100

Router-CE-A2(config-router)#network 10.8.8.0 mask 255.255.255.0

Router-CE-A2(config-router)#network 192.168.3.0

Router-CE-A2(config-router)#no synchronization

Router-CE-A2(config-router)#no auto-summary

Router-CE-A2(config-router)#end

Router-CE-A2#

Router-PE1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-PE1(config)#router bgp 100

Router-PE1(config-router)#address-family ipv4 vrf NetworkA

Router-PE1(config-router-af)#neighbor 192.168.1.5 remote-as 65535

Router-PE1(config-router-af)#neighbor 192.168.1.5 activate

Router-PE1(config-router-af)#end

Router-PE1#

Router-PE2#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-PE2(config)#router bgp 100

Router-PE2(config-router)#address-family ipv4 vrf NetworkA

Router-PE2(config-router-af)#neighbor 192.168.3.8 remote-as 65534

Router-PE2(config-router-af)#neighbor 192.168.3.8 activate

Router-PE2(config-router-af)#end

Router-PE2#

注釋 這里仍然不是全部的配置。對于BGP來說就不需要再配置再分布了,不過很少有運營商會支持客戶網絡的BGP互聯

26.9.  MPLS上的QoS

提問 配置MPLS上QoS的支持

回答

Router-PE1#configure terminal

Router-PE1(config)#class-map match-any med-priority

Router-PE1(config-cmap)#match precedence 1

Router-PE1(config-cmap)#match precedence 2

Router-PE1(config-cmap)#exit

Router-PE1(config)#class-map match-any high-priority

Router-PE1(config-cmap)#match precedence 3

Router-PE1(config-cmap)#match precedence 4

Router-PE1(config-cmap)#match precedence 5

Router-PE1(config-cmap)#exit

Router-PE1(config)#class-map match-any realtime-priority

Router-PE1(config-cmap)#match precedence 6

Router-PE1(config-cmap)#match dscp ef

Router-PE1(config-cmap)#exit

Router-PE1(config)#policy-map MPLS-priority

Router-PE1(config-pmap)#class realtime-priority

Router-PE1(config-pmap-c)#priority percent 10

Router-PE1(config-pmap-c)#set mpls experimental topmost 3

Router-PE1(config-pmap-c)#exit

Router-PE1(config-pmap)#class high-priority

Router-PE1(config-pmap-c)#bandwidth percent 10

Router-PE1(config-pmap-c)#queue-limit 20

Router-PE1(config-pmap-c)#set mpls experimental topmost 2

Router-PE1(config-pmap-c)#exit

Router-PE1(config-pmap)#class med-priority

Router-PE1(config-pmap-c)#bandwidth percent 15

Router-PE1(config-pmap-c)#queue-limit 50

Router-PE1(config-pmap-c)#set mpls experimental topmost 1

Router-PE1(config-pmap-c)#exit

Router-PE1(config-pmap)#class class-default

Router-PE1(config-pmap-c)#bandwidth percent 40

Router-PE1(config-pmap-c)#random-detect

Router-PE1(config-pmap-c)#set mpls experimental topmost 0

Router-PE1(config-pmap-c)#exit

Router-PE1(config-pmap)#exit

Router-PE1(config)#interface Serial0/0

Router-PE1(config-if)#service-policy output MPLS-priority

Router-PE1(config-if)#exit

Router-PE1(config)#end

Router-PE1#

Router-P1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-P1(config)#class-map match-any med-priority

Router-P1(config-cmap)#match mpls experimental topmost 1

Router-P1(config-cmap)#exit

Router-P1(config)#class-map match-any high-priority

Router-P1(config-cmap)#match mpls experimental topmost 2

Router-P1(config-cmap)#exit

Router-P1(config)#class-map match-any realtime-priority

Router-P1(config-cmap)#match mpls experimental topmost 3

Router-P1(config-cmap)#exit

Router-P1(config)#policy-map MPLS-priority

Router-P1(config-pmap)#class realtime-priority

Router-P1(config-pmap-c)#priority percent 10

Router-P1(config-pmap-c)#exit

Router-P1(config-pmap)#class high-priority

Router-P1(config-pmap-c)#bandwidth percent 10

Router-P1(config-pmap-c)#queue-limit 20

Router-P1(config-pmap-c)#exit

Router-P1(config-pmap)#class med-priority

Router-P1(config-pmap-c)#bandwidth percent 15

Router-P1(config-pmap-c)#queue-limit 50

Router-P1(config-pmap-c)#exit

Router-P1(config-pmap)#class class-default

Router-P1(config-pmap-c)#bandwidth percent 40

Router-P1(config-pmap-c)#random-detect

Router-P1(config-pmap-c)#exit

Router-P1(config-pmap)#exit

Router-P1(config)#interface FastEthernet0/0

Router-P1(config-if)#service-policy output MPLS-priority

Router-P1(config-if)#exit

Router-P1(config)#end

Router-P1#

注釋 簡單的說就是PE做客戶網絡數據包的DSCP或者IP優先級位和MPLS EXP優先級位之間的轉化,EXP目前只能支持四種類型的數據包。很有用的驗證命令

Router-P1#show policy interface FastEthernet0/0

FastEthernet0/0

 

  Service-policy output: MPLS-priority

 

    Class-map: realtime-priority (match-any)

      0 packets, 0 bytes

      5 minute offered rate 0 bps, drop rate 0 bps

      Match: mpls experimental topmost 3

        0 packets, 0 bytes

        5 minute rate 0 bps

      Queueing

        Strict Priority

        Output Queue: Conversation 264

        Bandwidth 10 (%)

        Bandwidth 10000 (kbps) Burst 250000 (Bytes)

        (pkts matched/bytes matched) 0/0

        (total drops/bytes drops) 0/0

進入討論組討論。

26.10.  Autoroute 和MPLS流量工程

提問 使用autoroute特性來自動維護MPLS網絡的流量工程路徑

回答

Router-PE1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-PE1(config)#mpls traffic-eng tunnels

Router-PE1(config)#interface Loopback0

Router-PE1(config-if)#ip address 10.0.0.2 255.255.255.255

Router-PE1(config-if)#exit

Router-PE1(config)#interface Tunnel11

Router-PE1(config-if)#ip unnumbered Loopback0

Router-PE1(config-if)#tunnel destination 10.0.0.3

Router-PE1(config-if)#tunnel mode mpls traffic-eng

Router-PE1(config-if)#tunnel mpls traffic-eng autoroute announce

Router-PE1(config-if)#tunnel mpls traffic-eng priority 7 7

Router-PE1(config-if)#tunnel mpls traffic-eng bandwidth 256

Router-PE1(config-if)#tunnel mpls traffic-eng path-option 1 explicit name def-PE3

Router-PE1(config-if)#exit

Router-PE1(config)#interface Tunnel12

Router-PE1(config-if)#ip unnumbered Loopback0

Router-PE1(config-if)#tunnel destination 10.0.0.3

Router-PE1(config-if)#tunnel mode mpls traffic-eng

Router-PE1(config-if)#tunnel mpls traffic-eng autoroute announce

Router-PE1(config-if)#tunnel mpls traffic-eng priority 7 7

Router-PE1(config-if)#tunnel mpls traffic-eng bandwidth 256

Router-PE1(config-if)#tunnel mpls traffic-eng path-option 1 explicit name hi-PE3

Router-PE1(config-if)#exit

Router-PE1(config)#interface Serial0/0

Router-PE1(config-if)#ip address 10.1.1.13 255.255.255.252

Router-PE1(config-if)#mpls traffic-eng tunnels

Router-PE1(config-if)#tag-switching ip

Router-PE1(config-if)#ip rsvp bandwidth 512

Router-PE1(config-if)#exit

Router-PE1(config)#interface ATM1/0.1 tag-switching

Router-PE1(config-subif)#ip address 10.1.1.2 255.255.255.252

Router-PE1(config-subif)#mpls traffic-eng tunnels

Router-PE1(config-subif)#tag-switching ip

Router-PE1(config-subif)#ip rsvp bandwidth 4000

Router-PE1(config-subif)#exit

Router-PE1(config)#router ospf 99

Router-PE1(config-router)#router-id 10.0.0.2

Router-PE1(config-router)#log-adjacency-changes

Router-PE1(config-router)#network 10.0.0.0 0.255.255.255 area 0

Router-PE1(config-router)#mpls traffic-eng router-id Loopback0

Router-PE1(config-router)#mpls traffic-eng area 0

Router-PE1(config-router)#exit

Router-PE1(config)#ip explicit-path name def-PE3 enable

Router-PE1(cfg-ip-expl-path)#next-address 10.1.1.14

Explicit Path name def-PE3:

    1: next-address 10.1.1.14

Router-PE1(cfg-ip-expl-path)#next-address 10.1.1.9

Explicit Path name def-PE3:

    1: next-address 10.1.1.14

    2: next-address 10.1.1.9

Router-PE1(cfg-ip-expl-path)#exit

Router-PE1(config)#ip explicit-path name hi-PE3 enable

Router-PE1(cfg-ip-expl-path)#next-address 10.1.1.1

Explicit Path name hi-PE3:

    1: next-address 10.1.1.1

Router-PE1(cfg-ip-expl-path)#next-address 10.1.1.6

Explicit Path name hi-PE3:

    1: next-address 10.1.1.1

    2: next-address 10.1.1.6

Router-PE1(cfg-ip-expl-path)#exit

Router-PE1(config)#end

Router-PE1#

Router-PE3#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-PE3(config)#mpls traffic-eng tunnels

Router-PE3(config)#interface Loopback0

Router-PE3(config-if)#ip address 10.0.0.3 255.255.255.255

Router-PE3(config-if)#exit

Router-PE3(config)#interface Tunnel11

Router-PE3(config-if)#ip unnumbered Loopback0

Router-PE3(config-if)#tunnel destination 10.0.0.2

Router-PE3(config-if)#tunnel mode mpls traffic-eng

Router-PE3(config-if)#tunnel mpls traffic-eng autoroute announce

Router-PE3(config-if)#tunnel mpls traffic-eng priority 7 7

Router-PE3(config-if)#tunnel mpls traffic-eng bandwidth 256

Router-PE3(config-if)#tunnel mpls traffic-eng path-option 1 explicit name def-PE1

Router-PE3(config-if)#exit

Router-PE3(config)#interface Tunnel12

Router-PE3(config-if)#ip unnumbered Loopback0

Router-PE3(config-if)#tunnel destination 10.0.0.2

Router-PE3(config-if)#tunnel mode mpls traffic-eng

Router-PE3(config-if)#tunnel mpls traffic-eng autoroute announce

Router-PE3(config-if)#tunnel mpls traffic-eng priority 7 7

Router-PE3(config-if)#tunnel mpls traffic-eng bandwidth 256

Router-PE3(config-if)#tunnel mpls traffic-eng path-option 1 explicit name hi-PE1

Router-PE3(config-if)#exit

Router-PE3(config)#interface Serial0/0

Router-PE3(config-if)#ip address 10.1.1.9 255.255.255.252

Router-PE3(config-if)#mpls traffic-eng tunnels

Router-PE3(config-if)#tag-switching ip

Router-PE3(config-if)#ip rsvp bandwidth 512

Router-PE3(config-if)#exit

Router-PE3(config)#interface ATM1/0.1 tag-switching

Router-PE3(config-subif)#ip address 10.1.1.6 255.255.255.252

Router-PE3(config-subif)#mpls traffic-eng tunnels

Router-PE3(config-subif)#tag-switching ip

Router-PE3(config-subif)#ip rsvp bandwidth 4000

Router-PE3(config-subif)#exit

Router-PE3(config)#router ospf 99

Router-PE3(config-router)#router-id 10.0.0.3

Router-PE3(config-router)#log-adjacency-changes

Router-PE3(config-router)#network 10.0.0.0 0.255.255.255 area 0

Router-PE3(config-router)#mpls traffic-eng router-id Loopback0

Router-PE3(config-router)#mpls traffic-eng area 0

Router-PE3(config-router)#exit

Router-PE3(config)#ip explicit-path name def-PE1 enable

Router-PE3(cfg-ip-expl-path)#next-address 10.1.1.10

Explicit Path name def-PE1:

    1: next-address 10.1.1.10

Router-PE3(cfg-ip-expl-path)#next-address 10.1.1.13

Explicit Path name def-PE1:

    1: next-address 10.1.1.10

    2: next-address 10.1.1.13

Router-PE3(cfg-ip-expl-path)#exit

Router-PE3(config)#ip explicit-path name hi-PE1 enable

Router-PE3(cfg-ip-expl-path)#next-address 10.1.1.5

Explicit Path name hi-PE1:

    1: next-address 10.1.1.5

Router-PE3(cfg-ip-expl-path)#next-address 10.1.1.2

Explicit Path name hi-PE1:

    1: next-address 10.1.1.5

    2: next-address 10.1.1.2

Router-PE3(cfg-ip-expl-path)#exit

Router-PE3(config)#end

Router-PE3#

Router-P1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-P1(config)#mpls traffic-eng tunnels

Router-P1(config)#interface Loopback0

Router-P1(config-if)#ip address 10.0.0.11 255.255.255.255

Router-P1(config-if)#exit

Router-P1(config)#interface Serial0/0

Router-P1(config-if)#ip address 10.1.1.14 255.255.255.252

Router-P1(config-if)#tag-switching ip

Router-P1(config-if)#mpls traffic-eng tunnels

Router-P1(config-if)#ip rsvp bandwidth 512

Router-P1(config-if)#exit

Router-P1(config)#interface Serial0/1

Router-P1(config-if)#ip address 10.1.1.10 255.255.255.252

Router-P1(config-if)#tag-switching ip

Router-P1(config-if)#mpls traffic-eng tunnels

Router-P1(config-if)#ip rsvp bandwidth 512

Router-P1(config-if)#exit

Router-P1(config)#router ospf 99

Router-P1(config-router)#router-id 10.0.0.11

Router-P1(config-router)#log-adjacency-changes

Router-P1(config-router)#network 10.0.0.0 0.255.255.255 area 0

Router-P1(config-router)#mpls traffic-eng router-id Loopback0

Router-P1(config-router)#mpls traffic-eng area 0

Router-P1(config-router)#exit

Router-P1(config)#end

Router-P1#

注釋 很復雜啊,還沒很明白

進入討論組討論。

26.11.  MPLS上的組播

提問 配置MPLS網絡對客戶組播的支持

回答

Router-C-An#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-C-An(config)#ip multicast-routing

Router-C-An(config)#interface FastEthernet0/0

Router-C-An(config-if)#ip address 192.168.5.12 255.255.255.0

Router-C-An(config-if)#ip pim sparse-dense-mode

Router-C-An(config-if)#exit

Router-C-An(config)#end

Router-C-An#

Router-CE-A1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-CE-A1(config)#ip multicast-routing

Router-CE-A1(config)#interface FastEthernet0/0.1

Router-CE-A1(config-subif)#encapsulation dot1Q 101

Router-CE-A1(config-subif)#ip address 192.168.1.5 255.255.255.0

Router-CE-A1(config-subif)#ip pim sparse-dense-mode

Router-CE-A1(config-subif)#exit

Router-CE-A1(config)#interface FastEthernet0/0.2

Router-CE-A1(config-subif)#encapsulation dot1Q 111

Router-CE-A1(config-subif)#ip address 192.168.5.1 255.255.255.0

Router-CE-A1(config-subif)#ip pim sparse-dense-mode

Router-CE-A1(config-subif)#exit

Router-CE-A1(config)#end

Router-CE-A1#

Router-CE-A2#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-CE-A2(config)#ip multicast-routing

Router-CE-A2(config)#interface Loopback0

Router-CE-A2(config-if)#ip address 10.8.8.8 255.255.255.255

Router-CE-A2(config-if)#ip pim sparse-dense-mode

Router-CE-A2(config-if)#ip igmp join-group 239.1.1.1

Router-CE-A2(config-if)#exit

Router-CE-A2(config)#interface Ethernet0

Router-CE-A2(config-if)#ip address 192.168.3.8 255.255.255.0

Router-CE-A2(config-if)#ip pim sparse-dense-mode

Router-CE-A2(config-if)#exit

Router-CE-A2(config)#end

Router-CE-A2#

Router-PE1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-PE1(config)#ip multicast-routing

Router-PE1(config)#interface Loopback0

Router-PE1(config-if)#ip address 10.0.0.2 255.255.255.255

Router-PE1(config-if)#ip pim sparse-dense-mode

Router-PE1(config-if)#exit

Router-PE1(config)#interface Serial0/0

Router-PE1(config-if)#ip address 10.1.1.13 255.255.255.252

Router-PE1(config-if)#ip pim sparse-dense-mode

Router-PE1(config-if)#tag-switching ip

Router-PE1(config-if)#exit

Router-PE1(config)#ip multicast-routing vrf NetworkA

Router-PE1(config)#ip vrf NetworkA

Router-PE1(config-vrf)#rd 100:1

Router-PE1(config-vrf)#route-target export 100:1

Router-PE1(config-vrf)#route-target import 100:1

Router-PE1(config-vrf)#mdt default 239.100.100.1

Router-PE1(config-vrf)#exit

Router-PE1(config)#interface Loopback155

Router-PE1(config-if)#ip vrf forwarding NetworkA

Router-PE1(config-if)#ip address 192.168.155.1 255.255.255.255

Router-PE1(config-if)#ip pim sparse-dense-mode

Router-PE1(config-if)#exit

Router-PE1(config)#interface Ethernet0/0

Router-PE1(config-if)#description connection to customer A, site 1

Router-PE1(config-if)#ip vrf forwarding NetworkA

Router-PE1(config-if)#ip address 192.168.1.1 255.255.255.0

Router-PE1(config-if)#ip pim sparse-dense-mode

Router-PE1(config-if)#exit

Router-PE1(config)#ip pim vrf NetworkA send-rp-announce Loopback155 scope 15

Router-PE1(config)#ip pim vrf NetworkA send-rp-discovery Loopback155 scope 15

Router-PE1(config)#end

Router-PE1#

Router-PE2#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-PE2(config)#ip multicast-routing

Router-PE2(config)#interface Loopback0

Router-PE2(config-if)#ip address 10.0.0.4 255.255.255.255

Router-PE2(config-if)#ip pim sparse-dense-mode

Router-PE2(config-if)#exit

Router-PE2(config)#interface FastEthernet0/0.1

Router-PE2(config-subif)#encapsulation dot1Q 10

Router-PE2(config-subif)#ip address 10.1.2.4 255.255.255.0

Router-PE2(config-subif)#ip pim sparse-dense-mode

Router-PE2(config-subif)#tag-switching ip

Router-PE2(config-subif)#exit

Router-PE2(config)#ip multicast-routing vrf NetworkA

Router-PE2(config)#ip vrf NetworkA

Router-PE2(config-vrf)#rd 100:1

Router-PE2(config-vrf)#route-target export 100:1

Router-PE2(config-vrf)#route-target import 100:1

Router-PE2(config-vrf)#mdt default 239.100.100.1

Router-PE2(config-vrf)#exit

Router-PE2(config)#interface Loopback155

Router-PE2(config-if)#ip vrf forwarding NetworkA

Router-PE2(config-if)#ip address 192.168.155.2 255.255.255.255

Router-PE2(config-if)#ip pim sparse-dense-mode

Router-PE2(config-if)#exit

Router-PE2(config)#interface FastEthernet0/0.2

Router-PE2(config-subif)#encapsulation dot1Q 102

Router-PE2(config-subif)#ip vrf forwarding NetworkA

Router-PE2(config-subif)#ip address 192.168.3.1 255.255.255.0

Router-PE2(config-subif)#ip pim sparse-dense-mode

Router-PE2(config-subif)#exit

Router-PE2(config)#end

Router-PE2#

Router-P1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-P1(config)#ip multicast-routing

Router-P1(config)#interface FastEthernet0/0

Router-P1(config-if)#ip address 10.1.2.11 255.255.255.0

Router-P1(config-if)#ip pim sparse-dense-mode

Router-P1(config-if)#tag-switching ip

Router-P1(config-if)#exit

Router-P1(config)#interface Serial0/0

Router-P1(config-if)#ip address 10.1.1.14 255.255.255.252

Router-P1(config-if)#ip pim sparse-dense-mode

Router-P1(config-if)#tag-switching ip

Router-P1(config-if)#exit

Router-P1(config)#interface Serial0/1

Router-P1(config-if)#ip address 10.1.1.10 255.255.255.252

Router-P1(config-if)#ip pim sparse-dense-mode

Router-P1(config-if)#tag-switching ip

Router-P1(config-if)#exit

Router-P1(config)#end

Router-P1#

注釋 無

進入討論組討論。

26.12.  服務商不能我能

提問 通過其他方式來實現運營商所不能提供的特性

回答

Router-CE-A1#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-CE-A1(config)#ip multicast-routing

Router-CE-A1(config)#interface FastEthernet0/0.1

Router-CE-A1(config-if)#encapsulation dot1Q 101

Router-CE-A1(config-if)#ip address 192.168.1.5 255.255.255.0

Router-CE-A1(config-if)#exit

Router-CE-A1(config)#interface Loopback1

Router-CE-A1(config-if)#ip address 192.168.101.1 255.255.255.255

Router-CE-A1(config-if)#exit

Router-CE-A1(config)#interface Tunnel1

Router-CE-A1(config-if)#ip address 192.168.152.1 255.255.255.252

Router-CE-A1(config-if)#tunnel source 192.168.101.1

Router-CE-A1(config-if)#tunnel destination 192.168.101.2

Router-CE-A1(config-if)#ip pim sparse-dense-mode

Router-CE-A1(config-if)#exit

Router-CE-A1(config)#router bgp 65535

Router-CE-A1(config-router)#neighbor 192.168.1.1 remote-as 100

Router-CE-A1(config-router)#network 192.168.1.0

Router-CE-A1(config-router)#network 192.168.101.1 mask 255.255.255.255

Router-CE-A1(config-router)#no synchronization

Router-CE-A1(config-router)#no auto-summary

Router-CE-A1(config-router)#exit

Router-CE-A1(config)#router ospf 155

Router-CE-A1(config-router)#network 192.168.5.0 0.0.0.255 area 0

Router-CE-A1(config-router)#network 192.168.152.0 0.0.0.255 area 0

Router-CE-A1(config-router)#exit

Router-CE-A1(config)#end

Router-CE-A1#

Router-CE-A2#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router-CE-A2(config)#ip multicast-routing

Router-CE-A2(config)#interface Ethernet0

Router-CE-A2(config-if)#ip address 192.168.3.8 255.255.255.0

Router-CE-A2(config-if)#exit

Router-CE-A2(config)#interface Loopback1

Router-CE-A2(config-if)#ip address 192.168.101.2 255.255.255.255

Router-CE-A2(config-if)#exit

Router-CE-A2(config)#interface Tunnel1

Router-CE-A2(config-if)#ip address 192.168.152.2 255.255.255.252

Router-CE-A2(config-if)#tunnel source 192.168.101.2

Router-CE-A2(config-if)#tunnel destination 192.168.101.1

Router-CE-A2(config-if)#ip pim sparse-dense-mode

Router-CE-A2(config-if)#exit

Router-CE-A2(config)#router bgp 65534

Router-CE-A2(config-router)#neighbor 192.168.3.1 remote-as 100

Router-CE-A2(config-router)#network 192.168.3.0

Router-CE-A2(config-router)#network 192.168.101.2 mask 255.255.255.0

Router-CE-A2(config-router)#no synchronization

Router-CE-A2(config-router)#no auto-summary

Router-CE-A2(config-router)#exit

Router-CE-A2(config)#router ospf 155

Router-CE-A2(config-router)#network 10.8.8.0 0.0.0.255 area 0

Router-CE-A2(config-router)#network 192.168.152.0 0.0.0.255 area 0


Router-CE-A2(config-router)#exit

Router-CE-A2(config)#end

Router-CE-A2#

注釋 這里只是CE的配置,PE配置參考26.8。這里在服務商只支持BGP互聯的網絡中實現了OSPF和組播的傳遞



發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 商洛市| 大庆市| 襄城县| 顺义区| 兰坪| 阜南县| 宁晋县| 西盟| 山丹县| 宝清县| 方城县| 北票市| 泉州市| 松溪县| 正定县| 西藏| 北辰区| 丰顺县| 蒙城县| 乌苏市| 轮台县| 措勤县| 遂平县| 汽车| 张家港市| 安康市| 新龙县| 堆龙德庆县| 杭锦旗| 柘荣县| 乌拉特中旗| 上犹县| 乌拉特后旗| 呼伦贝尔市| 日土县| 新宾| 玉树县| 德化县| 阿拉善右旗| 肥城市| 宜都市|