Archive for September, 2008

BGP load test with JunOS 8.5 @ Juniper M7i

Tuesday, September 9th, 2008

Just got a BGP routes injector, and tried it on the Juniper M7i in my testbed. The results is quite good, I think. With 512 MB memory, the routing engine can handle up to 534k BGP prefixes. When the memory reach 96%, junos seems drops all the new BGP routes but still keep the bgp session up to avoid crash. No impact in the forwarding plane, not sure what is going to happen if I have a lot of traffic, maybe next time I’ll use this BGP routes injector and traffic generator at the same time.

[edit]
rendo@m7i# run show chassis routing-engine
Routing Engine status:
    Temperature                 23 degrees C / 73 degrees F
    CPU temperature             22 degrees C / 71 degrees F
    DRAM                       512 MB
    Memory utilization          97 percent
    CPU utilization:
      User                       0 percent
      Background                 0 percent
      Kernel                     3 percent
      Interrupt                  1 percent
      Idle                      96 percent
    Model                          RE-5.0
    Serial ID                      xxxxxxxxxxx
    Start time                     2008-09-06 06:46:53 WIT
    Uptime                         3 days, 6 hours, 36 minutes, 37 seconds
    Load averages:                 1 minute   5 minute  15 minute
                                       0.02       0.04       0.01

[edit]
rendo@m7i# run show bgp summary
Groups: 1 Peers: 1 Down peers: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0            536706     534421          0          0          0          0
Peer               AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Damped...
192.168.196.107   200       1977        324       0       0     2:24:47 534421/536706/0      0/0/0

[edit]
rendo@m7i#

Inter-AS VPN option C #2

Monday, September 8th, 2008

Purpose: Sample working config of Inter AS VPN option C : Multihop MP-eBGP between PE routers
(using traffic-engineering bgp-igp)
Type: Simulated using logical-router
Tools: Olive on Qemu

inter_as_option_c.jpg

logical-routers {
    as1-asbr {
        interfaces {
            fxp1 {
                unit 611 {
                    vlan-id 611;
                    family inet {
                        address 10.9.1.1/30;
                    }
                    family mpls;
                }
            }
            fxp2 {
                unit 619 {
                    vlan-id 619;
                    family inet {
                        address 10.1.3.2/30;
                    }
                    family mpls;
                }
            }
            lo0 {
                unit 11 {
                    family inet {
                        address 10.1.0.1/32;
                    }
                }
            }
        }
        protocols {
            mpls {
                traffic-engineering bgp-igp;
                interface all;
            }
            bgp {
                group iBGP {
                    type internal;
                    local-address 10.1.0.1;
                    family inet {
                        labeled-unicast {
                            resolve-vpn;
                        }
                    }
                    neighbor 10.1.0.2;
                }
                group eBGP {
                    type external;
                    family inet {
                        labeled-unicast;
                    }
                    export export-lo0;
                    neighbor 10.9.1.2 {
                        peer-as 2;
                    }
                }
            }
            ospf {
                area 0.0.0.0 {
                    interface fxp2.619;
                    interface lo0.11;
                }
            }
            ldp {
                interface all;
            }
        }
        policy-options {
            policy-statement export-bgp {
                term a {
                    from protocol bgp;
                    then accept;
                }
            }
            policy-statement export-direct {
                term a {
                    from protocol direct;
                    then accept;
                }
            }
            policy-statement export-lo0 {
                from {
                    route-filter 10.1.0.0/24 orlonger;
                    route-filter 10.2.0.0/24 orlonger;
                }
                then accept;
            }
            policy-statement export-ospf {
                term a {
                    from protocol ospf;
                    then accept;
                }
            }
            policy-statement set-pref {
                then {
                    preference 10;
                }
            }
        }
        routing-options {
            autonomous-system 1;
        }
    }
    as1-pe1 {
        interfaces {
            fxp1 {
                unit 616 {
                    vlan-id 616;
                    family inet {
                        address 10.10.1.1/30;
                    }
                }
                unit 617 {
                    vlan-id 617;
                    family inet {
                        address 10.11.1.1/30;
                    }
                }
                unit 619 {
                    vlan-id 619;
                    family inet {
                        address 10.1.3.1/30;
                    }
                    family mpls;
                }
            }
            lo0 {
                unit 12 {
                    family inet {
                        address 10.1.0.2/32;
                    }
                }
                unit 101 {
                    family inet {
                        address 10.10.0.1/32;
                    }
                }
                unit 111 {
                    family inet {
                        address 10.11.0.1/32;
                    }
                }
            }
        }
        protocols {
            mpls {
                interface all;
            }
            bgp {
                group eMPBGP {
                    type external;
                    multihop;
                    local-address 10.1.0.2;
                    family inet-vpn {
                        any;
                    }
                    neighbor 10.2.0.2 {
                        peer-as 2;
                    }
                }
                group iBGP {
                    type internal;
                    local-address 10.1.0.2;
                    family inet {
                        labeled-unicast {
                            resolve-vpn;
                        }
                    }
                    neighbor 10.1.0.1;
                }
            }
            ospf {
                area 0.0.0.0 {
                    interface all;
                }
            }
            ldp {
                interface all;
            }
        }
        policy-options {
            policy-statement export-bgp {
                term a {
                    from protocol bgp;
                    then accept;
                }
            }
            policy-statement export-lo0 {
                from {
                    route-filter 10.1.0.2/32 exact;
                }
                then accept;
            }
        }
        routing-instances {
            vpn-blue {
                instance-type vrf;
                interface fxp1.616;
                interface lo0.101;
                route-distinguisher 1:10;
                vrf-target target:1:1;
                vrf-table-label;
                protocols {
                    ospf {
                        export export-bgp;
                        area 0.0.0.1 {
                            interface all;
                        }
                    }
                }
            }
            vpn-red {
                instance-type vrf;
                interface fxp1.617;
                interface lo0.111;
                route-distinguisher 1:20;
                vrf-target target:1:2;
                vrf-table-label;
            }
        }
        routing-options {
            autonomous-system 1;
        }
    }
    as2-asbr {
        interfaces {
            fxp1 {
                unit 612 {
                    vlan-id 612;
                    family inet {
                        address 10.2.1.1/30;
                    }
                    family mpls;
                }
            }
            fxp2 {
                unit 611 {
                    vlan-id 611;
                    family inet {
                        address 10.9.1.2/30;
                    }
                    family mpls;
                }
            }
            lo0 {
                unit 21 {
                    family inet {
                        address 10.2.0.1/32;
                    }
                }
            }
        }
        protocols {
            mpls {
                traffic-engineering bgp-igp;
                interface all;
            }
            bgp {
                group iBGP {
                    type internal;
                    local-address 10.2.0.1;
                    family inet {
                        labeled-unicast {
                            resolve-vpn;
                        }
                    }
                    neighbor 10.2.0.2;
                }
                group eBGP {
                    type external;
                    family inet {
                        labeled-unicast;
                    }
                    export export-lo0;
                    neighbor 10.9.1.1 {
                        peer-as 1;
                    }
                }
            }
            ospf {
                area 0.0.0.0 {
                    interface fxp1.612;
                    interface lo0.21;
                }
            }
            ldp {
                interface all;
            }
        }
        policy-options {
            policy-statement export-bgp {
                term a {
                    from protocol bgp;
                    then accept;
                }
            }
            policy-statement export-direct {
                term a {
                    from protocol direct;
                    then accept;
                }
            }
            policy-statement export-lo0 {
                from {
                    route-filter 10.1.0.0/24 orlonger;
                    route-filter 10.2.0.0/24 orlonger;
                }
                then accept;
            }
            policy-statement export-ospf {
                term a {
                    from protocol ospf;
                    then accept;
                }
            }
            policy-statement set-pref {
                then {
                    preference 10;
                }
            }
        }
        routing-options {
            autonomous-system 2;
        }
    }
    as2-p1 {
        interfaces {
            fxp1 {
                unit 621 {
                    vlan-id 621;
                    family inet {
                        address 10.2.2.1/30;
                    }
                    family mpls;
                }
            }
            fxp2 {
                unit 612 {
                    vlan-id 612;
                    family inet {
                        address 10.2.1.2/30;
                    }
                    family mpls;
                }
            }
            lo0 {
                unit 23 {
                    family inet {
                        address 10.2.0.3/32;
                    }
                }
            }
        }
        protocols {
            mpls {
                interface all;
            }
            ospf {
                area 0.0.0.0 {
                    interface all;
                }
            }
            ldp {
                interface all;
            }
        }
        routing-options {
            autonomous-system 2;
        }
    }
    as2-pe1 {
        interfaces {
            fxp1 {
                unit 613 {
                    vlan-id 613;
                    family inet {
                        address 10.11.2.1/30;
                    }
                }
                unit 618 {
                    vlan-id 618;
                    family inet {
                        address 10.10.2.1/30;
                    }
                }
            }
            fxp2 {
                unit 621 {
                    vlan-id 621;
                    family inet {
                        address 10.2.2.2/30;
                    }
                    family mpls;
                }
            }
            lo0 {
                unit 22 {
                    family inet {
                        address 10.2.0.2/32;
                    }
                }
                unit 102 {
                    family inet {
                        address 10.10.0.2/32;
                    }
                }
                unit 112 {
                    family inet {
                        address 10.11.0.2/32;
                    }
                }
            }
        }
        protocols {
            mpls {
                interface all;
            }
            bgp {
                group eMPBGP {
                    type external;
                    multihop;
                    local-address 10.2.0.2;
                    family inet-vpn {
                        any;
                    }
                    neighbor 10.1.0.2 {
                        peer-as 1;
                    }
                }
                group iBGP {
                    type internal;
                    local-address 10.2.0.2;
                    family inet {
                        labeled-unicast {
                            resolve-vpn;
                        }
                    }
                    neighbor 10.2.0.1;
                }
            }
            ospf {
                area 0.0.0.0 {
                    interface all;
                }
            }
            ldp {
                interface all;
            }
        }
        policy-options {
            policy-statement export-lo0 {
                from {
                    route-filter 10.2.0.2/32 exact;
                }
                then accept;
            }
        }
        routing-instances {
            vpn-blue {
                instance-type vrf;
                interface fxp1.618;
                interface lo0.102;
                route-distinguisher 2:1;
                vrf-target target:1:1;
                vrf-table-label;
            }
            vpn-red {
                instance-type vrf;
                interface lo0.112;
                interface fxp1.613;
                route-distinguisher 2:2;
                vrf-target target:1:2;
                vrf-table-label;
            }
        }
        routing-options {
            autonomous-system 2;
        }
    }
}

Inter-AS VPN option C #1

Monday, September 8th, 2008

Purpose: Sample working config of Inter AS VPN option C : Multihop MP-eBGP between PE routers
(using export lo0 address in PE and routing preference manipulation in ASBR)
Type: Simulated using logical-router
Tools: Olive on Qemu

inter_as_option_c.jpg

logical-routers {
    as1-asbr {
        interfaces {
            fxp1 {
                unit 611 {
                    vlan-id 611;
                    family inet {
                        address 10.9.1.1/30;
                    }
                    family mpls;
                }
            }
            fxp2 {
                unit 619 {
                    vlan-id 619;
                    family inet {
                        address 10.1.3.2/30;
                    }
                    family mpls;
                }
            }
            lo0 {
                unit 11 {
                    family inet {
                        address 10.1.0.1/32;
                    }
                }
            }
        }
        protocols {
            mpls {
                interface all;
            }
            bgp {
                group iBGP {
                    type internal;
                    local-address 10.1.0.1;
                    import set-pref;
                    family inet {
                        labeled-unicast {
                            resolve-vpn;
                        }
                    }
                    neighbor 10.1.0.2;
                }
                group eBGP {
                    type external;
                    family inet {
                        labeled-unicast;
                    }
                    export export-lo0;
                    neighbor 10.9.1.2 {
                        peer-as 2;
                    }
                }
            }
            ospf {
                area 0.0.0.0 {
                    interface fxp2.619;
                    interface lo0.11;
                }
            }
            ldp {
                interface all;
            }
        }
        policy-options {
            policy-statement export-bgp {
                term a {
                    from protocol bgp;
                    then accept;
                }
            }
            policy-statement export-direct {
                term a {
                    from protocol direct;
                    then accept;
                }
            }
            policy-statement export-lo0 {
                from {
                    route-filter 10.1.0.0/24 orlonger;
                    route-filter 10.2.0.0/24 orlonger;
                }
                then accept;
            }
            policy-statement export-ospf {
                term a {
                    from protocol ospf;
                    then accept;
                }
            }
            policy-statement set-pref {
                then {
                    preference 10;
                }
            }
        }
        routing-options {
            autonomous-system 1;
        }
    }
    as1-pe1 {
        interfaces {
            fxp1 {
                unit 616 {
                    vlan-id 616;
                    family inet {
                        address 10.10.1.1/30;
                    }
                }
                unit 617 {
                    vlan-id 617;
                    family inet {
                        address 10.11.1.1/30;
                    }
                }
                unit 619 {
                    vlan-id 619;
                    family inet {
                        address 10.1.3.1/30;
                    }
                    family mpls;
                }
            }
            lo0 {
                unit 12 {
                    family inet {
                        address 10.1.0.2/32;
                    }
                }
                unit 101 {
                    family inet {
                        address 10.10.0.1/32;
                    }
                }
                unit 111 {
                    family inet {
                        address 10.11.0.1/32;
                    }
                }
            }
        }
        protocols {
            mpls {
                interface all;
            }
            bgp {
                group eMPBGP {
                    type external;
                    multihop;
                    local-address 10.1.0.2;
                    family inet-vpn {
                        any;
                    }
                    neighbor 10.2.0.2 {
                        peer-as 2;
                    }
                }
                group iBGP {
                    type internal;
                    local-address 10.1.0.2;
                    family inet {
                        labeled-unicast {
                            resolve-vpn;
                        }
                    }
                    export export-lo0;
                    neighbor 10.1.0.1;
                }
            }
            ospf {
                area 0.0.0.0 {
                    interface all;
                }
            }
            ldp {
                interface all;
            }
        }
        policy-options {
            policy-statement export-bgp {
                term a {
                    from protocol bgp;
                    then accept;
                }
            }
            policy-statement export-lo0 {
                from {
                    route-filter 10.1.0.2/32 exact;
                }
                then accept;
            }
        }
        routing-instances {
            vpn-blue {
                instance-type vrf;
                interface fxp1.616;
                interface lo0.101;
                route-distinguisher 1:10;
                vrf-target target:1:1;
                vrf-table-label;
                protocols {
                    ospf {
                        export export-bgp;
                        area 0.0.0.1 {
                            interface all;
                        }
                    }
                }
            }
            vpn-red {
                instance-type vrf;
                interface fxp1.617;
                interface lo0.111;
                route-distinguisher 1:20;
                vrf-target target:1:2;
                vrf-table-label;
            }
        }
        routing-options {
            autonomous-system 1;
        }
    }
    as2-asbr {
        interfaces {
            fxp1 {
                unit 612 {
                    vlan-id 612;
                    family inet {
                        address 10.2.1.1/30;
                    }
                    family mpls;
                }
            }
            fxp2 {
                unit 611 {
                    vlan-id 611;
                    family inet {
                        address 10.9.1.2/30;
                    }
                    family mpls;
                }
            }
            lo0 {
                unit 21 {
                    family inet {
                        address 10.2.0.1/32;
                    }
                }
            }
        }
        protocols {
            mpls {
                interface all;
            }
            bgp {
                group iBGP {
                    type internal;
                    local-address 10.2.0.1;
                    import set-pref;
                    family inet {
                        labeled-unicast {
                            resolve-vpn;
                        }
                    }
                    neighbor 10.2.0.2;
                }
                group eBGP {
                    type external;
                    family inet {
                        labeled-unicast;
                    }
                    neighbor 10.9.1.1 {
                        peer-as 1;
                    }
                }
            }
            ospf {
                area 0.0.0.0 {
                    interface fxp1.612;
                    interface lo0.21;
                }
            }
            ldp {
                interface all;
            }
        }
        policy-options {
            policy-statement export-bgp {
                term a {
                    from protocol bgp;
                    then accept;
                }
            }
            policy-statement export-direct {
                term a {
                    from protocol direct;
                    then accept;
                }
            }
            policy-statement export-ospf {
                term a {
                    from protocol ospf;
                    then accept;
                }
            }
            policy-statement set-pref {
                then {
                    preference 10;
                }
            }
        }
        routing-options {
            autonomous-system 2;
        }
    }
    as2-p1 {
        interfaces {
            fxp1 {
                unit 621 {
                    vlan-id 621;
                    family inet {
                        address 10.2.2.1/30;
                    }
                    family mpls;
                }
            }
            fxp2 {
                unit 612 {
                    vlan-id 612;
                    family inet {
                        address 10.2.1.2/30;
                    }
                    family mpls;
                }
            }
            lo0 {
                unit 23 {
                    family inet {
                        address 10.2.0.3/32;
                    }
                }
            }
        }
        protocols {
            mpls {
                interface all;
            }
            ospf {
                area 0.0.0.0 {
                    interface all;
                }
            }
            ldp {
                interface all;
            }
        }
        routing-options {
            autonomous-system 2;
        }
    }
    as2-pe1 {
        interfaces {
            fxp1 {
                unit 613 {
                    vlan-id 613;
                    family inet {
                        address 10.11.2.1/30;
                    }
                }
                unit 618 {
                    vlan-id 618;
                    family inet {
                        address 10.10.2.1/30;
                    }
                }
            }
            fxp2 {
                unit 621 {
                    vlan-id 621;
                    family inet {
                        address 10.2.2.2/30;
                    }
                    family mpls;
                }
            }
            lo0 {
                unit 22 {
                    family inet {
                        address 10.2.0.2/32;
                    }
                }
                unit 102 {
                    family inet {
                        address 10.10.0.2/32;
                    }
                }
                unit 112 {
                    family inet {
                        address 10.11.0.2/32;
                    }
                }
            }
        }
        protocols {
            mpls {
                interface all;
            }
            bgp {
                group eMPBGP {
                    type external;
                    multihop;
                    local-address 10.2.0.2;
                    family inet-vpn {
                        any;
                    }
                    neighbor 10.1.0.2 {
                        peer-as 1;
                    }
                }
                group iBGP {
                    type internal;
                    local-address 10.2.0.2;
                    family inet {
                        labeled-unicast {
                            resolve-vpn;
                        }
                    }
                    export export-lo0;
                    neighbor 10.2.0.1;
                }
            }
            ospf {
                area 0.0.0.0 {
                    interface all;
                }
            }
            ldp {
                interface all;
            }
        }
        policy-options {
            policy-statement export-lo0 {
                from {
                    route-filter 10.2.0.2/32 exact;
                }
                then accept;
            }
        }
        routing-instances {
            vpn-blue {
                instance-type vrf;
                interface fxp1.618;
                interface lo0.102;
                route-distinguisher 2:1;
                vrf-target target:1:1;
                vrf-table-label;
            }
            vpn-red {
                instance-type vrf;
                interface lo0.112;
                interface fxp1.613;
                route-distinguisher 2:2;
                vrf-target target:1:2;
                vrf-table-label;
            }
        }
        routing-options {
            autonomous-system 2;
        }
    }
}