4標(biāo)簽inter-AS option C實(shí)驗(yàn)

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:

https://next-hopself.net/4-Label-Stack/

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末屈雄,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子官套,更是在濱河造成了極大的恐慌酒奶,老刑警劉巖,帶你破解...
    沈念sama閱讀 218,546評(píng)論 6 507
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件奶赔,死亡現(xiàn)場離奇詭異惋嚎,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)站刑,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,224評(píng)論 3 395
  • 文/潘曉璐 我一進(jìn)店門另伍,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人绞旅,你說我怎么就攤上這事摆尝。” “怎么了因悲?”我有些...
    開封第一講書人閱讀 164,911評(píng)論 0 354
  • 文/不壞的土叔 我叫張陵堕汞,是天一觀的道長。 經(jīng)常有香客問我晃琳,道長讯检,這世上最難降的妖魔是什么琐鲁? 我笑而不...
    開封第一講書人閱讀 58,737評(píng)論 1 294
  • 正文 為了忘掉前任,我火速辦了婚禮人灼,結(jié)果婚禮上绣否,老公的妹妹穿的比我還像新娘。我一直安慰自己挡毅,他們只是感情好蒜撮,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,753評(píng)論 6 392
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著跪呈,像睡著了一般段磨。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上耗绿,一...
    開封第一講書人閱讀 51,598評(píng)論 1 305
  • 那天苹支,我揣著相機(jī)與錄音,去河邊找鬼误阻。 笑死债蜜,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的究反。 我是一名探鬼主播寻定,決...
    沈念sama閱讀 40,338評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼精耐!你這毒婦竟也來了狼速?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 39,249評(píng)論 0 276
  • 序言:老撾萬榮一對(duì)情侶失蹤卦停,失蹤者是張志新(化名)和其女友劉穎向胡,沒想到半個(gè)月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體惊完,經(jīng)...
    沈念sama閱讀 45,696評(píng)論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡僵芹,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,888評(píng)論 3 336
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了小槐。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片拇派。...
    茶點(diǎn)故事閱讀 40,013評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖本股,靈堂內(nèi)的尸體忽然破棺而出攀痊,到底是詐尸還是另有隱情桐腌,我是刑警寧澤拄显,帶...
    沈念sama閱讀 35,731評(píng)論 5 346
  • 正文 年R本政府宣布,位于F島的核電站案站,受9級(jí)特大地震影響躬审,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,348評(píng)論 3 330
  • 文/蒙蒙 一承边、第九天 我趴在偏房一處隱蔽的房頂上張望遭殉。 院中可真熱鬧,春花似錦博助、人聲如沸险污。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,929評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽蛔糯。三九已至,卻和暖如春窖式,著一層夾襖步出監(jiān)牢的瞬間蚁飒,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,048評(píng)論 1 270
  • 我被黑心中介騙來泰國打工萝喘, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留淮逻,地道東北人。 一個(gè)月前我還...
    沈念sama閱讀 48,203評(píng)論 3 370
  • 正文 我出身青樓阁簸,卻偏偏與公主長得像爬早,于是被迫代替她去往敵國和親。 傳聞我的和親對(duì)象是個(gè)殘疾皇子启妹,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,960評(píng)論 2 355

推薦閱讀更多精彩內(nèi)容