MPLS_×××的基本部署实验 <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

不知道大家忘了没有,之前的MPLS环境部署的实验,其实在MPLS中最有价值的地方就是在MPLS ×××MPLS TE。接下来我们做一个MPLS ×××的实验。
 
配置如下:

R1配置:

ip vrf a 

 rd 1:1  

 route-target export 1:1

 route-target import 1:1

!        

no ip domain lookup

interface Loopback0

 ip address 1.1.1.1 255.255.255.0

 

interface Serial0/0

 ip vrf forwarding a

 ip address 13.1.1.1 255.255.255.0

 clock rate 2000000

!        

interface Serial0/1

 ip address 12.1.1.1 255.255.255.0

 mpls ip 

 clock rate 2000000

!        

router rip

 version 2

 network 1.0.0.0

 network 12.0.0.0

 no auto-summary

 !       

 address-family ipv4 vrf a

 redistribute bgp 1 metric transparent

 network 13.0.0.0

 network 192.168.3.0

 no auto-summary

 exit-address-family

!        

router bgp 1

 no synchronization

 bgp router-id 1.1.1.1

 bgp log-neighbor-changes

 neighbor 4.4.4.4 remote-as 1

 neighbor 4.4.4.4 update-source Loopback0

 no auto-summary

 !       

 address-family ***v4

 neighbor 4.4.4.4 activate

 neighbor 4.4.4.4 send-community both

 exit-address-family

 !       

 address-family ipv4 vrf a

 redistribute rip

 no auto-summary

 no synchronization

 exit-address-family

 

 

R2配置:

interface Loopback0

 ip address 2.2.2.2 255.255.255.0

!        

interface Serial0/0

 ip address 12.1.1.2 255.255.255.0

 mpls ip 

 clock rate 2000000

!        

interface Serial0/1

 ip address 24.1.1.2 255.255.255.0

 mpls ip 

 clock rate 2000000

!         

router rip

 version 2

 network 2.0.0.0

 network 12.0.0.0

 network 24.0.0.0

 no auto-summary

R3配置

interface Loopback0

 ip address 192.168.3.1 255.255.255.0

!        

interface Serial0/0

 ip address 13.1.1.3 255.255.255.0

 clock rate 2000000

!         

router rip

 version 2

 network 13.0.0.0

 network 192.168.3.0

 no auto-summary

 

 

R4配置

interface Loopback0

 ip address 4.4.4.4 255.255.255.0

!        

interface Serial0/0

 ip address 24.1.1.4 255.255.255.0

 mpls ip 

 clock rate 2000000

!        

interface Serial0/1

 ip vrf forwarding a

 ip address 45.1.1.4 255.255.255.0

 clock rate 2000000

!        

router rip

 version 2

 network 4.0.0.0

 network 24.0.0.0

 no auto-summary

 !       

 address-family ipv4 vrf a

 redistribute bgp 1 metric transparent

 network 45.0.0.0

 network 192.168.5.0

 no auto-summary

 exit-address-family

!        

router bgp 1

 no synchronization

 bgp router-id 4.4.4.4

 bgp log-neighbor-changes

 neighbor 1.1.1.1 remote-as 1

 neighbor 1.1.1.1 update-source Loopback0

 neighbor 1.1.1.1 next-hop-self

 no auto-summary

 !       

 address-family ***v4

 neighbor 1.1.1.1 activate

 neighbor 1.1.1.1 send-community both

 exit-address-family

 !       

 address-family ipv4 vrf a

 redistribute rip

 no auto-summary

 no synchronization

 exit-address-family

 

 

R5配置:

interface Loopback0

 ip address 192.168.5.1 255.255.255.0

!

interface Serial0/0

 ip address 45.1.1.5 255.255.255.0

 clock rate 2000000

!        

router rip

 version 2

 network 45.0.0.0

 network 192.168.5.0

 no auto-summary

 

配置完之后我们以为例,我们来看看R1上的状态:

1show ip route

 

这是只有 IGP 的路由,而不会有 BGP 的条目,难道没有 BGP

不会吧,接下来我们

2 show  ip  rou  vrf  a
很显然,我们在此表中,可以看见两个私网的IP路由,而在R2上的话无论怎么查看,都没有办法看见私网的路由条目的。同时我们来看看***v4的路由情况,

3 show  ip  bgp ***v4 all

毫无疑问,一共应该有四条BGP 学过来的×××V4路由。再看看下一条的

4Show ip bgp ***v4 all label 可以看见到目标网络的label号。

R2 上:

5 Show  ip  route

在这,只能看见IGP运行的路由条目以及一些直连条目。其他没有看见,当然VRF中肯定没有的 ,本来就没有创建VRF表的,所以不SHOW 了。

6 ,在 R5 show ip route
 当然其私网的路由是一定要有的,否侧失败。

看完这些基本的情况自后,关键看通还是不通?

7ping 192.168.5.1 source 192.168.3.1
 
通的不容易吧?有点纠结!
当然在配置中,我没有跟大家一起来具体学习,希望能海涵,我把我个人的实验步骤写下,当然这只是我个人的理解:

1,  运行MPLS 环境;

2,  在私网运行IGP

3,  PE上创建一个VRF 表,并且通告所连接的网络(address-family簇下)

4,  ISP网络运行MP-IBGP,在MPIBGP中把IGP redistributeaddress-family簇下)

5,  在另一端的PE上把IBGP redistribute IGP 中。

注意:

   当要数据通信时,两个私网要互联那么就要有来、去的双向控制路由,或者说控制/数据层面的控制。