cust-A:10.0.255.1 <--------------->10.0.255.4走low path
cust-B:10.0.255.8 <---------------->10.0.255.9严格走fast path
cust-B:10.0.255.88 <---------------->10.0.255.99走low path
root@PE-1# run show configuration | display set
set version 14.1R4.8
set system host-name PE-1
set system root-authentication encrypted-password "$1$iwX8Oear$UbqXYDjJQikoqARR/KrI91"
set system services ssh root-login allow
set system services ssh protocol-version v2
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 chassis fpc 0 pic 0 tunnel-services bandwidth 1g
set chassis network-services enhanced-ip
set interfaces ge-0/0/0 description "link to PE-2"
set interfaces ge-0/0/0 unit 0 family inet address 10.0.25.2/24
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/1 description "link to CE-1"
set interfaces ge-0/0/1 unit 0 family inet address 10.0.12.2/24
set interfaces ge-0/0/2 description "LINK TO P-2"
set interfaces ge-0/0/2 unit 0 family inet address 10.0.26.2/24
set interfaces ge-0/0/2 unit 0 family mpls
set interfaces ge-0/0/3 description "LINK TO CE-B-1"
set interfaces ge-0/0/3 unit 0 family inet address 10.0.28.2/24
set interfaces em0 mac 50:00:00:01:00:0a
set interfaces em0 unit 0 family inet address 10.5.245.12/24
set interfaces lo0 unit 0 family inet address 10.0.255.2/32
set routing-options static route 10.5.0.0/16 next-hop 10.5.245.254
set routing-options router-id 10.0.255.2
set routing-options autonomous-system 65000
set routing-options forwarding-table export MAP-VPN-TO-LSP
set protocols rsvp interface ge-0/0/0.0
set protocols rsvp interface ge-0/0/2.0
set protocols mpls no-cspf
set protocols mpls label-switched-path PE1-PE2 from 10.0.255.2
set protocols mpls label-switched-path PE1-PE2 to 10.0.255.3
set protocols mpls label-switched-path PE1-PE2 ultimate-hop-popping
set protocols mpls label-switched-path PE1-fast-PE2 from 10.0.255.2
set protocols mpls label-switched-path PE1-fast-PE2 to 10.0.255.3
set protocols mpls label-switched-path PE1-fast-PE2 ultimate-hop-popping
set protocols mpls label-switched-path PE1-fast-PE2 primary path-p2-p3
set protocols mpls path path-p2-p3 10.0.255.6 strict
set protocols mpls path path-p2-p3 10.0.255.7 strict
set protocols mpls interface ge-0/0/0.0
set protocols mpls interface ge-0/0/2.0
set protocols bgp group IBGP type internal
set protocols bgp group IBGP local-address 10.0.255.2
set protocols bgp group IBGP family inet-vpn unicast
set protocols bgp group IBGP neighbor 10.0.255.3 description peer-to-PE2
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 interface-type p2p
set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 interface-type p2p
set policy-options policy-statement MAP-VPN-TO-LSP term 1 from community CUST-A
set policy-options policy-statement MAP-VPN-TO-LSP term 1 from community cust-B-6500-22
set policy-options policy-statement MAP-VPN-TO-LSP term 1 then install-nexthop lsp PE1-PE2
set policy-options policy-statement MAP-VPN-TO-LSP term 1 then accept
set policy-options policy-statement MAP-VPN-TO-LSP term 2 from community cust-B-6500-2
set policy-options policy-statement MAP-VPN-TO-LSP term 2 then install-nexthop strict
set policy-options policy-statement MAP-VPN-TO-LSP term 2 then install-nexthop lsp PE1-fast-PE2
set policy-options policy-statement MAP-VPN-TO-LSP term 2 then accept
set policy-options policy-statement cust-B-Export term 1 from route-filter 10.0.255.8/32 exact
set policy-options policy-statement cust-B-Export term 1 then community add cust-B-6500-2
set policy-options policy-statement cust-B-Export term 1 then accept
set policy-options policy-statement cust-B-Export term 2 from route-filter 10.0.255.88/32 exact
set policy-options policy-statement cust-B-Export term 2 then community add cust-B-6500-22
set policy-options policy-statement cust-B-Export term 2 then accept
set policy-options policy-statement cust-B-Export term last then reject
set policy-options policy-statement cust-B-Import term 1 from community cust-B-6500-2
set policy-options policy-statement cust-B-Import term 1 from community cust-B-6500-22
set policy-options policy-statement cust-B-Import term 1 then accept
set policy-options policy-statement cust-B-Import term last then reject
set policy-options community CUST-A members target:65000:1
set policy-options community cust-B-6500-2 members target:65000:2
set policy-options community cust-B-6500-22 members target:65000:22
set routing-instances cust-A instance-type vrf
set routing-instances cust-A interface ge-0/0/1.0
set routing-instances cust-A route-distinguisher 65000:1
set routing-instances cust-A vrf-target target:65000:1
set routing-instances cust-A vrf-table-label
set routing-instances cust-A protocols bgp group EBGP-A type external
set routing-instances cust-A protocols bgp group EBGP-A neighbor 10.0.12.1 peer-as 65001
set routing-instances cust-B instance-type vrf
set routing-instances cust-B interface ge-0/0/3.0
set routing-instances cust-B route-distinguisher 65000:2
set routing-instances cust-B vrf-import cust-B-Import
set routing-instances cust-B vrf-export cust-B-Export
set routing-instances cust-B vrf-target target:65000:2
set routing-instances cust-B vrf-table-label
set routing-instances cust-B protocols bgp group EBGP-B type external
set routing-instances cust-B protocols bgp group EBGP-B neighbor 10.0.28.8 peer-as 65008
root@PE-2# run show configuration | display set
set version 14.1R4.8
set system host-name PE-2
set system root-authentication encrypted-password "$1$o5wG8uFd$SZB3YeoWMcLoQWQwzhBXf1"
set system services ssh root-login allow
set system services ssh protocol-version v2
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 chassis fpc 0 pic 0 tunnel-services bandwidth 1g
set chassis network-services enhanced-ip
set interfaces ge-0/0/0 description "link to PE-1"
set interfaces ge-0/0/0 unit 0 family inet address 10.0.35.3/24
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/1 description "link to CE-2"
set interfaces ge-0/0/1 unit 0 family inet address 10.0.34.3/24
set interfaces ge-0/0/2 description "LINK TO CE-B-2"
set interfaces ge-0/0/2 unit 0 family inet address 10.0.39.3/24
set interfaces ge-0/0/3 unit 0 family inet address 10.0.37.3/24
set interfaces ge-0/0/3 unit 0 family mpls
set interfaces em0 mac 50:00:00:01:00:22
set interfaces em0 unit 0 family inet address 10.5.245.13/24
set interfaces lo0 unit 0 family inet address 10.0.255.3/32
set routing-options static route 10.5.0.0/16 next-hop 10.5.245.254
set routing-options router-id 10.0.255.3
set routing-options autonomous-system 65000
set routing-options forwarding-table export MAP-VPN-TO-LSP
set protocols rsvp interface ge-0/0/0.0
set protocols rsvp interface ge-0/0/3.0
set protocols mpls no-cspf
set protocols mpls label-switched-path PE2-PE1 from 10.0.255.3
set protocols mpls label-switched-path PE2-PE1 to 10.0.255.2
set protocols mpls label-switched-path PE2-PE1 ultimate-hop-popping
set protocols mpls label-switched-path PE2-fast-PE1 from 10.0.255.3
set protocols mpls label-switched-path PE2-fast-PE1 to 10.0.255.2
set protocols mpls label-switched-path PE2-fast-PE1 ultimate-hop-popping
set protocols mpls label-switched-path PE2-fast-PE1 primary path-p3-p2
set protocols mpls path path-p3-p2 10.0.255.7 strict
set protocols mpls path path-p3-p2 10.0.255.6 strict
set protocols mpls interface ge-0/0/0.0
set protocols mpls interface ge-0/0/3.0
set protocols bgp group IBGP type internal
set protocols bgp group IBGP local-address 10.0.255.3
set protocols bgp group IBGP family inet-vpn unicast
set protocols bgp group IBGP neighbor 10.0.255.2 description peer-to-PE1
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 interface-type p2p
set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 interface-type p2p
set policy-options policy-statement MAP-VPN-TO-LSP term 1 from community CUST-A
set policy-options policy-statement MAP-VPN-TO-LSP term 1 from community cust-B-6500-22
set policy-options policy-statement MAP-VPN-TO-LSP term 1 then install-nexthop lsp PE2-PE1
set policy-options policy-statement MAP-VPN-TO-LSP term 1 then accept
set policy-options policy-statement MAP-VPN-TO-LSP term 2 from community cust-B-6500-2
set policy-options policy-statement MAP-VPN-TO-LSP term 2 then install-nexthop strict
set policy-options policy-statement MAP-VPN-TO-LSP term 2 then install-nexthop lsp PE2-fast-PE1
set policy-options policy-statement MAP-VPN-TO-LSP term 2 then accept
set policy-options policy-statement cust-B-Export term 1 from route-filter 10.0.255.9/32 exact
set policy-options policy-statement cust-B-Export term 1 then community add cust-B-6500-2
set policy-options policy-statement cust-B-Export term 1 then accept
set policy-options policy-statement cust-B-Export term 2 from route-filter 10.0.255.99/32 exact
set policy-options policy-statement cust-B-Export term 2 then community add cust-B-6500-22
set policy-options policy-statement cust-B-Export term 2 then accept
set policy-options policy-statement cust-B-Export term last then reject
set policy-options policy-statement cust-B-Import term 1 from community cust-B-6500-2
set policy-options policy-statement cust-B-Import term 1 then accept
set policy-options policy-statement cust-B-Import term 2 from community cust-B-6500-22
set policy-options policy-statement cust-B-Import term 2 then accept
set policy-options policy-statement cust-B-Import term last then reject
set policy-options community CUST-A members target:65000:1
set policy-options community cust-B-6500-2 members target:65000:2
set policy-options community cust-B-6500-22 members target:65000:22
set routing-instances cust-A instance-type vrf
set routing-instances cust-A interface ge-0/0/1.0
set routing-instances cust-A route-distinguisher 65000:1
set routing-instances cust-A vrf-target target:65000:1
set routing-instances cust-A vrf-table-label
set routing-instances cust-A protocols bgp group EBGP-A type external
set routing-instances cust-A protocols bgp group EBGP-A neighbor 10.0.34.4 peer-as 65002
set routing-instances cust-B instance-type vrf
set routing-instances cust-B interface ge-0/0/2.0
set routing-instances cust-B route-distinguisher 65000:2
set routing-instances cust-B vrf-import cust-B-Import
set routing-instances cust-B vrf-export cust-B-Export
set routing-instances cust-B vrf-target target:65000:2
set routing-instances cust-B vrf-table-label
set routing-instances cust-B protocols bgp group EBGP-B type external
set routing-instances cust-B protocols bgp group EBGP-B neighbor 10.0.39.9 peer-as 65009
验证:
root@PE-1# run show route 10.0.255.9/32 table cust-B
cust-B.inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.255.9/32 *[BGP/170] 00:00:20, localpref 100, from 10.0.255.3
AS path: 65009 I, validation-state: unverified
to 10.0.26.6 via ge-0/0/2.0,
label-switched-path PE1-fast-PE2[edit]
root@PE-1# run show route 10.0.255.99/32 table cust-B
cust-B.inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.255.99/32 *[BGP/170] 00:06:40, localpref 100, from 10.0.255.3
AS path: 65009 I, validation-state: unverified
to 10.0.25.5 via ge-0/0/0.0,
label-switched-path PE1-PE2
[edit]
root@PE-1# run show route 10.0.255.4/32 table cust-A
cust-A.inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.255.4/32 *[BGP/170] 00:06:54, localpref 100, from 10.0.255.3
AS path: 65002 I, validation-state: unverified
to 10.0.25.5 via ge-0/0/0.0,
label-switched-path PE1-PE2
root@PE-2# run show route 10.0.255.8/32 table cust-B
cust-B.inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.255.8/32 *[BGP/170] 00:00:03, localpref 100, from 10.0.255.2
AS path: 65008 I, validation-state: unverified
to 10.0.37.7 via ge-0/0/3.0,
label-switched-path PE2-fast-PE1
[edit]
root@PE-2# run show route 10.0.255.88/32 table cust-B
cust-B.inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.255.88/32 *[BGP/170] 00:06:24, localpref 100, from 10.0.255.2
AS path: 65008 I, validation-state: unverified
to 10.0.35.5 via ge-0/0/0.0,
label-switched-path PE2-PE1
[edit]
root@PE-2# run show route 10.0.255.1/32 table cust-A
cust-A.inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.255.1/32 *[BGP/170] 00:07:32, localpref 100, from 10.0.255.2
AS path: 65001 I, validation-state: unverified
to 10.0.35.5 via ge-0/0/0.0,
label-switched-path PE2-PE1