多平台统一管理软件接口,如何实现多平台统一管理软件接口
363
2022-09-23
MPLS方式解决BGP路由黑洞(bgp路由黑洞产生原因)
在查找LFIB表 走4.4.4.4出去,欺骗了R2和R3,最后在R4弹出标签,到6.6.6.6e、查看入出标签情况Router#sh mpls ip binding 1.1.1.0/24 in label: imp-null out label: 200 lsr: 2.2.2.2:0 2.2.2.0/24 in label: 100 out label: imp-null lsr: 2.2.2.2:0 inuse3.3.3.0/24 in label: 101 out label: 203 lsr: 2.2.2.2:0 inuse4.4.4.0/24 in label: 102 out label: 201 lsr: 2.2.2.2:0 inuse12.12.12.0/24 in label: imp-null out label: imp-null lsr: 2.2.2.2:0 15.15.15.0/24 in label: imp-null 23.23.23.0/24 in label: 103 out label: imp-null lsr: 2.2.2.2:0 inuse34.34.34.0/24 in label: 104 out label: 202 lsr: 2.2.2.2:0 inuse通过标签可以看到:label 201是mpls分配给igp路由4.4.4.0的。
5、配置:
R1:interface Loopback0ip address 1.1.1.1 255.255.255.0!interface Ethernet0/0ip address 12.12.12.1 255.255.255.0mpls ip!interface Ethernet0/1ip address 15.15.15.1 255.255.255.0
router eigrp 100network 1.1.1.0 0.0.0.255network 12.12.12.0 0.0.0.255!router bgp 100bgp router-id 1.1.1.1bgp log-neighbor-changesnetwork 1.1.1.0 mask 255.255.255.0neighbor 4.4.4.4 remote-as 100neighbor 4.4.4.4 update-source Loopback0neighbor 4.4.4.4 next-hop-selfneighbor 15.15.15.5 remote-as 200
R2:interface Loopback0ip address 2.2.2.2 255.255.255.0!interface Ethernet0/0ip address 12.12.12.2 255.255.255.0mpls ip!interface Ethernet0/1ip address 23.23.23.2 255.255.255.0mpls ip
router eigrp 100network 2.2.2.0 0.0.0.255network 12.12.12.0 0.0.0.255network 23.23.23.0 0.0.0.255
R3:
!interface Loopback0ip address 3.3.3.3 255.255.255.0!interface Ethernet0/0ip address 23.23.23.3 255.255.255.0mpls ip!interface Ethernet0/1ip address 34.34.34.3 255.255.255.0mpls ip
router eigrp 100network 3.3.3.0 0.0.0.255network 23.23.23.0 0.0.0.255network 34.34.34.0 0.0.0.255
R4:!interface Loopback0ip address 4.4.4.4 255.255.255.0!interface Ethernet0/0ip address 34.34.34.4 255.255.255.0mpls ip!interface Ethernet0/1ip address 46.46.46.4 255.255.255.0
!router eigrp 100network 4.4.4.0 0.0.0.255network 34.34.34.0 0.0.0.255!router bgp 100bgp router-id 4.4.4.4bgp log-neighbor-changesnetwork 4.4.4.0 mask 255.255.255.0neighbor 1.1.1.1 remote-as 100neighbor 1.1.1.1 update-source Loopback0neighbor 1.1.1.1 next-hop-selfneighbor 46.46.46.6 remote-as 300
R5:!interface Loopback0ip address 5.5.5.5 255.255.255.0!interface Ethernet0/0ip address 15.15.15.5 255.255.255.0
!router bgp 200bgp router-id 5.5.5.5bgp log-neighbor-changesnetwork 5.5.5.0 mask 255.255.255.0neighbor 15.15.15.1 remote-as 100
!R6:interface Loopback0ip address 6.6.6.6 255.255.255.0!interface Ethernet0/0ip address 46.46.46.6 255.255.255.0!router bgp 300bgp router-id 6.6.6.6bgp log-neighbor-changesnetwork 6.6.6.0 mask 255.255.255.0neighbor 46.46.46.4 remote-as 100
最后我们可以总结出:在mpls网络中,mpls会给igp路由分配label,cef会给采用mpls分配好的label并且给下一跳是该igp的bgp路由分配该igp的label,数据在转发的时候是按照cef表进行的,这样那些没有在mpls中分配标签的bgp路由也可以按照标签进行转发。
6、相关配置命令详解
1、启用CEF
2、指定使用的标签分发协议 (可选)
3、MPLS LDP router-id lo0 fo强制更改 (可选)
4、MPLS label range 200 299 (可选)
5、运行LDP
6、修改MTU值 (可选)
查询命令:
show mpls interfaces //查看启用MPLS的接口
show mpls ldp neighbor //查看LDP的邻居表
show mpls ldp bindings //查看LIB表
show mpls forwarding-table //查看标签转发表LFIB
show mpls ip binding //可以直接看到一条路由的入标签和出标签
show ip cef //查看FIB表
show mpls ldp discovery detail //可看到transport-address
基本命令:
rouer(config)#ip cef
rouer(config)#int s0/0
rouer(config-if)#mpls ip //在接口下启用MPLS
可选命令:
rouer(config)#mpls label protocol ldp //指定使用LDP
rouer(config)#mpls ldp router-id lo0 //指定lo0为router-id
rouer(config)#mpls label range 200 299 //指定路由器分配标签的范围,需要重新建立TCP连接
rouer(config-if)#mpls ldp discovery transport-address interface //指定自已的transport-address
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~