cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
494
Views
5
Helpful
3
Replies

BGP optional routing

mindgenie
Level 1
Level 1

I had been trying this for a long time now, but still unable to find any way. I am connected with 2 back bone service providers. I have 8 IP class assigned from APNIC. I want to advertise 4 classes on one network and other 4 on other network. But when any one link is down all traffic should go through one remaining link.

3 Replies 3

I read the doc, but I think it is for the prefixs which are to be advertised by other networks. Where as I want to control my own IP class advertisment. Should I send you the sample config?

Hello,

I labbed this and it seems to work. Watch out though, there are a few bugs related to advertise-maps. I used IOS 12.2(24) Enterprise Plus.

Here is what I configured (obviously you will use other address ranges):

Router R1 is in AS1, router R2 is in AS2, and router R3 is in AS3. R1 has a EBGP peer relationship with both AS2 and AS3 routers (which is equivalent to your scenario). R1 advertises the following address spaces:

192.168.10.0

192.168.11.0

192.168.12.0

192.168.13.0

192.168.14.0

192.168.15.0

192.168.16.0

192.168.17.0

Fom R2, R1 receives the prefix 2.2.2.2/32, and from R3 it receives prefix 3.3.3.3/32 (these prefixes will be used to set the advertise condition).

Both R2 and R3 receive all prefixes, but after configuring the adveryise-maps, they will only receive half of the prefixes, unless the prefix received from the other router is not in the routing table of R1.

Here is the configuration of R1:

R1#

Current configuration : 2289 bytes

!

version 12.2

service timestamps debug uptime

service timestamps log uptime

no service password-encryption

service udp-small-servers

service tcp-small-servers

!

hostname R1

!

!

ip subnet-zero

!

frame-relay switching

!

!

!

interface Loopback1

ip address 192.168.10.1 255.255.255.0

!

interface Loopback2

ip address 192.168.11.1 255.255.255.0

!

interface Loopback3

ip address 192.168.12.1 255.255.255.0

!

interface Loopback4

ip address 192.168.13.1 255.255.255.0

!

interface Loopback5

ip address 192.168.14.1 255.255.255.0

!

interface Loopback6

ip address 192.168.15.1 255.255.255.0

!

interface Loopback7

ip address 192.168.16.1 255.255.255.0

!

interface Loopback8

ip address 192.168.17.1 255.255.255.0

!

interface Ethernet0

ip address 192.168.6.1 255.255.255.0

no ip route-cache

no ip mroute-cache

!

interface Serial0

ip address 192.168.3.2 255.255.255.0

encapsulation ppp

no ip route-cache

no ip mroute-cache

clockrate 64000

!

interface Serial1

ip address 192.168.1.2 255.255.255.252

encapsulation frame-relay

no ip route-cache

no ip mroute-cache

clockrate 64000

frame-relay map ip 192.168.1.1 102 broadcast

no frame-relay inverse-arp

frame-relay intf-type dce

!

router bgp 1

bgp log-neighbor-changes

network 192.168.10.0

network 192.168.11.0

network 192.168.12.0

network 192.168.13.0

network 192.168.14.0

network 192.168.15.0

network 192.168.16.0

network 192.168.17.0

neighbor 192.168.1.1 remote-as 2

neighbor 192.168.1.1 advertise-map ADVERTISE-AS3 non-exist-map NON-EXIST-AS3

neighbor 192.168.3.1 remote-as 3

neighbor 192.168.3.1 advertise-map ADVERTISE-AS2 non-exist-map NON-EXIST-AS2

!

ip classless

no ip http server

!

access-list 1 permit 192.168.10.0

access-list 1 permit 192.168.11.0

access-list 1 permit 192.168.12.0

access-list 1 permit 192.168.13.0

access-list 2 permit 192.168.14.0

access-list 2 permit 192.168.15.0

access-list 2 permit 192.168.16.0

access-list 2 permit 192.168.17.0

access-list 3 permit 2.2.2.2

access-list 4 permit 3.3.3.3

route-map NON-EXIST-AS2 permit 10

match ip address 3

!

route-map NON-EXIST-AS3 permit 10

match ip address 4

!

route-map ADVERTISE-AS2 permit 10

match ip address 1

!

route-map ADVERTISE-AS3 permit 10

match ip address 2

!

!

!

line con 0

line aux 0

transport input all

line vty 0 4

login

!

You can test this by shutting down or disconnecting either one of the routers that peer with R1. The routes from the one will be installed on the other.

Sort of a long post, let me know if this is not entirely clear...

Regards,

Georg