0% found this document useful (0 votes)
130 views

BGP-4 Case Studies: Nenad Krajnovic

The document discusses several BGP case studies including: 1. Load balancing traffic over multiple links between two autonomous systems (AS). The configuration shows how to advertise routes and load balance traffic across three links. 2. Multihoming a single AS to a provider for redundancy. The configuration shows how to define one link as primary and one as backup by setting metrics and blocking inbound routes on the backup link. 3. Multihoming an AS to different providers for failover. Route policies are used to prefer one provider as primary while allowing failover to a secondary provider.

Uploaded by

Bojan Maljkovic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
130 views

BGP-4 Case Studies: Nenad Krajnovic

The document discusses several BGP case studies including: 1. Load balancing traffic over multiple links between two autonomous systems (AS). The configuration shows how to advertise routes and load balance traffic across three links. 2. Multihoming a single AS to a provider for redundancy. The configuration shows how to define one link as primary and one as backup by setting metrics and blocking inbound routes on the backup link. 3. Multihoming an AS to different providers for failover. Route policies are used to prefer one provider as primary while allowing failover to a secondary provider.

Uploaded by

Bojan Maljkovic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

BGP-4

Case Studies

Nenad Krajnovic
e-mail: [email protected]
Today topics

Ñ load balancing over multiple links


Ñ multihoming to a single provider
Ñ multihoming to different providers
Ñfollowing defaults inside an AS
Ñ policy routing
Ñ lab examples

2
Load balancing over multiple links

Increasing traffic toward Internet is requesting more


and more bandwidth. Increasing of bandwidth can be
made by aggregating two or more links and load
balancing over them.

3
load balancing over multiple links

Loopback Interface 0
172.16.50.1
Loopback Interface 0
1.1.1.1 172.16.1.1
1.1.1.2
192.168.4.0/24
1.1.2.1 1.1.2.2 172.16.4.0/24
1.1.3.1 1.1.3.2

AS 65100 AS 65300

We like to load balance over all tree links between


AS 65100 and AS 65300

4
load balancing over multiple links

Loopback Interface 0 interface ethernet 0


172.16.50.1 Loopback Interface 0
172.16.1.1
ip address 192.168.4.1 255.255.255.0
1.1.1.1
!
1.1.1.2
192.168.4.0/24 1.1.2.1
1.1.2.2
interface serial 0
172.16.4.0/24
1.1.3.1
1.1.3.2
ip address 1.1.1.1 255.255.255.0
AS 65100 !
AS 65300
interface serial 1
ip address 1.1.2.1 255.255.255.0
!
interface serial 2
ip address 1.1.3.1 255.255.255.0
!
Interface loopback 0
ip address 172.16.50.1 255.255.255.0
!
router bgp 65100
network 192.168.4.0 mask 255.255.255.0
neighbor 172.16.1.1 remote-as 65300
neighbor 172.16.1.1 ebgp-multihop
neighbor 172.16.1.1 update-source loopback 0
no auto-summary
!
ip route 172.16.1.1 255.255.255.255 1.1.1.2 3
ip route 172.16.1.1 255.255.255.255 1.1.2.2 3
ip route 172.16.1.1 255.255.255.255 1.1.3.2 3 5
load balancing over multiple links
Loopback Interface 0
172.16.50.1 Loopback Interface 0
interface ethernet 0 172.16.1.1
ip address 172.16.4.1 255.255.255.0 1.1.1.1
1.1.1.2
! 192.168.4.0/24 1.1.2.1
1.1.2.2 172.16.4.0/24
interface serial 0 1.1.3.1
1.1.3.2
ip address 1.1.1.2 255.255.255.0 AS 65100 AS 65300
!
interface serial 1
ip address 1.1.2.2 255.255.255.0
!
interface serial 2
ip address 1.1.3.2 255.255.255.0
!
Interface loopback 0
ip address 172.16.1.1 255.255.255.0
!
router bgp 65100
network 172.16.4.0 mask 255.255.255.0
neighbor 172.16.50.1 remote-as 65300
neighbor 172.16.50.1 ebgp-multihop
neighbor 172.16.50.1 update-source loopback 0
no auto-summary
!
ip route 172.16.50.1 255.255.255.255 1.1.1.1 3
ip route 172.16.50.1 255.255.255.255 1.1.2.1 3
6
ip route 172.16.50.1 255.255.255.255 1.1.3.1 3
Multihoming to a single provider

In situation where links to the provider isn’t reliable


enough, it is necessary to have more links to the
provider. Beside that, this solution offer better
stability and reliability of the network.

7
multihomed to a single provider - default only, one primary and one backup link

AS 10
192.168.4.0/24 E0
192.168.1.1 E0 IBGP
192.168.1.4 E0
1.1.2.1 S0 1.1.1.1 S0
X2
X1
ÑAS30 is not learning any BGP routes from
1.1.2.2 S1 AS10 and is sending its own routes via BGP.
1.1.1.2 S0 ÑOutbound traffic from AS30 should always
go on the X1 link unless that link fails, in
which case it should switch to the other link.
172.18.23.0/24 E0
ÑInbound traffic toward AS30 should always
come on the X1 link unless that link fails, in
AS 30 which case is should switch to the other link.
ÑPrevent any BGP updates from coming into
AS3.

8
multihomed to a single provider - default only, one primary and one backup link
AS 10
192.168.4.0/24 E0
192.168.1.1 E0 IBGP
192.168.1.4 E0
1.1.2.1 S0 1.1.1.1 S0
X2 router bgp 30
X1
network 172.18.23.0 mask 255.255.255.0
neighbor 1.1.2.1 remote-as 10
1.1.2.2 S1
1.1.1.2 S0 neighbor 1.1.2.1 route-map BLOCK in
neighbor 1.1.2.1 route-map SETMETRIC1 out
neighbor 1.1.1.1 remote-as 10
172.18.23.0/24 E0
neighbor 1.1.1.1 route-map BLOCK in
neighbor 1.1.1.1 route-map SETMETRIC2 out
AS 30 no auto-summary
!
ip route 0.0.0.0 0.0.0.0 1.1.1.1 40
ip route 0.0.0.0 0.0.0.0 1.1.2.1 60
!
route-map SETMETRIC1 permit 10
set metric 100
!
route-map SETMETRIC2 permit 10
set metric 50
!
route-map BLOCK deny 10
9
multihomed to a single provider - default only, one primary and one backup link
AS 10
192.168.4.0/24 E0
192.168.1.1 E0 IBGP
192.168.1.4 E0
1.1.2.1 S0 1.1.1.1 S0
X2
X1
router# show ip bgp
1.1.2.2 S1
BGP table version 11, local router ID is 192.168.1.4
1.1.1.2 S0 Status codes: s suppressed, d damped, h history, * valid, > best,
i - internal Origin codes: i - IGP, e - EGP, ? - incomplete
172.18.23.0/24 E0
Network Next Hop Metric LocPrf Weight
Path
AS 30
*>i 172.18.23.0/24 192.168.1.4 50 100 0 3i
* 1.1.2.1 100 0 3i
*> 192.168.4.0/24 0.0.0.0 0 32768 i
router# show ip route

Gateway of last resort is 1.1.1.1 to network 0.0.0.0

1.0.0.0 255.0.0.0 is subnetted, 2 subnets


C 1.1.1.0 is directly connected, Serial 0
C 1.1.2.0 is directly connected, Serial 1
C 172.18.23.0 is directly connected, Ethernet0
S* 0.0.0.0 0.0.0.0 [40/0] via 1.1.1.1
10
multihomed to a single provider - default, primary and backup plus partial routing

192.68.40.1 193.78.0.0/16

AS 6 NAP
192.68.11.2
AS 7
AS 1
192.68.11.1 192.68.10.1
192.68.6.2 IBGP
192.68.6.1
172.16.20.1 192.68.5.2

X2 X1
172.16.20.2 S0 192.68.5.1
172.16.1.1 E1 IBGP
172.16.1.2 E1
172.16.220.1 E0
172.16.10.1
172.16.2.254 L0
172.16.65.1
AS 3
11
192.68.40.1 193.78.0.0/16

multihomed to a single provider AS 6 NAP


- default, primary and backup 192.68.11.2
AS 7
AS 1
plus partial routing 192.68.11.1 192.68.10.1
192.68.6.2 IBGP
192.68.6.1
172.16.20.1 192.68.5.2

X2
X1
172.16.20.2 S0 192.68.5.1
172.16.1.1 E1 IBGP
172.16.1.2 E1
172.16.220.1 E0
172.16.10.1
172.16.2.254 L0
172.16.65.1
AS 3
Routing policies
AS3 will only accept AS1’s local routes and its customers’ routes
such as AS6. AS3 will also accept one route from the Internet to set
its default toward the provider AS1.
For all outbound traffic toward AS1 and AS6 (the partial routes),
AS3 should use the X2 link. In case of failure, the other link is used.
!For all other outbound traffic toward the Internet, AS3 should use
the X1 link as the primary link by following a default route. In case
of failure, the default via other link should be used.
"For inbound traffic, AS3 will instruct AS1 to use the X2 link for
172.16.220.0/24.
#For all other inbound traffic, the X1 link is the primary. 12
multihomed to a single provider - default, primary and backup plus partial routing
router bgp 3
192.68.40.1 193.78.0.0/16 no sunchronization
network 172.16.1.0 mask 255.255.255.0
AS 6
192.68.11.2
NAP network 172.16.10.0 mask 255.255.255.0
AS 7 network 172.16.65.0 mask 255.255.255.192
AS 1
192.68.11.1 192.68.10.1 network 172.16.220.0 mask 255.255.255.0
192.68.6.2 IBGP neighbor 172.16.1.2 remote-as 3
192.68.6.1
192.68.5.2
neighbor 172.16.1.2 update-source loopback0
172.16.20.1
neighbor 172.16.1.2 next-hop-self
X2 neighbor 172.16.20.1 remote-as 1
X1
172.16.20.2 S0 192.68.5.1
neighbor 172.16.20.1 route-map SET_OUTBOUND_TRAFFIC in
172.16.1.1 E1 IBGP neighbor 172.16.20.1 route-map SET_INBOUND_TRAFFIC out
172.16.1.2 E1
172.16.220.1 E0 neighbor 172.16.20.1 filter-list 10 out
172.16.10.1
172.16.2.254 L0
172.16.65.1
no auto-summary
AS 3 !
ip route 0.0.0.0 0.0.0.0 193.78.0.0
ip as-path access-list 10 permit ^$
ip as-path access-list 4 permit ^1 6$
ip as-path access-list 4 permit ^1$
access-list 2 permit 172.16.220.0 0.0.0.255
access-list 101 permit ip 193.78.0.0 0.0.255.255 255.255.0.0 0.0.0.0
!
route-map SET_OUTBOUND_TRAFFIC permit 10
match ip address 101
set local-preference 200
route-map SET_OUTBOUND_TRAFFIC permit 20
match as-path 4
set local-preference 300
!
route-map SET_INBOUND_TRAFFIC permit 10
match ip address 2
set local-preference 200
route-map SET_INBOUND_TRAFFIC permit 20
set metric 300
13
multihomed to a single provider - default, primary and backup plus partial routing
192.68.40.1 193.78.0.0/16 router bgp 3
no sunchronization
AS 6 NAP network 172.16.1.0 mask 255.255.255.0
192.68.11.2
AS 7 network 172.16.10.0 mask 255.255.255.0
AS 1 network 172.16.65.0 mask 255.255.255.192
192.68.11.1 192.68.10.1
192.68.6.2 IBGP network 172.16.220.0 mask 255.255.255.0
192.68.6.1 neighbor 172.16.2.254 remote-as 3
172.16.20.1 192.68.5.2
neighbor 172.16.2.254 next-hop-self
X2 neighbor 192.68.5.2 remote-as 1
X1
neighbor 192.68.5.2 route-map SET_OUTBOUND_TRAFFIC in
172.16.20.2 S0 192.68.5.1
172.16.1.1 E1 IBGP neighbor 192.68.5.2 route-map SET_INBOUND_TRAFFIC out
172.16.220.1 E0
172.16.1.2 E1 neighbor 192.68.5.2 filter-list 10 out
172.16.10.1 no auto-summary
172.16.2.254 L0
172.16.65.1
AS 3 !
ip route 0.0.0.0 0.0.0.0 193.78.0.0
!
ip as-path access-list 10 permit ^$
ip as-path access-list 4 permit ^1 6$
! ip as-path access-list ^1 ?[0-9]*$
ip as_path access-list 4 permit ^1$
!
access-list 101 permit ip 193.78.0.0 0.0.255.255 255.255.0.0 0.0.0.0
!
route-map SET_OUTBOUND_TRAFFIC permit 10
match ip address 101
set local-preference 250
!
route-map SET_OUTBOUND_TRAFFIC permit 20
match as-path 4
set local-preference 250
!
route-map SET_INBOUND_TRAFFIC permit 10
set metric 250
14
multihomed to a single provider - automatic load balancing

192.68.40.1 AS1 will load balancing traffic over two


links between AS1 and AS3.
AS 6
192.68.11.2

AS 1
192.68.11.1
192.68.6.2 IBGP
192.68.6.1
172.16.20.1 172.16.60.1

X2 X1
172.16.20.2 S0
172.16.60.2 IBGP
RTA 172.16.1.1 E1
172.16.1.2

172.16.10.1
172.16.2.254 L0
AS 3
15
multihomed to a single provider - automatic load balancing
192.68.40.1
router bgp 3
no sunchronization AS 6
192.68.11.2
neighbor 172.16.1.2 remote-as 3
neighbor 172.16.1.2 update-source AS 1
192.68.11.1
loopback0 192.68.6.2 IBGP
neighbor 172.16.20.1 remote-as 1 192.68.6.1
172.16.20.1
neighbor 172.16.20.1 filter-list 10 out 172.16.60.1

neighbor 172.16.60.1 remote-as 1 X2 X1


neighbor 172.16.60.1 filter-list 10 out
172.16.20.2 S0
172.16.60.2 IBGP
maximum-paths 2
172.16.1.2
no auto-summary 172.16.1.1 E1
172.16.10.1
! 172.16.2.254 L0

ip as-path access-list 10 permit ^$ AS 3

router# show ip bgp


BGP table version 11, local router ID is 172.168.60.2
Status codes: s suppressed, d damped, h history, * valid, > best,
i - internal Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight


Path
*>i 172.16.10.0/24 172.16.1.2 0 100 0 i
*> 192.68.11.0 172.16.20.1 0 0 1i
* 172.16.60.1 0 1i
*> 192.68.40.0 172.16.20.1 0 16i 16
*> 172 16 60 1 0 16
Multihomed to different provider

Multihoming to different provider is offering better


stability and reliability of network. Because of that, it
can be often found network which is multihomed.

17
multihomed to different provider

193.78.0.0/16
192.68.40.1
Route
192.68.10.2 Server
AS 6 AS 7 NAP
192.68.10.4

192.68.11.1 192.68.10.1

AS 1 192.68.10.3
192.68.6.1 AS 2
172.16.20.1 192.68.5.2

X2 X1
172.16.20.2 S0 192.68.5.1
172.16.1.1 E1 IBGP
172.16.1.2 E1
172.16.220.1 E0
172.16.10.1
172.16.2.254 L0
255.255.255.255 172.16.65.1
AS 3
18
193.78.0.0/16
multihomed to different provider 192.68.40.1
Route
192.68.10.2 Server
AS 6 AS 7 NAP
192.68.10.4

192.68.11.1 192.68.10.1

AS 1 192.68.10.3
192.68.6.1 AS 2
172.16.20.1 192.68.5.2

X2 X1
172.16.20.2 S0 192.68.5.1
172.16.1.1 E1 IBGP
172.16.1.2 E1
172.16.220.1 E0
172.16.10.1
172.16.2.254 L0
255.255.255.255 172.16.65.1
AS 3
Routing policies
AS3 will be accepting AS1’s local and customer routes only via
the X2 link. All other Internet routes will be accepted via the X1 link
(primary).
AS3 will accept a default route from AS1 just in case there is a
failure in the X1 link.
!AS3 prefers that the network 172.16.220.0/24 be reachable by the
outside world via the X2 link, and networks 172.16.10.0/24 and
172.16.65.0/26 be reachable via the X1 link.
"AS3 cannot be a transit network for A1 and AS2, which means
that under no circumstances will AS1 use AS3 to reach AS2. 19
multihomed to different provider
193.78.0.0/16
router bgp 3 192.68.40.1
Route
192.68.10.2 Server
no sunchronization AS 6
network 172.16.1.0 mask 255.255.255.0 AS 7 NAP
192.68.10.4
network 172.16.10.0 mask 255.255.255.0
network 172.16.65.0 mask 255.255.255.192
192.68.11.1 192.68.10.1
network 172.16.220.0 mask 255.255.255.0
neighbor 172.16.1.2 remote-as 3 192.68.10.3 AS 2
neighbor 172.16.1.2 update-source Loopback0
AS 1 192.68.6.1
172.16.20.1 192.68.5.2
neighbor 172.16.1.2 next-hop-self
neighbor 172.16.20.1 remote-as 1 X1
neighbor 172.16.20.1 route-map ACCEPT_ALL in X2
neighbor 172.16.20.1 route-map PREPEND_PATH out 172.16.20.2 S0 192.68.5.1
172.16.1.1 E1 IBGP
no auto-summary
172.16.1.2 E1
! 172.16.220.1 E0
172.16.10.1
ip as-path access-list 1 permit ^1 ?[0-9]*$ 172.16.2.254 L0
172.16.65.1
255.255.255.255 AS 3
ip as-path access-list 2 permit ^$
!
access-list 1 permit 172.16.65.0 0.0.0.63
access-list 1 permit 172.16.10.0 0.0.0.255
access-list 10 permit 0.0.0.0
!
route-map PREPEND_PATH permit 10
match ip address 1
set as-path prepend 3 3 3
!
route-map PREPEND_PATH permit 20
match as-path 2
!
route-map ACCEPT_LOCAL permit 10
match ip address 10
set local-preference 50
!
route-map ACCEPT_LOCAL permit 20
match as-path 1 20
multihomed to different provider
193.78.0.0/16
192.68.40.1
Route router bgp 3
192.68.10.2 Server no sunchronization
AS 6 network 172.16.1.0 mask 255.255.255.0
AS 7 NAP
192.68.10.4
network 172.16.10.0 mask 255.255.255.0
network 172.16.65.0 mask 255.255.255.192
192.68.11.1 192.68.10.1
network 172.16.220.0 mask 255.255.255.0
AS 1 192.68.10.3
192.68.6.1 AS 2 neighbor 172.16.2.254 remote-as 3
172.16.20.1 192.68.5.2 neighbor 172.16.2.254 next-hop-self
neighbor 192.68.5.2 remote-as 1
X2 X1
neighbor 192.68.5.2 route-map PREPEND_PATH out
172.16.20.2 S0 192.68.5.1
172.16.1.1 E1 IBGP no auto-summary
172.16.220.1 E0
172.16.1.2 E1 !
172.16.2.254 L0
172.16.10.1 ip as-path access-list 2 permit ^$
172.16.65.1
255.255.255.255 AS 3 !
access-list 1 permit 172.16.220.0 0.0.0.255
!
route-map PREPEND_PATH permit 10
match ip address 1
set as-path prepend 3 3 3
!
route-map PREPEND_PATH permit 20
match as-path 2

21
multihomed to different provider - customers of the same provider with a backup link

192.68.40.1

AS 6 AS 7 NAP
172.16.10.4

172.16.10.1
172.16.1.1
IBGP
172.16.1.2
172.16.220.1 192.68.5.1
172.16.2.254 L0
172.16.20.2 255.255.255.255 172.16.65.1
AS 3
X2 X1

172.16.20.1 192.68.5.2
AS 1 192.68.6.1
AS 2
192.68.6.2

192.68.11.1 192.68.6.1
22
multihomed to different provider - customers of the same provider with a backup link
192.68.40.1

AS 6 AS 7 NAP
172.16.10.4

172.16.10.1
172.16.1.1
IBGP
172.16.1.2
172.16.220.1 192.68.5.1
172.16.2.254 L0
172.16.20.2 255.255.255.255 172.16.65.1
AS 3
X2
X1

172.16.20.1 192.68.5.2
AS 1 192.68.6.1
AS 2
192.68.6.2

192.68.11.1 192.68.6.1

Routing policies
In normal condition, AS1 and AS2 will use the private link only
for traffic between AS1 and AS2; for all other Internet traffic, the
direct link to the provider AS3 is used.
AS1 and AS2 agree to use each other as backup in case their links
to AS3 fail. 23
multihomed to different provider - customers of the same provider with a backup link

192.68.40.1

AS 6 AS 7 NAP
172.16.10.4
router bgp 1
network 192.168.11.0 mask 255.255.255.0 172.16.10.1
IBGP
neighbor 172.16.20.2 remote-as 3 172.16.1.1
172.16.1.2
neighbor 172.16.20.2 route-map PREF_FROM_AS3 in 172.16.220.1
172.16.2.254 L0
192.68.5.1

neighbor 192.68.6.1 remote-as 1 172.16.20.2 255.255.255.255 172.16.65.1


neighbor 192.68.6.1 route-map PREF_FROM_AS2 in AS 3
X2
no auto-summary X1
!
172.16.20.1 192.68.5.2
ip as-path access-list 1 permit _2_ AS 1 192.68.6.1
AS 2
! 192.68.6.2
route-map PREF_FROM_AS3 permit 10 192.68.11.1 192.68.6.1
match ip address 1
set local-preference 100
!
route-map PREF_FROM_AS3 permit 20
match local-preference 300
!
route-map PREF_FROM_AS2 permit 10
set local-preference 200

24
multihomed to different provider - customers of the same provider with a backup link
192.68.40.1

AS 6
AS 7 NAP
172.16.10.4

172.16.10.1
172.16.1.1
IBGP
172.16.1.2
172.16.220.1 192.68.5.1
172.16.2.254 L0
172.16.20.2 255.255.255.255 172.16.65.1
AS 3
X2
X1

172.16.20.1 192.68.5.2
AS 1 192.68.6.1
router# show ip bgp 192.68.6.2
AS 2

BGP table version 11, local router ID is 192.68.11.1 192.68.11.1 192.68.6.1

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


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

Network Next Hop Metric LocPrf Weight Path


*>i 172.16.1.0/24 172.16.20.2 0 300 0 3i
* 192.68.6.1 200 0 23i
*> 172.16.10.0/24 172.16.20.2 20 300 0 3i
* 192.68.6.1 200 0 23i
*> 172.16.65.0/26 172.16.20.2 20 300 0 3i
* 192.68.6.1 200 0 23i
*> 172.16.220.0/24 172.16.20.2 0 300 0 3i
* 192.68.6.1 200 0 23i
* 192.68.10.0 172.16.20.2 0 100 0 32i
*> 192.68.6.1 200 0 2i
*> 192.68.11.0 0.0.0.0 0 32768 i
*> 192.68.40.0 172.16.20.2 300 0 36i
25
*> 192.68.6.1 200 0 236
multihomed to different provider - customers of different providers with a backup link

172.16.2.254 L0 172.16.65.1
255.255.255.255 172.16.10.1
172.16.1.1
AS 4 172.16.1.2
172.16.220.1 AS 3
192.68.5.1
172.16.20.2

X2 X1

172.16.20.1 192.68.5.2
AS 1 192.68.6.1
AS 2
192.68.6.2

192.68.11.1 192.68.10.1

26
multihomed to different provider - customers of different providers with a backup link

172.16.2.254 L0 172.16.65.1
255.255.255.255 172.16.10.1
172.16.1.1
AS 4 172.16.1.2
172.16.220.1 AS 3
192.68.5.1
172.16.20.2

X2 X1

172.16.20.1 192.68.5.2
AS 1 192.68.6.1
AS 2
192.68.6.2

192.68.11.1 192.68.10.1

Routing policies
In normal condition, AS1 and AS2 will use the private link only
for traffic between AS1 and AS2; for all other Internet traffic, both
customers would like to go out via their direct providers, AS1 via
AS4 and AS2 via AS3
In case the private link goes down, the customers should be able to
talk to one another via the providers. If a link to the provider fails,
the other customer should be used to reach the Internet. 27
multihomed to different provider - customers of different providers with a backup link
router bgp 4
network 172.16.220.0 mask 255.255.255.0
neighbor 172.16.1.2 remote-as 3
neighbor 172.16.1.2 route-map CHECK_COMMUNITY in
neighbor 172.16.20.1 remote-as 1
neighbor 172.16.20.1 route-map CHECK_COMMUNITY in
no auto-summary
!
ip community-list 2 permit 4:40
ip community-list 3 permit 4:60
! 172.16.2.254 L0 172.16.65.1
route-map CHECK_COMMUNITY permit 10 255.255.255.255 172.16.10.1
172.16.1.1
match community 2 AS 4 172.16.1.2
set local-preference 40
172.16.220.1 AS 3
192.68.5.1
172.16.20.2
!
route-map CHECK_COMMUNITY permit 20
X2
match community 3 X1
set local-preference 60
! 172.16.20.1 192.68.5.2
route-map CHECK_COMMUNITY permit 30 AS 1 192.68.6.1
AS 2
set local-preference 100 192.68.6.2

192.68.11.1 192.68.10.1

Solution No. 1 - The Community Approach


28
multihomed to different provider - customers of different providers with a backup link

router bgp 1
network 192.68.11.0 mask 255.255.255.0
neighbor 172.16.20.2 remote-as 4
neighbor 172.16.20.2 send-community
neighbor 172.16.20.2 route-map SETCOMMUNITY out
neighbor 172.16.20.2 filter-list 10 out
neighbor 192.68.6.1 remote-as 2
no auto-summary 172.16.2.254 L0 172.16.65.1
255.255.255.255 172.16.10.1
! 172.16.1.1
ip as-path access-list 2 permit _2_ AS 4 172.16.1.2
ip as-path access-list 10 permit ^$
172.16.220.1 AS 3
192.68.5.1
172.16.20.2
ip as-path access-list 10 permit ^2$
! X2
route-map SETCOMMUNITY permit 10 X1
match as-path 2
set community 4:40 172.16.20.1 192.68.5.2
AS 1 192.68.6.1
! AS 2
route-map SETCOMMUNITY permit 20 192.68.6.2

192.68.11.1 192.68.10.1

Solution No. 1 - The Community Approach


29
multihomed to different provider - customers of different providers with a backup link

router bgp 3
network 172.16.10.0 mask 255.255.255.0
network 172.16.65.0 mask 255.255.255.192
neighbor 172.16.1.1 remote-as 4
neighbor 172.16.1.1 send-community
neighbor 172.16.1.1 route-map setcommunity out
neighbor 192.68.5.2 remote-as 2
no auto-summary
!
route-map setcommunity permit 10
set community 4:60

172.16.2.254 L0 172.16.65.1
255.255.255.255 172.16.10.1
172.16.1.1
AS 4 172.16.1.2
172.16.220.1 AS 3
192.68.5.1
172.16.20.2

X2
X1

172.16.20.1 192.68.5.2
AS 1 192.68.6.1
AS 2
192.68.6.2

192.68.11.1 192.68.10.1

Solution No. 1 - The Community Approach 30


multihomed to different provider - customers of different providers with a backup link

router# show ip bgp


BGP table version 11, local router ID is 172.16.2.254
Status codes: s suppressed, d damped, h history, * valid, > best,
i - internal Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path


*> 172.16.10.0/24 172.16.1.2 0 60 0 3i
*> 172.16.65.0/26 172.16.1.2 0 60 0 3i
*> 172.16.220.0/24 0.0.0.0 0 32768 i
*> 192.68.10.0 172.16.1.2 0 60 0 32i
* 172.16.20.1 40 0 12i
*> 192.68.11.0 172.16.20.1 0 100 0 1i

172.16.2.254 L0 172.16.65.1
255.255.255.255 172.16.10.1
172.16.1.1
AS 4 172.16.1.2
172.16.220.1 AS 3
192.68.5.1
172.16.20.2

X2
X1

172.16.20.1 192.68.5.2
AS 1 192.68.6.1
AS 2
192.68.6.2

192.68.11.1 192.68.10.1

Solution No. 1 - The Community Approach 31


multihomed to different provider - customers of different providers with a backup link

router bgp 1
network 192.68.11.0 mask 255.255.255.0
neighbor 172.16.20.2 remote-as 4
neighbor 172.16.20.2 route-map setpath out
neighbor 172.16.20.2 filter-list 10 out
neighbor 192.68.6.1 remote-as 2
no auto-summary
! 172.16.2.254 L0 172.16.65.1
255.255.255.255 172.16.10.1
ip as-path access-list 2 permit _2_ 172.16.1.1
ip as-path access-list 10 permit ^$ AS 4 172.16.1.2
ip as-path access-list 10 permit ^2$
172.16.220.1 AS 3
192.68.5.1
172.16.20.2
!
route-map setpath permit 10 X2
match as-path 2 X1
set as-path prepend 1
! 172.16.20.1 192.68.5.2
AS 1 192.68.6.1
route-map setpath permit 20 AS 2
192.68.6.2

192.68.11.1 192.68.10.1

Solution No. 2 - The AS_Path Approach


32
multihomed to different provider - customers of different providers with a backup link

router# show ip bgp


BGP table version 9, local router ID is 172.16.2.254
Status codes: s suppressed, d damped, h history, * valid, > best,
i - internal Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path


*> 172.16.10.0/24 172.16.1.2 0 0 3i
*> 172.16.65.0/26 172.16.1.2 0 0 3i
*> 172.16.220.0/24 0.0.0.0 0 32768 i
*> 192.68.10.0 172.16.1.2 0 0 32i
* 172.16.20.1 0 112i
*> 192.68.11.0 172.16.20.1 0 100 0 1i

172.16.2.254 L0 172.16.65.1
255.255.255.255 172.16.10.1
172.16.1.1
AS 4 172.16.1.2
172.16.220.1 AS 3
192.68.5.1
172.16.20.2

X2
X1

172.16.20.1 192.68.5.2
AS 1 192.68.6.1
AS 2
192.68.6.2

192.68.11.1 192.68.10.1

Solution No. 2 - The Community Approach 33


Following default inside an AS

Inserting default route in an AS can make a lot of


problem if it wasn’t do on appropriate way.

34
following defaults inside an AS

Border routers HAVE


192.68.10.2
physical connection.
NAP 193.78.0.0/16

AS 7
192.68.11.1 192.68.10.1

AS 1 192.68.10.3 AS 2
172.16.20.1 192.68.5.2

X2 X1
172.16.20.2
172.16.1.1 IBGP AS 3 192.68.5.1

172.16.1.2
172.16.220.1 172.16.50.1
172.16.70.1
IGP RTG IGP
172.16.70.2 172.16.50.2

35
following defaults inside an AS 192.68.10.2

NAP 193.78.0.0/16

AS 7
192.68.11.1 192.68.10.1

AS 1 192.68.10.3 AS 2
172.16.20.1 192.68.5.2

X2 X1
172.16.20.2
172.16.1.1 IBGP AS 3 192.68.5.1

172.16.1.2
172.16.220.1 172.16.50.1
172.16.70.1
IGP RTG IGP
172.16.70.2 172.16.50.2

Routing policies
RTG is an interior router in AS3 that is running an OSPF; RTG is
following the default route 0/0 to reach networks outside AS3
AS3 is multihomed to two different providers.

36
following defaults inside an AS

router ospf 16
passive-interface Serial0
network 172.16.0.0 0.0.255.255 area 0
default-information originate always
!
router bgp 3
192.68.10.2
no synchronization
network 172.16.1.0 mask 255.255.255.0 NAP
network 172.16.70.0 mask 255.255.255.0 193.78.0.0/16
network 172.16.220.0 mask 255.255.255.0
neighbor 172.16.20.1 remote-as 1 AS 7
neighbor 172.16.20.1 filter-list 10 out
192.68.11.1 192.68.10.1
neighbor 172.16.1.2 remote-as 3
no auto-summary
! AS 1 192.68.10.3 AS 2
ip as-path access-list 10 permit ^$ 172.16.20.1 192.68.5.2

X2 X1
172.16.20.2
172.16.1.1 IBGP AS 3 192.68.5.1

172.16.1.2
172.16.220.1 172.16.50.1
172.16.70.1
IGP RTG IGP
172.16.70.2 172.16.50.2

37
following defaults inside an AS

192.68.10.2
router ospf 16
NAP 193.78.0.0/16 passive-interface Serial0
network 172.16.0.0 0.0.255.255 area 0
AS 7 default-information originate always
192.68.11.1 192.68.10.1 !
router bgp 3
AS 1 192.68.10.3 AS 2 no synchronization
172.16.20.1 192.68.5.2 network 172.16.1.0 mask 255.255.255.0
network 172.16.50.0 mask 255.255.255.0
X2 X1 neighbor 172.16.1.1 remote-as 1
neighbor 172.16.1.1 next-hop-self
172.16.20.2
172.16.1.1 IBGP AS 3 192.68.5.1
neighbor 172.16.5.2 remote-as 2
172.16.220.1
172.16.1.2
172.16.50.1 neighbor 172.16.5.2 filter-list 10 out
172.16.70.1 no auto-summary
IGP RTG IGP
172.16.70.2 !
172.16.50.2
ip as-path access-list 10 permit ^$

router ospf 16
network 172.16.0.0 0.0.255.255 area 0

38
following defaults inside an AS

Border routers DON’T


HAVE physical connection. 192.68.10.2

NAP 193.78.0.0/16

AS 7
192.68.11.1 192.68.10.1

AS 1 192.68.10.3 AS 2
172.16.20.1 192.68.5.2

X2 X1
172.16.20.2
IBGP AS 3 192.68.5.1

172.16.220.1 172.16.50.1
172.16.70.1
IGP RTG IGP
172.16.70.2 172.16.50.2

39
following defaults inside an AS
router ospf 16
passive-interface Serial0
network 172.16.0.0 0.0.255.255 area 0
default-information originate route-map send_default
!
router bgp 3
no synchronization
network 172.16.70.0 mask 255.255.255.0
network 172.16.220.0 mask 255.255.255.0 192.68.10.2
neighbor 172.16.20.1 remote-as 1
neighbor 172.16.20.1 filter-list 10 out
NAP 193.78.0.0/16
neighbor 172.16.50.1 remote-as 3
neighbor 172.16.50.1 route-map setlocalpref in AS 7
no auto-summary
! 192.68.11.1 192.68.10.1
ip as-path access-list 10 permit ^$
! AS 1 192.68.10.3 AS 2
access-list 1 permit 0.0.0.0 172.16.20.1 192.68.5.2
access-list 2 permit 172.16.20.1
!
route-map setlocalpref permit 10 X2 X1
set local-preference 300
!
172.16.20.2
IBGP AS 3 192.68.5.1

route-map send_default permit 10


match ip address 1 172.16.220.1 172.16.50.1
172.16.70.1
match ip next-hop 2 IGP
IGP RTG
172.16.70.2 172.16.50.2

40
following defaults inside an AS

192.68.10.2

NAP router ospf 16


193.78.0.0/16
passive-interface Serial0
AS 7 network 172.16.0.0 0.0.255.255 area 0
192.68.11.1 192.68.10.1 default-information originate route-map send_default
!
AS 1 192.68.10.3 AS 2
192.68.5.2
router bgp 3
172.16.20.1
no synchronization
X2 X1 network 172.16.50.0 mask 255.255.255.0
neighbor 172.16.70.1 remote-as 3
172.16.20.2
IBGP AS 3 192.68.5.1
neighbor 172.16.70.1 net-hop-self
172.16.220.1 172.16.50.1 neighbor 192.68.5.2 remote-as 2
172.16.70.1
IGP RTG IGP neighbor 192.68.5.2 filter-list 10 out
172.16.70.2 172.16.50.2 no auto-summary
!
ip as-path access-list 10 permit ^$
!
access-list 1 permit 0.0.0.0
access-list 2 permit 192.68.5.2
!
route-map send_default permit 10
match ip address 1
match ip next-hop 2

router ospf 16
network 172.16.0.0 0.0.255.255 area 0

41
Policy routing

Possibility to route traffic based on source IP


address, instead of destination IP address.

42
policy routing
192.68.11.1 192.68.10.1
192.68.6.2 192.68.6.1
AS 1 AS 2
172.16.20.1
172.16.80.2

X2 X1
172.16.20.2 172.16.80.1 172.16.10.1

172.16.220.1 172.16.50.1
172.16.70.1 172.16.112.1
IGP IGP AS 3
172.16.70.2 172.16.50.2

Routing policies
Traffic from network 172.16.10.0/24 is directed toward AS2, over
X1 link.
Traffic from network 172.16.112.0/24 is directed toward AS1 over
X2 link; in case of a link failure to AS1, the traffic will go to AS2.
!For all other source IP address, follow normal routing.
43
policy routing 192.68.11.1 192.68.10.1
192.68.6.2 192.68.6.1
AS 1 AS 2
172.16.20.1
172.16.80.2

X2 X1
172.16.20.2 172.16.80.1 172.16.10.1

172.16.220.1 172.16.50.1
172.16.70.1 172.16.112.1
IGP IGP AS 3
172.16.70.2 172.16.50.2

interface ethernet0 neighbor 172.16.20.1 remote-as 1


ip address 172.16.80.1 255.255.255.0 neighbor 172.16.20.1 filter-list 10 out
! neighbor 172.16.80.2 remote-as 2
interface serial1 neighbor 172.16.80.2 filter-list 10 out
ip address 172.16.70.1 255.255.255.0 no auto-summary
ip policy route-map CHECK_SOURCE !
! ip as-path access-list 10 permit ^$
router ospf 16 !
passive-interface Serial0 access-list 1 permit 172.16.10.0 255.255.255.0
passive-interface Ethernet0 access-list 2 permit 172.16.112.0 255.255.255.0
network 172.16.0.0 0.0.255.255 area 0 !
default-information originate always route-map CHECK_SOURCE permit 10
! match ip address 1
router bgp 3 set ip next-hop 172.16.80.2
network 172.16.70.0 mask 255.255.255.0 !
network 172.16.50.0 mask 255.255.255.0 route-map CHECK_SOURCE permit 20
network 172.16.10.0 mask 255.255.255.0 match ip address 2
network 172.16.112.0 mask 255.255.255.0 set ip next-hop 172.16.20.1 172.16.80.2 44
Lab examples

Equipment:

CISCO 2501 (1x10BaseAUI + 2xSerial) ……………3 pcs.


DTE cables…………………………………………...3 pcs
DCE cables…………………………………………...3 pcs
hub

45
lab example 1

AS 10
192.168.4.0/24 E0
192.168.1.1 S1 IBGP
192.168.1.2 S1
1.1.2.1 S0 1.1.1.1 S0
X2
X1
ÑAS30 is not learning any BGP routes from
1.1.2.2 S1 AS10 and is sending its own routes via BGP.
1.1.1.2 S0 ÑOutbound traffic from AS30 should always
go on the X1 link unless that link fails, in
which case it should switch to the other link.
172.18.23.0/24 E0
ÑInbound traffic toward AS30 should always
come on the X1 link unless that link fails, in
AS 30 which case is should switch to the other link.
ÑPrevent any BGP updates from coming into
AS3.

46
lab example 1 AS 10
192.168.4.0/24 E0
192.168.1.1 S1 IBGP
192.168.1.2 S1
1.1.2.1 S0 1.1.1.1 S0
X2
X1

1.1.2.2 S1
1.1.1.2 S0

172.18.23.0/24 E0

AS 30

interface ethernet 0 neighbor 1.1.2.1 route-map SETMET1 out


ip address 172.18.23.1 255.255.255.0 neighbor 1.1.1.1 remote-as 10
! neighbor 1.1.1.1 route-map BLOCK in
interface serial 0 neighbor 1.1.1.1 route-map SETMET2 out
ip address 1.1.1.2 255.255.255.0 no auto-summary
clockrate 64000 !
! ip route 0.0.0.0 0.0.0.0 1.1.1.1 40
interface serial 1 ip route 0.0.0.0 0.0.0.0 1.1.2.1 60
ip address 1.1.2.2 255.255.255.0 !
clockrate 6400 route-map SETMET1 permit 10
! set metric 100
router bgp 30 !
network 172.18.23.0 mask 255.255.255.0 route-map SETMET2 permit 10
network 1.1.0.0 mask 255.255.252.0 set metric 50
neighbor 1.1.2.1 remote-as 10 !
neighbor 1.1.2.1 route-map BLOCK in route-map BLOCK deny 10 47
lab example 1
AS 10
192.168.4.0/24 E0
192.168.1.1 S1 IBGP
192.168.1.2 S1
1.1.2.1 S0 1.1.1.1 S0
X2
X1

1.1.2.2 S1
1.1.1.2 S0
interface ethernet 0
172.18.23.0/24 E0
ip address 192.168.4.1 255.255.255.0
!
interface serial 0
AS 30 ip address 1.1.2.1 255.255.255.0
!
interface serial 1
ip address 192.168.1.1 255.255.255.0
!
router bgp 10
network 192.168.0.0 mask 255.255.0.0
neighbor 1.1.2.2 remote-as 30
neighbor 192.168.1.2 remote-as 10
no auto-summary
48
lab example 1
AS 10
192.168.4.0/24 E0
192.168.1.1 S1 IBGP
192.168.1.2 S1
1.1.2.1 S0 1.1.1.1 S0
X2
X1

1.1.2.2 S1
1.1.1.2 S0
interface serial 0
172.18.23.0/24 E0
ip address 1.1.1.1 255.255.255.0
!
interface serial 1
AS 30 ip address 192.168.1.2 255.255.255.0
!
router bgp 10
network 192.168.0.0 mask 255.255.0.0
network 1.1.1.0 mask 255.255.255.0
neighbor 1.1.1.2 remote-as 30
neighbor 192.168.1.1 remote-as 10
no auto-summary

49
lab example 2-a

172.18.3.1 E0
RTA
192.168.1.1 S1 IBGP RTB
192.168.1.2 S1
1.1.2.1 S0 1.1.1.1 S0
172.18.2.1 E0

X1
X2
RTC AS 10
1.1.2.2 S1
1.1.1.2 S0

172.18.23.1 E0

Routing policies
Traffic to the Internet should go toward 172.18.2.10.
IBGP is running between RTA and RTB; IGP is running between
RTB and RTC. 50
lab example 2-a
interface ethernet 0 172.18.3.1 E0
ip address 172.18.2.1 255.255.255.0 RTA
192.168.1.1 S1 IBGP RTB
! 192.168.1.2 S1
interface serial 0 1.1.2.1 S0 1.1.1.1 S0
172.18.2.1 E0
ip address 1.1.2.1 255.255.255.0
X1
clockrate 64000 X2
interface serial 1 RTC AS 10
1.1.2.2 S1
ip address 192.168.1.1 255.255.255.0 1.1.1.2 S0

clockrate 6400
172.18.23.1 E0
!
router bgp 10
no synchronization
network 172.18.2.0 mask 255.255.255.0
network 1.1.0.0 mask 255.255.252.0
neighbor 192.168.1.2 remote-as 10
neighbor 192.168.1.2 next-hop-self
redistribute static route-map default_only
no auto-summary
!
ip route 0.0.0.0 0.0.0.0 172.18.2.1 40
access-list 1 permit 0.0.0.0
!
route-map default_only permit 10
match ip address 1
set local-preference 300
route-map default_only deny 20 51
lab example 2-a interface ethernet 0
ip address 172.18.3.1 255.255.255.0
!
172.18.3.1 E0 interface serial 0
RTA
192.168.1.1 S1 IBGP RTB ip address 1.1.1.1 255.255.255.0
192.168.1.2 S1
!
1.1.2.1 S0 1.1.1.1 S0
172.18.2.1 E0 interface serial 1
X1 ip address 192.168.1.2 255.255.255.0
X2 !
RTC AS 10
1.1.2.2 S1 router bgp 10
1.1.1.2 S0
no synchronization
172.18.23.1 E0 network 172.18.3.0 mask 255.255.255.0
network 1.1.0.0 mask 255.255.252.0
neighbor 192.168.1.1 remote-as 10
neighbor 192.168.1.1 next-hop-self
no auto-summary
!
router ospf 16
network 1.1.0.0 0.0.3.255 area 0
default-originate route-map def-only
!
access-list 1 permit 0.0.0.0
!
route-map def_only permit 10
match ip address 1

52
lab example 2-a

172.18.3.1 E0
RTA
192.168.1.1 S1 IBGP RTB
192.168.1.2 S1
1.1.2.1 S0 1.1.1.1 S0
172.18.2.1 E0
X1
X2
RTC AS 10
1.1.2.2 S1
1.1.1.2 S0

172.18.23.1 E0

interface ethernet 0
ip address 172.18.23.1 255.255.255.0
!
interface serial 0
ip address 1.1.1.2 255.255.255.0
!
interface serial 1
ip address 1.1.2.2 255.255.255.0
!
router ospf 16
network 1.1.0.0 0.0.3.255 area 0 53
lab example 2-b

172.18.3.1 E0
RTA
IBGP RTB

1.1.2.1 S0 1.1.1.1 S0
172.18.2.1 E0

X1
X2
RTC AS 10
1.1.2.2 S1
1.1.1.2 S0

172.18.23.1 E0

Routing policies
Traffic to the Internet should go toward 172.18.2.10.
IBGP is running between RTA and RTB; IGP is running between
RTB and RTC. 54
lab example 2-b
interface ethernet 0
ip address 172.18.2.1 255.255.255.0 172.18.3.1 E0
RTA
! IBGP RTB
interface serial 0
1.1.2.1 S0 1.1.1.1 S0
ip address 1.1.2.1 255.255.255.0 172.18.2.1 E0
clockrate 64000 X1
! X2
router bgp 10 RTC AS 10
1.1.2.2 S1
no synchronization 1.1.1.2 S0
network 172.18.2.0 mask 255.255.255.0
network 1.1.0.0 mask 255.255.252.0 172.18.23.1 E0

neighbor 1.1.1.1 remote-as 10


neighbor 1.1.1.1 next-hop-self
redistribute static route-map default_only
no auto-summary
!
ip route 0.0.0.0 0.0.0.0 172.18.2.1 40
access-list 1 permit 0.0.0.0
!
route-map default_only permit 10
match ip address 1
set local-preference 300
!
route-map default_only deny 20

55
lab example 2-b interface ethernet 0
ip address 172.18.3.1 255.255.255.0
!
interface serial 0
ip address 1.1.1.1 255.255.255.0
!
172.18.3.1 E0
RTA router bgp 10
IBGP RTB
no synchronization
1.1.2.1 S0 1.1.1.1 S0 network 172.18.3.0 mask 255.255.255.0
172.18.2.1 E0
network 1.1.0.0 mask 255.255.252.0
X1 neighbor 1.1.2.1 remote-as 10
X2
RTC AS 10 neighbor 1.1.2.1 next-hop-self
1.1.2.2 S1
1.1.1.2 S0 no auto-summary
!
172.18.23.1 E0 router ospf 16
network 1.1.0.0 0.0.3.255 area 0
default-originate route-map def-only
!
access-list 1 permit 0.0.0.0
!
route-map def_only permit 10
match ip address 1

56
lab example 2-b

172.18.3.1 E0
RTA RTB
IBGP
1.1.2.1 S0 1.1.1.1 S0
172.18.2.1 E0
X1
X2
RTC AS 10
1.1.2.2 S1
1.1.1.2 S0

172.18.23.1 E0

interface ethernet 0
ip address 172.18.23.1 255.255.255.0
!
interface serial 0
ip address 1.1.1.2 255.255.255.0
!
interface serial 1
ip address 1.1.2.2 255.255.255.0
!
router ospf 16
network 1.1.0.0 0.0.3.255 area 0 57
lab example 3

Loopback Interface 0
172.16.50.1
Loopback Interface 0
1.1.1.1 S0 1.1.1.2 S0 172.16.1.1
192.168.4.1 E0
1.1.2.2 S1
172.16.4.1 E0
1.1.2.1 S1

AS 65100 AS 65300

We like to load balance over two links between


AS 65100 and AS 65300

58
lab example 3

interface ethernet 0
ip address 192.168.4.1 255.255.255.0
!
interface serial 0
ip address 1.1.1.1 255.255.255.0
Loopback Interface 0
clockrate 64000
172.16.50.1
Loopback Interface 0 !
172.16.1.1
192.168.4.1 E0
1.1.1.1 S0 1.1.1.2 S0
interface serial 1
1.1.2.2 S1
1.1.2.1 S1
172.16.4.1 E0 ip address 1.1.2.1 255.255.255.0
AS 65100 AS 65300
clockrate 64000
!
Interface loopback 0
ip address 172.16.50.1 255.255.255.0
!
router bgp 65100
network 192.168.4.0 mask 255.255.255.0
network 172.16.50.0 mask 255.255.255.0
neighbor 172.16.1.1 remote-as 65300
neighbor 172.16.1.1 ebgp-multihop
neighbor 172.16.1.1 update-source loopback 0
no auto-summary
!
ip route 172.16.1.1 255.255.255.255 1.1.1.2 3
ip route 172.16.1.1 255.255.255.255 1.1.2.2 3
59
lab example 3

interface ethernet 0
ip address 172.16.4.1 255.255.255.0
!
interface serial 0
ip address 1.1.1.2 255.255.255.0
Loopback Interface 0
!
172.16.50.1
Loopback Interface 0 interface serial 1
172.16.1.1
192.168.4.1 E0
1.1.1.1 S0 1.1.1.2 S0
ip address 1.1.2.2 255.255.255.0
1.1.2.2 S1
1.1.2.1 S1
172.16.4.1 E0 !
AS 65100 AS 65300
Interface loopback 0
ip address 172.16.1.1 255.255.255.0
!
router bgp 65300
network 172.16.4.0 mask 255.255.255.0
network 172.16.1.0 mask 255.255.255.0
neighbor 172.16.50.1 remote-as 65100
neighbor 172.16.50.1 ebgp-multihop
neighbor 172.16.50.1 update-source loopback 0
no auto-summary
!
ip route 172.16.50.1 255.255.255.255 1.1.1.1 3
ip route 172.16.50.1 255.255.255.255 1.1.2.1 3

60

You might also like