eec 484 584 computer networks n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
EEC-484/584 Computer Networks PowerPoint Presentation
Download Presentation
EEC-484/584 Computer Networks

Loading in 2 Seconds...

play fullscreen
1 / 31

EEC-484/584 Computer Networks - PowerPoint PPT Presentation


  • 102 Views
  • Uploaded on

EEC-484/584 Computer Networks. Lecture 10 Wenbing Zhao wenbingz@gmail.com (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer Networking book). Outline. Routing algorithms Link state routing Distance vector routing Internet protocol v4 Header

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'EEC-484/584 Computer Networks' - chace


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
eec 484 584 computer networks

EEC-484/584Computer Networks

Lecture 10

Wenbing Zhao

wenbingz@gmail.com

(Part of the slides are based on Drs. Kurose & Ross’s slides for their Computer Networking book)

outline
Outline

Routing algorithms

Link state routing

Distance vector routing

Internet protocol v4

Header

Fragmentation

Internet Protocol v6

EEC-484/584: Computer Networks

link state routing
Link State Routing

Basic idea

Assumes net topology & link costs known to all nodes

Accomplished via “link state broadcast”

All nodes have same info

Computes least cost paths from one node (‘source”) to all other nodes, using Dijkstra’s Algorithm

Gives forwarding table for that node

EEC-484/584: Computer Networks

dijkstra s algorithm
Dijkstra’s Algorithm

Each node labeled with distance from source node along best known path

Initially, no paths known so all nodes labeled with infinity

As algorithm proceeds, labels may change reflecting shortest path

Label may be tentative or permanent, initially, all tentative

When label represents shortest path from source to node, label becomes permanent

EEC-484/584: Computer Networks

compute shortest path from a to d
Compute Shortest Path from A to D

Start with node A as the initial working node

Examine each of the nodes adjacent to A, i.e., B and G, relabeling them with the distance to A

Examine all the tentatively labeled nodes in the whole graph and make the one with the smallest label permanent, i.e., B. B is the new working node

EEC-484/584: Computer Networks

compute shortest path from a to d1
Compute Shortest Path from A to D

EEC-484/584: Computer Networks

computation results
Computation Results

C

B

E

F

A

D

H

G

Destination

link

Routing Table in A

(A,B)

(A,B)

(A,B)

(A,B)

(A,B)

(A,B)

(A,B)

B

C

D

E

F

G

H

EEC-484/584: Computer Networks

distance vector routing
Distance Vector Routing

Also called Bellman-Ford or Ford-Fulkerson

Each router maintains a table, giving best known distance to each destination and which line to use to get there

Table is updated by exchanging info with neighbors

Table contains one entry for each router in network with

Preferred outgoing line to that destination

Estimate of time or distance to that destination

Once every T msec, router sends to each neighbor a list of estimated delays to each destination and receives same from those neighbors

EEC-484/584: Computer Networks

distance vector routing how each entry is updated
Distance Vector Routing:How each entry is updated

A

d(A,Y)

Y

At router A, for Z

Compute d(A,X) + d(X,Z) and

d(A,Y) + d(Y,Z), take minimum

d(Y,Z)

d(A,X)

Z

X

d(X,Z)

d(A,Z) = min {d(A,v) + d(v,Z) }

where min is taken over all neighbors v of A

EEC-484/584: Computer Networks

slide11

cost to

x y z

x

0 2 7

y

from

z

2

1

7

z

x

y

d(x,z) = min{d(x,y) + d(y,z), d(x,z) + d(z,z)}

= min{2+1 , 7+0} = 3

d(x,y) = min{d(x,y) + d(y,y), d(x,z) + d(z,y)} = min{2+0 , 7+1} = 2

node x table

cost to

x y z

x

0

2

3

y

from

2 0 1

z

7 1 0

node y table

cost to

x y z

x

2 0 1

y

from

z

  • Each node keeps track of the following info:
  • Its own distance vector: least-cost to each of other routers
  • Each of its neighbor’s distance vector received most recently
  • If there is a change in distance vector, a node sends the update to all its neighbors

node z table

cost to

x y z

x

∞ ∞ ∞

y

from

z

7

1

0

time

EEC-484/584: Computer Networks

slide12

cost to

x y z

x

0 2 7

y

from

z

2

1

7

z

x

y

d(x,z) = min{d(x,y) + d(y,z), d(x,z) + d(z,z)}

= min{2+1 , 7+0} = 3

d(x,y) = min{d(x,y) + d(y,y), d(x,z) + d(z,y)} = min{2+0 , 7+1} = 2

node x table

cost to

cost to

x y z

x y z

x

0 2 3

x

0 2 3

y

from

2 0 1

y

from

2 0 1

z

7 1 0

z

3 1 0

node y table

cost to

cost to

cost to

x y z

x y z

x y z

x

x

0 2 7

2 0 1

x

0 2 3

y

y

from

2 0 1

y

from

from

2 0 1

z

z

7 1 0

z

3 1 0

node z table

cost to

cost to

cost to

x y z

x y z

x y z

x

0 2 7

x

0 2 3

x

∞ ∞ ∞

y

y

2 0 1

from

from

y

2 0 1

from

z

z

z

3 1 0

3 1 0

7

1

0

time

EEC-484/584: Computer Networks

distance vector routing1
Distance Vector Routing

Distance from A to B 12ms, to C 25ms, to D 40ms, to G 18ms

Distance from J to A 8ms, to I 10ms, to H 12ms, to K 6ms

Distance from J to A to G 8+18 = 26msto I to G 10+31 = 41ms to H to G 12+6=18ms to K to G 6+31=37ms

EEC-484/584: Computer Networks

distance vector routing2
Distance Vector Routing

Good news travels fast

Bad news travels slow

Count to infinity problem: Takes too long to converge upon router failure

×

Routers’ knowledge about the cost to A

EEC-484/584: Computer Networks

the network layer in internet
The Network Layer in Internet

Host, router network layer functions:

  • ICMP protocol
  • error reporting
  • router “signaling”
  • IP protocol
  • addressing conventions
  • datagram format
  • packet handling conventions
  • Routing protocols
  • path selection
  • RIP, OSPF, BGP

forwarding

table

Transport layer: TCP, UDP

Network

layer

Link layer

physical layer

EEC-484/584: Computer Networks

ipv4 datagram format
IPv4 Datagram Format

IP protocol version

number

32 bits

total datagram

length (bytes)

header length

(bytes)

Total

length

type of

service

IHL

ver

for

fragmentation/

reassembly

fragment

offset

“type” of data

flgs

16-bit identifier

max number

remaining hops

(decremented at

each router)

time to

live

header

checksum

protocol

32 bit source IP address

32 bit destination IP address

upper layer protocol

to deliver payload to

E.g. timestamp,

record route

taken, specify

list of routers

to visit.

Options (if any)

  • How much overhead with TCP?
  • 20 bytes of TCP
  • 20 bytes of IP
  • = 40 bytes + app layer overhead

data

(variable length,

typically a TCP

or UDP segment)

EEC-484/584: Computer Networks

the ipv4 header
The IPv4 Header

Version – 4

IHL – length of header in 32-bit words

Min 5, max 15 – i.e., 60 bytes

Type of service - to distinguish different classes of service

To accommodate differentiated services (which class this packet belongs to)

Total length – header and data  65,535 (216-1) bytes

Identification – allows destination to determine which datagram a fragment belongs to

EEC-484/584: Computer Networks

the ipv4 header1
The IPv4 Header

Time to live – counter to limit packet lifetimes

Max lifetime 255sec

Packet is destroyed when counter becomes 0

Protocol – which transport layer protocols being used

Header checksum – verifies header

EEC-484/584: Computer Networks

the ipv4 header2
The IPv4 Header

Options – security, error reporting, etc.

Some of the IP options

EEC-484/584: Computer Networks

ipv4 fragmentation
IPv4 Fragmentation

Fragmentation Flags

DF – tells routers “Don’t Fragment”

MF – More Fragments. All fragments except last have this set. Used as check against total length

Fragment offset – where in datagram this fragment belongs

All fragments (payload in the IP packet) except last must be multiples of 8 bytes

The number of 8 byte blocks is called Number of Fragment Blocks (NFB)

The unit of the offset is NFB

EEC-484/584: Computer Networks

ipv4 fragmentation reassembly
IPv4 Fragmentation & Reassembly

Network links have MTU (max.transfer size) - largest possible link-level frame.

different link types, different MTUs

Large IP datagram divided (“fragmented”) within net

one datagram becomes several datagrams

“reassembled” only at final destination

IP header bits used to identify, order related fragments

fragmentation:

in: one large datagram

out: 3 smaller datagrams

reassembly

EEC-484/584: Computer Networks

ipv4 fragmentation and reassembly
IPv4 Fragmentation and Reassembly

length

=1040

length

=4000

length

=1500

length

=1500

ID

=x

ID

=x

ID

=x

ID

=x

MF

=0

MF

=0

MF

=1

MF

=1

offset

=370

offset

=185

offset

=0

offset

=0

  • Example
  • 4000 byte datagram
  • MTU = 1500 bytes

One large datagram becomes

several smaller datagrams

1480 bytes in data field

offset =

1480/8

Fragment should be as large as possible

EEC-484/584: Computer Networks

ipv6 motivation
IPv6: motivation
  • initial motivation:32-bit address space soon to be completely allocated.
  • additional motivation:
    • header format helps speed processing/forwarding
    • header changes to facilitate QoS

IPv6 datagram format:

    • fixed-length 40 byte header
    • no fragmentation allowed

Network Layer

ipv6 datagram format
IPv6 datagram format

priority: identify priority among datagrams in flow

flow Label: identify datagrams in same “flow.”

(concept of“flow” not well defined).

next header: identify upper layer protocol for data

pri

ver

flow label

hop limit

payload len

next hdr

source address

(128 bits)

destination address

(128 bits)

data

32 bits

Network Layer

other changes from ipv4
Other changes from IPv4
  • checksum:removed entirely to reduce processing time at each hop
  • options: allowed, but outside of header, indicated by “Next Header” field
  • ICMPv6: new version of ICMP
    • additional message types, e.g. “Packet Too Big”
    • multicast group management functions

Network Layer

transition from ipv4 to ipv6

IPv6 header fields

IPv6 source dest addr

UDP/TCP payload

IPv4 payload

Transition from IPv4 to IPv6
  • not all routers can be upgraded simultaneously
    • no “flag days”
    • how will network operate with mixed IPv4 and IPv6 routers?
  • tunneling: IPv6 datagram carried as payload in IPv4 datagram among IPv4 routers

IPv4 header fields

IPv4 source, dest addr

IPv6 datagram

IPv4 datagram

Network Layer

tunneling

IPv4 tunnel

connecting IPv6 routers

logical view:

A

A

E

E

B

B

F

F

IPv6

IPv6

IPv6

IPv6

IPv6

IPv6

IPv6

IPv6

Tunneling

C

D

physical view:

IPv4

IPv4

Network Layer

tunneling1

Flow: X

Src: A

Dest: F

data

Flow: X

Src: A

Dest: F

data

IPv4 tunnel

connecting IPv6 routers

logical view:

A

A

E

E

B

B

F

F

IPv6

IPv6

IPv6

IPv6

IPv6

IPv6

IPv6

IPv6

src:B

dest: E

src:B

dest: E

flow: X

src: A

dest: F

data

flow: X

src: A

dest: F

data

A-to-B:

IPv6

E-to-F:

IPv6

B-to-C:

IPv6 inside

IPv4

B-to-C:

IPv6 inside

IPv4

Tunneling

C

D

physical view:

IPv4

IPv4

Network Layer

dijkstra s algorithm exercise
Dijkstra’s Algorithm: Exercise

Given the subnet shown below, using the Dijkstra’s Algorithm, determine the shortest path tree from node u and its routing table

5

3

5

2

2

1

3

1

2

1

x

z

w

y

u

v

EEC-484/584: Computer Networks

distance vector routing exercise
Distance Vector Routing: Exercise

Consider the subnet shown below. Distance vector routing is used, and the following vectors have just come in to router C: from B: (5, 0, 8, 12, 6, 2); from D: (16, 12, 6, 0, 9, 10); and from E: (7, 6, 3, 9, 0, 4). The measured delays to B, D, and E, are 6, 3, and 5, respectively. What is C's new routing table? Give both the outgoing line to use and the expected delay.

EEC-484/584: Computer Networks

exercise ip fragmentation
Exercise: IP Fragmentation

Suppose that host A is connected to a router R 1, R 1 is connected to another router, R 2, and R 2 is connected to host B. Suppose that a TCP message that contains 900 bytes of data and 20 bytes of TCP header is passed to the IP code at host A for delivery to B. Show the Total length, Identification, DF, MF, and Fragment offset fields of the IP header in each packet transmitted over the three links. Assume that link A-R1 can support a maximum frame size of 1024 bytes including a 14-byte frame header, link R1-R2 can support a maximum frame size of 512 bytes, including an 8-byte frame header, and link R2-B can support a maximum frame size of 512 bytes including a 12-byte frame header.

EEC-484/584: Computer Networks