12-08-2011 09:41 PM - edited 03-04-2019 02:34 PM
Helo all,
I have a scenarion. Im just beginner to BGP. We having customer with total 16 sites, 2 HQ and 14 branches. all this sites connected via MPLS which running under BGP. The MPLS cloud managed by our ISP.
2 HQ router which connected to Telco UPE (NTU) is running on BGP which establish BGP session to ISP PE router. all other 14 sites actually running on private broadband which connected to MPLS clound. Basically branch site just having a ADSL modem, once dialer get connected, they can communicate to all other site. Bothe HQ having separate Internet link to access internet. And all the branches accessing internt via HQ 1 internet link. To achive this, in HQ 1 router i jus add below command under router bgp AS ID
neighbor neighbour ID default-originate
And all the branches able to surf internet without no problem. But here we want once the HQ internet is down, we need all branch internet access is diverted to HQ 2 internet link. I know it can be done manually in HQ 2 router by adding the same command. But is there anyway to do it automatically? What if both site HQ 1 and 2 advertised default route? which link will the branch choose? can I advertise default route with metric?
my request in simple form.
If HQ 1 internet link down: branches and HQ 1 should use HQ 2 internet to online
if HQ 2 internet link down : branches and HQ 2 should use HQ 1 internet to online
Anyway to achive this?
Solved! Go to Solution.
12-12-2011 06:43 AM
Ok
Based on the info provided, a change to the default route injection required on both HQ sites to make it more relable and aware of the availability of the local Internet
Instead of using the default originate command tou will need to use the below logic
Add ip sla track that monitor the availability of the Internet ispmnext hop using icmp
Add a default staticnroute if not already added that point to the ISP next hop ip with the ip sla track created above
The ip sla track will bring this default route down epinephrine the even of icmp to ISP next hop ip ping failur
In this case if the Internet link is down the default route will disappear from the local routing table
In bgp the advertisement of the default route can be associated with the default route existence in the routing table a d this will lead to make it relable because in the case of the Internet link is down the default route will not be advertised
Config example as below assuming
Bgp AS 100
Internet ISP 100.1.1.1
Ip sla monitor 1
icmp-echo 100.1.1.1
timeout 500
ip route 0.0.0.0 0.0.0.0 100.1.1.1 track 10
Now advertise this using bgp using network command
Router bgp 100
Network 0.0.0.0
Same concept must be done on both HQ sites after removing the default originate command
also the previously route map created in HQ 2 must be left as it is to achieve the active standby requirement
Hope this help
12-08-2011 10:19 PM
Hi,
How are sites conected to HQ (logically).
Is there any protocol running between them ?
Regards,
Smitesh
12-09-2011 06:24 PM
Hi Smitesh,
The protocol between HQ to branches is running over BGP(if not mistaken), but this managed by ISP. only our HQ1 and HQ2 router running on BGP protocol established bgb neighbour to ISP PE router. all other branches running on default route. As i mentioned b4, all sites running on MPLS network.
12-10-2011 02:02 AM
Simply add same default-originate command on the HQ site toward the ISP
And use bgp AS prepending to make the default route of hq2 les prefered over hqq1 if both of them up
For example use the below config to prepend to the default route assuming your bgp AS number as 100
Ip prefix-list list1 permit 0.0.0.0/0
Route-map map1 permit 10
Match ip address prefix list list1
Set as prepend 100 100
Route-map map1 permit 30
Router bgp 100
Neighbor
And below is good guide
http://wiki.nil.com/AS-path_prepending_(technical_details)
Hope this help
If helpful rate
12-10-2011 02:18 AM
Marwanshawi is totally right, you need to advertise a default route from the HQ2 site that is less preffered to the HQ1 site so changing a BGP attribute on the route somehow with a route-map is the best way - you could use MED as well if you wanted.
12-10-2011 07:14 PM
hi marwanshawi
Thanks for the guideline, anyway need some clarification. should I still need to add-in default-originate command in HQ 2 router? in HQ 1 router no changes needed? Thanks for the help.
12-11-2011 12:33 AM
Yes that's correct
On hq2 you need to the defual-originate
And AS pretending as described above
Hq1 no changes required
Hope this help
Sent from Cisco Technical Support iPhone App
12-11-2011 10:58 PM
Hi marwanshawi,
After I applied the below command in HQ 2 router, HQ1 and All other branches unable to communicate to HQ2 LAN. I login to HQ 1 router, and do "sho ip bgp", the LAN segment of HQ 2 not in the list. Meaning to say, the HQ 2 LAN segment nt been advertised.
Neighbor
Is that because of " ip prefix-list list1 0.0.0.0/0 " command? Because HQ2 router still need advertised in own LAN segment to the neighbour. And all other branches and HQ 1 have to access server placed in HQ 2 LAN. Anyway to trick the prefix list to still advertise HQ 2 own LAN segment without any interuption?
12-12-2011 02:04 AM
Did you creat a second sequence in the route map map1 with permit as described in my example above ?
Like
Route-map map1 permit 10
Match ip address prefix list list1
Set as prepend xx xx
Route-map map1 permit 40
HTH
12-12-2011 02:16 AM
Hi marwanshawi,
Ohh sorry, i missed that command. Anyway does that will solve the problem?
12-12-2011 02:44 AM
Hi marwanshawi,
That solve the problem. But yet another problem came out. I tried to disconnect HQ 1 internet, to see if HQ 1 fail over to HQ 2 internet , but it doesnt. In HQ 1 router i have default-originate command in place. If I remove this command from HQ1 router, than HQ 1 able to failover to HQ 2 internet.
During default-originate command in place at HQ 1, i did sho ip bgp, and didnt find any default route entry. If I remove that command, than the default route is in place in HQ 1 router. Any idea why?
12-12-2011 04:14 AM
That's correct this different issue
If you want to have your your static route to be reliable you need to change the way you advertise it to the network with the use is ip sla
I will post an example to you to configure for this
But before that how this router reach the Internet is it directly connected link or it is via another devise advertised via routing
Ir using a static route
Do you have a next hope ip from the Internet ISP ?
Once you provide this onto I can guide to use different way
HTH
and rate the helpful posts for ur original post
Sent from Cisco Technical Support iPhone App
12-12-2011 04:56 AM
Both HQ1 And HQ2 router dirrectly connected to Internet. Meaning to say, both MPLS and internet connected to same router each site. My default route at each router is using next hop IP of ISP Router. I did use IP SLA at each router to track the availablity of internet link, but the problem, both site router doesnt receive default route from BGP, if i put default-originate command in HQ1 router.
12-12-2011 06:43 AM
Ok
Based on the info provided, a change to the default route injection required on both HQ sites to make it more relable and aware of the availability of the local Internet
Instead of using the default originate command tou will need to use the below logic
Add ip sla track that monitor the availability of the Internet ispmnext hop using icmp
Add a default staticnroute if not already added that point to the ISP next hop ip with the ip sla track created above
The ip sla track will bring this default route down epinephrine the even of icmp to ISP next hop ip ping failur
In this case if the Internet link is down the default route will disappear from the local routing table
In bgp the advertisement of the default route can be associated with the default route existence in the routing table a d this will lead to make it relable because in the case of the Internet link is down the default route will not be advertised
Config example as below assuming
Bgp AS 100
Internet ISP 100.1.1.1
Ip sla monitor 1
icmp-echo 100.1.1.1
timeout 500
ip route 0.0.0.0 0.0.0.0 100.1.1.1 track 10
Now advertise this using bgp using network command
Router bgp 100
Network 0.0.0.0
Same concept must be done on both HQ sites after removing the default originate command
also the previously route map created in HQ 2 must be left as it is to achieve the active standby requirement
Hope this help
12-12-2011 05:40 PM
Hi marwanshawi,
I understand the part until default routing with ip sla tracking. But in router bgp, u have adversited network 0.0.0.0 , and this same command has to be applied at both HQ 1 and HQ 2. But in here, how the branches identifies which path to choose communicate with HQ1 LAN or HQ2 LAN since both router didnt advertised its own LAN segment. Do i can add another network a.b.c.d command under network 0.0.0.0 where a.b.c.d is the router own LAN ?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide