Exterior Gateway Protocols

reekydizzyNetworking and Communications

Oct 28, 2013 (3 years and 7 months ago)

76 views

Interfacing Interior and
Exterior Gateway Protocols

2

Two classes of routing protocols


Exterior Gateway Protocol (e.g., BGP)


Used to exchange routes between different domains (autonomous
systems)



Interior Gateway Protocol (e.g., IS
-
IS, OSPF, RIP, IGRP)


Used to establish routing tables within a domain


Redistribution of OSPF routes into BGP

3

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800943c5.shtml

hostname RTB

!

interface Ethernet0/0 ip address 2.2.2.3 255.255.255.0

!

interface Serial1/0 ip address 3.3.3.1 255.0.0.0

!

router ospf 1 network 2.0.0.0 0.255.255.255 area 1

!

router bgp 100

redistribute ospf 1 match internal external 1 external 2

neighbor 3.3.3.2 remote
-
as 200

!

End

Redistribution of OSPF routes into BGP

4

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800943c5.shtml

RTB#
show
ip

route

2.0.0.0/24
is
subnetted
, 1
subnets

C
2.2.2.0 is directly connected,
Ethernet0/0

C
3.0.0.0/8 is directly connected,
Serial1/0

O E2
200.1.1.0/24 [110/20] via 2.2.2.2, 00:16:17,
Ethernet0/0

O
E1 200.2.2.0/24 [110/104] via 2.2.2.2, 00:00:41, Ethernet0/0

131.108.0.0/24
is
subnetted
, 2
subnets

O
131.108.2.0 [110/74] via 2.2.2.2, 00:16:17,
Ethernet0/0

O
IA 131.108.1.0 [110/84] via 2.2.2.2, 00:16:17, Ethernet0/0

Codes:

C


connected

O


OSPF

E1


OSPF external type 1

E2


OSPF external type 2

IA


Inter
-
area

Redistribution of OSPF routes into BGP

5

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800943c5.shtml

RTB#
show ip bgp

BGP table version is 30, local router ID is 192.168.1.7

Network



Next Hop

Metric


LocPrf

Weight

Path

*> 2.2.2.0/24


0.0.0.0


0


32768

?

*> 131.108.1.0/24


2.2.2.2


84


32768

?

*> 131.108.2.0/24


2.2.2.2


74


32768

?

*> 200.1.1.0


2.2.2.2


20


32768

?

*> 200.2.2.0


2.2.2.2


104


32768

?

Key:


*
-

valid


>
-

best route

Redistribution of OSPF routes into BGP

6

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800943c5.shtml

RTC#
sh

ip

route

2.0.0.0/24 is
subnetted
, 1 subnets

B 2.2.2.0 [20/0] via 3.3.3.1, 00:01:24

C 3.0.0.0/8 is directly connected, Serial0/0

B 200.1.1.0/24 [20/20] via 3.3.3.1, 00:01:24

B 200.2.2.0/24 [20/104] via 3.3.3.1, 00:01:24 131.108.0.0/24 is
subnetted
, 2 subnets

B 131.108.2.0 [20/74] via 3.3.3.1, 00:01:24

B 131.108.1.0 [20/84] via 3.3.3.1, 00:01:24

Redistribution of BGP routes into OSPF

Router R1



interface Loopback0

ip address 1.1.1.1 255.255.255.255

!

interface Loopback1

ip address 172.16.1.1 255.255.0.0

!

interface Serial1/0

ip address 192.12.12.1 255.255.255.0

serial restart
-
delay 0

!

router bgp 100

no synchronization

bgp router
-
id 1.1.1.1

bgp log
-
neighbor
-
changes

network 1.1.1.1 mask
255.255.255.255

network 172.16.0.0

neighbor 192.12.12.2 remote
-
as 100

no auto
-
summary



Router R2

interface Loopback0



ip address 2.2.2.2 255.255.255.255



!

interface Serial1/0



ip address 192.12.12.2 255.255.255.0



serial restart
-
delay 0



!

interface FastEthernet2/0



ip address 192.23.23.2 255.255.255.0



duplex auto



speed auto



!

router ospf 1



router
-
id 2.2.2.2



log
-
adjacency
-
changes



redistribute bgp 100 metric 100 metric
-
type
1 subnets route
-
map BGP
-
To_OSPF



network 192.23.23.2 0.0.0.0 area 0

!

router bgp 100



no synchronization



bgp router
-
id 2.2.2.2



bgp log
-
neighbor
-
changes


bgp redistribute
-
internal



neighbor 192.12.12.1 remote
-
as 100



no auto
-
summary

!

ip prefix
-
list B2O seq 5 permit 172.16.0.0/16

!

route
-
map BGP
-
To_OSPF permit 10



match ip address prefix
-
list B2O

Router R3

interface FastEthernet1/0



ip address 192.23.23.3
255.255.255.0



duplex auto



speed auto



!

router ospf 1



log
-
adjacency
-
changes

network 192.23.23.3 0.0.0.0 area 0



https://supportforums.cisco.com/docs/DOC
-
18319

(iBGP)

Redistribution of BGP routes into OSPF





https://supportforums.cisco.com/docs/DOC
-
18319


R1#sh ip bgp sum


BGP router identifier 1.1.1.1, local AS number 100


BGP table version is 3, main routing table version 3


2 network entries using 240 bytes of memory


2 path entries using 104 bytes of memory


1/1 BGP path/bestpath attribute entries using 124 bytes of memory


0 BGP route
-
map cache entries using 0 bytes of memory


0 BGP filter
-
list cache entries using 0 bytes of memory


BGP using 468 total bytes of memory


BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs





Neighbor


V


AS MsgRcvd MsgSent


TblVer


InQ OutQ
Up/Down


State/PfxRcd


192.12.12.2


4


100


117


119


3


0


0 01:43:47


0


Redistribution of BGP routes into OSPF





https://supportforums.cisco.com/docs/DOC
-
18319

R3#sh ip route

Codes: L
-

local, C
-

connected, S
-

static, R
-

RIP, M
-

mobile, B
-

BGP



D
-

EIGRP, EX
-

EIGRP external, O
-

OSPF, IA
-

OSPF inter area



N1
-

OSPF NSSA external type 1, N2
-

OSPF NSSA external type 2



E1
-

OSPF external type 1, E2
-

OSPF external type 2



i
-

IS
-
IS, su
-

IS
-
IS summary, L1
-

IS
-
IS level
-
1, L2
-

IS
-
IS level
-
2



ia
-

IS
-
IS inter area, *
-

candidate default, U
-

per
-
user static route



o
-

ODR, P
-

periodic downloaded static route, +
-

replicated route



Gateway of last resort is not set



O E1


172.16.0.0/16 [110/101] via 192.23.23.2, 00:57:55, FastEthernet1/0



192.23.23.0/24 is variably subnetted, 2 subnets, 2 masks

C


192.23.23.0/24 is directly connected, FastEthernet1/0

L


192.23.23.3/32 is directly connected, FastEthernet1/0