11-17-2011 06:42 AM - edited 03-04-2019 02:18 PM
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 switch
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
11-17-2011 06:54 AM
Hi,
and a one Million-dollar-question: What is your question?
it looks correct except the route-map part
11-17-2011 06:59 AM
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 ?
11-17-2011 07:05 AM
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? )
11-17-2011 07:09 AM
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.
11-17-2011 07:16 AM
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.
11-17-2011 07:21 AM
You mentioned route map isnt correct , than What should be the route map
11-17-2011 07:23 AM
it's not incorrect - it's just empty and allows all.
I wouldn't use "redistribute connected" anyway, better just to use "network" command.
11-17-2011 07:25 AM
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
11-17-2011 07:34 AM
have you ever configured a BGP before? if not, you should first read a couple of articales, because BGP configuration needs some background knowledges.
11-17-2011 07:30 AM
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
11-17-2011 07:36 AM
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)
11-17-2011 08:12 AM
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
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: