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

[经验分享] Juniper MPLS Static LSP

[复制链接]

尚未签到

发表于 2018-7-27 12:33:45 | 显示全部楼层 |阅读模式
  MPLS Static LSP
  1、配置接口去接收和处理MPLS帧
  user@R1#set interface ge-1/0/0 unit 0 family inet family mpls
  2、指定哪个接口运行MPLS
  user@R1#set protocols mpls interface ge-1/0/0.0
  或
  user@R1#setprotocols mpls interface all
  3、验证MPLS接口配置
  user@R1>show mpls interface
  Interface         state         (x: extended)
  ge-1/0/5.0        up             <none>
  ge-1/0/6.0        up             <none>
  4、配置static LSPs
  命名:每条Static LSP应该被给出一个唯一的名称,并且名称在路径上所有路由应该保存一致。
  标签值:static LSPs预留的标签范围在1000000和1048575之间.剩下的标签空间用于动态标签分发协议。
  如果设计需要,标签0(显式null)也允许在倒数第二跳。如果使用TC  bits来传递Class ofService信息,这是很有用的。
  a、在ingress路由配置static LSP
  user@R1#set protocols mpls static-label-switch-path <lsp-name> ingress next-hop <address of next-hop router> to <lsp endpoint> push <label>
  b、在transit路由器配置static LSP,指定传入标签和转发动作,可以swap带着label 0(explicit null)或倒数第二跳弹出(pop)。
  user@R2#set protocols mpls static-label-switch-path <lsp-name> transit<incoming-label> next-hop <address of next-hop router> swap<outgoing label>
  在Transitrouter操作模式下查看命令:
  查看LSP状态:show mpls static-lsp name <LSP-name> transit extensive
  查看标签交换表:show route table mpls.0
  c、,如果做倒数第二跳弹出,那么在egress router就不需要配置。
  5、路由表汇总
  在juniper路由器上配置staticLSP直接影响到两张表,
  mpls.0表(labelswitchingtable):传入标签和转发动作之间的映射
  inet.3表:用于跟踪LSP 入站点
  注意inet.0 和inet.6表分别用于IPv4和IPv6转发不受Static LSP配置的影响,这意味这Juniper路由器默认不会使用MPLS转发IPv4和IPv6流量。
  6、staticLSP作为静态路由的下一跳
  user@R1#set routing-options static route <destination-prefix> static-lsp-next-hop<LSP-name>
  静态标签j交换路径用于转发的一种非常简单的方法是创建静态LSP作为静态路由的吓一跳。然后,静态路由将被安装到inet.0表,并将用于转发流量。还有其他的方法(稍后讨论)将前缀与标签交换路径关联起来用于转发。然而,LSP下跳的静态路由有几个优点,包括容易设置特定于路由的属性的可能性,以及静态路由易于操作和重新分配策略的事实。
  备注:对于point-to-point接口(e.g.,SONET/SDH)你可以使用接口名称作为下一跳而不是ip address。
  MPLS Packet Forwarding实验:
DSC0000.png

  R1
  set logical-systems r1 interfaces ge-0/0/0 unit 12 vlan-id 12
  set logical-systems r1 interfaces ge-0/0/0 unit 12 family inet address 10.1.12.1/30
  set logical-systems r1 interfaces ge-0/0/0 unit 12 family mpls
  set logical-systems r1 interfaces lo0 unit 1 family inet address 1.1.1.1/32
  set logical-systems r1 protocols mpls static-label-switched-path r1-to-r4 ingress next-hop10.1.12.2
  set logical-systems r1 protocols mpls static-label-switched-path r1-to-r4 ingress to 4.4.4.4
  set logical-systems r1 protocols mpls static-label-switched-path r1-to-r4 ingress push 1000014
  set logical-systems r1 protocols mpls interface ge-0/0/0.12
  set logical-systems r1 routing-options static route 4.4.4.4/32 static-lsp-next-hop r1-to-r4
  R2
  set logical-systems r2 interfaces ge-0/0/1 unit 12 vlan-id 12
  set logical-systems r2 interfaces ge-0/0/1 unit 12 family inet address 10.1.12.2/30
  set logical-systems r2 interfaces ge-0/0/1 unit 12 family mpls
  set logical-systems r2 interfaces ge-0/0/1 unit 23 vlan-id 23
  set logical-systems r2 interfaces ge-0/0/1 unit 23 family inet address 10.1.23.1/30
  set logical-systems r2 interfaces ge-0/0/1 unit 23 family mpls
  set logical-systems r2 protocols mpls static-label-switched-path r1-to-r4 transit 1000014 next-hop10.1.23.2
  set logical-systems r2 protocols mpls static-label-switched-path r1-to-r4 transit 1000014 swap1000024
  set logical-systems r2 protocols mpls static-label-switched-path r4-to-r1 transit 1000031 next-hop10.1.12.1
  set logical-systems r2 protocols mpls static-label-switched-path r4-to-r1 transit 1000031 pop
  set logical-systems r2 protocols mpls interface ge-0/0/1.12
  set logical-systems r2 protocols mpls interface ge-0/0/1.23
  R3
  set logical-systems r3 interfaces ge-0/0/2 unit 23 vlan-id 23
  set logical-systems r3 interfaces ge-0/0/2 unit 23 family inet address 10.1.23.2/30
  set logical-systems r3 interfaces ge-0/0/2 unit 23 family mpls
  set logical-systems r3 interfaces ge-0/0/2 unit 34 vlan-id 34
  set logical-systems r3 interfaces ge-0/0/2 unit 34 family inet address 10.1.34.1/30
  set logical-systems r3 interfaces ge-0/0/2 unit 34 family mpls
  set logical-systems r3 protocols mpls static-label-switched-path r1-to-r4 transit 1000024 next-hop10.1.34.2
  set logical-systems r3 protocols mpls static-label-switched-path r1-to-r4 transit 1000024 pop
  set logical-systems r3 protocols mpls static-label-switched-path r4-to-r1 transit 1000041 next-hop10.1.23.1
  set logical-systems r3 protocols mpls static-label-switched-path r4-to-r1 transit 1000041 swap1000031
  set logical-systems r3 protocols mpls interface ge-0/0/2.23
  set logical-systems r3 protocols mpls interface ge-0/0/2.34
  R4
  set logical-systems r4 interfaces ge-0/0/3 unit 34 vlan-id 34
  set logical-systems r4 interfaces ge-0/0/3 unit 34 family inet address 10.1.34.2/30
  set logical-systems r4 interfaces ge-0/0/3 unit 34 family mpls
  set logical-systems r4 interfaces lo0 unit 4 family inet address 4.4.4.4/32
  set logical-systems r4 protocols mpls static-label-switched-path r4-to-r1 ingress next-hop10.1.34.1
  set logical-systems r4 protocols mpls static-label-switched-path r4-to-r1 ingress to 1.1.1.1
  set logical-systems r4 protocols mpls static-label-switched-path r4-to-r1 ingress push 1000041
  set logical-systems r4 protocols mpls interface ge-0/0/3.34
  set logical-systems r4 routing-options static route 1.1.1.1/32 static-lsp-next-hop r4-to-r1
  测试结果
  R1:
  root@vMX-1:r1>show mpls static-lsp ingress extensive
  Ingress LSPs:
  LSPname: r1-to-r4,To: 4.4.4.4
  State: Up
  Nexthop: 10.1.12.2 Via ge-0/0/0.12
  LabelOperation: Push, Outgoing-label: 1000014
  Created: Sat Aug  5 09:25:14 2017
  Bandwidth: 0 bps
  Statistics: Packets 2442, Bytes 204776
  Total 1, displayed1, Up 1, Down 0
  root@vMX-1:r1>show route table inet.0 protocol static
  inet.0: 14destinations, 14 routes (14 active, 0 holddown, 0 hidden)
  + = Active Route, -= Last Active, * = Both
  4.4.4.4/32         *[Static/5] 02:18:53
  > to 10.1.12.2 viage-0/0/0.12, Push 1000014
  root@vMX-1:r1>ping 4.4.4.4 source 1.1.1.1
  PING 4.4.4.4(4.4.4.4): 56 data bytes
  64 bytes from4.4.4.4: icmp_seq=0 ttl=62 time=9.630 ms
  64 bytes from4.4.4.4: icmp_seq=1 ttl=62 time=5.994 ms
  64 bytes from4.4.4.4: icmp_seq=2 ttl=62 time=14.861 ms
  64 bytes from4.4.4.4: icmp_seq=3 ttl=62 time=3.858 ms
  64 bytes from4.4.4.4: icmp_seq=4 ttl=62 time=2.675 ms
  ^C
  --- 4.4.4.4 pingstatistics ---
  5 packetstransmitted, 5 packets received, 0% packet loss
  round-tripmin/avg/max/stddev = 2.675/7.404/14.861/4.416 ms

运维网声明 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-542080-1-1.html 上篇帖子: 配置juniper交换机web管理界面 下篇帖子: juniper的配置-适合对juniper感兴趣的人探讨
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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

扫描微信二维码查看详情

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


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


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


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



合作伙伴: 青云cloud

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