Configuring BGP on Cisco router is simple enough. Before start configuring BGP, you need two consideration:
1. BGP only advertise routing entry that exist in IGP routing table
2. BGP is classfull routing protocol, you must include netmask in network statement BGP configuration if the network is not classfull.
Step for confiuring BGP
1. Check whether the network that you want advertise in in the IGP routing table.Simply check routing in the router. For example you want to advertise network 192.168.1.0/24, simply type this command
router#show ip route 192.168.1.0
If the network exist in the routing table, then you can go to next step, but if the network doesn't exist, or only the routing that more specific exist, you need statically route the network to Null0 using administrative distance that high enough. Example,
router(config)#ip route 192.168.1.0 255.255.255.0 null0 255
2. Configure BGP. Say your AS is 65000, and your neighbor AS is 65001 and peer IP 10.10.10.2
router(config)#router bgp 65000
router(config-router)#neigbor 10.10.10.2 remote-as 65001
router(config-router)#network 192.168.1.0 mask 255.255.255.0
That's it. If everything ok, then you can see the BGP is up.
router#sho ip bgp sum
The result will be something like this,
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.10.10.2 4 65001 382168 300922 537070 0 0 13w0d 5007
When state is Active or Idle, then connection have been up. You need check connectivity, with ping, or try telnet to port 179 (BGP use port 179 TCP), when it's not open, something doesn't allow port 179, so BGP doesn't up.
To check the routing that you received,
sh ip bgp neigh 10.10.10.2 received-route
sh ip bgp neigh 10.10.10.2 advertised-route
Using Next-Hop Self
BGP will advertise to network that have valid next-hop. Next-hop usually coming from IGP routing table. For the border router, that connect with internal router and external router, it is good useing next-hop-self for the following reason :
1. Sometime you don't redistribute connected interface to IGP routing protocol
2. For stability reason
Configure next-hop self in Cisco router is simply.
router(config)#router bgp 65000
router(config-router)#neighbor 172.16.1.1 remote-as 65000 ----> internal peer
router(config-router)#neighbor 172.16.1.1 next-hop-self
0 comments
Post a Comment