cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
567
Views
0
Helpful
3
Replies

Two Default routes

anitachoi3
Level 1
Level 1

Hi Expert,

Attached please find the existing network block diagram and relevant config for your reference.

HK: router to ISP - A

router ospf 192

network 192.168.0.0 0.0.255.255 area 0

network 192.168.10.0 0.0.255.255 area 0

network 192.168.20.0 0.0.255.255 area 0

redistribute bgp 192 metric-type 1 subnets route-map FROM-ISP

!

router bgp 192

neighbor 172.16.10.1 remote-as 172

neighbor 172.16.10.1 distribute-list 1 out

!

access-list 1 permit 192.168.0.0 0.0.255.255

access-list 1 permit 192.168.10.0 0.255.255.255

access-list 1 permit 192.168.20.0 0.255.255.255

!

ip access-list standard DEF-ROUTE

permit 0.0.0.0

!

route-map FROM-ISP permit 10

match ip address DEF-ROUTE

set metric 1000

!

TWK: router to ISP - A

router ospf 192

network 192.168.0.0 0.0.255.255 area 0

network 192.168.110.0 0.0.255.255 area 0

network 192.168.120.0 0.0.255.255 area 0

redistribute bgp 192 metric-type 1 subnets route-map FROM-ISP

!

router bgp 192

neighbor 172.16.110.1 remote-as 172

neighbor 172.16.110.1 distribute-list 1 out

!

access-list 1 permit 192.168.0.0 0.0.255.255

access-list 1 permit 192.168.110.0 0.255.255.255

access-list 1 permit 192.168.120.0 0.255.255.255

!

ip access-list standard DEF-ROUTE

permit 0.0.0.0

!

route-map FROM-ISP permit 10

match ip address DEF-ROUTE

set metric 1000

!

Question:

1. I would like to control the traffic in/out. If traffic is out from HK, the return traffic is expected to come into HK links.  If traffic is out from TW, the return traffic is expected to come into TW links. It means that where is out, where is in.

In the OSPF, there is on backbond area and there are two default routes (one from HK, other from TW). how can I achieve it?

2. There is no inter-connection between two BGP routers which one is in HK, other is in TW. Any technical issue will be arisen in the future?

Rdgs

1 Accepted Solution

Accepted Solutions

Hello Anita,

the default-information originate command supports a route-map option

the route-map can be used to check the presence of the BGP 0.0.0.0/0 coming from the expected BGP next-hop

router ospf 192

default-information originate metric-type 1 route-map check-bgp

!

ip prefix-list only-default permit 0.0.0.0/0

access-list 25 0.0.0.0

access-list 11 host a.b.c.d

route-map check-bgp permit 20

match ip address 25

match ip next-hop 11

set metric 10

where a.b.c.d is the expected BGP next-hop

I have used this approach some years ago and it was successful by using O E1 routes each internet router becomes the exit point for all those networks that see a best path through it.

>> Furthermore, there is one 20M ME inter-connect to two sites where are running on OSPF with single area design only

this is fine.

Hope to help

Giuseppe

View solution in original post

3 Replies 3

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Anita,

first note:

to generate a default in OSPF you need to use default-information originate you can use a route-map that checks the BGP 0.0.0.0/0 route but you cannot redistribute it into OSPF as a normal prefix

you are right to use O E1 type route.

it is not clear to me if HK and TW have a connection or are separate networks

hope to help

Giuseppe

Dear Giuseppe,

The configuration would be amended as below

!

router ospf 192

...

...

default-information originate metric-type

!

Regarding your message, "you cannot redistribute it into OSPF as a normal prefix". how to inform OSPF (routing protocol) that the "default route" is in BGP?

In addition, "O E1 type route" approach is copied from preceding router. I do not have any idea about it. Grateful if you would enlighten me about the advantage of using "O E1 type route".

Furthermore, there is one 20M ME inter-connect to two sites where are running on OSPF with single area design only.

Thanks

rdgs

Hello Anita,

the default-information originate command supports a route-map option

the route-map can be used to check the presence of the BGP 0.0.0.0/0 coming from the expected BGP next-hop

router ospf 192

default-information originate metric-type 1 route-map check-bgp

!

ip prefix-list only-default permit 0.0.0.0/0

access-list 25 0.0.0.0

access-list 11 host a.b.c.d

route-map check-bgp permit 20

match ip address 25

match ip next-hop 11

set metric 10

where a.b.c.d is the expected BGP next-hop

I have used this approach some years ago and it was successful by using O E1 routes each internet router becomes the exit point for all those networks that see a best path through it.

>> Furthermore, there is one 20M ME inter-connect to two sites where are running on OSPF with single area design only

this is fine.

Hope to help

Giuseppe

Review Cisco Networking for a $25 gift card