This site requires JavaScript for navigation. Please enable JavaScript for the best learning experience.
 

To configure BGP on a Cisco router, you must use some or all of the following commands:

router bgp [your AS]
 network x.x.x.x [ mask x.x.x.x ]
 neighbor n.n.n.n remote-as NNNN
 neighbor n.n.n.n version 4
 neighbor n.n.n.n distribute-list in|out
 neighbor n.n.n.n filter-list in|out
 neighbor n.n.n.n route-map NAME in|out
 neighbor n.n.n.n ebgp multi-hop <hop-count>

Let's break these commands down one by one.

router bgp [your AS]

This statement is REQUIRED. This command enables BGP on the router. Entering this command in global configuration mode places all configured neighbors in the "Active" state and changes the command prompt to read (config-router)#. If BGP is unable to initiate a TCP connection for a neighbor session you have configured, the state of that session will be 'Idle'.

network x.x.x.x [ mask x.x.x.x ]

This statement is REQUIRED. The network statement informs BGP what prefixes it is permitted to announce network X.X.X.X. The optional mask statement will cause aggregation of all CIDR blocks smaller than the network/mask combination into the larger supernet. All routes in the IP table that fall within this range will be advertised as originating from that router.

neighbor n.n.n.n remote-as NNNN

This statement is REQUIRED to set up a session to a BGP speaking neighbor. This is the first statement in any block of neighbor statements. It iinforms BGP which IP address to peer with, and whether the session will be an iBGP or eBGP session based on the AS number. Neighbors with the same AS number will establish an iBGP session. Neighbors with different AS numbers will establish an eBGP session. The IP address in each of the neighbor statements serves to inform the router which statements apply to a specific neighbor.

neighbor n.n.n.n version 4

This statement is not required, but there are issues with BGP3. Older routers might default to BGP version 3 or may not support BGP version 4 at all. Using this statement guarantees that your router will only establish the session if the neighbor can 'speak' BGP version 4. This statement forces BGP to run as version 4 or not at all. Version 4 supports CIDR and route dampening.

neighbor n.n.n.n distribute-list xxx in|out
neighbor n.n.n.n filter-list xxx in|out

neighbor n.n.n.n prefix-list xxx in|out

If you are not an ISP, these are REQUIRED or your private network will become a transit network and traffic will start flowing between your ISP's through your network. Both prefix-lists and distribute-lists filter routes by ranges of IP addresses. Prefix-lists are simply another way to write distribute-lists. Filter-lists filter by AS-path. Therefore, you cannot use them together on the same neighbor session to filter routes in the same direction. You can combine a filter-list with either in the same direction. You may use any two of these you wish, so long as it is in opposite directions."

neighbor n.n.n.n route-map NAME in|out

A Route Map is a more effective means of implementing a route policy, and allows the administrator to implement not only a more complex filter, but to adjust routing metrics using the MATCH and SET statements.

neighbor n.n.n.n ebgp multi-hop <hop-count>

This command is optional and not often used but it can allow two BGP speaking routers not directly connected to establish a BGP session. As it's name implies, eBGP multi-hop cannot be used for iBGP sessions.

Satellite Internet customers who have a simplex connection will use another connection to provide the physical layer return path for BGP. eBGP MULTI-HOP provides the means to allow such network environments to function using BGP, albeit with rediculously high hop counts (20+).

 


Bookmark this page and SHARE:  

Search

Support InetDaemon.Com

Get Tutorials in your INBOX!

Free Training