VMX-PE1:? lo0.0? 10.0.255.1
VMX-PE6:? lo0.0? 10.0.255.6
VMX2-P2:? lo0.0? 10.0.255.2
VMX3-P3:? lo0.0? 10.0.255.3
VMX4-P4:? lo0.0? 10.0.255.4
VMX5-P5:? lo0.0? 10.0.255.5
VMX-CE1:? lo0.0? 10.1.255.1
VMX-CE2:? lo0.0? 10.1.255.2
1.兩個(gè)ASBR(VMX4-P4,VMX5-P5)各有EBGP和IBGP連接,協(xié)議族bgp-lu(family inet labeled-unicast)
為兩個(gè)PE(10.0.255.1咐扭,10.0.255.6)提供labeled route
2.PE的IBGP( family inet labeled-unicast resolve-vpn), resolve-vpn表示將labeled route放在int.3,為跨域(inter-AS)PE之間的VPNV4路由的下一條提供解析
Allow labeled routes to be placed in the inet.3 routing table for route resolution. These routes are then resolved for PE router connections where the remote PE is located across another AS. For a PE router to install a route in the VRF, the next hop must resolve to a route stored within the inet.3 table.
resolve-vpn—(Optional) Store labeled routes in the inet.3 or inet6.3 routing table to resolve routes for a provider edge (PE) router located in a different autonomous system (AS). For a PE?router to install a route in the virtual routing and forwarding (VRF) table, the next hop must resolve to a route stored in the inet.3 or inet6.3 routing table. This option is also used to configure inter-AS VPLS with MAC operations.
3.ASBR(VMX4-P4,VMX5-P5)之間在互相通告10.0.255.1/10.0.255.6時(shí)纯丸,其10.0.255.1/10.0.255.6是從ospf來的哮内,在向各自的目的地PE轉(zhuǎn)發(fā)包時(shí)菩浙,需set protocols mpls traffic-engineering mpls-forwarding(ospf用來尋址蚤蔓,mpls用來轉(zhuǎn)發(fā))
4.PE1-P3之間有個(gè) ldp-tunneling over rsvp的隧道(set protocols ldp interface lo0.0)
5.juniper默認(rèn)標(biāo)簽盞最大標(biāo)簽數(shù)為3,PE1需要set interfaces ge-0/0/0 unit 0 family mpls maximum-labels 4
root@VMX-PE1> show configuration | display set
set version 20.4R1.12
set system host-name VMX-PE1
set system root-authentication encrypted-password "$6$E5h3Kre1$u85X39JyGoDbggG.OjF8B7XZpUQ80kR5utXDFW35vfMShDs60/Xmu5JKXFgM3xLCnFzj1TUaiw1cMpvYEIQDN0"
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set system processes dhcp-service traceoptions file dhcp_logfile
set system processes dhcp-service traceoptions file size 10m
set system processes dhcp-service traceoptions level all
set system processes dhcp-service traceoptions flag packet
set interfaces ge-0/0/0 unit 0 family inet address 192.168.12.1/24
set interfaces ge-0/0/0 unit 0 family mpls maximum-labels 4
set interfaces ge-0/0/5 unit 0 family inet address 172.16.11.1/24
set interfaces fxp0 unit 0 family inet dhcp vendor-id Juniper:vmx:VM605C293CB7
set interfaces fxp0 unit 0 family inet6 dhcpv6-client client-type stateful
set interfaces fxp0 unit 0 family inet6 dhcpv6-client client-ia-type ia-na
set interfaces fxp0 unit 0 family inet6 dhcpv6-client client-identifier duid-type duid-ll
set interfaces fxp0 unit 0 family inet6 dhcpv6-client vendor-id Juniper:vmx:VM605C293CB7
set interfaces lo0 unit 0 family inet address 10.0.255.1/32
set policy-options policy-statement VPN-export term 1 then community add L3-VPN
set policy-options policy-statement VPN-export term 1 then accept
set policy-options policy-statement VPN-export term last then reject
set policy-options policy-statement VPN-import term 1 from protocol bgp
set policy-options policy-statement VPN-import term 1 from community L3-VPN
set policy-options policy-statement VPN-import term 1 then accept
set policy-options policy-statement VPN-import term last then reject
set policy-options community L3-VPN members target:1000:2000
set routing-instances CE-1 routing-options auto-export
set routing-instances CE-1 protocols bgp group TO-CE type external
set routing-instances CE-1 protocols bgp group TO-CE neighbor 172.16.11.2 peer-as 65001
set routing-instances CE-1 instance-type vrf
set routing-instances CE-1 interface ge-0/0/5.0
set routing-instances CE-1 route-distinguisher 1000:2000
set routing-instances CE-1 vrf-import VPN-import
set routing-instances CE-1 vrf-export VPN-export
set routing-instances CE-1 vrf-table-label
set routing-options autonomous-system 64510
set protocols router-advertisement interface fxp0.0
set protocols bgp group MPLS type internal
set protocols bgp group MPLS local-address 10.0.255.1
set protocols bgp group MPLS family inet labeled-unicast resolve-vpn
set protocols bgp group MPLS neighbor 10.0.255.4
set protocols bgp group TO-PE6 type external
set protocols bgp group TO-PE6 multihop ttl 255
set protocols bgp group TO-PE6 local-address 10.0.255.1
set protocols bgp group TO-PE6 family inet-vpn unicast
set protocols bgp group TO-PE6 neighbor 10.0.255.6 peer-as 64511
set protocols ldp interface lo0.0
set protocols mpls label-switched-path PE1-to-P3 from 10.0.255.1
set protocols mpls label-switched-path PE1-to-P3 to 10.0.255.3
set protocols mpls label-switched-path PE1-to-P3 ldp-tunneling
set protocols mpls label-switched-path PE1-to-P3 no-cspf
set protocols mpls interface ge-0/0/0.0
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols rsvp interface ge-0/0/0.0
root@VMX-PE6> show configuration | display set
set version 20.4R1.12
set system host-name VMX-PE6
set system root-authentication encrypted-password "$6$vgGrT/RU$3.kvZNmyaqpahJAGDB8u860XolardzvUZVrQShiOA2j1s0yy.6DvIF2Xtw9ad0jPO2V9DJCS3dLTCY1NSmZ0F/"
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set system processes dhcp-service traceoptions file dhcp_logfile
set system processes dhcp-service traceoptions file size 10m
set system processes dhcp-service traceoptions level all
set system processes dhcp-service traceoptions flag packet
set interfaces ge-0/0/0 unit 0 family inet address 192.168.56.6/24
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/5 unit 0 family inet address 172.16.12.1/24
set interfaces fxp0 unit 0 family inet dhcp vendor-id Juniper:vmx:VM605C3831DF
set interfaces fxp0 unit 0 family inet6 dhcpv6-client client-type stateful
set interfaces fxp0 unit 0 family inet6 dhcpv6-client client-ia-type ia-na
set interfaces fxp0 unit 0 family inet6 dhcpv6-client client-identifier duid-type duid-ll
set interfaces fxp0 unit 0 family inet6 dhcpv6-client vendor-id Juniper:vmx:VM605C3831DF
set interfaces lo0 unit 0 family inet address 10.0.255.6/32
set policy-options policy-statement VPN-export term 1 then community add L3-VPN
set policy-options policy-statement VPN-export term 1 then accept
set policy-options policy-statement VPN-export term last then reject
set policy-options policy-statement VPN-import term 1 from protocol bgp
set policy-options policy-statement VPN-import term 1 from community L3-VPN
set policy-options policy-statement VPN-import term 1 then accept
set policy-options policy-statement VPN-import term last then reject
set policy-options community L3-VPN members target:1000:2000
set routing-instances CE-2 routing-options auto-export
set routing-instances CE-2 protocols bgp group TO-CE type external
set routing-instances CE-2 protocols bgp group TO-CE neighbor 172.16.12.2 peer-as 65002
set routing-instances CE-2 instance-type vrf
set routing-instances CE-2 interface ge-0/0/5.0
set routing-instances CE-2 route-distinguisher 1000:2000
set routing-instances CE-2 vrf-import VPN-import
set routing-instances CE-2 vrf-export VPN-export
set routing-instances CE-2 vrf-table-label
set routing-options router-id 10.0.255.6
set routing-options autonomous-system 64511
set protocols router-advertisement interface fxp0.0
set protocols bgp group MPLS type internal
set protocols bgp group MPLS local-address 10.0.255.6
set protocols bgp group MPLS family inet labeled-unicast resolve-vpn
set protocols bgp group MPLS neighbor 10.0.255.5
set protocols bgp group TO-PE1 type external
set protocols bgp group TO-PE1 multihop ttl 255
set protocols bgp group TO-PE1 local-address 10.0.255.6
set protocols bgp group TO-PE1 family inet-vpn unicast
set protocols bgp group TO-PE1 neighbor 10.0.255.1 peer-as 64510
set protocols ldp interface ge-0/0/0.0
set protocols mpls interface ge-0/0/0.0
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
root@VMX2-P2> show configuration | display set
set version 14.1R4.8
set system host-name VMX2-P2
set system root-authentication encrypted-password "$1$7hIdqWZo$IbTdCxOQX7kWR2GYBJj3X0"
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces ge-0/0/0 unit 0 family inet address 192.168.12.2/24
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/1 unit 0 family inet address 192.168.23.2/24
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.0.255.2/32
set routing-options router-id 10.0.255.2
set protocols rsvp interface ge-0/0/0.0
set protocols rsvp interface ge-0/0/1.0
set protocols mpls interface ge-0/0/0.0
set protocols mpls interface ge-0/0/1.0
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
root@VMX3-P3> show configuration | display set
set version 14.1R4.8
set system host-name VMX3-P3
set system root-authentication encrypted-password "$1$MRLnGKX8$3nZlDfI2S6kV/SPJ6tM7X0"
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces ge-0/0/1 unit 0 family inet address 192.168.23.3/24
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces ge-0/0/2 unit 0 family inet address 192.168.34.3/24
set interfaces ge-0/0/2 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.0.255.3/32
set routing-options router-id 10.0.255.3
set protocols rsvp interface ge-0/0/1.0
set protocols mpls label-switched-path P3-to-PE1 from 10.0.255.3
set protocols mpls label-switched-path P3-to-PE1 to 10.0.255.1
set protocols mpls label-switched-path P3-to-PE1 ldp-tunneling
set protocols mpls label-switched-path P3-to-PE1 no-cspf
set protocols mpls interface ge-0/0/1.0
set protocols mpls interface ge-0/0/2.0
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface ge-0/0/2.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ldp interface ge-0/0/2.0
set protocols ldp interface lo0.0
root@VMX4-P4> show configuration | display set
set version 14.1R4.8
set system host-name VMX4-P4
set system root-authentication encrypted-password "$1$W0phQnNm$Ty0A3C6L51X6J8RTKND7I."
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces ge-0/0/2 unit 0 family inet address 192.168.34.4/24
set interfaces ge-0/0/2 unit 0 family mpls
set interfaces ge-0/0/3 unit 0 family inet address 192.168.45.4/24
set interfaces ge-0/0/3 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.0.255.4/32
set routing-options router-id 10.0.255.4
set routing-options autonomous-system 64510
set protocols mpls traffic-engineering mpls-forwarding
set protocols mpls interface ge-0/0/2.0
set protocols mpls interface ge-0/0/3.0
set protocols bgp group MPLS type internal
set protocols bgp group MPLS local-address 10.0.255.4
set protocols bgp group MPLS family inet labeled-unicast
set protocols bgp group MPLS export nhs
set protocols bgp group MPLS neighbor 10.0.255.1
set protocols bgp group ASBR type external
set protocols bgp group ASBR family inet labeled-unicast
set protocols bgp group ASBR export ADV-PE1-TO-PE6
set protocols bgp group ASBR neighbor 192.168.45.5 peer-as 64511
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ospf area 0.0.0.0 interface ge-0/0/2.0
set protocols ldp interface ge-0/0/2.0
set policy-options policy-statement ADV-PE1-TO-PE6 term 1 from route-filter 10.0.255.1/32 exact
set policy-options policy-statement ADV-PE1-TO-PE6 term 1 then accept
set policy-options policy-statement ADV-PE1-TO-PE6 term last then reject
set policy-options policy-statement nhs then next-hop self
root@VMX5-P5> show configuration | display set
set version 14.1R4.8
set system host-name VMX5-P5
set system root-authentication encrypted-password "$1$gluVrG.x$ANGnelnGauVHu/TGQ.SIu/"
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces ge-0/0/0 unit 0 family inet address 192.168.56.5/24
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/3 unit 0 family inet address 192.168.45.5/24
set interfaces ge-0/0/3 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.0.255.5/32
set routing-options router-id 10.0.255.5
set routing-options autonomous-system 64511
set protocols mpls traffic-engineering mpls-forwarding
set protocols mpls interface ge-0/0/3.0
set protocols mpls interface ge-0/0/0.0
set protocols bgp group MPLS type internal
set protocols bgp group MPLS local-address 10.0.255.5
set protocols bgp group MPLS family inet labeled-unicast
set protocols bgp group MPLS export nhs
set protocols bgp group MPLS neighbor 10.0.255.6
set protocols bgp group ASBR type external
set protocols bgp group ASBR family inet labeled-unicast
set protocols bgp group ASBR export ADV-PE6-TO-PE1
set protocols bgp group ASBR neighbor 192.168.45.4 peer-as 64510
set protocols ospf traffic-engineering
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ldp interface ge-0/0/0.0
set policy-options policy-statement ADV-PE6-TO-PE1 term 1 from route-filter 10.0.255.6/32 exact
set policy-options policy-statement ADV-PE6-TO-PE1 term 1 then accept
set policy-options policy-statement ADV-PE6-TO-PE1 term last then reject
set policy-options policy-statement nhs then next-hop self
root@VMX-CE1> show configuration | display set
set version 14.1R4.8
set system host-name VMX-CE1
set system root-authentication encrypted-password "$1$UoOIHlY4$42OOEfrtaceBgB/v9TpNi."
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces ge-0/0/3 unit 0 family inet address 172.16.11.2/24
set interfaces lo0 unit 0 family inet address 10.1.255.1/32
set routing-options router-id 10.1.255.1
set routing-options autonomous-system 65001
set protocols bgp group EBGP type external
set protocols bgp group EBGP export export-lo0
set protocols bgp group EBGP neighbor 172.16.11.1 peer-as 64510
set policy-options policy-statement export-lo0 term 1 from interface lo0.0
set policy-options policy-statement export-lo0 term 1 then accept
set policy-options policy-statement export-lo0 term last then reject
root@VMX-CE2> show configuration | display set
set version 14.1R4.8
set system host-name VMX-CE2
set system root-authentication encrypted-password "$1$ORUSJPgI$1M1yhFMqQkrKLNn/Usto4."
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces ge-0/0/3 unit 0 family inet address 172.16.12.2/24
set interfaces ge-0/0/5 unit 0 family inet
set interfaces lo0 unit 0 family inet address 10.1.255.2/32
set routing-options router-id 10.1.255.2
set routing-options autonomous-system 65002
set protocols bgp group EBGP type external
set protocols bgp group EBGP export export-lo0
set protocols bgp group EBGP neighbor 172.16.12.1 peer-as 64511
set policy-options policy-statement export-lo0 term 1 from interface lo0.0
set policy-options policy-statement export-lo0 term 1 then accept
set policy-options policy-statement export-lo0 term last then reject
驗(yàn)證:
root@VMX-PE1> show route
inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.255.1/32? ? ? *[Direct/0] 20:04:25
? ? ? ? ? ? ? ? ? ? >? via lo0.0
10.0.255.2/32? ? ? *[OSPF/10] 20:03:47, metric 1
? ? ? ? ? ? ? ? ? ? >? to 192.168.12.2 via ge-0/0/0.0
10.0.255.3/32? ? ? *[OSPF/10] 20:03:47, metric 2
? ? ? ? ? ? ? ? ? ? >? to 192.168.12.2 via ge-0/0/0.0
10.0.255.4/32? ? ? *[OSPF/10] 20:03:47, metric 3
? ? ? ? ? ? ? ? ? ? >? to 192.168.12.2 via ge-0/0/0.0
10.0.255.6/32? ? ? *[BGP/170] 18:56:19, MED 1, localpref 100, from 10.0.255.4
? ? ? ? ? ? ? ? ? ? ? AS path: 64511 I, validation-state: unverified
? ? ? ? ? ? ? ? ? ? >? to 192.168.12.2 via ge-0/0/0.0, label-switched-path PE1-to-P3
192.168.12.0/24? ? *[Direct/0] 20:03:57
? ? ? ? ? ? ? ? ? ? >? via ge-0/0/0.0
192.168.12.1/32? ? *[Local/0] 20:03:57
? ? ? ? ? ? ? ? ? ? ? Local via ge-0/0/0.0
192.168.23.0/24? ? *[OSPF/10] 20:03:47, metric 2
? ? ? ? ? ? ? ? ? ? >? to 192.168.12.2 via ge-0/0/0.0
192.168.34.0/24? ? *[OSPF/10] 20:03:47, metric 3
? ? ? ? ? ? ? ? ? ? >? to 192.168.12.2 via ge-0/0/0.0
224.0.0.2/32? ? ? *[LDP/9] 20:04:25, metric 1
? ? ? ? ? ? ? ? ? ? ? MultiRecv
224.0.0.5/32? ? ? *[OSPF/10] 20:04:25, metric 1
? ? ? ? ? ? ? ? ? ? ? MultiRecv
inet.3: 4 destinations, 7 routes (3 active, 0 holddown, 3 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.255.3/32? ? ? *[RSVP/7/1] 19:01:14, metric 2
? ? ? ? ? ? ? ? ? ? >? to 192.168.12.2 via ge-0/0/0.0, label-switched-path PE1-to-P3
? ? ? ? ? ? ? ? ? ? [LDP/9] 19:01:14, metric 1
? ? ? ? ? ? ? ? ? ? >? to 192.168.12.2 via ge-0/0/0.0, label-switched-path PE1-to-P3
10.0.255.4/32? ? ? *[LDP/9] 19:01:14, metric 1
? ? ? ? ? ? ? ? ? ? >? to 192.168.12.2 via ge-0/0/0.0, label-switched-path PE1-to-P3
10.0.255.6/32? ? ? *[BGP/170] 18:56:19, MED 1, localpref 100, from 10.0.255.4
? ? ? ? ? ? ? ? ? ? ? AS path: 64511 I, validation-state: unverified
? ? ? ? ? ? ? ? ? ? >? to 192.168.12.2 via ge-0/0/0.0, label-switched-path PE1-to-P3
CE-1.inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.1.255.1/32? ? ? *[BGP/170] 19:44:27, localpref 100
? ? ? ? ? ? ? ? ? ? ? AS path: 65001 I, validation-state: unverified
? ? ? ? ? ? ? ? ? ? >? to 172.16.11.2 via ge-0/0/5.0
10.1.255.2/32? ? ? *[BGP/170] 18:56:19, localpref 100, from 10.0.255.6
? ? ? ? ? ? ? ? ? ? ? AS path: 64511 65002 I, validation-state: unverified
? ? ? ? ? ? ? ? ? ? >? to 192.168.12.2 via ge-0/0/0.0, label-switched-path PE1-to-P3
172.16.11.0/24? ? *[Direct/0] 20:03:57
? ? ? ? ? ? ? ? ? ? >? via ge-0/0/5.0
172.16.11.1/32? ? *[Local/0] 20:03:57
? ? ? ? ? ? ? ? ? ? ? Local via ge-0/0/5.0
172.16.12.0/24? ? *[BGP/170] 18:56:19, localpref 100, from 10.0.255.6
? ? ? ? ? ? ? ? ? ? ? AS path: 64511 I, validation-state: unverified
? ? ? ? ? ? ? ? ? ? >? to 192.168.12.2 via ge-0/0/0.0, label-switched-path PE1-to-P3
mpls.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0? ? ? ? ? ? ? ? ? *[MPLS/0] 20:04:25, metric 1
? ? ? ? ? ? ? ? ? ? ? to table inet.0
0(S=0)? ? ? ? ? ? *[MPLS/0] 20:04:25, metric 1
? ? ? ? ? ? ? ? ? ? ? to table mpls.0
1? ? ? ? ? ? ? ? ? *[MPLS/0] 20:04:25, metric 1
? ? ? ? ? ? ? ? ? ? ? Receive
2? ? ? ? ? ? ? ? ? *[MPLS/0] 20:04:25, metric 1
? ? ? ? ? ? ? ? ? ? ? to table inet6.0
2(S=0)? ? ? ? ? ? *[MPLS/0] 20:04:25, metric 1
? ? ? ? ? ? ? ? ? ? ? to table mpls.0
13? ? ? ? ? ? ? ? *[MPLS/0] 20:04:25, metric 1
? ? ? ? ? ? ? ? ? ? ? Receive
16? ? ? ? ? ? ? ? *[VPN/0] 20:04:24
? ? ? ? ? ? ? ? ? ? >? via lsi.0 (CE-1), Pop
299776? ? ? ? ? ? *[LDP/9] 19:01:14, metric 1
? ? ? ? ? ? ? ? ? ? >? to 192.168.12.2 via ge-0/0/0.0, label-switched-path PE1-to-P3
299792? ? ? ? ? ? *[LDP/9] 19:01:14, metric 1
? ? ? ? ? ? ? ? ? ? >? to 192.168.12.2 via ge-0/0/0.0, label-switched-path PE1-to-P3
bgp.l3vpn.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1000:2000:10.1.255.1/32
? ? ? ? ? ? ? ? ? *[BGP/170] 19:44:27, localpref 100
? ? ? ? ? ? ? ? ? ? ? AS path: 65001 I, validation-state: unverified
? ? ? ? ? ? ? ? ? ? >? to 172.16.11.2 via ge-0/0/5.0
1000:2000:10.1.255.2/32
? ? ? ? ? ? ? ? ? *[BGP/170] 18:56:19, localpref 100, from 10.0.255.6
? ? ? ? ? ? ? ? ? ? ? AS path: 64511 65002 I, validation-state: unverified
? ? ? ? ? ? ? ? ? ? >? to 192.168.12.2 via ge-0/0/0.0, label-switched-path PE1-to-P3
1000:2000:172.16.11.0/24
? ? ? ? ? ? ? ? ? *[Direct/0] 20:03:57
? ? ? ? ? ? ? ? ? ? >? via ge-0/0/5.0
1000:2000:172.16.11.1/32
? ? ? ? ? ? ? ? ? *[Local/0] 20:03:57
? ? ? ? ? ? ? ? ? ? ? Local via ge-0/0/5.0
1000:2000:172.16.12.0/24
? ? ? ? ? ? ? ? ? *[BGP/170] 18:56:19, localpref 100, from 10.0.255.6
? ? ? ? ? ? ? ? ? ? ? AS path: 64511 I, validation-state: unverified
? ? ? ? ? ? ? ? ? ? >? to 192.168.12.2 via ge-0/0/0.0, label-switched-path PE1-to-P3
inet6.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
fe80::5200:ff:fe05:0/128
? ? ? ? ? ? ? ? ? *[Local/0] 20:04:25
? ? ? ? ? ? ? ? ? ? ? Local via fxp0.0
ff02::2/128? ? ? ? *[INET6/0] 20:04:25
? ? ? ? ? ? ? ? ? ? ? MultiRecv
CE-1.inet6.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
ff02::2/128? ? ? ? *[INET6/0] 20:04:25
? ? ? ? ? ? ? ? ? ? ? MultiRecv
root@VMX-PE1> show route table CE-1.inet.0 10.1.255.2 extensive
(注意第23行:Label operation: Push 16, Push 300032, Push 299792, Push 299824(top)茉继,分別為VPN標(biāo)簽16翼闹,BGP-LU標(biāo)簽300032丁寄,LDP標(biāo)簽299792柑营,RSVP標(biāo)簽299824)
CE-1.inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
10.1.255.2/32 (1 entry, 1 announced)
TSI:
KRT in-kernel 10.1.255.2/32 -> {indirect(1048575)}
Page 0 idx 0, (group TO-CE type External) Type 1 val 0xd7868c8 (adv_entry)
? Advertised metrics:
? ? Nexthop: Self
? ? AS path: [64510] 64511 65002 I
? ? Communities: target:1000:2000
? ? Advertise: 00000001
Path 10.1.255.2
from 10.0.255.6
Vector len 4.? Val: 0
? ? ? ? *BGP? ? Preference: 170/-101
? ? ? ? ? ? ? ? Route Distinguisher: 1000:2000
? ? ? ? ? ? ? ? Next hop type: Indirect, Next hop index: 0
? ? ? ? ? ? ? ? Address: 0xc51fe88
? ? ? ? ? ? ? ? Next-hop reference count: 6
? ? ? ? ? ? ? ? Source: 10.0.255.6
? ? ? ? ? ? ? ? Next hop type: Router, Next hop index: 611
? ? ? ? ? ? ? ? Next hop: 192.168.12.2 via ge-0/0/0.0, selected
? ? ? ? ? ? ? ? Label-switched-path PE1-to-P3
? ? ? ? ? ? ? ? Label operation: Push 16, Push 300032, Push 299792, Push 299824(top)
? ? ? ? ? ? ? ? Label TTL action: prop-ttl,prop-ttl,prop-ttl,prop-ttl
? ? ? ? ? ? ? ? Load balance label: Label 16: None; Label 300032: None; Label 299792: None; Label 299824: None;
? ? ? ? ? ? ? ? Label element ptr: 0xcce6698
? ? ? ? ? ? ? ? Label parent element ptr: 0xcce6418
? ? ? ? ? ? ? ? Label element references: 1
? ? ? ? ? ? ? ? Label element child references: 0
? ? ? ? ? ? ? ? Label element lsp id: 0
? ? ? ? ? ? ? ? Session Id: 0x140
? ? ? ? ? ? ? ? Statistics ID Group: Kernel ID = 2, Stats IDs = { 536870920 }
? ? ? ? ? ? ? ? Protocol next hop: 10.0.255.6
? ? ? ? ? ? ? ? Label operation: Push 16
? ? ? ? ? ? ? ? Label TTL action: prop-ttl
? ? ? ? ? ? ? ? Load balance label: Label 16: None;
? ? ? ? ? ? ? ? Indirect next hop: 0xc676904 1048575 INH Session ID: 0x144
? ? ? ? ? ? ? ? State: <Secondary Active Ext ProtectionCand>
? ? ? ? ? ? ? ? Local AS: 64510 Peer AS: 64511
? ? ? ? ? ? ? ? Age: 18:57:14? Metric2: 1
? ? ? ? ? ? ? ? Validation State: unverified
? ? ? ? ? ? ? ? Task: BGP_64511.10.0.255.6
? ? ? ? ? ? ? ? Announcement bits (2): 0-KRT 2-BGP_RT_Background
? ? ? ? ? ? ? ? AS path: 64511 65002 I
? ? ? ? ? ? ? ? Communities: target:1000:2000
? ? ? ? ? ? ? ? Import Accepted
? ? ? ? ? ? ? ? VPN Label: 16
? ? ? ? ? ? ? ? Localpref: 100
? ? ? ? ? ? ? ? Router ID: 10.0.255.6
? ? ? ? ? ? ? ? Primary Routing Table: bgp.l3vpn.0
? ? ? ? ? ? ? ? Indirect next hops: 1
? ? ? ? ? ? ? ? ? ? ? ? Protocol next hop: 10.0.255.6 Metric: 1
? ? ? ? ? ? ? ? ? ? ? ? Label operation: Push 16
? ? ? ? ? ? ? ? ? ? ? ? Label TTL action: prop-ttl
? ? ? ? ? ? ? ? ? ? ? ? Load balance label: Label 16: None;
? ? ? ? ? ? ? ? ? ? ? ? Indirect next hop: 0xc676904 1048575 INH Session ID: 0x144
? ? ? ? ? ? ? ? ? ? ? ? Indirect path forwarding next hops: 1
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Next hop type: Router
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Next hop: 192.168.12.2 via ge-0/0/0.0
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Session Id: 0x140
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Statistics ID Group: Kernel ID = 2, Stats IDs = { 536870920 }
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 10.0.255.6/32 Originating RIB: inet.3
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Metric: 1 Node path count: 1
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Indirect next hops: 1
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Protocol next hop: 10.0.255.4 Metric: 1
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Inode flags: 0x204 path flags: 0x0
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Path fnh link: 0xbfd06c0 path inh link: 0x0
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Label operation: Push 300032
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Label TTL action: prop-ttl
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Load balance label: Label 300032: None;
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Indirect next hop: 0xc66c284 1048574 INH Session ID: 0x143
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Indirect path forwarding next hops: 1
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Next hop type: Router
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Next hop: 192.168.12.2 via ge-0/0/0.0
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Session Id: 0x140
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Statistics ID Group: Kernel ID = 2, Stats IDs = { 536870920 }
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 10.0.255.4/32 Originating RIB: inet.3
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Metric: 1 Node path count: 1
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Forwarding nexthops: 1
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Next hop type: Router
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Next hop: 192.168.12.2 via ge-0/0/0.0
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Session Id: 0x0
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Statistics ID Group: Kernel ID = 2, Stats IDs = { 536870920 }
root@VMX-PE1> show route receive-protocol bgp 10.0.255.6 10.1.255.2 extensive
(查看VPN 16標(biāo)簽)
CE-1.inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
* 10.1.255.2/32 (1 entry, 1 announced)
? ? Import Accepted
? ? Route Distinguisher: 1000:2000
? ? VPN Label: 16
? ? Nexthop: 10.0.255.6
? ? AS path: 64511 65002 I
? ? Communities: target:1000:2000
root@VMX-PE1> show route receive-protocol bgp 10.0.255.4 10.0.255.6 extensive
(查看BGP-LU 300032標(biāo)簽)
inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden)
* 10.0.255.6/32 (1 entry, 1 announced)
? ? Accepted
? ? Route Label: 300032
? ? Nexthop: 10.0.255.4
? ? MED: 1
? ? Localpref: 100
? ? AS path: 64511 I
inet.3: 4 destinations, 7 routes (3 active, 0 holddown, 3 hidden)
* 10.0.255.6/32 (1 entry, 1 announced)
? ? Accepted
? ? Route Label: 300032
? ? Nexthop: 10.0.255.4
? ? MED: 1
? ? Localpref: 100
? ? AS path: 64511 I
root@VMX-PE1> show ldp database
(查看299792 ldp標(biāo)簽,由VMX3-P3分配)
Input label database, 10.0.255.1:0--10.0.255.3:0
Labels received: 3
? Label? ? Prefix
299808? ? ? 10.0.255.1/32
? ? ? 3? ? ? 10.0.255.3/32
299792? ? ? 10.0.255.4/32
Output label database, 10.0.255.1:0--10.0.255.3:0
Labels advertised: 3
? Label? ? Prefix
? ? ? 3? ? ? 10.0.255.1/32
299776? ? ? 10.0.255.3/32
299792? ? ? 10.0.255.4/32
root@VMX3-P3> show route table mpls.0 label 299792
(299792將被彈出)
mpls.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
299792? ? ? ? ? ? *[LDP/9] 20:17:45, metric 1
? ? ? ? ? ? ? ? ? ? > to 192.168.34.4 via ge-0/0/2.0, Pop
299792(S=0)? ? ? ? *[LDP/9] 20:17:45, metric 1
? ? ? ? ? ? ? ? ? ? > to 192.168.34.4 via ge-0/0/2.0, Pop
root@VMX-PE1> show rsvp session extensive
(299824標(biāo)簽由RSVP分配)
Ingress RSVP: 1 sessions
10.0.255.3
? From: 10.0.255.1, LSPstate: Up, ActiveRoute: 0
? LSPname: PE1-to-P3, LSPpath: Primary
? LSPtype: Static Configured
? Suggested label received: -, Suggested label sent: -
? Recovery label received: -, Recovery label sent: 299824
? Resv style: 1 FF, Label in: -, Label out: 299824
? Time left:? ? -, Since: Thu Mar 25 07:34:01 2021
? Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500
? Port number: sender 1 receiver 6211 protocol 0
? Enhanced FRR: Disabled, Reason: LSP Type, Refresh: 30 secs
? PATH rcvfrom: localclient
? Adspec: sent MTU 1500
? Path MTU: received 1500
? PATH sentto: 192.168.12.2 (ge-0/0/0.0) 2477 pkts
? ? ? outgoing message state: refreshing, Message ID: 21, Epoch: 10704757
? RESV rcvfrom: 192.168.12.2 (ge-0/0/0.0) 1537 pkts, Entropy label: Yes
? ? ? incoming message handle: R-4/1
? Record route: <self> 192.168.12.2 192.168.23.3
Total 1 displayed, Up 1, Down 0
Egress RSVP: 1 sessions
10.0.255.1
? From: 10.0.255.3, LSPstate: Up, ActiveRoute: 0
? LSPname: P3-to-PE1, LSPpath: Primary
? Suggested label received: -, Suggested label sent: -
? Recovery label received: -, Recovery label sent: -
? Resv style: 1 FF, Label in: 3, Label out: -
? Time left:? 146, Since: Thu Mar 25 08:36:32 2021
? Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500
? Port number: sender 1 receiver 1282 protocol 0
? Enhanced FRR: Disabled, Reason: LSP Type, Refresh: 30 secs
? PATH rcvfrom: 192.168.12.2 (ge-0/0/0.0) 1540 pkts
? ? ? incoming message handle: P-3/1
? Adspec: received MTU 1500
? PATH sentto: localclient
? RESV rcvfrom: localclient , Entropy label: Yes
? RESV
? ? ? outgoing message state: refreshing, Message ID: 22, Epoch: 10704757
? Record route: 192.168.23.3 192.168.12.2 <self>
Total 1 displayed, Up 1, Down 0
Transit RSVP: 0 sessions
Total 0 displayed, Up 0, Down 0
root@VMX2-P2> show route table mpls.0 label 299824 extensive
(299824標(biāo)簽將被彈出)
mpls.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden)
299824 (1 entry, 1 announced)
TSI:
KRT in-kernel 299824 /52 -> {Pop? ? ? Flags acct EL-capable}
? ? ? ? *RSVP? Preference: 7/1
? ? ? ? ? ? ? ? Next hop type: Router, Next hop index: 567
? ? ? ? ? ? ? ? Address: 0x9690814
? ? ? ? ? ? ? ? Next-hop reference count: 2
? ? ? ? ? ? ? ? Next hop: 192.168.23.3 via ge-0/0/1.0, selected
? ? ? ? ? ? ? ? Label-switched-path PE1-to-P3
? ? ? ? ? ? ? ? Label operation: Pop
? ? ? ? ? ? ? ? Load balance label: None;
? ? ? ? ? ? ? ? Session Id: 0x140
? ? ? ? ? ? ? ? State: <Active Int AckRequest Accounting EL-capable>
? ? ? ? ? ? ? ? Age: 20:17:31? Metric: 1
? ? ? ? ? ? ? ? Validation State: unverified
? ? ? ? ? ? ? ? Task: RSVP
? ? ? ? ? ? ? ? Announcement bits (1): 0-KRT
? ? ? ? ? ? ? ? AS path: I
299824(S=0) (1 entry, 1 announced)
TSI:
KRT in-kernel 299824 /56 -> {Pop? ? ? Flags acct EL-capable}
? ? ? ? *RSVP? Preference: 7/1
? ? ? ? ? ? ? ? Next hop type: Router, Next hop index: 568
? ? ? ? ? ? ? ? Address: 0x9690860
? ? ? ? ? ? ? ? Next-hop reference count: 2
? ? ? ? ? ? ? ? Next hop: 192.168.23.3 via ge-0/0/1.0, selected
? ? ? ? ? ? ? ? Label-switched-path PE1-to-P3
? ? ? ? ? ? ? ? Label operation: Pop
? ? ? ? ? ? ? ? Load balance label: None;
? ? ? ? ? ? ? ? Session Id: 0x140
? ? ? ? ? ? ? ? State: <Active Int AckRequest Accounting EL-capable>
? ? ? ? ? ? ? ? Age: 20:17:31? Metric: 1
? ? ? ? ? ? ? ? Validation State: unverified
? ? ? ? ? ? ? ? Task: RSVP
? ? ? ? ? ? ? ? Announcement bits (1): 0-KRT
? ? ? ? ? ? ? ? AS path: I
在VMX2-P2的GE-0/0/0上的攔截
REF: