cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
776
Views
0
Helpful
12
Replies

Simple BGP Config

imranraheel
Level 1
Level 1

I have to configure BGP between two directly connected routers and want to advertise only one host from my side to client, attached is the diagram and below is the configs . Keeping in mind i have a default route and few static routes on my Layer3 switchSimple Diagram.jpg

Router Configurations:

Client Router/ Layer3 Switch

interface FastEthernet0/0

ip address 10.0.0.1 255.255.255.0

router bgp 100

no synchronization

bgp log-neighbor-changes

network 10.0.0.0

neighbor 10.0.0.2 remote-as 100

!

My Router/ Layer3 Switch

interface Loopback0

ip address 209.xx.xxx.xx 255.255.255.255

interface FastEthernet0/0

ip address 10.0.0.2 255.255.255.0

router bgp 100

no synchronization

bgp log-neighbor-changes

network 10.0.0.0

network 209.xx.xxx.xx

redistribute connected route-map abc

neighbor 10.0.0.1 remote-as 100

ip prefix-list abc seq 5 permit 209.xx.xxx.xx/32

route-map abc permit 1

12 Replies 12

Hi,

and a one Million-dollar-question: What is your question?

it looks correct except the route-map part

What should be the route map , also the the rest of the configs like state route would work as they are configured or would they have any conflict with this BGP config & the bgp configs have priority over default route ?

the static routes are always more "impotant" as dynamic  ( if you don't change metric)

What is you goal? do you see any problem with this configuration?

route-map configuration just looks a bit strange - without body it will allow all connected IP to be redistributed into BGP (do you really want it? )

on both routers servers are connected i want to configure BGP so that when ever the server wants to communicate they should go over this router , but if it is down it should go via default route.

on the client router you should also configure "network" command or a redistibute.

then, if you have a static route you should give the metric to it hieger then iBGP , just like "ip route x.x.x.x y.y.yy. z.z.z.z 250" 

then check on both side if the BGP session up and runjing "sh ip bgp summ" and if they are, check the BGP table "sh ip bgp" to see which prefixes are exchenging.

You mentioned route map isnt correct , than What should be the route map

it's not incorrect - it's just empty and allows all.

I wouldn't  use "redistribute connected" anyway, better just to use "network" command.

Can you let me know what should be changed here

Router Configurations:

Client Router/ Layer3 Switch

interface FastEthernet0/0

ip address 10.0.0.1 255.255.255.0

router bgp 100

no synchronization

bgp log-neighbor-changes

network 10.0.0.0

neighbor 10.0.0.2 remote-as 100

!

My Router/ Layer3 Switch

interface Loopback0

ip address 209.xx.xxx.xx 255.255.255.255

interface FastEthernet0/0

ip address 10.0.0.2 255.255.255.0

router bgp 100

no synchronization

bgp log-neighbor-changes

network 10.0.0.0

network 209.xx.xxx.xx

redistribute connected route-map abc

neighbor 10.0.0.1 remote-as 100

ip prefix-list abc seq 5 permit 209.xx.xxx.xx/32

route-map abc permit 1

have you ever configured a BGP before?  if not,  you should first  read a couple of articales, because BGP configuration  needs some background knowledges.

Hi,

1) your network commands are not correct because by default auto-summary is disabled and if the mask is not a classful mask for the prefix already in the routing table you want to advertise through BGP then you have to specify the mask in the command like this:

Client Router/ Layer3 Switch

router bgp 100

network 10.0.0.0 mask 255.255.255.0

My Router/ Layer3 Switch

router bgp 100

network 10.0.0.0 mask 255.255.255.0

network 209.xx.xxx.xx mask 255.255.255.255

2) why redistribute  the loopback with a route-map and at the same-time with a network command? It's one or the other

but not both. But in your case as the network command was wrong then it will be redistributed.

Now concerning your goal, let me try to understand:

You want the client Switch to get to the server via its BGP route and if this route goes down ,use the static route ?

As the routing process is always looking for a longest match, in your case it will indeed use the iBGP route but anyway if it had 2 longest matches from 2 different protocols it would take AD into account and a static route unless you change the AD has always an AD of 1 which is < 200(iBGP) so it would choose the static route.

Now let's consider how the BGP route could be lost. if it is because the BGP peering is lost because the connection between the switches is broken then you would have no more routes to the server.

If you want backup connectivity you must have redundancy somewhere in the path which is not your case.

And lastly what is important is the routing table of the client not yours to get to the server( of course you must have a route back to the client).

Regards.

Alain

Don't forget to rate helpful posts.

Thanks Alain.

Now my goal is that both servers on either side should connect via BGP incase if the router goes down than the servers should connect via default route (over internet)

Hi,

could you explain more about the relationship between the 2 switches? how are they connected ?

And don't forget that to have failover you must have redundancy in the path otherwise if the path between the 2 is broken then all L3 connectivity will be lost.

Regards.

Alain

Don't forget to rate helpful posts.
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card