4标签inter-AS option C实验

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.两个ASBR(VMX4-P4,VMX5-P5)各有EBGP和IBGP连接,协议族bgp-lu(family inet labeled-unicast)

为两个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时,其10.0.255.1/10.0.255.6是从ospf来的,在向各自的目的地PE转发包时,需set protocols mpls traffic-engineering mpls-forwarding(ospf用来寻址,mpls用来转发)

4.PE1-P3之间有个 ldp-tunneling over rsvp的隧道(set protocols ldp interface lo0.0)

5.juniper默认标签盏最大标签数为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

验证:

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标签16,BGP-LU标签300032,LDP标签299792,RSVP标签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标签)

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标签)

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标签,由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标签由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标签将被弹出)

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/

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 203,324评论 5 476
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 85,303评论 2 381
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 150,192评论 0 337
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,555评论 1 273
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,569评论 5 365
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,566评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,927评论 3 395
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,583评论 0 257
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,827评论 1 297
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,590评论 2 320
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,669评论 1 329
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,365评论 4 318
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,941评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,928评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,159评论 1 259
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 42,880评论 2 349
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,399评论 2 342

推荐阅读更多精彩内容