cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6558
Views
30
Helpful
30
Replies

BGP config (2 routers, 1 ISP per router)

Peter Valdes
Level 3
Level 3

Hi Cisco,

Im new to routing and need help preparing a config for 2 routers.

We have 2 offices next to each other connected via a Layer 2 point to point access link. Each offices have a router running connected to separate ISP AS. Each offices have unique public and private IP Addresses.

I need to have BGP running on both sites so if ISP 2 fails in office 2 (ATLAS), it's public IP Address will be routed to and from ISP 1 via office 1 and default router traffic for office 2 (ATLAS) will use the L2 point to point link to get to the Internet via office 1 (NEXUS) link. Same scenerio with ISP 1 failing in office 1 (NEXUS).

NEXUS

interface GigabitEthernet0/0

description LINK TO ISP 1

bandwidth 10240

ip address X.X.X.2 255.255.255.252

ip nat outside

!

interface GigabitEthernet0/1

description LINK TO SWITCH STACK

no ip address

!

interface GigabitEthernet0/1.101

description LINK TO OFFICE 1 LAN

encapsulation dot1Q 101

ip address 192.168.1.1 255.255.255.0

ip nat inside

!

interface FastEthernet1/1

description LINK TO OFFICE 2

bandwidth 102400

ip address 172.17.0.1 255.255.255.252

!

router bgp 300

bgp log-neighbor-changes

neighbor X.X.X.1 remote-as 100

!

address-family ipv4

neighbor X.X.X.1 activate

neighbor X.X.X.1 soft-reconfiguration inbound

no auto-summary

no synchronization

network 61.1.1.0 mask 255.255.255.0

exit-address-family

!

ip route 192.168.2.0 255.255.255.0 172.17.0.2 name OFFICE2_ATLAS

ip route 61.1.1.0 255.255.255.0 Null0 200 name NEXUS_BGP

===========================================================================

ATLAS

interface GigabitEthernet0/0

description LINK TO ISP 2

bandwidth 10240

ip address Y.Y.Y.2 255.255.255.0

ip nat outside

!

interface GigabitEthernet0/1

description LINK TO SWITCH STACK

no ip address

!

interface GigabitEthernet0/1.101

description LINK TO OFFICE 2 LAN

encapsulation dot1Q 101

ip address 192.168.2.1 255.255.255.0

ip nat inside

!

interface FastEthernet0/0/0

description LINK TO OFFICE 1

bandwidth 102400

ip address 172.17.0.2 255.255.255.252

!

router bgp 300

bgp log-neighbor-changes

neighbor Y.Y.Y.1 remote-as 200

neighbor Y.Y.Y.1 ebgp-multihop 2

neighbor Y.Y.Y.1 update-source GigabitEthernet0/0

!

address-family ipv4

  neighbor Y.Y.Y.1 activate

  neighbor Y.Y.Y.1 soft-reconfiguration inbound

  no auto-summary

  no synchronization

  network 61.2.2.0 mask 255.255.255.0

exit-address-family

!

ip route 192.168.1.0 255.255.255.0 172.17.0.1 name OFFICE1_NEXUS

ip route 61.2.2.0 255.255.255.0 Null0 200 name ATLAS_BGP

Help please.

Thanks

30 Replies 30

Hi Val,

Kindly share the timelines(IST) of your activity, I would like to join you online so that in case of any issues we can trouble shoot.

Please consider implementing M-HSRP for lan redundancy.

Thanks.

Ameya

Hi Ameya,

Its on the 25th September @ 6AM to 8AM AEST.

I will post if I need help.

WIth M-HSRP, I dont see any benefits on our current Nexus/Atlas setup. Please explain otherwise.

Thanks

Dear Val,

Only benifit is lightning convergence and uninterrupted service during BGP failover.

It is perfectly alright if not applied.

Please rate if helpful.

Thanks.

Ameya

Hi,

I have one more question, I need to understand how Norwest Internet link will know of Atlas Public IP during failover if Norwest router is not advertising 61.2.2.0/24 on the BGP network?

Scenerio:

Attached previous network diagram, Atlas Internet fails. Base on the final config below, how will ISP1 know about 61.2.2.0/24 to route down traffic via Norwest link -> point to point -> Atlas LAN?

I understand everything else with the route-map prepend and prefix...

THANKS AGAIN!!!

NEXUS

router bgp 300

bgp log-neighbor-changes

neighbor X.X.X.1 remote-as 100

neighbor 172.17.0.2 remote-as 300

!

address-family ipv4

  neighbor X.X.X.1 activate

  neighbor X.X.X.1 soft-reconfiguration inbound

  neighbor X.X.X.1 prefix-list BLOCKINBOUNDBGP in

  neighbor X.X.X.1 route-map Nexus out

  neighbor 172.17.0.2 activate

  no auto-summary

  no synchronization

  network 61.1.1.0 mask 255.255.255.0

exit-address-family

!

ip prefix-list BLOCKINBOUNDBGP seq 10 permit 0.0.0.0/0

!

ip prefix-list BLOCKOUTBOUNDBGP1 seq 10 permit 61.1.1.0/24

!

ip prefix-list BLOCKOUTBOUNDBGP2 seq 10 permit 61.2.2.0/24

!

route-map Nexus permit 10

match ip address prefix-list BLOCKOUTBOUNDBGP1

!

route-map Nexus permit 20

match ip address prefix-list BLOCKOUTBOUNDBGP2

set as-path prepend 300 300 300

========================================================================

ATLAS

router bgp 300

bgp log-neighbor-changes

neighbor 172.17.0.1 remote-as 300

neighbor y.y.y.1 remote-as 200

neighbor y.y.y.1 ebgp-multihop 2

neighbor y.y.y.1 update-source FastEthernet0/0/0

!

address-family ipv4

  neighbor 172.17.0.1 activate

  neighbor y.y.y.1 activate

  neighbor y.y.y.1 soft-reconfiguration inbound

  neighbor y.y.y.1 prefix-list BLOCKINBOUNDBGP in

  neighbor y.y.y.1 route-map Atlas out

  no auto-summary

  no synchronization

  network 61.2.2.0 mask 255.255.255.0

exit-address-family

!

ip prefix-list BLOCKINBOUNDBGP seq 10 permit 0.0.0.0/0

!

ip prefix-list BLOCKOUTBOUNDBGP1 seq 10 permit 61.2.2.0/24

!

ip prefix-list BLOCKOUTBOUNDBGP2 seq 10 permit 61.1.1.0/24

!

route-map Nexus permit 10

match ip address prefix-list BLOCKOUTBOUNDBGP1

!

route-map Nexus permit 20

match ip address prefix-list BLOCKOUTBOUNDBGP2

set as-path prepend 300 300 300

Hey Val,

Apology for late reply.

What/Where is Norwest in the diagram??

Ameya

Hi Val,

I believe you meant to say How will Nexus router know about the public pools of Atlas, please confirm.

This will happen via IBGP neighborship between Atlas and Nexus.

Ameya

Peter Valdes
Level 3
Level 3

Hi,

Sorry you are correct. I was referring to Nexus router.

So iBGP will populate ISP1 of Atlas network?

Thanks again for your help. Appreciate your prompt replies.

Sent from Cisco Technical Support iPhone App

Hi Val,

Yes you are right and Its vice-versa.

Atlas will populate 61.1 pool and Nexus will populate 61.2 pools from IBGPs.

HTH

Ameya

Hi Amera,

Should i setup a static route of 0.0.0.0/0 via iBGP next hop IP with a metric of say 25?

Or will iBGP send the local default route I received from ISP1 (B*   0.0.0.0/0 [20/0] via ISP1) across the point to point aswell?

Thanks

Hi Val,

No need to add default route, IBGP will take care of it.

Please rate helpful posts.

Ameya

Hi Ameya,

Thanks for your last reply.

Here are the results.

Before Atlas failover to Nexus Internet:

ATL-GW1#sh ip bgp

BGP table version is 16, local router ID is 61.2.2.1

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path

* i0.0.0.0          X.X.X.1 (ISP1)          0    100   1000 10223 i

*>                  Y.Y.Y.1 (ISP2)           0          2000 24093 i

*>i61.1.1.0/24   172.17.0.1               0    100   1000 i

*> 61.2.2.0/24   0.0.0.0                  0         32768 i

During Atlas failover to Nexus Internet

ATL-GW1#sh ip bgp

BGP table version is 6, local router ID is 61.2.2.1

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path

r>i0.0.0.0          X.X.X.1 (ISP1)          0    100   1000 10223 i

*>i61.1.1.0/24   172.17.0.1               0    100   1000 i

*> 61.2.2.0/24   0.0.0.0                  0         32768 i

!

ip route 0.0.0.0 0.0.0.0 172.17.0.1 100 name DEFAULT-ROUTE-NEXUS

I had to add the above default static routers for this to work because when I did a "show ip route", the routing table didnt have a default rout via 172.17.0.1 point to point link to Nexus. Strange as I thought the nexus default route would be in Atlas routing table via iBGP but it didnt have it.

Is there  any other way of removing the static default route above and rely on iBGP to populate the routing table?

If i remove the above static default route, my connection out to the Internet fails.

Also, just incase I have place a weight on BGP for both neighbours. eBGP neighbour at 2000 and iBGP neighbour at 1000. This config is applied on both Atlas an Nexus.

Thanks

Try to add the bellow command on both iBGP peers and rest the begp session and try it after removing the static

Default route

neighbor 172.17.0.x next-hop-self

Hope this help

Hi

Thanks for your prompt reply. I'll add the config mentioned and test it. Will let you know how it goes.

Thanks again

Sent from Cisco Technical Support iPhone App

Hi Val,

As marvan suggested,inorder to reach ATALS routes to the internet u wl hv to set 172.17.0.X as the next-hope.without next-hope self command NEXUS ebgp g/w wil replicate to ATALS .

Thanks everyone for your help.

All is working as expected.

Cheers