Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple BGP Config

Status
Not open for further replies.

FWHATER

MIS
Apr 26, 2005
105
US
I have 3 routers (2 2620's and a 1710). I've done ospf, igrp, eigrp etc. Could anyone show me a simple config for BGP ?
 
Hi.

In global mode enter:
Code:
router bgp XXX --> Autonnomous-system-number
interface:
Code:
router bgp XXX --> Autonnomous-system-number
neighbor ip-address remote-as yyy --> peer relationships
Like this:
Code:
router(config)# router bgp 200
router(config-router)#neighbor 10.0.0.2 remote-as 100
router(config-router)#neighbor 10.0.0.3 remote-as 200
100 and 200 will be your neighbor routers.

After you can do:
Code:
sh ip bgp neighbors or sh ip bgp

This is an very basic, for sure other guys can give you a very good explanation.

Hope this help.
 
Hi.

Sorry this is in global config mode:
Code:
router bgp XXX --> Autonnomous-system-number

interface:
Code:
router(config)# router bgp 100
router(config-router)#neighbor 10.0.0.2 remote-as 200
router(config-router)#neighbor 10.0.0.3 remote-as 300

200 and 300 will be your neighbor routers
 
Thanks, but after doing a sh ip route, I don't see any learned BGP routes from my neighbors. Here's one of my configs:

Building configuration...

Current configuration : 2472 bytes
!
version 12.3
service timestamps debug uptime
service timestamps log uptime
service password-encryption
!
!
boot-start-marker
boot-end-marker
!
enable secret 5 xxxxxxxxxxxxxxxx.
!
no aaa new-model
ip subnet-zero
ip cef
!
!
!
!
!
interface Loopback0
ip address 172.x.x.x 255.255.255.0
!
interface FastEthernet0/0
ip address 192.xxx.xxx.x 255.255.255.224
no ip mroute-cache
speed auto
full-duplex
!
interface Serial0/0
no ip address
no ip mroute-cache
shutdown
no fair-queue
!
router bgp 300
synchronization
bgp log-neighbor-changes
neighbor 172.16.x.x remote-as 200
neighbor 172.16.x.x description link
neighbor 172.16.x.x send-community
neighbor 172.16.x.x version 4
neighbor 172.16.x.x route-map Vanguard out
neighbor 172.x.x.7 remote-as 100
neighbor 172.x.x.7 description link
neighbor 172.x.x.7 send-community
neighbor 172.x.x.7 version 4
neighbor 172.x.x.7 route-map Vanguard out
no auto-summary
!
ip http server
ip classless
ip route 0.0.0.0 0.0.0.0 192.x.x.1
!
!
cdp timer 90
cdp holdtime 240
banner motd ^C

Does anyone see something wrong ? Something I missed ?
 
do a "sho ip bgp sum"
do your bgp peers establish?

i dont see any interface with the address range your using for your peering...
if it is a loopback then you must specify the neighbor source-interface command
and also if its a loopback you will need to use the multihop command

something like...

neighbor 172.16.x.x update-source lo0
neighbor 172.16.x.x ebgp-multihop 2

if there is more config being omitted.. ie the Vanguard routemap pls post it because there could be config issues that we cant see
 
Router#sh ip bgp route-map Vanguard

Router#sh ip bgp sum
BGP router identifier 172.19.0.3, local AS number 300
BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
172.x.x.4 4 200 0 0 0 0 0 never Idle
172.x.x.7 4 100 0 0 0 0 0 never Idle

Should I be using the loopback addresses as the neighbor addresses in my neighbor statements per router ?
 
..so you are not peering..
..i guess these are not in production..

..you could do a "debug ip packet detail", look for ACK RST (reset) or ACK SYN dealing with TCP port src=179..
..another.. try to telnet 172.16.x.x 179 see if you get "open"
..also debug icmp...if you see icmp type 11 means TTL has exceded and indeed multihop problem...



 
Keep in mind that BGP works a little differently from those other protocols. Even if you get your peers set up, you still need to tell it which routes you want to advertise. It's not going to just start advertising routes on its own.
 
How do you do that ? This is what I have from one peer:

Router#sh ip bgp sum
BGP router identifier 172.19.0.2, local AS number 200
BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
172.16.30.7 4 100 2763 2762 1 0 0 1d21h 0
192.168.254.2 4 300 0 0 0 0 0 never Idle

Router#sh run
Building configuration...

Current configuration : 2688 bytes
!
version 12.3
service timestamps debug uptime
service timestamps log uptime
service password-encryption
!
!
boot-start-marker
boot-end-marker
!
no logging on
enable secret
!
no aaa new-model
ip subnet-zero
ip cef
!
!
!
!
!
!
!
interface Loopback0
ip address 172.19.0.2 255.255.255.255
!
interface FastEthernet0/0
ip address 10.x.x.13 255.255.128.0
duplex auto
speed 100
no cdp enable
!
interface Ethernet1/0
ip address 192.x.2.2 255.255.255.252
full-duplex
no cdp enable
!
interface Ethernet1/1
no ip address
shutdown
full-duplex
!
interface Ethernet1/2
ip address 10.x.x.2 255.255.255.252
no ip route-cache cef
no ip route-cache
no ip mroute-cache
half-duplex
keepalive 12
!
interface Ethernet1/3
ip address 172.x.30.4 255.255.255.240
full-duplex
!
router bgp 200
synchronization
bgp log-neighbor-changes
neighbor 172.x.30.7 remote-as 100
neighbor 172.x.30.7 description link
neighbor 172.x.30.7 send-community
neighbor 172.x.30.7 version 4
neighbor 172.x.30.7 route-map Vanguard out
neighbor 192.x.x.2 remote-as 300
neighbor 192.x.x.2 description link
neighbor 192.x.x.2 send-community
neighbor 192.x.x.2 version 4
neighbor 192.x.x.2 route-map Vanguard out
no auto-summary
!
no ip http server
ip classless
ip route 0.0.0.0 0.0.0.0 172.x.30.2
ip route 10.x.128.0 255.255.128.0 172.x.30.7
ip route 192.x.x.0 255.255.255.224 172.x.30.7
!
!
cdp timer 90
cdp holdtime 240
banner motd ^C
!
line con 0
logging synchronous
login local
line aux 0
line vty 0 4
exec-timeout 0 0
password 7
logging synchronous
login local
!
!
end
 
To get routes into BGP you can add them manually via the network statement or you can redistribute them from another source.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top