[j-nsp] cogent bgp example?

seph seph at directionless.org
Thu Sep 25 10:37:46 EDT 2008


On Wed, 8/20/08, seph <seph at directionless.org> wrote:

> Can someone send a basic cogent bgp setup?

Everyone's pointers were incredibly helpful in building out my configs,
but there were a couple of missing pieces. I thought I'd followup and
dump them.

First, cogent's particular setup requires that my peerA session announce
a route for my peerB local address. Not hard to implement, but a silly
gotcha.

Second, there's some issue around juniper and cogent mss negotiation, so
for the peerB session, I needed to manually set the tcp-mss.

Here are the various snippets of my configs, hopefully they'll help some
future person. (Any errors are probably from my eliding step)

interfaces {
    ge-0/0/3 {
        unit 0 {
            description cogent;
            family inet {
                address <cogent peerA assignment>;
            }
        }
    }
    lo0 {
        unit 0 {
            family inet {
                filter {
                    input incoming-to-router;
                }
                address <my localhost address>;
                address <cogent peerB assignment>;
            }
        }
    }
}
routing-options {
    static {
        route <cogent peerB> next-hop <cogent peerA>;
    }
}
protocols {
    bgp {
        /* This is Cogent peer A. Where we send routes too */
        group cogent-peer-a {
            type external;
            export [ <myas> announce-cogent-peer-b reject ];
            peer-as 174;
            neighbor <cogent peerA> {
                description "Cogent Transit [CE->PE]
    support at cogentco.com";
                authentication-key "XXX"; ## SECRET-DATA
            }
        }
        group cogent-peer-b {
            type external;
            multihop {
                ttl 6;
            }
            local-address <cogent peerB assignment>;
            import [ BOGONS-policy damping ];
            authentication-key "XXX"; ## SECRET-DATA
            export reject;
            peer-as 174;
            tcp-mss 1440;
            neighbor <cogent peerB> {
                description "Cogent Transit [CE<-PE]
            support at cogentco.com";
            }
        }
    }
}
policy-options {
    policy-statement announce-cogent-peer-b {
        term 1 {
            from {
                route-filter <cogent peerB assignment> exact;
            }
            then accept;
        }
    }
    policy-statement <myas> {
        term 1 {
            from {
                route-filter <my network> exact;
            }
            then accept;
        }
    }
}


More information about the juniper-nsp mailing list