• No results found

Border Gateway Protocol (BGP)

N/A
N/A
Protected

Academic year: 2021

Share "Border Gateway Protocol (BGP)"

Copied!
63
0
0

Loading.... (view fulltext now)

Full text

(1)

Border Gateway

Border Gateway

Protocol (BGP)

Protocol (BGP)

Petr

(2)

Role of Autonomous Systems on the

Role of Autonomous Systems on the

(3)

Autonomous systems

Autonomous systems

Not possible to maintain complete Internet topology

Not possible to maintain complete Internet topology

information on all routers

information on all routers

big database, change processing overhead, instability

big database, change processing overhead, instability

Internet divided into Autonomous systems

Internet divided into Autonomous systems

ISP, big company

ISP, big company

Autonomous system

Autonomous system

= contiguous set of routers with

= contiguous set of routers with

common routing policy and under common

common routing policy and under common

administration

administration

Routing policy: IGP, implemented route optimization,

Routing policy: IGP, implemented route optimization,

Autonomous systems numbered with world

Autonomous systems numbered with world

-

-

wide

wide

unique numbers (16 bit)

(4)

Hierarchical routing

Hierarchical routing

Intra

Intra

-

-

AS routing uses Interior Gateway Protocols (IGP)

AS routing uses Interior Gateway Protocols (IGP)

knows only topology of it

knows only topology of it

s own AS

s own AS

outside of AS is reached using default

outside of AS is reached using default

sometimes has summary information about networks behind

sometimes has summary information about networks behind

individual external links

individual external links

Limited by number of routes the protocol is capable to process

Limited by number of routes the protocol is capable to process

efficiently

efficiently

OPSF, RIP, IGRP,

OPSF, RIP, IGRP,

Inter

Inter

-

-

AS routing uses Exterior Gateway Protocols

AS routing uses Exterior Gateway Protocols

Operates on graph of AS interconnection

Operates on graph of AS interconnection

Does not know topology of other

Does not know topology of other

ASes

ASes

, works only with

, works only with

information about networks contained in individual

information about networks contained in individual

ASes

ASes

knows local next

knows local next

-

-

hop border router to reach the destination

hop border router to reach the destination

(5)

Inter

Inter

-

-

AS routing

AS routing

The purpose of EGP is to provide information to deliver packet

The purpose of EGP is to provide information to deliver packet

to the boundary router of the destination AS

to the boundary router of the destination AS

Boundary routers run both EGP and IGP

Boundary routers run both EGP and IGP

Boundary router delivers the packet to the final destination us

Boundary router delivers the packet to the final destination us

ing IGP

ing IGP

Every AS propagates networks contained within it into EGP

Every AS propagates networks contained within it into EGP

also networks reachable through it

also networks reachable through it

It is useful to limit number of routes propagated using summariz

It is useful to limit number of routes propagated using summariz

ation

ation

(internal networks should have common prefix)

(internal networks should have common prefix)

Note: For transit AS, packet has to be passed among border route

Note: For transit AS, packet has to be passed among border route

rs

rs

through AS internal routers

(6)

AS types

AS types

Single

Single

-

-

homed

homed

Multi

Multi

-

-

homed

homed

More links to the same ISP or different ISPs

More links to the same ISP or different ISPs

Transit

Transit

Carries traffic not originated or destined to internal networks

Carries traffic not originated or destined to internal networks

multi

multi

-

-

homed

homed

Non

Non

-

-

transit

transit

(7)

Single

(8)

Single

Single

-

-

homed AS:

homed AS:

How to propagate internal networks

How to propagate internal networks

into BGP ?

into BGP ?

ISP router has static routes to customer

ISP router has static routes to customer

s

s

networks

networks

and redistributes them into BGP

and redistributes them into BGP

IGP between ISP router and customer router

IGP between ISP router and customer router

ISP redistributes IGP into BGP

ISP redistributes IGP into BGP

BGP between ISP router and customer router

BGP between ISP router and customer router

If customer has it

If customer has it

s own AS number

s own AS number

(9)

Propagation via IGP

(10)

Propagation via BGP

(11)

Private AS

Private AS

-

-

es

es

64512

64512

65535

65535

Used and known only in context of single

Used and known only in context of single

provider

provider

s AS

s AS

Can be used only for AS connected to single

Can be used only for AS connected to single

provider (by one or more links)

provider (by one or more links)

Outside of provider AS, private AS

Outside of provider AS, private AS

-

-

es

es

presents

presents

themselves like part of that

(12)

Private AS

(13)

Who has it

Who has it

s own AS ?

s own AS ?

Normally, customer

Normally, customer

s networks are part of

s networks are part of

provider AS

provider AS

Sometimes private AS

Sometimes private AS

-

-

es

es

used

used

Customer has to have it

Customer has to have it

s own AS number if he

s own AS number if he

indents to connect to multiple providers

indents to connect to multiple providers

Customer commonly needs it

Customer commonly needs it

s own AS number

s own AS number

if it requires provider

(14)

Nontransit

Nontransit

Multi

Multi

-

-

homed AS

homed AS

Packet filters can be used on ingress links to

Packet filters can be used on ingress links to

protect against injection of unwanted traffic

protect against injection of unwanted traffic

(15)

Transit multi

Transit multi

-

-

homed AS

homed AS

AS1

20.0.1.0/24

20.0.2.0/24

AS2

30.0.10.0/24

30.0.20.0/24

(16)

Routing symmetry, load balancing

Routing symmetry, load balancing

Symmetry

Symmetry

-

-

the link used for outgoing traffic for

the link used for outgoing traffic for

some network is also used for returning traffic

some network is also used for returning traffic

Load balancing

Load balancing

some destinations reached by

some destinations reached by

one link, others by another

one link, others by another

(17)

Border

(18)

Border

Border

Gateway

Gateway

Protocol

Protocol

Exchanges information between AS border routers

Exchanges information between AS border routers

What networks are in each AS

What networks are in each AS

List of AS

List of AS

-

-

es

es

to transit when reaching particular network

to transit when reaching particular network

Today, BGP v.4 is used

Today, BGP v.4 is used

Sometimes BGPv4+:

Sometimes BGPv4+:

multiprotocol

multiprotocol

extension

extension

Other address families, multicasting,

Other address families, multicasting,

VPNs

VPNs

,

,

Supports classless addressing

Supports classless addressing

Propagates subnet masks with every prefix

Propagates subnet masks with every prefix

(19)

BGP operation on graph of AS

(20)

Path selection, routing policies

Path selection, routing policies

BGP operates on AS interconnection graph

BGP operates on AS interconnection graph

Path

Path

= sequence of AS numbers to transit to get to

= sequence of AS numbers to transit to get to

particular network

particular network

BGP does not have simple concept of metric to select

BGP does not have simple concept of metric to select

best path

best path

Path has to be chosen with regard to business policy of

Path has to be chosen with regard to business policy of

individual AS operators

individual AS operators

BGP configuration has to reflect appointed routing policy

BGP configuration has to reflect appointed routing policy

Details of routing policy have to be configured manually

Details of routing policy have to be configured manually

Peer routers, prefix filtering and route preferences,

Peer routers, prefix filtering and route preferences,

(21)

Examples of routing policies

Examples of routing policies

Which destination we allow to transit packets to

Which destination we allow to transit packets to

through our AS ?

through our AS ?

From which source address we allow to transit

From which source address we allow to transit

traffic through our AS ?

traffic through our AS ?

Which external link will we use to reach

Which external link will we use to reach

particular external network ?

particular external network ?

Which ingress link we want other

Which ingress link we want other

ASes

ASes

use for

use for

traffic destined for particular network inside our

traffic destined for particular network inside our

(22)

Suboptimal routing on the Internet

Suboptimal routing on the Internet

Internet routing is not optimal from point of

Internet routing is not optimal from point of

view of any metric

view of any metric

There is no common metric, various

There is no common metric, various

IGPs

IGPs

use

use

different metrics

different metrics

Optimality not reachable neither desired

Optimality not reachable neither desired

Hierarchical routing is suboptimal

Hierarchical routing is suboptimal

but limits the number of routes in routing table

but limits the number of routes in routing table

(23)

BGP Principle

BGP Principle

Path

Path

-

-

vector routing algorithm

vector routing algorithm

from point of view of topology knowledge, BGP stands

from point of view of topology knowledge, BGP stands

between distance

between distance

-

-

vector and link

vector and link

-

-

state protocols

state protocols

Path vector =

Path vector =

sequence of AS numbers to transit

sequence of AS numbers to transit

before getting to particular network

before getting to particular network

Every route is propagated together with it

Every route is propagated together with it

s path vector

s path vector

Path vector collects number of AS

Path vector collects number of AS

-

-

es

es

the route was passed

the route was passed

through

through

If AS receives route with path vector containing it

If AS receives route with path vector containing it

s own AS

s own AS

number, route is discarded (loop avoidance)

number, route is discarded (loop avoidance)

Path vector serves as metric

Path vector serves as metric

(24)

Passing of BGP routes

(25)

Spreading of routing information

Spreading of routing information

Routing information exchanged between AS

Routing information exchanged between AS

boundary routers

boundary routers

Peer routers to exchange routing information with

Peer routers to exchange routing information with

are configured manually

are configured manually

Reliable exchange (TCP, port 179)

Reliable exchange (TCP, port 179)

When BGP session is established among peers,

When BGP session is established among peers,

complete routing information is exchanged

complete routing information is exchanged

(26)

Peer

Peer

reachability

reachability

testing

testing

BGP router periodically checks

BGP router periodically checks

reachability

reachability

of

of

every peer

every peer

Keepalive

Keepalive

message sent once per minute

message sent once per minute

(27)

BGP messages

BGP messages

Exchanged between peer routers

Exchanged between peer routers

(TCP/179, support for authentication)

(TCP/179, support for authentication)

OPEN

OPEN

session establishment

session establishment

Negotiation of protocol version, hold time for

Negotiation of protocol version, hold time for

keepalives

keepalives

, AS

, AS

numbers,

numbers,

UPDATE

UPDATE

Advertised prefixes (+ route attributes), withdrawn routes

Advertised prefixes (+ route attributes), withdrawn routes

KEEPALIVE

KEEPALIVE

peer

peer

reachability

reachability

testing

testing

(28)

BGP database

BGP database

BGP database contains all routes learned from

BGP database contains all routes learned from

peers

peers

For every destination, one route is chosen based

For every destination, one route is chosen based

on routing policy criteria

on routing policy criteria

No support for load balancing

No support for load balancing

Chosen routes are placed into routing table

Chosen routes are placed into routing table

Only routes used by router itself (i.e. those

Only routes used by router itself (i.e. those

chosen into routing table) are propagated to

chosen into routing table) are propagated to

(29)

External and Internal BGP

(30)

External and Internal BGP

External and Internal BGP

If there is more than one boundary router in some AS,

If there is more than one boundary router in some AS,

BGP information has to be passed between them

BGP information has to be passed between them

Special case, exchange between routers in the same AS

Special case, exchange between routers in the same AS

Boundary routers can possibly be separated by internal

Boundary routers can possibly be separated by internal

structure of routers (running IGP)

structure of routers (running IGP)

Solution: there exists two types of BGP session

Solution: there exists two types of BGP session

External BGP (EBGP)

External BGP (EBGP)

Internal BGP (IBGP)

Internal BGP (IBGP)

(31)

EBGP and IBGP

(32)

Passing of routes in IBGP sessions

Passing of routes in IBGP sessions

Need to avoid loops when passing routes

Need to avoid loops when passing routes

through IBGP

through IBGP

Test for presence of receiving peer

Test for presence of receiving peer

s AS number in

s AS number in

path vector doesn

path vector doesn

t work

t work

Special rules defined for passing of routes in

Special rules defined for passing of routes in

IBGP session

IBGP session

Informa

Informa

tion

tion

from

from

IBGP

IBGP

is passed to

is passed to

EBGP

EBGP

peer

peer

s

s

,

,

but not to other

but not to other

IBGP

IBGP

peer

peer

s

s

.

.

Informa

Informa

tion

tion

from

from

EBGP

EBGP

is passed to other

is passed to other

EBGP

EBGP

peer

(33)

Full mesh of IBGP sessions

(34)

Definition of BGP Routing Policy

(35)

BGP Attributes

BGP Attributes

Mechanism of implementation of routing

Mechanism of implementation of routing

policies

policies

Every route passed between peers can be

Every route passed between peers can be

assigned one or more

assigned one or more

attributes

attributes

Routes are processed and selected based on

Routes are processed and selected based on

values of attributes they carry

(36)

Attribute Types

Attribute Types

Well

Well

-

-

known

known

--

understood by every BGP implementation

understood by every BGP implementation

Mandatory

Mandatory

must be appended to each route

must be appended to each route

Discretionary

Discretionary

may be appended to route

may be appended to route

Optional

Optional

--

not every BGP implementation must understand it

not every BGP implementation must understand it

Transitive

Transitive

if implementation doesn

if implementation doesn

t understand the attribute, it

t understand the attribute, it

passes it next unchanged

passes it next unchanged

Nontransitive

Nontransitive

if implementation doesn

if implementation doesn

t understand the attribute, it

t understand the attribute, it

doesn

(37)

Most commonly used Attributes

(38)

How to influence routing policy

How to influence routing policy

using attributes ?

using attributes ?

Manipulation with attributes received from individual

Manipulation with attributes received from individual

peers

peers

Input Policy Engine

Input Policy Engine

Includes filtering of routes received from individual peers

Includes filtering of routes received from individual peers

Manipulation with attributes of routes propagated to

Manipulation with attributes of routes propagated to

individual peers

individual peers

Output Policy Engine

Output Policy Engine

Includes filtering of routes propagated to individual peers

Includes filtering of routes propagated to individual peers

Route used (and propagated next) by BGP router is

Route used (and propagated next) by BGP router is

determined by candidate route

(39)

Function of policy engines

Function of policy engines

Test for attribute values

Test for attribute values

Test for prefixes (including prefix length)

Test for prefixes (including prefix length)

Setting of attribute value when predefined

Setting of attribute value when predefined

criteria met

criteria met

(40)

Processing of BGP routes

(41)

Definition of Routing Policies

Definition of Routing Policies

Separately for each peer

Separately for each peer

(42)

BGP Table (BGP database)

BGP Table (BGP database)

Contains routes passed through (and possibly

Contains routes passed through (and possibly

manipulated by) input policy engine

manipulated by) input policy engine

Routes from every peer

Routes from every peer

For every destination (prefix), one best route is

For every destination (prefix), one best route is

chosen

chosen

Selection is based on attribute values

Selection is based on attribute values

Standardized algorithm (will be discussed next)

Standardized algorithm (will be discussed next)

Best route placed into routing table

Best route placed into routing table

(43)

Well

(44)

AS

AS

-

-

PATH

PATH

Necessary for path

Necessary for path

-

-

vector algorithm function

vector algorithm function

AS which gets the route

AS which gets the route

prepends

prepends

it

it

s number to

s number to

the beginning

the beginning

AS doesn

AS doesn

t accept route if AS

t accept route if AS

-

-

PATH already

PATH already

contains it

contains it

s own AS number

s own AS number

(45)

AS

AS

-

-

PATH manipulation

PATH manipulation

AS

AS

-

-

PATH handled as string

PATH handled as string

(AS numbers separated by spaces)

(AS numbers separated by spaces)

Regular expression used to test presence of

Regular expression used to test presence of

some pattern (AS sequence)

some pattern (AS sequence)

Originating AS, AS in path,

Originating AS, AS in path,

Inserting AS number multiple times makes AS

Inserting AS number multiple times makes AS

-

-PATH longer and route less preferred

PATH longer and route less preferred

Router can insert only it

Router can insert only it

s own AS number (possibly

s own AS number (possibly

multiple times)

(46)

NEXT

NEXT

-

-

HOP

HOP

Next hop of BGP route is boundary router

Next hop of BGP route is boundary router

which propagated that route into AS

which propagated that route into AS

Difference from IGP

Difference from IGP

not neighbor on the same

not neighbor on the same

link

link

Router has to know route to next

Router has to know route to next

-

-

hop address

hop address

from IGP (or IBGP)

from IGP (or IBGP)

Otherwise, BGP route is not accepted

Otherwise, BGP route is not accepted

Recursive routing table lookup when routing

Recursive routing table lookup when routing

packets

(47)

NEXT

NEXT

-

-

HOP

HOP

(48)

NEXT

(49)

ORIGIN

ORIGIN

Informs where BGP learnt the route from

Informs where BGP learnt the route from

IGP

IGP

redistributed from IGP

redistributed from IGP

EGP

EGP

unused (from outdated protocol EGP)

unused (from outdated protocol EGP)

(50)

BGP and IGP synchronization

BGP and IGP synchronization

(51)

Route synchronization

Route synchronization

Route is synchronized, if router can see it both

Route is synchronized, if router can see it both

from BGP and IGP

from BGP and IGP

Only synchronized routes are propagated out of

Only synchronized routes are propagated out of

AS

AS

Otherwise, traffic would have to be discarded by

Otherwise, traffic would have to be discarded by

internal routers

internal routers

When IBGP is ran on every router, switch off

When IBGP is ran on every router, switch off

the synchronization test

(52)

Transit system routing

Transit system routing

implementation choices

implementation choices

BGP on every router (IBGP)

BGP on every router (IBGP)

At least on every transit router

At least on every transit router

Common solution of ISPs

Common solution of ISPs

Redistribution of BGP routes into IGP

Redistribution of BGP routes into IGP

(53)

Route aggregation in BGP

(54)

Aggregation Attributes

Aggregation Attributes

Router can aggregate more routes into one with

Router can aggregate more routes into one with

shorter prefix

shorter prefix

Only when aggregator

Only when aggregator

owns

owns

whole address range

whole address range

ATOMIC

ATOMIC

-

-

AGGREGATE=True

AGGREGATE=True

AGGREGATOR: ID of aggregating router

AGGREGATOR: ID of aggregating router

AS

AS

-

-

SET= AS

SET= AS

-

-

PATH_1+AS

PATH_1+AS

-

-

PATH_2

PATH_2

AS

AS

-

-

PATH: set as if route originated from AS of

PATH: set as if route originated from AS of

aggregating router

(55)

Aggregation Example

(56)

How to influence route selection

How to influence route selection

(57)

LOCAL_PREFERENCE

LOCAL_PREFERENCE

Well

Well

-

-

known discretionary

known discretionary

Allows routers of one AS to unify exit link they

Allows routers of one AS to unify exit link they

will use to reach some particular external

will use to reach some particular external

network

network

Route with higher LOCAL_PREFERENCE is

Route with higher LOCAL_PREFERENCE is

preferred

preferred

(58)
(59)

WEIGHT

WEIGHT

Proprietary (Cisco,

Proprietary (Cisco,

)

)

Used to increase/decrease preference of some

Used to increase/decrease preference of some

route in Input Policy Engine

route in Input Policy Engine

Higher Weight is preferred

Higher Weight is preferred

Only local significance, does not passed outside

Only local significance, does not passed outside

of single router

of single router

(60)

WEIGHT example

(61)

Multi

Multi

-

-

Exit

Exit

Discriminator

Discriminator

(MED)

(MED)

Influences other AS

Influences other AS

s decision which link to use

s decision which link to use

when routing packets into networks inside

when routing packets into networks inside

our

our

AS

AS

Lower

Lower

MED

MED

is

is

preferred

preferred

treated

treated

similary

similary

like

like

IGP

IGP

metric

metric

MED value can be set manually or taken from IGP

MED value can be set manually or taken from IGP

metric

metric

Normally, only

Normally, only

MEDs

MEDs

from the same AS may

from the same AS may

be compared

(62)

MED example

(63)

Route Selection Algorithm

Route Selection Algorithm

1.

1.

Higher WEIGHT

Higher WEIGHT

2.

2.

Higher LOCAL_PREFERENCE

Higher LOCAL_PREFERENCE

3.

3.

Route generated by router itself

Route generated by router itself

4.

4.

Shorter AS_PATH

Shorter AS_PATH

5.

5.

More preferred ORIGIN

More preferred ORIGIN

(IGP best, INCOMPLETE worst)

(IGP best, INCOMPLETE worst)

6.

6.

Lower MED

Lower MED

7.

7.

EBGP preferred over IBGP

EBGP preferred over IBGP

8.

8.

Better IGP metric to NEXT

Better IGP metric to NEXT

-

-

HOP

HOP

9.

References

Related documents

secondary to SnapMirror deployment 37 SnapVault with data compression 37 SnapVault with deduplication 37 SnapVault with volume SnapMirror 38 storage efficiency 37 SnapVault

The superiority which is styled sovereignty, and the independent political society which sovereignty implies, is distinguished from other superiority, and from other society, by

The need for creating a form of dialogue between science and business encouraged us to organize a series of international conferences Advanced Analytics and Data Science...

Participants understand their own personal values, strengths and areas of challenge or weakness and are able to effectively use or address them; are able to develop, implement

I, N.N., a servant of God, call upon thee, desire and conjure thee, O Spirit Anoch, by the wisdom of Solomon, by the obedience of Isaac, by the blessing of Abraham, by the piety

(Continue holding the LEFT hand locked around the base of your penis) Then, resume stroking with your RIGHT hand until you reach the point of wanting to orgasm again.. One more

In this study, the authors present a method for estimating calorific expenditure from combined visual and accelerometer sensors by way of an RGB-Depth camera and a

Architectural Style: Neoclassical Revival - Greek Revival NRHP Significance: Unknown NHL Significance: N/A Postcard Date: 1907