设为首页 收藏本站
查看: 2820|回复: 0

[经验分享] CISCO MPLS *** 标签转发表项

[复制链接]
发表于 2018-7-22 07:46:44 | 显示全部楼层 |阅读模式
注,在该案例研究中,我们全程关注私网路由4.4.4.4/32。在公网中,需要关注公网路由2.2.2.2/32  1、Ingress-PE
  1)、VRP路由表:show ip route vrf <vrf>
  Routing Table: ***1
  Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
  D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
  N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
  E1 - OSPF external type 1, E2 - OSPF external type 2
  i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
  ia - IS-IS inter area, * - candidate default, U - per-user static route
  o - ODR, P - periodic downloaded static route
  Gateway of last resort is not set
  4.0.0.0/32 is subnetted, 1 subnets
  B       4.4.4.4 [200/0] via 2.2.2.2, 00:28:54
  5.0.0.0/32 is subnetted, 1 subnets
  B       5.5.5.5 [20/0] via 172.16.35.5, 00:29:38
  172.17.0.0/24 is subnetted, 1 subnets
  B       172.17.24.0 [200/0] via 2.2.2.2, 00:30:55
  172.16.0.0/24 is subnetted, 2 subnets
  C       172.16.35.0 is directly connected, FastEthernet1/0.1
  B       172.16.24.0 [200/0] via 2.2.2.2, 00:30:55
  2)、私网标签:show ip bgp ***v4 vrf <vrf> labels
  C3600-R3#show ip bgp ***v4 vrf ***1 labels
  Network          Next Hop      In label/Out label
  Route Distinguisher: 65000:300 (***1)
  4.4.4.4/32       2.2.2.2         nolabel/22
  5.5.5.5/32       172.16.35.5     21/nolabel
  172.16.24.0/24   2.2.2.2         nolabel/20
  172.16.35.0/24   172.16.35.5     20/nolabel
  0.0.0.0         20/aggregate(***1)
  172.17.24.0/24   2.2.2.2         nolabel/21
  只显示私网标签,为了了解转发过程的完整性,可以根据下一跳进一步查找公网标签
  3)、公网标签:show mpls forwarding-table
  C3600-R3#show mpls forwarding-table
  Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop

  tag    tag or VC   or Tunnel>  17     Pop tag     1.1.1.1/32        0          Fa0/0      172.16.13.1
  18     16          2.2.2.2/32        0          Fa0/0      172.16.13.1
  19     Pop tag     172.16.12.0/24    0          Fa0/0      172.16.13.1
  20     Aggregate   172.16.35.0/24[V] 1164
  21     Untagged    5.5.5.5/32[V]     0          Fa1/0.1    172.16.35.5
  主要关注到2.2.2.2/32的标签,结合2)、3)命令的输出,可以看出到私网路由4.4.4.4/32的公网标签为16,私网标签为22。即,标签栈为{16,22},到该私网目的地址的数据包会打上两层标签{16,22}
  4)、私网 cef:show ip cef vrf <vrf> <dest ip>
  该命令的好处就是,可以看到完整的标签栈
  C3600-R3#show ip cef vrf ***1 4.4.4.4
  4.4.4.4/32, version 13, epoch 0, cached adjacency 172.16.13.1
  0 packets, 0 bytes
  tag information set
  local tag: ***-route-head
  fast tag rewrite with Fa0/0, 172.16.13.1, tags imposed: {16 22}
  via 2.2.2.2, 0 dependencies, recursive
  next hop 172.16.13.1, FastEthernet0/0 via 2.2.2.2/32
  valid cached adjacency
  tag rewrite with Fa0/0, 172.16.13.1, tags imposed: {16 22}
  输出结果和2)、 3)命令得出的结果是一致的,但是使用更方便
  2、P
  1)、公网标签转发表:show mpls forwarding-table
  C3600-R1#show mpls forwarding-table
  Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop

  tag    tag or VC   or Tunnel>  16     Pop tag     2.2.2.2/32        73         Fa0/0      172.16.12.2
  18     Pop tag     3.3.3.3/32        11751      Fa1/0      172.16.13.3
  关注到2.2.2.2/32的表项,入标签(Local Tag)和1.4)中的公网标签一致。出标签执行Pop操作(倒数第二跳弹出)。
  3、Egress-PE
  1)、VRF路由表
  C3600-R2#show ip route vrf ***1
  Routing Table: ***1
  Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
  D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
  N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
  E1 - OSPF external type 1, E2 - OSPF external type 2
  i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
  ia - IS-IS inter area, * - candidate default, U - per-user static route
  o - ODR, P - periodic downloaded static route
  Gateway of last resort is not set
  4.0.0.0/32 is subnetted, 1 subnets
  B       4.4.4.4 [20/0] via 172.16.24.4, 01:17:52
  5.0.0.0/32 is subnetted, 1 subnets
  B       5.5.5.5 [200/0] via 3.3.3.3, 01:18:16
  172.17.0.0/24 is subnetted, 1 subnets
  C       172.17.24.0 is directly connected, FastEthernet1/0.2
  172.16.0.0/24 is subnetted, 2 subnets
  B       172.16.35.0 [200/0] via 3.3.3.3, 01:19:31
  C       172.16.24.0 is directly connected, FastEthernet1/0.1
  2)、私网标签:show ip bgp ***v4 vrf <vrf> labels
  C3600-R2#show ip bgp ***v4 vrf ***1 labels
  Network          Next Hop      In label/Out label
  Route Distinguisher: 65000:100 (***1)
  4.4.4.4/32       172.17.24.4     22/nolabel
  172.16.24.4     22/nolabel
  5.5.5.5/32       3.3.3.3         nolabel/21
  172.16.24.0/24   172.17.24.4     20/nolabel
  172.16.24.4     20/nolabel
  0.0.0.0         20/aggregate(***1)
  172.16.35.0/24   3.3.3.3         nolabel/20
  172.17.24.0/24   172.17.24.4     21/nolabel
  172.16.24.4     21/nolabel
  0.0.0.0         21/aggregate(***1)
  到私网路由4.4.4.4/32的入标签为22,和Ingress- PE打的私网标签一致。无出标签,转为IP转发。

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-539646-1-1.html 上篇帖子: Cisco ROMMON状态下,恢复路由器的IOS 下篇帖子: 路由交换笔记(二十一)---Cisco技术资料汇总
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表