Docsity

Network Routing and Protocols: Understanding Routing Algorithms and Network Protocols, Slides of Computer Numerical Control

Toggle sidebar
bg1
1
Network Routing and Network Protocols
Arvind Krishnamurthy
Spring 2004
Routing
4
3
6
2
1
9
1
1
nRouting algorithms view the
network as a graph
nProblem: find lowest cost
path between two nodes
nFactors:
nStatic topology
nDynamic load
nPolicy
nTwo main approaches:
nLink state protocol
nEach node builds a local
copy of the entire network
nDistance-vector protocol
D
A
F
E
B
C
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a

Partial preview of the text

Download Network Routing and Protocols: Understanding Routing Algorithms and Network Protocols and more Slides Computer Numerical Control in PDF only on Docsity!

Network Routing and Network Protocols

Arvind Krishnamurthy

Spring 2004

Routing

4

3

6 1 2

9

1

1

n Routing algorithms view the

network as a graph

n Problem: find lowest cost

path between two nodes

n Factors:

n Static topology

n Dynamic load

n Policy

n Two main approaches:

n Link state protocol

n Each node builds a local

copy of the entire network

n Distance-vector protocol

D

A

E F B

C

Distributed Bellman-Ford

  • Start Conditions:
    • Each router starts with a vector of distances to all directly attached

networks

  • Send step:
    • Each router advertises its current vector to all neighboring routers
  • Receive step:
    • For every network X, router finds shortest distance to X

•Considers current distance to X

•Then takes into account distance to X from its neighbors

  • Router updates its cost to X
  • After doing this for all X, router goes to send step

Example - Initial Distances

A

B

E

C

D

Info at Node A B C D

A B C

Distance to Node D ~ ~ 2 0 E 1 8 ~ 2

E

Complexity

n How many steps does it take to converge?

n What is the message complexity of the algorithm?

n How does this compare to link state routing protocol?

The Bouncing Effect

A

B

C

B

C 2

dest cost

A

C 1

dest cost

A

B 1

dest cost

X

C Sends Routes to B

A

B

C

B

C 2

dest cost

A

C 1

dest cost

A

B 1

dest cost

B Updates Distance to A

A

B

C

B

C 2

dest cost

A

C 1

dest cost

A

B 1

dest cost

Solutions

n Problems arise:

n When metric increases

n Implicit path has loops

n “Solutions”:

n If metric increases, delay propagating information

n Adversely affects convergence

n Split horizon: C does not advertise route to B

n Poisoned reverse: C advertises route to B with infinite distance

n Works for two node loops

n Does not work for loops with more nodes

Example Where Split Horizon Fails

A

n When link breaks, C marks D as unreachable and reports that to A and B n Suppose A learns it first n A now thinks best path to D is through B n A reports D unreachable to B and a route of cost=3 to C n C thinks D is reachable through A at cost 4 and reports that to B n B reports a cost 5 to A who reports new cost to C n etc...

X

B

C

D

Solution: Enhanced Distance Vector

n Each routing update carries the entire path

n Loops are detected as follows:

n When node gets route check if node is already in path

n If yes, reject route

n If no, add self and (possibly) advertise route further

n Advantage:

n Metrics are local - node chooses path, protocol ensures no loops

Border Gateway Protocol (BGP)

n Designed for scalability

n Granularity is at the level of “autonomous systems” (ASs)

n Usual BGP table has a few thousand entries

n Each entries contains the entire AS-path for getting to a

destination

n Uses simple hop-count metric – does not propagate

information about bandwidth or congestion in the system

n Some problems:

n ASes do not necessarily convey packets through shortest paths

n Some adopt “early exit” strategy – get rid of packet as soon as

possible

n Some send packets only through other ASes with which they

have contractual agreements

Issues (contd.)

n Fragmentation & reassembly

n Flow control

n Sender generating data faster than the receiver can handle

n Feedback required from receiver to sender

n Congestion control

n Related to flow control; similar in many ways

n There is more than the sender & receiver

n Problem gets rediscovered every once in a while!

n Presentation

n Endian-ness, floating point format

n Security (authentication)

Solution: Layered Protocols

n Collection of protocols

n Stacked together

n Each solves one of the problems

n Protocol has three interfaces:

n Provides service to higher levels of the protocol stack

n Depends on some lower transport protocol

n Has a peer-to-peer interface

Simple File Transfer

n Copy file to remote machine

Send( fname,

hostname )

Send( packet,

hostname )

Recv( hostname,

buffer )

fname, userid

block

ok

ack

block

ack

Protocol Stack

IP

Ethernet FDDI^ 802.

UDP TCP

RPC

NFS WWW E-mail^ rlogin

“Time-to-live”

n Field on an IP packet header:

n 8 bit header (255 secs or ticks)

n Every router/gateway forwards a packet, it subtracts at least 1 tick

n When it gets to zero, packet is trashed

n Prevents packets from roaming around for ever

n Question: what are the implications of time-to-live?

Features and Limitations

n IP packet headers are variable length:

n Route that a packet takes can be recorded

n Source routing: specify the route from the source

n What are the IP limits?

n 32 bits of address

n Reliability: requires to get to destination in one shot

n Speed limitations?

Transmission Control Protocol

n Connection oriented

n End-to-end reliable

n Flow controlled

n Congestion controlled

open

close

write

push

read

Send packet

Recv packet

Overall Features

n Reliable

n Sequence numbers (per byte basis)

n Acknowledgements

n Timeout/retransmit

n Flow control

n “sliding window protocol”

n Purpose: pipeline communication through overlap

n Multiplexing

n Several connections to be open (sockets: host, port number)

n Connection-based: state kept at both ends

n Out of band data: “urgent”

Window Based Protocol

n Send up to N messages at a time without waiting for acks

n “Window” also reflects storage at receiver – sender shouldn’t overrun

receiver’s buffer space

n Each message has sequence number. Receiver can discard state of

messages outside the window

n If messages are received out of order:

n Keep copy until sender fills in the missing pieces

Source Dest

Peak Bandwidth:

Packets_in_window * packet_size/ RTT

or

packet_size/message_init_overhead

Flow Control Details

Sender messages

sent, acked sent, not acked not sent “in window”

not sent not “in window”

Receiver messages

maybe received not acked

received not yet received given to app

received, acked buffered

n Receiver acks: “got all messages up to #”

n Duplicate acks implies holes in received message sequence

n Sender can perform “fast retransmit”

TCP Flow Control

n Assume:

n Receiver window size = 8K

n TCP minimum threshold for sending = 1K

n Initial sequence number = 3000

User User

Send 3 bytes

Buffer: 3

TCP Flow Control 2

n Acknowledge message: “expecting byte # x”

User User

Send 997 bytes

Buffer: 0 Seq: 3000, Size: 1K

User User

Buffer: 0 Ack: 4000 (^) Buffer: 1K

TCP Flow Control 5

User User

Buffer: 0K Window: 3K

User User

Buffer: 0K

Seq: 8000, Size: 1K

Buffer: 3K

Buffer: 0K

Recv 3K bytes

3 x Send 1K bytes

Seq: 9000, Size: 1K

Seq: 10000, Size: 1K

TCP Flow Control 6

User User

Buffer: 0K Ack: 9000, Wdw: 1K

User User

Buffer: 0K (^) Buffer: 2K

Buffer: 1K

Recv 1K bytes

Seq: 9000, Size: 1K

Ack: 11000

Congestion Control

n Window size controls flow and congestion

n Receiver advertised window is maximum amount of data that can

be outstanding

n Have a smaller window if there is congestion in the system

n Canonical congestion problem:

n Flow between A-B uses up link capacity

n Flow between C-D starts, resulting in congestion on the link

A

C

B

D

Issues

n Flows need to find a fair use of link resources

n When a flow starts, it needs to find what is available reasonably

fast and under different network capacities

n Flows need to distinguish packet losses from packet delays

n Spurious detection of packet loss results in more traffic, more

congestion, more delays, and so on

n Flows need to adapt to changing network conditions

n Sometimes increase its utilization, sometimes lower its utilization