Monday, September 23, 2013

Inter-AS Option B configuration


A collection of Juniper configurations I've created during my testing.

INTER-AS OPTION B configuration

|-- AS65000 ---|      |--AS65001--|
PE1 ==== ASBR1 ---- ASBR2 ==== PE2


------------------------------------------
PE1

jnpr@PE1-router# show protocols bgp 
group ibgp {
    type internal;
    local-address 1.1.1.1;
    family inet {
        unicast;
    }
    family l2vpn {
        signaling;
    }
    export advertise_lo0;
    neighbor 5.5.5.5;
}

[edit]
jnpr@PE1-router# show routing-instances 
l2vpn {
    instance-type l2vpn;
    interface ge-0/2/2.601;
    route-distinguisher 65000:1;
    vrf-target target:65000:2;
    protocols {
        l2vpn {
            encapsulation-type ethernet-vlan;
            site acx1k {
                site-identifier 1;
                interface ge-0/2/2.601 {
                    remote-site-id 2;
                }
            }
        }
    }
}

[edit]
jnpr@PE1-router# show interfaces ge-0/2/2 
flexible-vlan-tagging;
encapsulation flexible-ethernet-services;
unit 601 {
    encapsulation vlan-ccc;
    vlan-id 601;
}


jnpr@PE1-router# show protocols bgp 
group ibgp {
    type internal;
    local-address 1.1.1.1;
    family inet {
        unicast;
    }
    family l2vpn {
        signaling;
    }
    export advertise_lo0;
    neighbor 5.5.5.5;
}

[edit]
jnpr@PE1-router# show routing-instances 
l2vpn {
    instance-type l2vpn;
    interface ge-0/2/2.601;
    route-distinguisher 65000:1;
    vrf-target target:65000:2;
    protocols {
        l2vpn {
            encapsulation-type ethernet-vlan;
            site MYSITE {
                site-identifier 1;
                interface ge-0/2/2.601 {
                    remote-site-id 2;
                }
            }
        }
    }
}

[edit]
jnpr@PE1-router# show interfaces ge-0/2/2 
flexible-vlan-tagging;
encapsulation flexible-ethernet-services;
unit 601 {
    encapsulation vlan-ccc;
    vlan-id 601;
}
jnpr@PE1-router# show protocols mpls
label-switched-path PE1-to-ASBR1 {
    from 1.1.1.1;
    to 5.5.5.5;
}
interface all;
interface fxp0.0 {
    disable;
}



jnpr@PE1-router# run show bgp summary 
Groups: 1 Peers: 1 Down peers: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0               
                       0          0          0          0          0          0
bgp.l2vpn.0          
                       1          1          0          0          0          0
Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
5.5.5.5               65000        268        263       0       0     1:55:15 Est
  inet.0: 0/0/0/0
  bgp.l2vpn.0: 1/1/1/0
  l2vpn.l2vpn.0: 1/1/1/0

[edit]
jnpr@PE1-router# run show mpls lsp 
Ingress LSP: 2 sessions
To              From            State Rt P     ActivePath       LSPname
5.5.5.5         1.1.1.1         Up     0 *                      PE1-to-ASBR1
Total 2 displayed, Up 1, Down 1

Egress LSP: 4 sessions
To              From            State   Rt Style Labelin Labelout LSPname 
1.1.1.1         5.5.5.5         Up       0  1 FF       3        - ASBR1-to-PE1
Total 4 displayed, Up 4, Down 0

Transit LSP: 0 sessions
Total 0 displayed, Up 0, Down 0

[edit]
jnpr@PE1-router# run rh
                      ^
syntax error, expecting <command>.
jnpr@PE1-router# run show route 5.5.5.5 

inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

5.5.5.5/32         *[OSPF/10] 02:01:35, metric 2
                    > to 192.168.2.2 via ge-0/2/0.0

inet.3: 6 destinations, 9 routes (5 active, 0 holddown, 3 hidden)
+ = Active Route, - = Last Active, * = Both

5.5.5.5/32         *[RSVP/7/1] 02:01:30, metric 2
                    > to 192.168.1.2 via ge-0/2/1.0, label-switched-path PE1-to-ASBR1

[edit]
jnpr@PE1-router# run show route 8.8.8.8 

jnpr@PE1-router# run show l2vpn connections 
Layer-2 VPN connections:

Legend for connection status (St)   
EI -- encapsulation invalid      NC -- interface encapsulation not CCC/TCC/VPLS
EM -- encapsulation mismatch     WE -- interface and instance encaps not same
VC-Dn -- Virtual circuit down    NP -- interface hardware not present 
CM -- control-word mismatch      -> -- only outbound connection is up
CN -- circuit not provisioned    <- -- only inbound connection is up
OR -- out of range               Up -- operational
OL -- no outgoing label          Dn -- down                      
LD -- local site signaled down   CF -- call admission control failure      
RD -- remote site signaled down  SC -- local and remote site ID collision
LN -- local site not designated  LM -- local site ID not minimum designated
RN -- remote site not designated RM -- remote site ID not minimum designated
XX -- unknown connection status  IL -- no incoming label
MM -- MTU mismatch               MI -- Mesh-Group ID not available
BK -- Backup connection         ST -- Standby connection
PF -- Profile parse failure      PB -- Profile busy
RS -- remote site standby SN -- Static Neighbor
LB -- Local site not best-site   RB -- Remote site not best-site
VM -- VLAN ID mismatch

Legend for interface status 
Up -- operational           
Dn -- down

Instance: l2vpn
  Local site: MYSITE (1)
    connection-site           Type  St     Time last up          # Up trans
    2                         rmt   Up     Sep 23 18:04:57 2013           1
      Remote PE: 5.5.5.5, Negotiated control-word: Yes (Null)
      Incoming label: 800003, Outgoing label: 800016
      Local interface: ge-0/2/2.601, Status: Up, Encapsulation: VLAN

[edit]


----------------------
ASBR1 

jnpr@P1-router# show protocols bgp 
group ibgp {
    type internal;
    family inet {
        unicast;
    }
    family l2vpn {
        signaling;
    }
    export nhs;
    neighbor 1.1.1.1;
}
group ebgp {
    type external;
    family inet {
        labeled-unicast;
    }
    family l2vpn {
        signaling;
    }
    peer-as 65001;
    neighbor 192.168.8.2;
}

[edit]
jnpr@P1-router# run show bgp summary 
Groups: 2 Peers: 2 Down peers: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0               
                       1          0          0          0          0          0
inet.3               
                       0          0          0          0          0          0
bgp.l2vpn.0          
                       2          2          0          0          0          0
Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
1.1.1.1               65000        231        236       0       0     1:40:50 Establ
  inet.0: 0/1/1/0
  bgp.l2vpn.0: 1/1/1/0
192.168.8.2           65001        269        274       0       2     1:35:18 Establ
  inet.0: 0/0/0/0
  bgp.l2vpn.0: 1/1/1/0

[edit]
jnpr@P1-router# run show route 1.1.1.1 

inet.0: 21 destinations, 22 routes (21 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

1.1.1.1/32         *[OSPF/10] 01:47:01, metric 2
                    > to 192.168.5.1 via xe-1/0/0.0
                    [BGP/170] 01:38:30, localpref 100, from 1.1.1.1
                      AS path: I, validation-state: unverified
                    > to 192.168.5.1 via xe-1/0/0.0, label-switched-path ASBR1-to-PE1

inet.3: 14 destinations, 18 routes (14 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

1.1.1.1/32         *[RSVP/7/1] 01:46:50, metric 2
                    > to 192.168.5.1 via xe-1/0/0.0, label-switched-path ASBR1-to-PE1


[edit]
jnpr@P1-router# run show route 8.8.8.8   

[edit]
jnpr@P1-router# run show route receive-protocol bgp 192.168.8.2 

inet.0: 21 destinations, 22 routes (21 active, 0 holddown, 0 hidden)

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

mpls.0: 21 destinations, 21 routes (21 active, 0 holddown, 0 hidden)

bgp.l2vpn.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
  Prefix   Nexthop       MED     Lclpref    AS path
  65000:3:2:1/96                    
*                         192.168.8.2                             65001 I

-------------
ASBR2
jnpr@P2-router# show protocols bgp 
group ebgp {
    type external;
    family inet {
        labeled-unicast;
    }
    family l2vpn {
        signaling;
    }
    peer-as 65000;
    neighbor 192.168.8.1;
    inactive: neighbor 192.168.9.1;
}
group ibgp {
    type internal;
    local-address 7.7.7.7;
    family inet {
        unicast;
    }
    family l2vpn {
        signaling;
    }
    export nhs;
    neighbor 8.8.8.8;
}

[edit]
jnpr@P2-router# run show bgp summary 
Groups: 2 Peers: 2 Down peers: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0               
                       1          0          0          0          0          0
bgp.l2vpn.0          
                       2          2          0          0          0          0
Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
8.8.8.8               65001        201        203       0       3     1:27:30 Establ
  inet.0: 0/1/1/0
  bgp.l2vpn.0: 1/1/1/0
192.168.8.1           65000        221        223       0       1     1:37:20 Establ
  inet.0: 0/0/0/0
  bgp.l2vpn.0: 1/1/1/0

[edit]
jnpr@P2-router# run show route 1.1.1.1 

[edit]
jnpr@P2-router# run show route 8.8.8.8 

inet.0: 14 destinations, 15 routes (14 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

8.8.8.8/32         *[OSPF/10] 02:57:35, metric 1
                    > to 192.168.10.2 via xe-1/0/0.0
                    [BGP/170] 01:27:37, localpref 100, from 8.8.8.8
                      AS path: I, validation-state: unverified
                    > to 192.168.10.2 via xe-1/0/0.0, label-switched-path ASBR2-to-PE2

inet.3: 1 destinations, 3 routes (1 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both

8.8.8.8/32         *[RSVP/7/1] 04:45:44, metric 1
                    > to 192.168.10.2 via xe-1/0/0.0, label-switched-path ASBR2-to-PE2

jnpr@ASBR2-router#run show route table bgp.l2vpn.0 

bgp.l2vpn.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

65000:1:1:1/96                
                   *[BGP/170] 02:21:28, localpref 100
                      AS path: 65000 I, validation-state: unverified
                    > to 192.168.8.1 via xe-1/1/0.0
65000:3:2:1/96                
                   *[BGP/170] 02:11:54, localpref 100, from 8.8.8.8
                      AS path: I, validation-state: unverified
                    > to 192.168.10.2 via xe-1/0/0.0, label-switched-path PE1-to-PE2



----------
PE2
jnpr@PE2-router# show protocols bgp 
group ibgp {
    type internal;
    local-address 8.8.8.8;
    family inet {
        unicast;
    }
    family l2vpn {
        signaling;
    }
    export advertise_lo0;
    neighbor 7.7.7.7;
}

[edit]
jnpr@PE2-router# show routing-instances     
l2vpn {
    instance-type l2vpn;
    interface xe-0/0/2.601;
    route-distinguisher 65000:3;
    vrf-target target:65000:2;
    protocols {
        l2vpn {
            encapsulation-type ethernet-vlan;
            site MYSITE2 {
                site-identifier 2;
                interface xe-0/0/2.601 {
                    remote-site-id 1;
                }
            }
        }
    }
}

[edit]
jnpr@PE2-router# show interfaces xe-0/0/2 
flexible-vlan-tagging;
encapsulation flexible-ethernet-services;
unit 601 {
    encapsulation vlan-ccc;
    vlan-id 601;
}


[edit]
jnpr@PE2-router# run show bgp summary 
Groups: 1 Peers: 1 Down peers: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0               
                       0          0          0          0          0          0
bgp.l2vpn.0          
                       1          1          0          0          0          0
inet.3               
                       0          0          0          0          0          0
Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
7.7.7.7               65001        207        204       0       0     1:29:36 Establ
  inet.0: 0/0/0/0
  bgp.l2vpn.0: 1/1/1/0
  l2vpn.l2vpn.0: 1/1/1/0

[edit]
jnpr@PE2-router# run show l2vpn connections 
Layer-2 VPN connections:

Legend for connection status (St)   
EI -- encapsulation invalid      NC -- interface encapsulation not CCC/TCC/VPLS
EM -- encapsulation mismatch     WE -- interface and instance encaps not same
VC-Dn -- Virtual circuit down    NP -- interface hardware not present 
CM -- control-word mismatch      -> -- only outbound connection is up
CN -- circuit not provisioned    <- -- only inbound connection is up
OR -- out of range               Up -- operational
OL -- no outgoing label          Dn -- down                      
LD -- local site signaled down   CF -- call admission control failure      
RD -- remote site signaled down  SC -- local and remote site ID collision
LN -- local site not designated  LM -- local site ID not minimum designated
RN -- remote site not designated RM -- remote site ID not minimum designated
XX -- unknown connection status  IL -- no incoming label
MM -- MTU mismatch               MI -- Mesh-Group ID not available
BK -- Backup connection         ST -- Standby connection
PF -- Profile parse failure      PB -- Profile busy
RS -- remote site standby SN -- Static Neighbor
LB -- Local site not best-site   RB -- Remote site not best-site
VM -- VLAN ID mismatch

Legend for interface status 
Up -- operational           
Dn -- down

Instance: l2vpn
  Local site: MYSITE2 (2)
    connection-site           Type  St     Time last up          # Up trans
    1                         rmt   Up     Sep 23 18:04:57 2013           1
      Remote PE: 7.7.7.7, Negotiated control-word: Yes (Null)
      Incoming label: 800004, Outgoing label: 800017
      Local interface: xe-0/0/2.601, Status: Up, Encapsulation: VLAN

[edit]
jnpr@PE2-router# run show mpls lsp 
Ingress LSP: 2 sessions
To              From            State Rt P     ActivePath       LSPname
7.7.7.7         8.8.8.8         Up     0 *                      PE2-to-ASBR2
Total 2 displayed, Up 1, Down 1

Egress LSP: 1 sessions
To              From            State   Rt Style Labelin Labelout LSPname 
8.8.8.8         7.7.7.7         Up       0  1 FF       3        - ASBR2-to-PE2
Total 1 displayed, Up 1, Down