CBGP - SourceForgec-bgp.sourceforge.net/downloads/cbgp-1.pdfOutcome of BGP decision process does not...

Preview:

Citation preview

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.1

Interdomain routing with BGP4Interdomain routing with BGP4

C­BGPA new approach to BGP simulation

http://cbgp.info.ucl.ac.be/(1/2)

Bruno Quoitin(bqu@info.ucl.ac.be)

Université Catholique de LouvainComputer Science and Engineering Dept.

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.2

Day 1Day 1

Introduction & Internals

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.3

AgendaAgenda

IntroductionHow does it work ? Internals

topology representationsimulator's principleBGP details

How do we use it ? Scriptingsetting up the topologysetting up BGP routerspolicies

Hands on...

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.4

MotivationsMotivations

Main interests: Traffic Engineeringstudy effects of manipulating BGP attributesinvestigate changes in BGP protocol

RequirementsPolicy Routing (no protocol dynamics)Large timescale aspects (10ths of minutes,hours)Scalability & efficiency: topologies with same order of magnitude as Internet

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.5

MotivationsMotivations

Why a new simulator ?

Traditional simulators do not scaleJavasim/SSFNetPacket­level simulationGranularity is too high

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.6

HistoryHistory

Development started in December 2002under the ATRIUM project and now continued under the TOTEM project.

First version (1.0.0)simplified BGP decision process (local­pref, as­path, tie­break)AS­level: one router per AS

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.7

HistoryHistory

Latest version (1.1.17)complete decision processroute reflectorsversatile filtersintradomain routingvarious MED behaviourscommand­line

Announced version (1.1.18)integration within TOTEM toolboxsupport for XML topologies

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.8

New approachNew approach

Assumptions:BGP sessions rely on TCPOutcome of BGP decision process does not rely on time

Consequences:Transmission lines never fail => simulator only preserves BGP messages ordering on each transmission lineDeterministic BGP decision process

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.9

How does it work ?How does it work ?

Conceptual view

scheduler[queue of events]

script / CLI

start/stop

setup

setup

setup, read update

read

readtopology DB

[nodes, links, ...]

Router configs DB[peerings, ...]

routers states DB[RIBs, sessions...]

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.10

Internals (1)Internals (1)

Topology databaseTopology represented as a graph

node = router, identified by a single IP addressedge = physical link

Graph implementationradix­tree contains all nodes: O(1)adjacencies maintained in sorted heaps: O(n)

Edge attributesdelay (informal)metric (for intradomain routing)

Current limitation:single link between nodes

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.11

Internals (2)Internals (2)

Example: topological view

10.0.0.1

10.0.0.2

10.0.0.3

10.0.0.4

physical link

iBGP session

AS110

5

5

5

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.12

Internals (3)Internals (3)

Example: content of topology database

10.0.0.1 10.0.0.2 10.0.0.3 10.0.0.4

adjacencies(sorted heap)10.0.0.2, 1010.0.0.3, 5

... ... ...

network (radix-tree)

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.13

Internals (4)Internals (4)

Routers configs databaseList of BGP neighbors (sorted heap)Per peer input/output filters

Routers states databaseRouting table (radix­trees)

STATIC routesIGP routes (computed)BGP routes (filled by BGP decision process)

BGP sessionsAdj­RIBs, Loc­RIBs (radix­trees)

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.14

Internals (5)Internals (5)

Example: routers configs/states databases

10.0.0.1 10.0.0.2 10.0.0.3 10.0.0.4

BGP neighbors: (sorted heap) 10.0.0.2 [filters, Adj-RIB-in, Adj-RIB-out] 10.0.0.3 [...] 10.0.0.4 [...]

...

...

...

...

...

...

network

Loc-RIB (radix-tree)

Routing table (radix-tree)

.........

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.15

Internals (6)Internals (6)

SchedulerSingle linear global queueHolds messages (with src, dst and next­hop)Sequential processing of messages by a single threadMessages are propagated hop­by­hop until they reach their final destination

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.16

Internals (7)Internals (7)

Simulator's FIFO queue

PUSHnew msg POP msg

UPDATE [192.168.0/24]src=10.0.0.1dst=10.0.0.2next-hop=10.0.0.2

UPDATE [192.168.1/24]src=10.0.0.3dst=10.0.0.4next-hop=10.0.0.4

...

FIFO queue

Deliver msg tonext-hop router

source routersend msg

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.17

Internals (8)Internals (8)

Structure of a router (simplified)

yes

yes

dst=local?

BGP peer ?

Forwarding:? route

DecisionProcess

no

drop

yes

nodrop

Output filter

no

Input filter

Loc-RIB

poppedmsg

pushmsg

RT

Adj-RIB-in

Adj-RIB-out

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.18

Internals (9)Internals (9)

Decision process (simplified)

0). ignores routes with unreachable next­hop1). prefer routes with highest LOCAL­PREF2). prefer routes with shortest AS­PATH...i). prefer eBGP routes over iBGP routes...j). prefer routes with nearest IGP next­hop...n). prefer routes with smallest IP address

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.19

Internals (10)Internals (10)

Per peer filterssequence of rules (predicates, actions)predicates: match prefix, communityactions: local­pref, communities, as­path prepending, ...

Input filter:(predicates, actions)(predicates, actions)...

Output filter:(predicates, actions)(predicates, actions)...

Decisionprocess

Adj-RIB-in Adj-RIB-out

Loc-RIB

Input filter:(predicates, actions)(predicates, actions)...

Adj-RIB-in Adj-RIB-out

Output filter:(predicates, actions)(predicates, actions)...

Peer 1

Peer 2

Peer 1

Peer 2

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.20

Internals (11)Internals (11)

Filtering one route

filter(ROUTE)foreach (rule R=(predicate, actions))

if (R.predicate matches ROUTE)for (i= 0; i < size(R.actions); i++)

if (R.action[i] == ACCEPT)return ACCEPT;

elsif (R.action[i] == DENY) {return DENY;

elseapply(R.action[i], ROUTE);

return ACCEPT;

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.21

Internals (12)Internals (12)

Example: running simulation

1.1

2.1

3.1

4.1AS1

FIFO queue

<empty>

Loc-RIB:192.168/16, local

AS2

AS3

AS4

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.22

Internals (13)Internals (13)

Example: running simulation FIFO queue

192.168/16[AS1]src=1.1dst=2.1

192.168/16[AS1]src=1.1dst=3.1

Loc-RIB:192.168/16, local

AS1

AS2

AS3

AS41.1

2.1

3.1

4.1

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.23

Internals (14)Internals (14)

Example: running simulation FIFO queue

Loc-RIB:192.168/16, [AS1]

Loc-RIB:192.168/16, local

192.168/16[AS1]

AS1

AS2

AS3

AS41.1

2.1

3.1

4.1

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.24

Internals (15)Internals (15)

Example: running simulation FIFO queue

192.168/16[AS2 AS1]src=2.1dst=3.1

Loc-RIB:192.168/16, local

AS1

AS2

AS3

AS41.1

2.1

3.1

4.1

Loc-RIB:192.168/16, [AS1]

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.25

Internals (16)Internals (16)

Example: running simulation FIFO queue

Loc-RIB:192.168/16, local

Loc-RIB:192.168/16, [AS1]

192.168/16[AS1]

AS1

AS2

AS3

AS41.1

2.1

3.1

4.1

Loc-RIB:192.168/16, [AS1]

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.26

Internals (17)Internals (17)

Example: running simulation FIFO queue

192.168/16[AS2 AS1]src=3.1dst=4.1

Loc-RIB:192.168/16, local

AS1

AS2

AS3

AS41.1

2.1

3.1

4.1

Loc-RIB:192.168/16, [AS1]

Loc-RIB:192.168/16, [AS1]

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.27

Internals (18)Internals (18)

Example: running simulation FIFO queue

Loc-RIB:192.168/16, local

192.168/16[AS2 AS1}

Loc-RIB:192.168/16, AS2 AS1

AS1

AS2

AS3

AS41.1

2.1

3.1

4.1

Loc-RIB:192.168/16, [AS1]

Loc-RIB:192.168/16, [AS1]

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.28

Loc-RIB:192.168/16, [AS2 AS1]

Internals (19)Internals (19)

Example: running simulation FIFO queue

Loc-RIB:192.168/16, local

192.168/16[AS4 AS2 AS1]src=4.1dst=3.1

AS1

AS2

AS3

AS41.1

2.1

3.1

4.1

Loc-RIB:192.168/16, [AS1]

Loc-RIB:192.168/16, [AS1]

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.29

Loc-RIB:192.168/16, [AS2 AS1]

Internals (20)Internals (20)

Example: running simulation FIFO queue

Loc-RIB:192.168/16, local

AS1

AS2

AS3

AS41.1

2.1

3.1

4.1

Loc-RIB:192.168/16, [AS1]

Loc-RIB:192.168/16, [AS1]

192.168/16[AS3 AS1}

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.30

Loc-RIB:192.168/16, [AS2 AS1]

Internals (21)Internals (21)

Example: running simulation FIFO queue

Loc-RIB:192.168/16, local

AS1

AS2

AS3

AS41.1

2.1

3.1

4.1

Loc-RIB:192.168/16, [AS1]

Loc-RIB:192.168/16, [AS1]

192.168/16[AS4 AS2 AS1}

<empty>

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.31

Scripting (1)Scripting (1)

How do we setup a C­BGP simulation ?through scriptingfile / interactiveCISCO­like syntax

A few main steps:create nodes and linksconfigure static routesconfigure IGPsetup BGP routers (peerings, filters, etc)run simulation...

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.32

Scripting (2)Scripting (2)

CISCO­like syntaxsequence of keywords and parameters

cbgp> net add node 10.0.0.1cbgp> bgp add router 1 10.0.0.1cbgp> bgp router 10.0.0.1cbgp-router> add network 192.168/16cbgp-router> add peer 1 10.0.0.2cbgp-router> peer 10.0.0.2 upcbgp-router> exitcbgp> bgp router 10.0.0.1 show rib 192.168/16

Console

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.33

Scripting (3)Scripting (3)

Classes of commandsnet ...

commands related to topology and IP routingbgp ...

commands related to BGPsim ...

commands related to the simulatormiscelaneous additional commands

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.34

Network commands (1)Network commands (1)

net add node IPaddr

net add link IPaddr1 IPaddr2 Delay

net link IPaddr1 IPaddr2 igp­weight Weight

net node IPaddr route add Prefix Nh Metric

net node IPaddr spf­prefix Prefix

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.35

Network commands (2)Network commands (2)

net node IPaddr show rt Prefix

net node IPaddr1 record­route IPaddr2

and more...

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.36

net add node 10.0.0.1net add node 10.0.0.2net add link 10.0.0.1 10.0.0.2 10

Network commands (3)Network commands (3)

Example

10.0.0.1 10.0.0.210

Routing table: Routing table:

Console

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.37

net add node 10.0.0.1net add node 10.0.0.2net add link 10.0.0.1 10.0.0.2 10net node 10.0.0.1 spf-prefix 10/8net node 10.0.0.2 spf-prefix 10/8

Network commands (4)Network commands (4)

Example

10.0.0.1 10.0.0.210

Routing table:10.0.0.2 IGP

Routing table:10.0.0.1 IGP

Console

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.38

net add node 10.0.0.1net add node 10.0.0.2net add node 20.0.0.1net add link 10.0.0.1 10.0.0.2 10net add link 10.0.0.2 20.0.0.1 5net node 10.0.0.1 spf-prefix 10/8net node 10.0.0.2 spf-prefix 10/8net node 10.0.0.2 route add 20.0.0.1/32 20.0.0.1 5net node 20.0.0.1 route add 10.0.0.2/32 10.0.0.2 5

Console

Network commands (5)Network commands (5)

Example

10.0.0.1 10.0.0.210

Routing table:10.0.0.2/32 IGP

Routing table:10.0.0.1/32 IGP20.0.0.1/32 STATIC

Domain 1

Domain 220.0.0.1

Routing table:10.0.0.2/32 STATIC

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.39

net options igp-inter onnet add node 10.0.0.1net add node 10.0.0.2net add node 20.0.0.1net add link 10.0.0.1 10.0.0.2 10net add link 10.0.0.2 20.0.0.1 5net node 10.0.0.1 spf-prefix 10/8net node 10.0.0.2 spf-prefix 10/8

Console

Network commands (6)Network commands (6)

Example

10.0.0.1 10.0.0.210

Routing table:10.0.0.2/32 IGP20.0.0.1/32 IGP

Routing table:10.0.0.1/32 IGP20.0.0.1/32 IGP

Domain 1

Domain 220.0.0.1

Routing table:10.0.0.2/32 IGP

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.40

BGP commands (1)BGP commands (1)

bgp add router ASnum IPaddr

bgp router IPaddr add network Network

bgp router IPaddr1 add peer ASnum IPaddr2

bgp router IPaddr1 peer IPaddr2 up

bgp router IPaddr1 peer IPaddr2 next­hop­self

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.41

BGP commands (2)BGP commands (2)

bgp router IPaddr1 show rib IPaddr2|Prefix/*

bgp router IPaddr1 show rib­in Peer|* IPaddr2|Prefix|*

bgp router IPaddr record­route Prefix

bgp router IPaddr1 peer IPaddr2next­hop­selfrr­clientvirtualrecv Message

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.42

bgp add router 1 10.0.0.1bgp router 10.0.0.1

add peer 1 10.0.0.2peer 10.0.0.2 up

bgp add router 1 10.0.0.2bgp router 10.0.0.2

add peer 1 10.0.0.1peer 10.0.0.1 up

sim run

BGP commands (3)BGP commands (3)

Example (iBGP)

10.0.0.1 10.0.0.210

Routing table:10.0.0.2 IGP

Routing table:10.0.0.1 IGP

ConsoleAS1 AS1

iBGP sessionAS 1

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.43

BGP commands (4)BGP commands (4)

Example (eBGP)

10.0.0.1 10.0.0.210

Routing table:10.0.0.2/32 IGP

Routing table:10.0.0.1/32 IGP20.0.0.1/32 STATIC20.0.0/24 BGP

AS 1

AS 220.0.0.1

Routing table:10.0.0.2/32 STATIC20.0.0/24 BGP

iBGP

eBGP

bgp router 10.0.0.2add network 10.0.0/24add peer 2 20.0.0.1peer 20.0.0.1 up

bgp router 20.0.0.1add network 20.0.0/24add peer 1 10.0.0.2peer 10.0.0.2 up

sim run

Console

! missing route !(20.0.0/24)

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.44

BGP commands (5)BGP commands (5)

Next­hop­self

bgp router 10.0.0.2add network 10.0.0/24add peer 2 20.0.0.1peer 20.0.0.1 next-hop-selfpeer 20.0.0.1 up

bgp router 20.0.0.1add network 20.0.0/24add peer 1 10.0.0.2peer 10.0.0.2 up

sim run

Console

10.0.0.1 10.0.0.210

Routing table:10.0.0.2/32 IGP20.0.0/24 BGP

Routing table:10.0.0.1/32 IGP20.0.0.1/32 STATIC20.0.0/24 BGP

AS 1

AS 220.0.0.1

Routing table:10.0.0.2/32 STATIC20.0.0/24 BGP

iBGP

eBGP

Use peer 20.0.0.1 next-hop-self

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.45

BGP commands (6)BGP commands (6)

without Next­hop­self

bgp router 10.0.0.2add network 10.0.0/24add peer 2 20.0.0.1peer 20.0.0.1 up

bgp router 20.0.0.1add network 20.0.0/24add peer 1 10.0.0.2peer 10.0.0.2 up

sim run

Console

10.0.0.1 10.0.0.210

Routing table:10.0.0.2/32 IGP20.0.0.1/32 IGP20.0.0/24 BGP

Routing table:10.0.0.1/32 IGP20.0.0.1/32 IGP20.0.0/24 BGP

20.0.0.1

Routing table:10.0.0.2/32 IGP10.0.0/24 BGP

Use net options igp-inter on

AS 1

AS 2

iBGP

eBGP

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.46

Miscellaneous commandsMiscellaneous commands

sim run

include Scriptexample: include /workspace/scripts/toto.cli

print Messageexample: print “Hello World\n”

# This is a comment

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.47

Policies (1)Policies (1)

bgp router IPaddr1 peer IPaddr2 filter [in|out]add­ruleinsert­rule Indexremove­rule Index

where a rule is composed ofmatch logical combination of predicatesactions comma separated list of actions

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.48

Policies (2)Policies (2)

Supported match predicatesany

match all routescommunity is Community

match routes that contain given community(specified as X or X:Y)

prefix is Prefixmatch routes for exact given prefix

prefix in Prefixmatch routes contained in given prefix

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.49

Policies (3)Policies (3)

Not yet implementedregular expressions on AS­Pathless specific prefixes

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.50

Policies (4)Policies (4)

Supported actionsaccept

accept the routedeny

deny the routeas­path prepend Amount

prepend the route's as­path Amount timescommunity add Community

add the given community to the routecommunity strip Community

remove all the route's communities

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.51

Policies (5)Policies (5)

Supported actions (cont')local­pref Pref

change the route's local­prefmetric Med|internal

change the route's multi­exit­discriminator(absolute value or based on IGP)

red­community add prepend Amount Targetadd a redistribution community that requestsprepending Amount times towards Target

red­community add ignore Targetadd a redistribution community that requestsignoring Target

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.52

Policies (6)Policies (6)

ExamplePrefer routes received from neighbor 2.0.0.1

bgp router 1.0.0.1add peer 2 2.0.0.1peer 2.0.0.1

filter inadd-rule

match anyaction “local-pref 120”

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.53

Policies (7)Policies (7)

ExampleDeny routes towards martian prefix 192.168/16

bgp router 1.0.0.1add peer 2 2.0.0.1peer 2.0.0.1

filter outadd-rule

match “prefix is 192.168/16”action deny

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.54

C­BGP results (1)C­BGP results (1)

Different meansdisplaying routing table of one routerdisplaying Adj­RIB­in and Loc­RIB of one BGP routertraceing route from one router to anothertraceing AS­path from one router to a prefixrecording BGP messages exchanged during the simulation

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.55

C­BGP results (2)C­BGP results (2)

Routing table of one node

cbgp> net node 1.0.0.1 show rt *4.0.0.0/8 4.0.0.1 0 BGP4.0.0.1/32 4.0.0.1 5 STATIC5.0.0.0/8 5.0.0.2 0 BGP5.0.0.2/32 5.0.0.2 5 STATIC

cbgp> net node 1.0.0.1 show rt 5/85.0.0.0/8 5.0.0.2 0 BGP

cbgp> net node 1.0.0.1 show rt 5.0.0.25.0.0.2/32 5.0.0.2 5 STATIC

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.56

C­BGP results (3)C­BGP results (3)

Loc­RIB of one router

cbgp> bgp router 1.0.0.1 show rib *i> 1.0.0.0/8 1.0.0.1 0 0 null i*> 4.0.0.0/8 4.0.0.1 0 4294967295 4 i*> 5.0.0.0/8 5.0.0.2 0 4294967295 5 i

cbgp> bgp router 1.0.0.1 show rib 5/8*> 5.0.0.0/8 5.0.0.2 0 4294967295 5 i

cbgp> bgp router 1.0.0.1 show rib 5.0.0.2*> 5.0.0.0/8 5.0.0.2 0 4294967295 5 i

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.57

C­BGP results (4)C­BGP results (4)

Adj­RIB­in of one router

cbgp> bgp router 1.0.0.1 show rib-in 4.0.0.1 ** 2.0.0.0/8 4.0.0.1 0 4294967295 4 2 i*> 4.0.0.0/8 4.0.0.1 0 4294967295 4 i* 6.0.0.0/8 4.0.0.1 0 4294967295 4 2 6 i

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.58

C­BGP results (5)C­BGP results (5)

Traceing route

cbgp> net node 1.0.0.1 record-route 5.0.0.21.0.0.1 5.0.0.2 SUCCESS 1.0.0.1 5.0.0.2

cbgp> net node 1.0.0.1 record-route 6.0.0.21.0.0.1 6.0.0.2 SUCCESS 1.0.0.1 2.0.0.1 6.0.0.1 6.0.0.2

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.59

C­BGP results (6)C­BGP results (6)

Traceing AS­path

cbgp> bgp router 1.0.0.1 record-route 5/81.0.0.1 5.0.0.0/8 SUCCESS 1 5

cbgp> bgp router 1.0.0.1 record-route 6/81.0.0.1 6.0.0.0/8 SUCCESS 1 2 6

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.60

C­BGP results (7)C­BGP results (7)

Recording BGP messagesuse “bgp options msg­monitor File”

...6.0.0.2|BGP4|114.00|W|6.0.0.1|6|5.0.0.0/85.0.0.2|BGP4|127.00|A|5.0.0.1|5|6.0.0.0/8|3 6|IGP|5.0.0.1|0||1.0.0.1|BGP4|147.00|A|5.0.0.2|5|6.0.0.0/8|5 3 6|IGP|5.0.0.2|0||5.0.0.1|BGP4|147.00|W|5.0.0.2|5|6.0.0.0/8...

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.61

Route­reflectors (1)Route­reflectors (1)

GoalDecrease number of iBGP sessionsDecrease information known by BGP routersAffect routing choices

How to setup RRs ?Only change sessions with RR­clients

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.62

Route­reflectors (2)Route­reflectors (2)

Example

client client

RR

AS1

bgp router 1.0.0.1add peer 1 1.0.0.2add peer 1 1.0.0.3peer 1.0.0.2 rr-clientpeer 1.0.0.3 rr-clientpeer 1.0.0.2 uppeer 1.0.0.3 up

Console

Only change sessions with RR-clients

1.0.0.1

1.0.0.31.0.0.2

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.63

Route­reflectors (3)Route­reflectors (3)

Multiple RRs

client client

RR

AS1

bgp router 1.0.0.1add peer 1 1.0.0.2add peer 1 1.0.0.3add peer 1 1.0.0.4peer 1.0.0.2 rr-clientpeer 1.0.0.3 rr-clientpeer 1.0.0.2 uppeer 1.0.0.3 uppeer 1.0.0.4 up

Console

1.0.0.1

1.0.0.31.0.0.2

1.0.0.4

RR

Full­mesh of iBGP sessions between RRsDefault cluster­ID based on IP address (change with set cluster­id)

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.64

Hands on... (1)Hands on... (1)

Installationdownload from http://cbgp.info.ucl.ac.be/

libgds 1.1.5cbgp 1.1.17

tar xvzf libgds­1.1.5.tar.gzcd libgds­1.1.5./configure; make; sudo make installcd ..tar xvzf cbgp­1.1.17.tar.gzcd cbgp­1.1.17./configure; make

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.65

Hands on... (2)Hands on... (2)

ExercisesEx1: Write a C­BGP script that models base­topo­1 (next slide)

Ex2: Based on the topo of Ex1, show the inbound and outbound paths passing on each access link of AS6

Ex3: Try to balance the inbound/outbound paths on each access link of AS6 using local­pref and as­path prepending

Interdomain Routing with BGP4, 25­26 Nov. 2004© 2004, B. Quoitin 1.66

base­topo­1base­topo­1

Recommended