28.06.2014 Views

Discussion

Discussion

Discussion

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

13.4 Adjusting the Next-Hop Attribute<br />

Problem<br />

Your IBGP routers need to be able to resolve the BGP next hop of routes that are in<br />

external ASs.<br />

Solution<br />

To have IBGP routers reach addresses in external ASs, you change the BGP next-hop<br />

attribute on routes when it is distributed from EBGP into IBGP so that the routes<br />

always point to a next-hop address inside the local AS. You do this with a routing<br />

policy that defines the next hop as self (that is, this router):<br />

[edit policy-options]<br />

aviva@RouterF# set policy-statement next-hop-self term 1 from protocol bgp<br />

aviva@RouterF# set policy-statement next-hop-self term 1 then next-hop self<br />

Then apply the policy as an export policy in the IBGP group on the border router:<br />

[edit protocols bgp]<br />

aviva@RouterF# set group internal-within-AS65500 export next-hop-self<br />

<strong>Discussion</strong><br />

When an EBGP route arrives from another AS, it contains the physical address of the<br />

remote interface as the BGP next hop. If the EBGP router advertises this route within<br />

its IBGP network, the IGP routing table may not know about that next hop because<br />

it is a physical interface in another AS and might not have a way to reach it. Setting<br />

up a next-hop self policy allows the EBGP router that is advertising the route to IBGP<br />

to use itself as the next hop for the EBGP routes.<br />

This recipe creates a simple routing policy that takes all BGP routes and defines the<br />

next hop of the route as self, which is the router on which the route resides. As with<br />

all JUNOS routing policies, you need to apply it—here, to the IBGP peer group as an<br />

export policy. It would be a mistake to apply the policy as an import policy in the<br />

EBGP group, because then all EBGP routes would be installed in the routing table<br />

with the local router as the BGP next hop, which would make the routes unusable.<br />

See Also<br />

Recipe 9.1<br />

Adjusting the Next-Hop Attribute | 439<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!