Top Banner
Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit
38

Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Dec 16, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Path Vector Routing

NETE0514

Presented by

Dr.Apichan Kanjanavapastit

Page 2: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

3b

1d

3a

1c2aAS3

AS1

AS21a

2c2b

1b

Intra-ASRouting algorithm

Inter-ASRouting algorithm

Forwardingtable

3c

Interconnected ASes

• forwarding table configured by both intra- and inter-AS routing algorithm– intra-AS sets entries for

internal dests– inter-AS & Intra-As sets

entries for external dests

Page 3: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

3b

1d

3a

1c2aAS3

AS1

AS21a

2c2b

1b

3c

Inter-AS tasks• suppose router in AS1

receives datagram dest outside of AS1– router should forward

packet to gateway router, but which one?

AS1 must:

1. learn which dests reachable through AS2, which through AS3

2. propagate this reachability info to all routers in AS1

Job of inter-AS routing!

Page 4: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Example: Setting forwarding table in router 1d

• suppose AS1 learns (via inter-AS protocol) that subnet x reachable via AS3 (gateway 1c) but not via AS2.

• inter-AS protocol propagates reachability info to all internal routers.

• router 1d determines from intra-AS routing info that its interface I is on the least cost path to 1c.– installs forwarding table entry (x,I)

3b

1d

3a

1c2aAS3

AS1

AS21a

2c2b

1b

3c

x…

Page 5: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Example: Choosing among multiple ASes

• now suppose AS1 learns from inter-AS protocol that subnet x is reachable from AS3 and from AS2.

• to configure forwarding table, router 1d must determine towards which gateway it should forward packets for dest x. – this is also job of inter-AS routing protocol!

3b

1d

3a

1c2aAS3

AS1

AS21a

2c2b

1b

3cx… …

Page 6: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Learn from inter-AS protocol that subnet x is reachable via multiple gateways

Use routing infofrom intra-AS

protocol to determine

costs of least-cost paths to each

of the gateways

Hot potato routing:Choose the

gatewaythat has the

smallest least cost

Determine fromforwarding table the interface I that leads

to least-cost gateway. Enter (x,I) in

forwarding table

Example: Choosing among multiple ASes

• now suppose AS1 learns from inter-AS protocol that subnet x is reachable from AS3 and from AS2.

• to configure forwarding table, router 1d must determine towards which gateway it should forward packets for dest x. – this is also job of inter-AS routing protocol!

• hot potato routing: send packet towards closest of two routers.

Page 7: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Why different Intra- and Inter-AS routing ? Policy: • Inter-AS: admin wants control over how its traffic routed,

who routes through its net. • Intra-AS: single admin, so no policy decisions needed

Scale:• hierarchical routing saves table size, reduced update

traffic

Performance: • Intra-AS: can focus on performance• Inter-AS: policy may dominate over performance

Page 8: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Why path vector routing is needed?

• Distance vector routing is subject to instability if there is more than a few hops in the domain of operation

• Link state routing needs a huge amount of resources to calculate routing tables. It also creates heavy traffic because of flooding

• There is a need for a third protocol which we call path vector routing

Page 9: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Path Vector Routing

• The principle of path vector routing is similar to distance vector routing

• In path vector routing, we assume that there is one node (in practice there can be more) in each autonomous system that acts on behalf of the entire autonomous system. Let us call it the speaker node

• The speaker node in an AS creates a routing table and advertises it to speaker nodes in the neighboring Ass

• A speaker node advertises the path, not the metric of the nodes, in its AS or other ASs

Page 10: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Initialization

• At the beginning, each speaker node can know only the reachability of nodes inside its autonomous system

WAN

WAN

Page 11: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Sharing

• A speaker in an AS shares its table with immediate neighbors

Page 12: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Updating

• When a speaker node receives information from a neighbor, it updates its own table by adding the nodes that are not in its routing table and adding its own AS and the AS that sent the table

• After a while each speaker has a table and knows how to reach each node in other ASs

Page 13: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Loop Prevention

• The instability of distance vector routing and the creation of loops can be avoided in path vector routing

• When a router receives a message, it checks to see if its AS is in the path list to the destination

• If it is, looping is involved and the message is ignored

Page 14: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Aggregation

• The path vector routing protocols normally support CIDR notation and the aggregation of addresses

• Note that a range may also include a block that may not be in the corresponding AS

• However, if this network exists in some other Ass, it eventually becomes part of the routing table due to the longest prefix principle

Page 15: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Policy Routing

• Policy routing can be easily implemented through path vector routing

• When a router receives a message, it can check the path

• If one of the AS listed in the path is against its policy, it can ignore that path and that destination

• It does not update its routing table with this path, and it does not send this message to its neighbors

Page 16: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Optimum Path

• We definitely cannot include metrics in a route because each AS that is included in the path may use a different criteria for the metric

• One system may use, internally, RIP, which defines hop count as the metric; another may use OSPF with minimum delay defined as the metric

• The optimum path is the path that fits the organization• In the example figure, each AS may have more than one

path to a destination. For the table, we chose the one that had the smaller number of Ass, but this is not always the case

• Other criteria such as security and safety, and reliability can also be applied

Page 17: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Internet inter-AS routing: BGP

• BGP (Border Gateway Protocol): the de facto standard

• BGP provides each AS a means to:1. Obtain subnet reachability information from

neighboring ASs.2. Propagate reachability information to all AS-internal

routers.3. Determine “good” routes to subnets based on

reachability information and policy.

• allows subnet to advertise its existence to rest of Internet: “I am here”

Page 18: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Types of Autonomous Systems

• Stub AS. A stub AS has only one connection to another AS

• Multihomed AS. A multihomed AS has more than one connection to other ASs, but it is still only a source or sink for data traffic. It can send/receive data traffic from more than one AS, but there is no transient traffic

• Transit AS. A transit AS is a multihomed AS that also allows transient traffic

Page 19: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

BGP Sessions

• The exchange of routing information between 2 routers using BGP takes place in a session

• A session is a connection that is established between 2 BGP routers only for the sake of exchange routing information

• The create a reliable environment, BGP uses the service of TCP. In other words, a session at the BGP level, as an application program, is a connection at the TCP level

Page 20: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

BGP Sessions (cont.)

• When a TCP connection is created for BGP, it can last for a long time, until something unusual happens.

• For this reason, BGP sessions are sometimes referred to as semi-permanent connections

BGP uses the services of TCP on port 179.

Note:Note:

Page 21: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

External and Internal BGP

• BGP can have 2 types of session: external BGP (E-BGP) and internal BGP (I-BGP) sessions

• The E-BGP session is used to exchange information between 2 speaker nodes belonging to 2 different Ass

• The I-BGP session is used to exchange routing information between 2 routers inside an AS

Page 22: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Distributing reachability info• using eBGP session between 3a and 1c, AS3 sends prefix

reachability info to AS1.– 1c can then use iBGP do distribute new prefix info to all routers

in AS1– 1b can then re-advertise new reachability info to AS2 over 1b-

to-2a eBGP session• when router learns of new prefix, creates entry for prefix in its

forwarding table.

3b

1d

3a

1c2aAS3

AS1

AS21a

2c

2b

1b

3ceBGP session

iBGP session

Page 23: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Path Attributes

• The path presents in a list of ASs in the previous example, in fact, it is a list of attributes

• Each attribute gives some information about the path. The list of attributes helps the receiving router make a better decision when applying its policy

• Attributes are divided into 2 broad categories: well-known and optional. A well known attribute is one that every BGP router must recognize. An optional attributes is one that needs not be recognized by every router

Page 24: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Path Attributes (cont.)

• Well-known attributes are themselves divided into 2 categories: mandatory and discretionary

• A well-known mandatory attribute is one that must appear in the description of a route

• A well-known discretionary attribute is one that must be recognized by each router, but is not required to be included in every update message

• Two important attributes:– AS-PATH: contains ASs through which prefix advertisement has

passed– NEXT-HOP: is the router interface that begins the AS-PATH

Page 25: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Why AS-PATH is needed?

• AS1 and AS2 are connected by 2 peering links. A router in AS1 could learn about 2 different routes to the same prefix x. These 2 routes could have the same AS-PATH to x, but could have different NEXT-HOP values corresponding to the different peering link. Using the AS-PATH values and the intra-AS routing algorithm, the router can determine the cost of the path to each peering link, and then apply hot potato routing to determine the appropriate interface

Page 26: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.
Page 27: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

BGP route selection

• router may learn about more than 1 route to some prefix. Router must select route.

• elimination rules:1. local preference value attribute: policy

decision

2. shortest AS-PATH

3. closest NEXT-HOP router: hot potato routing

4. additional criteria

Page 28: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

BGP routing policy

• A,B,C are provider networks• X,W,Y are customer (of provider networks)• X is dual-homed: attached to two networks

– X does not want to route from B via X to C– .. so X will not advertise to B a route to C

A

B

C

W X

Y

legend:

customer network:

provider network

Page 29: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

BGP routing policy (2)

• A advertises path AW to B• B advertises path BAW to X • Should B advertise path BAW to C?

– No way! B gets no “revenue” for routing CBAW since neither W nor C are B’s customers

– B wants to force C to route to w via A– B wants to route only to/from its customers!

A

B

C

W X

Y

legend:

customer network:

provider network

Page 30: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Types of Packets

• BGP uses 4 different type of messages: open, update, keepalive, and notification– OPEN: opens TCP connection to peer and authenticates sender– UPDATE: advertises new path (or withdraws old)– KEEPALIVE keeps connection alive in absence of UPDATES;

also ACKs OPEN request– NOTIFICATION: reports errors in previous msg; also used to

close connection

Page 31: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Packet Format

• All BGP packets share the same common header. The fields of this header are as follows:– Marker. The 16-byte marker field is reserved for authentication– Length. The 2-byte field defines the length of the total message

including the header– Type. This 1-byte field defines the type of the packet

Page 32: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Open Message

• To create a neighborhood relationship, a router running BGP opens a TCP connection with a neighbor and sends an open message

• If the neighbor accepts the neighborhood relationship, it responds with a keepalive message, which means that a relationship has been established between the 2 routers

Page 33: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Open Message (cont.)

• My autonomous system. This defines the AS number• Hold time. This defines the maximum number of seconds

that can elapse until one of the parties receives a keepalive or update message from the other. If a router does not receive one of these message during the hold time period, it considers the other party dead

• BGP identifiers. This defines the IP address of the router that sends the open message

Page 34: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Update Message

• The update message is the heart of the BGP protocol. It is used by a router to withdraw destination that have been advertised previously, announce a route to a new destination, or both

Page 35: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Update Message (cont.)

• The update message fields are listed below:– Unfeasible routes length. This defines the length of

the next field– Withdrawn routes. This fields lists all the routes that

must be deleted from the previously advertised list– Path attributes length. This defines the length of the

next field– Path attributes. This defines the attributes of the path

to the network whose reachability is being announced in this message

– Network layer reachability information (NLRI). This defines the network that is actually advertised by this message

Page 36: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Keepalive Message

• The routers (called peers in BGP parlance) running the BGP protocols exchnage keepalive messages regularly (before their hold time expires) to tell each other that they are alive

Page 37: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Notification Message

• A notification message is sent by a router whenever an error condition is detected or a router wants to close the connection

Page 38: Path Vector Routing NETE0514 Presented by Dr.Apichan Kanjanavapastit.

Notification Message (cont.)

• The fields making up the notification message follow:– Error code, Error subcode, and error data