Top Banner
Chapter 4 Network Layer Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
23
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: Week14 lec2

Chapter 4Network Layer

Computer Networking: A Top Down Approach 4th edition. Jim Kurose, Keith RossAddison-Wesley, July

2007.

Page 2: Week14 lec2

Path Vector RoutingLoop Prevention

If a router receives a message, checks to see if its autonomous system is in the path list to the destination.

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

Policy RoutingIf one of the path in the path vector

is against the policy it can ignore that path and does not update its routing table.

Page 3: Week14 lec2

Inter-AS Routing in Internet: BGP BGP (Border Gateway Protocol)

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 4: Week14 lec2

BGP Basics Pairs of routers (BGP peers) exchange routing info over

TCP connections using port 179. For each TCP connection, the two routers at the end of

the connection are called BGP Peers The TCP connection along with all the BGP messages

sent over the connection is called a BGP Session Internal (IBGP) neighbours

A pair of BGP speakers within the same AS External (EBGP) neighbours

Two BGP speakers from two different AS

3b

1d

3a

1c2aAS3

AS1

AS21a

2c

2b

1b

3ceBGP session

iBGP session

Page 5: Week14 lec2

BGP Basics BGP allows each AS to learn which

destinations are reachable via its neighboring ASs.

Destinations are not hosts but instead are CIDRized prefixes. E.g. AS1 has four subnets attached to it

It will aggregate the prefixes of these four and will advertise the single prefix

AS1 and AS2 send reachability information trough their gateway routers 1b and 2a.

When a gateway router receives e-BGP learned prefixes, the gateway router uses iBGP sessions to distribute the prefixes to other routers in the AS.

Page 6: Week14 lec2

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, it creates

entry for prefix in its forwarding table.

3b

1d

3a

1c2aAS3

AS1

AS21a

2c

2b

1b

3ceBGP session

iBGP session

Page 7: Week14 lec2

Path Attributes & BGP Routes

In BGP an AS is recognized by its globally unique Autonomous System Number (ASN).Assigned by ICANN Regional

Registries.Advertised prefix includes BGP

attributes. prefix + attributes = “route”

Two important attributes:AS-PATH and NEXT-HOP

Page 8: Week14 lec2

Path Attributes & BGP Routes

AS-PATHContains ASs through which prefix

advertisement has passed.When a prefix is passed into an AS, the

As adds its ASN to the AS-PATH attribute.E.g suppose that the prefix

138.16.64.0/24 is first advertised from AS2 to AS1.

If AS1 then advertises the prefix to AS3, AS-PATH would be AS2 AS1.

Detect and prevent looping advertisements

Page 9: Week14 lec2

Routing Loop Prevention

AS1

AS2

AS3

AS4

Net1

[Net1, (AS4)]

[ Net1, (AS3,AS4) ]

[ Net1, (AS1,AS2,AS3,AS4)]

[ Net1, (AS2,AS3,AS4)]

AS3 won’t forward this further

Page 10: Week14 lec2

NEXT-HOP The route advertised from 3a to 1c contains advertised

prefix say x and NEXT-HOP attribute.NEXT-HOP is the IP address of the router 3a interface that

leads to 1c. Router 1d learns about this route from iBGP. Remember that intra AS protocol finds the least cost

path to all the subnet attached to the routers in AS1 Router 1d makes entry into the table (l,x) where l is the

interface that begins the least cost path to the gateway router 1c.

3b

1d

3a

1c2aAS3

AS1

AS21a

2c

2b

1b

3ceBGP session

iBGP session

Page 11: Week14 lec2

AS 6431

135.207.0.0/16Next Hop = 12.125.133.90

AS 7018

AS 12654

12.125.133.90

135.207.0.0/16Next Hop = 12.127.0.121

12.127.0.121

NEXT-HOP

Page 12: Week14 lec2

BGP Route Selection Router may learn about more than one route

to the some prefix. Router must select one route.

BGP sequentially invokes the following elimination rules until one route remains

1. The route with highest local preference value. This is a policy decision.

2. Shortest AS-PATH. 3. Hot Potato Routing.

Additional criteria (SEE RFC 4271)

Page 13: Week14 lec2

BGP speakers receive a lot of path-vector advertisements from its EBGP neighbours

Advertisement processing involves 3 stepsImport policiesPath selection

Which route should I choose? Export policies

Which route should I export to my EBGP neighbors?

BGP Route Selection

Page 14: Week14 lec2

CompanyAS2

ISP1AS3

ISP2 AS4 Net1

[Net1, (AS2)]

[ Net1, (AS1,AS4,AS2)]

If AS1 forwards this to AS3, then ISP1 may use AS1 to reach Net1 if it chooses.However, AS1 may not want that.

Company AS1

[Net1, (AS4,AS2)]

Net2

[Net1, (AS4,AS2)]

Policy Routing

Page 15: Week14 lec2

CompanyAS2

ISP1AS3

ISP2 AS4

Net1[Net2, (AS4,AS1)]

[ Net2, (AS1)]

If AS1 doesn’t want to become a transitnetwork, it does not export routes learntfrom EBGP. It exports only its own routes.

Company AS1

[Net1, (AS4,AS2)]

Net2[Net2, (AS3,AS1)]

AS1 won’t export this

Policy Routing

Page 16: Week14 lec2

Why different Intra- and Inter-AS routing ?

Policy: Inter-AS: admin wants control over how its traffic

routed, who routes through its network. Intra-AS: single admin, so no policy decisions

needed

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

Page 17: Week14 lec2

Chapter 5 Link Layer

Computer Networking: A Top Down Approach 4th edition. Jim Kurose, Keith RossAddison-Wesley, July

2007.

Page 18: Week14 lec2

Link Layer: Introduction Layer-2 packet is a frame,

encapsulates datagram Link layer has responsibility

of transferring datagram from one node to adjacent node over a link

Datagram may be carried by different link-layer protocols on different links in the path. Services provided by link layer

protocols may be different May or may not provide

reliable data transfer over link

Page 19: Week14 lec2

Link layer and Network Layer

Transportation Analogy

Travel Agent planning a trip for a tourist Trip from Princeton to Lausanne

Car: Princeton to JFK Plane: JFK to Geneva Train: Geneva to Lausanne

Tourist = Datagram Transportation Mode = Link layer protocol Travel Agent = Routing Algorithm

Page 20: Week14 lec2

Link Layer Services Framing:

Encapsulate datagram into frame, adding header, trailer

The structure of the frame is specified by the Link Layer Protocol

Link Access Channel access if shared medium Medium Access Control (MAC) protocol specifies the

rules by which a frame is transmitted onto the link Reliable Delivery between Adjacent Nodes

Link Layer like Transport Layer provides reliability with ACKs and retransmissions.

Wireless links: high error rates Seldom used on low bit-error link (fiber, some twisted

pair)

Page 21: Week14 lec2

Link Layer Services

Flow Control: Pacing between adjacent sending and receiving

nodes

Error Detection: Errors caused by signal attenuation, noise. Receiver detects presence of errors

Error correction: Receiver identifies and corrects bit error(s) without

resorting to retransmissions Transport layer provides reliable delivery between

processes on an end-to-end basis Link layer provides reliability between two nodes

connected by a single link.

Page 22: Week14 lec2

Where is the link layer implemented? In each and every host Link layer implemented in

“adaptor” ( Network Interface Card NIC)

Attaches into host’s system buses

Network Adaptor Link Layer controller

Single special purpose chip Implements many of the

link layer services Mostly in hardware (Framing,

flow control, error detection etc)

Software Component Receiving the datagram,

addressing, activating the controller hardware

controller

physicaltransmission

cpu memory

host bus (e.g., PCI)

network adapter card

host

applicationtransportnetwork

link

linkphysical

Page 23: Week14 lec2

Adaptors Communicating

Sending Side: Encapsulates datagram

in frame Adds error checking

bits, flow control, etc.

Receiving Side looks for errors, flow

control, etc extracts datagram,

passes to upper layer at receiving side

frame

controller controller

sending host receiving host

datagram datagram

datagram