MPLS L3VPN inter-AS option C with RR

root@VMX1-PE1> show configuration | display set

set version 14.1R4.8

set system host-name VMX1-PE1

set system root-authentication encrypted-password "$1$araVeM1z$wOOT8EVR5OmIJz2Lma56g/"

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.1/24

set interfaces ge-0/0/0 unit 0 family mpls

set interfaces ge-0/0/3 unit 0 family inet address 192.168.100.254/24

set interfaces lo0 unit 0 family inet address 10.0.255.1/32

set routing-options router-id 10.0.255.1

set routing-options autonomous-system 64512

set protocols mpls interface ge-0/0/0.0

set protocols bgp group TO-RR1 type internal

set protocols bgp group TO-RR1 local-address 10.0.255.1

set protocols bgp group TO-RR1 family inet labeled-unicast rib inet.3

set protocols bgp group TO-RR1 family inet-vpn unicast

set protocols bgp group TO-RR1 neighbor 11.11.11.11

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 ldp interface ge-0/0/0.0

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 instance-type vrf

set routing-instances CE-1 interface ge-0/0/3.0

set routing-instances CE-1 route-distinguisher  64512:1

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-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 192.168.100.1 peer-as 65001

root@VMX2> show configuration | display set

set version 14.1R4.8

set system host-name VMX2

set system root-authentication encrypted-password "$1$3OPgI4b1$4SWnhgUtGjKNivLzHaKhR0"

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 ge-0/0/2 unit 0 family inet address 192.168.29.2/24

set interfaces ge-0/0/2 unit 0 family mpls

set interfaces lo0 unit 0 family inet address 10.0.255.2/32

set protocols mpls interface ge-0/0/2.0

set protocols mpls interface ge-0/0/1.0

set protocols mpls interface ge-0/0/0.0

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 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 ldp interface ge-0/0/0.0

set protocols ldp interface ge-0/0/1.0

set protocols ldp interface ge-0/0/2.0

root@VMX3> show configuration | display set

set version 14.1R4.8

set system host-name VMX3

set system root-authentication encrypted-password "$1$NbiKpA./$KlCKUSdMTUpliVBWBvEUW0"

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 ge-0/0/3 unit 0 family inet address 192.168.39.3/24

set interfaces ge-0/0/3 unit 0 family mpls

set interfaces lo0 unit 0 family inet address 10.0.255.3/32

set protocols mpls interface ge-0/0/1.0

set protocols mpls interface ge-0/0/2.0

set protocols mpls interface ge-0/0/3.0

set protocols ospf area 0.0.0.0 interface lo0.0 passive

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 ge-0/0/3.0

set protocols ldp interface ge-0/0/1.0

set protocols ldp interface ge-0/0/2.0

set protocols ldp interface ge-0/0/3.0

root@VMX4> show configuration | display set

set version 14.1R4.8

set system host-name VMX4

set system root-authentication encrypted-password "$1$5Pj3s4A5$Tf6CzcIWHbBDkTiHOqf.P0"

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.45.4/24

set interfaces ge-0/0/0 unit 0 family mpls

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 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 64512

set protocols mpls interface ge-0/0/2.0

set protocols mpls interface ge-0/0/0.0

set protocols bgp group ASBR type external

set protocols bgp group ASBR family inet labeled-unicast rib inet.3

set protocols bgp group ASBR export export-pe1-rr1-lo0

set protocols bgp group ASBR neighbor 192.168.45.5 peer-as 64513

set protocols bgp group TO-RR1 type internal

set protocols bgp group TO-RR1 local-address 10.0.255.4

set protocols bgp group TO-RR1 family inet labeled-unicast rib inet.3

set protocols bgp group TO-RR1 export nhs

set protocols bgp group TO-RR1 neighbor 11.11.11.11

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 export-pe1-rr1-lo0 term 1 from route-filter 10.0.255.1/32 exact

set policy-options policy-statement export-pe1-rr1-lo0 term 1 from route-filter 11.11.11.11/32 exact

set policy-options policy-statement export-pe1-rr1-lo0 term 1 then accept

set policy-options policy-statement export-pe1-rr1-lo0 term last then reject

set policy-options policy-statement nhs then next-hop self

root@VMX9-RR1> show configuration | display set

set version 14.1R4.8

set system host-name VMX9-RR1

set system root-authentication encrypted-password "$1$06zzpXHt$jBtfalrLy64HgQN84Y62Y0"

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.29.9/24

set interfaces ge-0/0/2 unit 0 family mpls

set interfaces ge-0/0/3 unit 0 family inet address 192.168.39.9/24

set interfaces ge-0/0/3 unit 0 family mpls

set interfaces lo0 unit 0 family inet address 11.11.11.11/32

set routing-options rib-groups RR2-INTO-INET0 import-rib inet.3

set routing-options rib-groups RR2-INTO-INET0 import-rib inet.0

set routing-options rib-groups RR2-INTO-INET0 import-policy RR2-lo0

set routing-options router-id 11.11.11.11

set routing-options autonomous-system 64512

set protocols mpls interface ge-0/0/2.0

set protocols mpls interface ge-0/0/3.0

set protocols bgp group IBGP type internal

set protocols bgp group IBGP local-address 11.11.11.11

set protocols bgp group IBGP family inet labeled-unicast rib-group RR2-INTO-INET0

set protocols bgp group IBGP family inet labeled-unicast rib inet.3

set protocols bgp group IBGP family inet-vpn unicast

set protocols bgp group IBGP cluster 11.11.11.11

set protocols bgp group IBGP neighbor 10.0.255.1

set protocols bgp group IBGP neighbor 10.0.255.4

set protocols bgp group TO-ASBR type external

set protocols bgp group TO-ASBR multihop ttl 32

set protocols bgp group TO-ASBR multihop no-nexthop-change

set protocols bgp group TO-ASBR local-address 11.11.11.11

set protocols bgp group TO-ASBR family inet-vpn unicast

set protocols bgp group TO-ASBR peer-as 64513

set protocols bgp group TO-ASBR neighbor 22.22.22.22

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 ospf area 0.0.0.0 interface ge-0/0/3.0

set protocols ldp interface ge-0/0/2.0

set protocols ldp interface ge-0/0/3.0

set policy-options policy-statement RR2-lo0 term 1 from route-filter 22.22.22.22/32 exact

set policy-options policy-statement RR2-lo0 term 1 then accept

set policy-options policy-statement RR2-lo0 term last then reject

root@VMX5> show configuration | display set

set version 14.1R4.8

set system host-name VMX5

set system root-authentication encrypted-password "$1$24xEGnd0$4ag5jjmjC/T70rwkYtu8u0"

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.45.5/24

set interfaces ge-0/0/0 unit 0 family mpls

set interfaces ge-0/0/2 unit 0 family inet address 192.168.56.5/24

set interfaces ge-0/0/2 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 64513

set protocols mpls interface ge-0/0/2.0

set protocols mpls interface ge-0/0/0.0

set protocols bgp group ASBR type external

set protocols bgp group ASBR family inet labeled-unicast rib inet.3

set protocols bgp group ASBR export export-pe2-rr2-lo0

set protocols bgp group ASBR neighbor 192.168.45.4 peer-as 64512

set protocols bgp group TO-RR2 type internal

set protocols bgp group TO-RR2 local-address 10.0.255.5

set protocols bgp group TO-RR2 family inet labeled-unicast rib inet.3

set protocols bgp group TO-RR2 export nhs

set protocols bgp group TO-RR2 neighbor 22.22.22.22

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 export-pe2-rr2-lo0 term 1 from route-filter 10.0.255.8/32 exact

set policy-options policy-statement export-pe2-rr2-lo0 term 1 from route-filter 22.22.22.22/32 exact

set policy-options policy-statement export-pe2-rr2-lo0 term 1 then accept

set policy-options policy-statement export-pe2-rr2-lo0 term last then reject

set policy-options policy-statement nhs then next-hop self

root@VMX6> show configuration | display set

set version 14.1R4.8

set system host-name VMX6

set system root-authentication encrypted-password "$1$ghWiBpr3$UrqEIjNBbvYy7LY6MFqr3/"

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.67.6/24

set interfaces ge-0/0/1 unit 0 family mpls

set interfaces ge-0/0/2 unit 0 family inet address 192.168.56.6/24

set interfaces ge-0/0/2 unit 0 family mpls

set interfaces ge-0/0/3 unit 0 family inet address 172.16.26.6/24

set interfaces ge-0/0/3 unit 0 family mpls

set interfaces lo0 unit 0 family inet address 10.0.255.6/32

set routing-options router-id 10.0.255.6

set protocols mpls interface ge-0/0/1.0

set protocols mpls interface ge-0/0/2.0

set protocols mpls interface ge-0/0/3.0

set protocols ospf area 0.0.0.0 interface lo0.0 passive

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 ge-0/0/3.0

set protocols ldp interface ge-0/0/1.0

set protocols ldp interface ge-0/0/2.0

set protocols ldp interface ge-0/0/3.0

root@VMX7> show configuration | display set

set version 14.1R4.8

set system host-name VMX7

set system root-authentication encrypted-password "$1$uopjp8De$uNz8phlpDEczPicfEga7j1"

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.78.7/24

set interfaces ge-0/0/0 unit 0 family mpls

set interfaces ge-0/0/1 unit 0 family inet address 192.168.67.7/24

set interfaces ge-0/0/1 unit 0 family mpls

set interfaces ge-0/0/2 unit 0 family inet address 172.16.27.7/24

set interfaces ge-0/0/2 unit 0 family mpls

set interfaces lo0 unit 0 family inet address 10.0.255.7/32

set routing-options router-id 10.0.255.7

set protocols mpls interface ge-0/0/0.0

set protocols mpls interface ge-0/0/1.0

set protocols mpls interface ge-0/0/2.0

set protocols ospf area 0.0.0.0 interface lo0.0 passive

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 ge-0/0/0.0

set protocols ldp interface ge-0/0/0.0

set protocols ldp interface ge-0/0/1.0

set protocols ldp interface ge-0/0/2.0

root@VMX8-PE2> show configuration | display set

set version 14.1R4.8

set system host-name VMX8-PE2

set system root-authentication encrypted-password "$1$Rk4ApGRF$3sCZlOGvHJ79GyJN/1SzJ0"

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.78.8/24

set interfaces ge-0/0/0 unit 0 family mpls

set interfaces ge-0/0/3 unit 0 family inet address 192.168.200.254/24

set interfaces lo0 unit 0 family inet address 10.0.255.8/32

set routing-options router-id 10.0.255.8

set routing-options autonomous-system 64513

set protocols mpls interface ge-0/0/0.0

set protocols bgp group TO-RR2 type internal

set protocols bgp group TO-RR2 local-address 10.0.255.8

set protocols bgp group TO-RR2 family inet labeled-unicast rib inet.3

set protocols bgp group TO-RR2 family inet-vpn unicast

set protocols bgp group TO-RR2 neighbor 22.22.22.22

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 ldp interface ge-0/0/0.0

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 instance-type vrf

set routing-instances CE-2 interface ge-0/0/3.0

set routing-instances CE-2 route-distinguisher 64513:1

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-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 192.168.200.1 peer-as 65002

root@VMX11-CE1> show configuration | display set

set version 14.1R4.8

set system host-name VMX11-CE1

set system root-authentication encrypted-password "$1$xImI/dJx$hCUa5BI5bIruv15W.uLol."

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 192.168.100.1/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 TO-PE1 type external

set protocols bgp group TO-PE1 export export-lo0

set protocols bgp group TO-PE1 neighbor 192.168.100.254 peer-as 64512

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@VMX12-CE2> show configuration | display set

set version 14.1R4.8

set system host-name VMX12-CE2

set system root-authentication encrypted-password "$1$/ZQdD.Cy$r5m8cQuvmiUZrnCavtGon."

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 192.168.200.1/24

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 TO-PE2 type external

set protocols bgp group TO-PE2 export export-lo0

set protocols bgp group TO-PE2 neighbor 192.168.200.254 peer-as 64513

set protocols ospf area 0.0.0.0 interface lo0.0 passive

set protocols ospf area 0.0.0.0 interface ge-0/0/3.0

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@VMX11-CE1> ping source 10.1.255.1 10.1.255.2 rapid count 4

PING 10.1.255.2 (10.1.255.2): 56 data bytes

!!!!

--- 10.1.255.2 ping statistics ---

4 packets transmitted, 4 packets received, 0% packet loss

round-trip min/avg/max/stddev = 13.530/14.883/17.789/1.721 ms

root@VMX1-PE1> show route table CE-1.inet.0 10.1.255.2 extensive

(注意Label operation: Push 16, Push 299872, Push 299808(top),分别为VPN标签,BGP-LU标签,LDP标签)

CE-1.inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)

10.1.255.2/32 (1 entry, 1 announced)

TSI:

Page 0 idx 1, (group TO-CE type External) Type 1 val 0x95c2a54 (adv_entry)

  Advertised metrics:

    Nexthop: Self

    AS path: [64512] 64513 65002 I

    Communities: target:1000:2000

Path 10.1.255.2 from 11.11.11.11 Vector len 4.  Val: 1

KRT in-kernel 10.1.255.2/32 -> {indirect(1048574)}

        *BGP    Preference: 170/-101

                Route Distinguisher: 1000:2000

                Next hop type: Indirect

                Address: 0x969535c

                Next-hop reference count: 6

                Source: 11.11.11.11

                Next hop type: Router, Next hop index: 557

                Next hop: 192.168.12.2 via ge-0/0/0.0, selected

                Label operation: Push 16, Push 299872, Push 299808(top)

                Label TTL action: prop-ttl, prop-ttl, prop-ttl(top)

                Load balance label: Label 16: None; Label 299872: None; Label 299808: None;

                Session Id: 0x140

                Protocol next hop: 10.0.255.8

                Label operation: Push 16

                Label TTL action: prop-ttl

                Load balance label: Label 16: None;

                Indirect next hop: 0x964c440 1048574 INH Session ID: 0x142

                State:

                Local AS: 64512 Peer AS: 64512

                Age: 16:40      Metric2: 1

                Validation State: unverified

                Task: BGP_64512.11.11.11.11+179

                Announcement bits (2): 0-BGP_RT_Background 1-KRT

                AS path: 64513 65002 I

                Communities: target:1000:2000

                Import Accepted

                VPN Label: 16

                Localpref: 100

                Router ID: 11.11.11.11

                Primary Routing Table bgp.l3vpn.0

                Indirect next hops: 1

                        Protocol next hop: 10.0.255.8 Metric: 1

                        Label operation: Push 16

                        Label TTL action: prop-ttl

                        Load balance label: Label 16: None;

                        Indirect next hop: 0x964c440 1048574 INH Session ID: 0x142

                        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

                        10.0.255.8/32 Originating RIB: inet.3

                          Metric: 1                      Node path count: 1

                          Indirect nexthops: 1

                                Protocol Nexthop: 10.0.255.4 Metric: 1 Push 299872

                                Indirect nexthop: 0x964c220 - INH Session ID: 0x0                              Indirect path forwarding nexthops: 1

                                        Nexthop: 192.168.12.2 via ge-0/0/0.0

root@VMX1-PE1>show route receive-protocol bgp 11.11.11.11 10.1.255.2 extensive

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.8

    Localpref: 100

    AS path: 64513 65002 I

    Communities: target:1000:2000

root@VMX1-PE1> show route receive-protocol bgp 11.11.11.11 10.0.255.8 extensive

inet.3: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)

* 10.0.255.8/32 (1 entry, 1 announced)

    Accepted

    Route Label: 299872

    Nexthop: 10.0.255.4

    MED: 1

    Localpref: 100

    AS path: 64513 I (Originator)

    Cluster list:  11.11.11.11

    Originator ID: 10.0.255.4

root@VMX1-PE1> show ldp database

Input label database, 10.0.255.1:0--10.0.255.2:0

  Label    Prefix

299776      10.0.255.1/32

      3      10.0.255.2/32

299792      10.0.255.3/32

299808      10.0.255.4/32

299824      11.11.11.11/32

Output label database, 10.0.255.1:0--10.0.255.2:0

  Label    Prefix

      3      10.0.255.1/32

299776      10.0.255.2/32

299792      10.0.255.3/32

299808      10.0.255.4/32

299824      11.11.11.11/32

你可能感兴趣的:(MPLS L3VPN inter-AS option C with RR)