[j-nsp] bgp route advertisements

michael.firth at bt.com michael.firth at bt.com
Wed Nov 5 15:06:14 EST 2008


> -----Original Message-----
> From: juniper-nsp-bounces at puck.nether.net 
> [mailto:juniper-nsp-bounces at puck.nether.net] On Behalf Of Mike Johnson
> Sent: 05 November 2008 18:45
> To: juniper-nsp at puck.nether.net
> Subject: [j-nsp] bgp route advertisements
> 
> I need some assistance advertising routes via JUNOS, I am 
> familiar with
> Cisco CLI.
> I must say JUNOS does not make sense to me, yet.
> 
> Could someone explain the basics of JUNOS CLI and how it rerlates to
> routing.
> It appears you configure BGP under protocols and then to advertise you
> define a policy.
> I am not sure why things are seperated??
> 

As well as the other suggestions, it would probably be useful to you to have a look at Chapter 4 (Routing Policy) of the JNCIA study guide available online at:

http://www.juniper.net/training/certification/JNCIA_studyguide.pdf

It covers what the JunOS routing policy is all about, and goes a long way to explaining why things are architected the way they are.

The basic summary is that the reason that they are separated is to make the configuration consistent across all routing protocols.

No matter which routing protocols you are using, and which routes you want to move between them, the configuration becomes very similar - you configure a policy to select the routes, and then apply the policy under the protocol(s) of your choice.

Like a lot of JunOS features, it appears complex to begin with, but actually is very well structured once you get used to it.

> Here is what I have, BGP is up but I am unable to advertise a 
> local network?
> Is there any good docs for understanding the setup an/or 
> conversion from
> Cisco?

Basically, what you need is something similar to the following:

protocols {
    bgp {
        log-updown;
        peer-as 100;
        local-as 101;
        group Cisco {
            export advertise-directs; <-- Add this line
            type external;
            neighbor 10.77.1.2;
        }
    }
}
policy-options {
    policy-statement advertise-directs {
        term directs {
            from {
                protocol direct; <-- Match directly connected routes
		    route-filter 10.77.1.1/24 orlonger; <-- Your subnet on ge-0/0/0
                route-filter 10.101.101.1/32 exact; <-- Your lo0 route
                interface [ ge-0/0/0.0 lo0.0 ]; <-- You can alternatively give a list of interfaces
            }
            then accept; <-- Accept the matched routes
        }
        term others {
            then reject; <-- Reject any other routes in the forwarding table
        }
    }
}

The bits beginning '<--' are my comments, and are not part of the config. You can specify either route filters, or interfaces (or other options about the routes you are interested in).

Hope this helps

Michael


More information about the juniper-nsp mailing list