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.

Then configure an EBGP session to the border router in the other AS:<br />

[edit protocols bgp]<br />

aviva@RouterF# set group session-to-AS65505 type external<br />

aviva@RouterF# set group session-to-AS65505 peer-as 65505<br />

aviva@RouterF# set group session-to-AS65505 neighbor 10.0.31.1<br />

[edit protocols]<br />

aviva@RouterF# show<br />

bgp {<br />

group session-to-AS65505 {<br />

type external;<br />

peer-as 65505;<br />

neighbor 10.0.31.1;<br />

}<br />

}<br />

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

The basic configuration of EBGP is very straightforward, and the configuration of the<br />

two EBGP peers is pretty much identical. This recipe shows how to configure a session<br />

between the two border routers shown in Figure 13-1.<br />

AS 65500 AS 65505<br />

RouterF<br />

192.168.16.1<br />

RouterD<br />

192.168.14.1<br />

10.0.31.2/24<br />

10.0.31.1/24<br />

Figure 13-1. EBGP network<br />

You define the router’s AS number and its router ID. You don’t configure these in<br />

the [edit protocols bgp] hierarchy but rather in the [edit routing-options] hierarchy<br />

because these two properties are not specific to BGP and can be used by other<br />

routing protocols. BGP includes the 32-bit router ID in Open messages when establishing<br />

a BGP connection. If you don’t manually set the router ID, the JUNOS software<br />

uses the IP address on the lo0 interface. However, it is good practice to<br />

configure the router ID so the address included in Open messages is always clear.<br />

For an EBGP peering connection, the AS numbers must be different on the two<br />

routers. In this recipe, RouterF is in AS 65500 and RouterD is in AS 65505.<br />

In the JUNOS BGP configuration, you place BGP neighbors into peer groups so you<br />

can apply the same policies and other characteristics to an entire group of neighbors.<br />

Each peer group is identified by a name. In this recipe, the group name is sessionto-AS65505.<br />

While multiple peers can be members of the same group, it is good practice<br />

to configure a separate group for each external peer, especially if the external<br />

peer is untrusted.<br />

Configuring a BGP Session Between Routers in Two ASs | 423<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!