Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Route selection

Hi,

I have two router , conneted with dual WAN , both are from different vendor. We want to run EBGP as protocol.

We need to sent some traffic through one link and some from another but when one link will goes down the other one needs take care of all the traffic.

When the link will come up the traffic choose their previouse path.

1 REPLY

Re: Route selection

There are multiple ways to achieve your requirement Manoj. I am suggesting my option of having this. Lets consider the below topology,

Config parameters

WAN1 / Serial IP : 10.20.1.0/30 (mask 255.255.255.252)

WAN2 / Serial IP : 10.30.1.0/30 (mask 255.255.255.252)

LAN / Ethernet IP : 100.100.100.0/24 and 200.200.200.0/24

Receiving Route : Default route from ISP's

LAN : ISP_A (AS20), ISP_B(AS30), Customer (AS10) and other ISP (AS50)

Lets begin with the configuration

CPE_1 Config

!

interface Serial1/1

ip address 10.20.1.1 255.255.255.252

load-interval 30

serial restart-delay 0

!

interface Serial1/2

no ip address

load-interval 30

shutdown

serial restart-delay 0

!

interface Serial1/3

no ip address

shutdown

serial restart-delay 0

!

interface FastEthernet2/0

ip address 200.200.200.2 255.255.255.0 secondary

ip address 100.100.100.1 255.255.255.0

duplex auto

speed auto

!

router bgp 10

no synchronization

bgp log-neighbor-changes

network 100.100.100.0 mask 255.255.255.0

network 200.200.200.0

redistribute connected

neighbor 10.20.1.2 remote-as 20 <------------------ BGP neighbor to ISP_"A"

neighbor 10.20.1.2 prefix-list to-ISP out <--------- Allow only IP block need to be advertised to ISP

neighbor 10.20.1.2 route-map route-to-ISP out <-------- To control inbound traffic

neighbor 100.100.100.2 remote-as 10 <----------- iBGP neighbor to CPE_2

neighbor 100.100.100.2 default-originate <------- Send default route

neighbor 100.100.100.2 route-map route-to-ibgp in <------- Make less prefer

no auto-summary

!

ip http server

no ip http secure-server

ip forward-protocol nd

!

ip prefix-list prefix-1 seq 5 permit 100.100.100.0/24

!

ip prefix-list prefix-2 seq 5 permit 200.200.200.0/24

!

ip prefix-list to-ISP seq 5 permit 100.100.100.0/24

ip prefix-list to-ISP seq 10 permit 200.200.200.0/24

!

route-map route-to-ISP permit 10 <-------- To control inbound traffic

match ip address prefix-list prefix-2
set as-path prepend 10 10 10

!

route-map route-to-ISP permit 20

!

route-map route-to-ibgp permit 10 <------- Make less prefer

set local-preference 80

CPE_2 Config

interface FastEthernet0/0

ip address 200.200.200.4 255.255.255.0

shutdown

duplex auto

speed auto

!

interface FastEthernet0/1

no ip address

shutdown

duplex auto

speed auto

!

interface Serial1/0

no ip address

shutdown

serial restart-delay 0

!

interface Serial1/1

ip address 10.30.1.1 255.255.255.252

load-interval 30

serial restart-delay 0

!

interface Serial1/2

no ip address

shutdown

serial restart-delay 0

!

interface Serial1/3

no ip address

shutdown

serial restart-delay 0

!

interface FastEthernet2/0

ip address 100.100.100.2 255.255.255.0 secondary

ip address 200.200.200.1 255.255.255.0

duplex auto

speed auto

!

router bgp 10

no synchronization

bgp log-neighbor-changes

network 100.100.100.0 mask 255.255.255.0

network 200.200.200.0

redistribute connected

neighbor 10.30.1.2 remote-as 30 <------------------ BGP neighbor to ISP_"B"

neighbor 10.30.1.2 prefix-list to-ISP out <--------- Allow only IP block need to be advertised to ISP

neighbor 10.30.1.2 route-map route-to-ISP out <-------- To control inbound traffic

neighbor 100.100.100.1 remote-as 10 <----------- iBGP neighbor to CPE_1

neighbor 100.100.100.1 default-originate <------- Send default route

neighbor 100.100.100.1 route-map route-to-ibgp in <------- Make less prefer

no auto-summary

!

ip http server

no ip http secure-server

ip forward-protocol nd

!

ip prefix-list prefix-1 seq 5 permit 100.100.100.0/24

!

ip prefix-list prefix-2 seq 5 permit 200.200.200.0/24

!

ip prefix-list to-ISP seq 5 permit 100.100.100.0/24

ip prefix-list to-ISP seq 10 permit 200.200.200.0/24

!

route-map route-to-ISP permit 10 <-------- To control inbound traffic

match ip address prefix-list prefix-1
set as-path prepend 10 10 10

!

route-map route-to-ISP permit 20

!

route-map route-to-ibgp permit 10 <------- Make less prefer

set local-preference 80

ISP_A PE Router

interface Serial1/0

ip address 10.20.1.2 255.255.255.252

serial restart-delay 0

!

interface Serial1/1

ip address 20.20.1.1 255.255.255.252

serial restart-delay 0

!

interface Serial1/2

no ip address

shutdown

serial restart-delay 0

!

interface Serial1/3

no ip address

shutdown

serial restart-delay 0

!

router bgp 20

no synchronization

bgp log-neighbor-changes

redistribute connected

neighbor 10.20.1.1 remote-as 10 <------------------ BGP neighbor to Customer

neighbor 10.20.1.1 default-originate
neighbor 10.20.1.1 route-map no-routes out
<------- No BGP routes will be sent to Customer

neighbor 20.20.1.2 remote-as 20

no auto-summary

!

ip http server

no ip http secure-server

ip forward-protocol nd

!

route-map no-routes deny 10<------- No BGP routes will be sent to Customer

ISP_B PE Configs

!

interface Serial1/0

ip address 10.30.1.2 255.255.255.252

serial restart-delay 0

!

interface Serial1/1

ip address 30.30.1.1 255.255.255.252

serial restart-delay 0

!

interface Serial1/2

no ip address

shutdown

serial restart-delay 0

!

interface Serial1/3

no ip address

shutdown

serial restart-delay 0

!

router bgp 30

no synchronization

bgp log-neighbor-changes

redistribute connected

neighbor 10.30.1.1 remote-as 10 <------------------ BGP neighbor to Customer

neighbor 10.30.1.1 default-originate
neighbor 10.30.1.1 route-map no-routes out
<------- No BGP routes will be sent to Customer

neighbor 30.30.1.2 remote-as 30

no auto-summary

!

ip http server

no ip http secure-server

ip forward-protocol nd

!

route-map no-routes deny 10

Now let's verify our requirement was achieved

CPE_1#sh ip bgp 0.0.0.0
BGP routing table entry for 0.0.0.0/0, version 21
Paths: (2 available, best #1, table Default-IP-Routing-Table)
  Not advertised to any peer
  20
    10.20.1.2 from 10.20.1.2 (20.20.1.1)
      Origin IGP, metric 0, localpref 100, valid, external, best
  Local
    100.100.100.2 from 100.100.100.2 (200.200.200.1)
      Origin IGP, metric 0, localpref 80, valid, internal


CPE_1#sh ip bgp nei 10.20.1.2 ad
BGP table version is 23, local router ID is 100.100.100.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
*> 100.100.100.0/24 0.0.0.0                  0         32768 i
*> 200.200.200.0    0.0.0.0                  0         32768 i

Total number of prefixes 2
CPE_1#


CPE_2#sh ip bgp 0.0.0.0
BGP routing table entry for 0.0.0.0/0, version 20
Paths: (2 available, best #1, table Default-IP-Routing-Table)
  Not advertised to any peer
  30
    10.30.1.2 from 10.30.1.2 (30.30.1.1)
      Origin IGP, metric 0, localpref 100, valid, external, best
  Local
    100.100.100.1 from 100.100.100.1 (100.100.100.1)
      Origin IGP, metric 0, localpref 80, valid, internal


CPE_2#sh ip bgp nei 10.30.1.2 ad
BGP table version is 20, local router ID is 200.200.200.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
*> 100.100.100.0/24 0.0.0.0                  0         32768 i
*> 200.200.200.0    0.0.0.0                  0         32768 i

Total number of prefixes 2
CPE_2#


ISP_A#sh ip bgp nei 10.20.1.1 ro
BGP table version is 56, local router ID is 20.20.1.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
*> 100.100.100.0/24 10.20.1.1                0             0 10 i
*  200.200.200.0    10.20.1.1                0             0 10 10 10 10 i

Total number of prefixes 2
ISP_A#


ISP_B#sh ip bgp nei 10.30.1.1 ro
BGP table version is 60, local router ID is 30.30.1.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
*  100.100.100.0/24 10.30.1.1                0             0 10 10 10 10 i
*> 200.200.200.0    10.30.1.1                0             0 10 i

Total number of prefixes 2
ISP_B#


TR_A#sh ip bgp 100.100.100.0
BGP routing table entry for 100.100.100.0/24, version 51
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1
  10
    10.20.1.1 from 20.20.1.1 (20.20.1.1)
      Origin IGP, metric 0, localpref 100, valid, internal, best


TR_A#sh ip bgp 200.200.200.0
BGP routing table entry for 200.200.200.0/24, version 58
Paths: (2 available, best #2, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1          2
  50 30 10
    20.50.1.2 from 20.50.1.2 (30.50.1.2)
      Origin IGP, localpref 100, valid, external
  30 10
    20.30.1.2 from 20.30.1.2 (30.50.1.1)
      Origin IGP, localpref 100, valid, external, best
TR_A#


TR_B#sh ip bgp 100.100.100.0
BGP routing table entry for 100.100.100.0/24, version 61
Paths: (2 available, best #2, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1          2
  50 20 10
    30.50.1.2 from 30.50.1.2 (30.50.1.2)
      Origin IGP, localpref 100, valid, external
  20 10
    20.30.1.1 from 20.30.1.1 (20.50.1.1)
      Origin IGP, localpref 100, valid, external, best


TR_B#sh ip bgp 200.200.200.0
BGP routing table entry for 200.200.200.0/24, version 66
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Advertised to update-groups:
     2
  10
    10.30.1.1 from 30.30.1.1 (30.30.1.1)
      Origin IGP, metric 0, localpref 100, valid, internal, best
TR_B#


Other_ISP#sh ip bgp 100.100.100.0
BGP routing table entry for 100.100.100.0/24, version 64
Paths: (2 available, best #1, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1
  20 10
    20.50.1.1 from 20.50.1.1 (20.50.1.1)
      Origin IGP, localpref 100, valid, external, best
  30 20 10
    30.50.1.1 from 30.50.1.1 (30.50.1.1)
      Origin IGP, localpref 100, valid, external


Other_ISP#tr 100.100.100.3
Type escape sequence to abort.
Tracing the route to 100.100.100.3

  1 20.50.1.1 64 msec 28 msec 8 msec
  2 20.20.1.1 [AS 20] 40 msec 24 msec 4 msec
  3 10.20.1.1 [AS 20] 16 msec 20 msec 8 msec
  4 100.100.100.3 [AS 10] 44 msec *  40 msec


Other_ISP#sh ip bgp 200.200.200.0
BGP routing table entry for 200.200.200.0/24, version 71
Paths: (2 available, best #1, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1
  30 10
    30.50.1.1 from 30.50.1.1 (30.50.1.1)
      Origin IGP, localpref 100, valid, external, best
  20 30 10
    20.50.1.1 from 20.50.1.1 (20.50.1.1)
      Origin IGP, localpref 100, valid, external


Other_ISP#tr 200.200.200.3
Type escape sequence to abort.
Tracing the route to 200.200.200.3

  1 30.50.1.1 52 msec 64 msec 12 msec
  2 30.30.1.1 [AS 30] 16 msec 20 msec 8 msec
  3 10.30.1.1 [AS 30] 12 msec 32 msec 16 msec
  4 200.200.200.3 [AS 10] 20 msec *  44 msec
Other_ISP#

Hope this helps.

*Please rate those who help you if the post's were helpful.

434
Views
0
Helpful
1
Replies
CreatePlease login to create content