eNSP——MPLS VPN配置(实验二)

其他配置同实验一配置到R2、R4的bgp200,不同的地方从R1和R5配置开始,若要看配置可以去实验一看。在这个实验二中R1和R5配置OSPF。

[R1]ospf 1 route-id 1.1.1.1
[R1-ospf-1]ar 0 
[R1-ospf-1-area-0.0.0.0]network 12.1.1.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[R2]ospf 1 router-id 2.2.2.2  vpn-instance 1
[R2-ospf-1]ar 0
[R2-ospf-1-area-0.0.0.0]network 12.1.1.2 0.0.0.0
[R4]ospf 1 router-id 4.4.4.4 vpn-instance 5
[R4-ospf-1]ar 0
[R4-ospf-1-area-0.0.0.0]network 45.1.1.4 0.0.0.0
[R5]ospf 1 rou	
[R5]ospf 1 router-id 5.5.5.5
[R5-ospf-1-area-0.0.0.0]network 45.1.1.5 0.0.0.0
[R5-ospf-1-area-0.0.0.0]network 5.5.5.5 0.0.0.0

接下来,可以配置前缀列表抓取1.1.1.1和5.5.5.5,然后引入bgp。

[R2]ip ip-prefix 1 index 10 permit 1.1.1.1 32
[R2-...]route-policy tobgp permit node 10
[R2-...]if-match ip-prefix 1
[R2]bgp 200
[R2-...]ipv4-family vpn-instance 1
[R2-...]import-route ospf 1 route-policy tobgp
[R2]ospf 1
[R2]import-route bgp

[R4]ip ip-prefix 1 index 10 permit 5.5.5.5 32
[R4-...]route-policy tobgp permit node 10
[R4-...]if-match ip-prefix 1
[R4]bgp 200
[R4-...]ipv4-family vpn-instance 1
[R4-...]import-route ospf 1 route-policy tobgp
[R4]ospf 1
[R4]import-route bgp

测试:

[R1]ping  -a 1.1.1.1 5.5.5.5
  PING 5.5.5.5: 56  data bytes, press CTRL_C to break
    Reply from 5.5.5.5: bytes=56 Sequence=1 ttl=253 time=120 ms
    Reply from 5.5.5.5: bytes=56 Sequence=2 ttl=253 time=90 ms
    Reply from 5.5.5.5: bytes=56 Sequence=3 ttl=253 time=100 ms
    Reply from 5.5.5.5: bytes=56 Sequence=4 ttl=253 time=110 ms
    Reply from 5.5.5.5: bytes=56 Sequence=5 ttl=253 time=90 ms

  --- 5.5.5.5 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 90/102/120 ms

类似双点双向引入。最后,这个实验二应该算是一个扩展吧,具体原理我也只是一知半解,实验仅作记录,防止以后遗忘。如有错误欢迎指正~

  • 7
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值