3

I would like to understand where advertised route are set in JunOS. For example, in OpenBGPd it's easy, you simply set "network 1.2.3.0/24". What is the equivalent in JunOS ? I didn't find anything very clear.

thank you in advance for answering

1

JunOS does not use a network command like you would use with a cisco router.

You will need to make use of policies and create one.

For BGP you could use

policy-statement my-bgp-network {
term 1 {
    from {
        route-filter 100.100.100.0/24 exact;
    }
    then accept;
}
}

To configure BGP then you could use something like

protocols {
bgp {
group Love-Peer-A {
type external;
neighbor 1.1.1.1 {
export my-bgp-network;
peer-as 111;
} 

Hope to helps you on your quest.

SleepyMan

  • That would still require that /24 to be in your routing table. So typically, you set a static route to either the destination you want, or a discard route if you're only announcing the aggregated prefix but have more specific routes in your routing table. – Teun Vink Jun 20 '16 at 15:37
  • Yes, this is true but if you are wanting to advertise static routes, you would need to make sure you allow static routes to be injected in whatever routing protocol you are using I guess. I just wanted to show him a simple sample on how it is done in JunOS as it is far different using policies, compared to a cisco router. – SleepyMan Jun 21 '16 at 7:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.