MPLS_×××的基本部署实验
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
不知道大家忘了没有,之前的MPLS环境部署的实验,其实在MPLS中最有价值的地方就是在MPLS ×××和MPLS TE。接下来我们做一个MPLS ×××的实验。
![](https://i-blog.csdnimg.cn/blog_migrate/17cb43681a3ae9286a0c73baef065e81.jpeg)
配置如下:
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上的状态:
1,show ip route
![](https://i-blog.csdnimg.cn/blog_migrate/22721322fc5ab3c1827a1824030f5403.jpeg)
这是只有
IGP
的路由,而不会有
BGP
的条目,难道没有
BGP
?
不会吧,接下来我们
2
,
show ip rou vrf a
![](https://i-blog.csdnimg.cn/blog_migrate/42738e030da816140d5ba0f7f17c1ce0.jpeg)
很显然,我们在此表中,可以看见两个私网的IP路由,而在R2上的话无论怎么查看,都没有办法看见私网的路由条目的。同时我们来看看***v4的路由情况,
3
,
show ip bgp ***v4 all
![](https://i-blog.csdnimg.cn/blog_migrate/24256482100bbe1df9323ae05bf7af9a.jpeg)
毫无疑问,一共应该有四条BGP 学过来的×××V4路由。再看看下一条的
4Show ip bgp ***v4 all label 可以看见到目标网络的label号。
在
R2
上:
5
,
Show ip route
![](https://i-blog.csdnimg.cn/blog_migrate/241e37d59712f5e872a25a51d6e0200f.jpeg)
在这,只能看见IGP运行的路由条目以及一些直连条目。其他没有看见,当然VRF中肯定没有的 ,本来就没有创建VRF表的,所以不SHOW
了。
6
,在
R5
上
show ip route
![](https://i-blog.csdnimg.cn/blog_migrate/7195c5a70a7866279aee31f6e3b947b5.jpeg)
当然其私网的路由是一定要有的,否侧失败。
看完这些基本的情况自后,关键看通还是不通?
7,ping 192.168.5.1 source 192.168.3.1
![](https://i-blog.csdnimg.cn/blog_migrate/947cd1f30ee065a83a89fa307e6246cb.jpeg)
通的不容易吧?有点纠结!
当然在配置中,我没有跟大家一起来具体学习,希望能海涵,我把我个人的实验步骤写下,当然这只是我个人的理解:
1, 运行MPLS 环境;
2, 在私网运行IGP;
3, 在PE上创建一个VRF 表,并且通告所连接的网络(address-family簇下)
4, 在ISP网络运行MP-IBGP,在MPIBGP中把IGP redistribute(address-family簇下)
5, 在另一端的PE上把IBGP redistribute 到IGP 中。
注意:
当要数据通信时,两个私网要互联那么就要有来、去的双向控制路由,或者说控制/数据层面的控制。
转载于:https://blog.51cto.com/redyi2008/506746