computer networking chapter #4 dr. abdulrhaman alameer

65
Computer Networking Chapter #4 Dr. Abdulrhaman Alameer

Upload: others

Post on 20-Feb-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

ComputerNetworking

Chapter#4

Dr.AbdulrhamanAlameer

Application

Transport

Network

Data link

Physical

HTTP,FTP,E-mail

UDP,TCP 2handshake,3handshake Reliability

Rou>ngandForwarding

ComputerNetwork

2

NetworkLayer3

•  NetworkLayer•  Itisresponsiblefortranspor>ngpacketfromsendingtoreceivinghost-  Onsendingsideencapsulatespacketintodatagrams-  Onreceivingside,deliverspackettotransportlayer

application transport network data link physical

Datagrams Datagrams

Data application transport network data link physical

Data Data :TCP / UDP

Data :TCP / UDP

NetworkLayer

4

•  Forwarding:movepacketsfromrouter’sinputtoappropriaterouteroutput.

•  Rou-ng:determineroutetakenbypackets(planningtrip)fromsourcetodes>na>on.(rou-ngalgorithms).

•  Twofunc=onsinthenetwork-layer

application transport network data link physical

Datagrams

application transport network data link physical

Datagrams

Rou>ngAlgorithm

ForwardingtableHeadervalue Outputlink

100  3101  2102  2

§ForwardingtableHeadervalue Outputlink

100  3101  2102  2

Rou>ngAlgorithm

NetworkLayer

5

•  Connec=on,Connec=on-lessService

•  Connec=onServicevirtual-circuit

•  Connec=onlessServicedatagram

NetworkLayer

6

•  Connec=onServicevirtual-circuit(VC):Itisusedtotransportdataoverapacketswitchcomputernetwork,inwhichitneedstosetupacalltoappearasifthereisaphysicalpathestablishedbetweenthefinaldes>na>onandsourceandthroughwhichallpacketscanberoutedduringthecall.-  EachpacketcarriesVCiden>fier(notdes>na>onhostaddress)forforwarding.-  Everyrouteronsource-destpathmaintains“state”foreachpassingconnec>on-  UsedinATM-  Notusedintoday’sInternet

application transport network data link physical

1. initiate call 2. incoming call 3. accept call 4. call connected

5. data flow begins 6. receive data application transport network data link physical

NetworkLayer

7

•  Connec=on,connec=on-lessservice

•  Connec=onServicevirtual-circuit(VC)

•  Connec=onlessServicedatagram

NetworkLayer

8

Datagram:Itisusedtotransportdataoverapacketswitchcomputernetwork.-  Eachpacketusesdes>na>onhostaddressforforwardingusingdes>na>onhostaddress-  Noneedtosetupacallatnetworklayer-  Everyrouter:nostatemaintainsaboutend-to-endconnec>ons

1. send datagrams

application transport network data link physical

application transport network data link physical

2. receive datagrams

Datagram

1 2 3 4 5

13

4

5

2

6

6

•  Connec=on-lessService

NetworkLayer

EachpacketcallasDatagrams

9

•  DatagramorVCnetwork:why?Internet(datagram)•  dataexchangeamong

computers–  “elas>c”service,nostrict

>mingreq.•  manylinktypes

–  differentcharacteris>cs–  uniformservicedifficult

•  “smart”endsystems(computers)–  canadapt,performcontrol,

errorrecovery–  simpleinsidenetwork,

complexityat“edge”

ATM(VC)•  evolvedfromtelephony•  humanconversa>on:

–  strict>ming,reliabilityrequirements

–  needforguaranteedservice

•  “dumb”endsystems–  telephones–  complexityinsidenetwork

NetworkLayer

10

TheInternetnetworklayer

forwarding table

•  host,routernetworklayerfunc=ons:

routing protocols •  path selection •  RIP, OSPF, BGP

IP protocol •  addressing conventions •  datagram format •  packet handling conventions

ICMP protocol •  error reporting •  router “signaling”

transport layer: TCP, UDP

link layer

physical layer

network layer

-  (RIP):Rou>ngInforma>onProtocol-  (OSPF):OpenShortestPathFirst-  (BGP):BorderGatewayProtocol

link layer

physical layer

NetworkLayer

11

ver length

32 bits

data (variable length, typically a TCP

or UDP segment)

16-bit identifier header

checksum time to

live

32 bit source IP address

head. len

type of service

flgs fragment offset

upper layer

32 bit destination IP address options (if any)

IP protocol version number

header length (bytes)

upper layer protocol to deliver payload to

total datagram length (bytes)

“type” of data for fragmentation/ reassembly max number

remaining hops (decremented at

each router)

e.g. timestamp, record route taken, specify list of routers to visit.

how much overhead? v  20 bytes of TCP v  20 bytes of IP v  = 40 bytes + app

layer overhead

IPdatagramformat

12

•  IPaddress:32-bitiden>fierforhost,routerinterface

•  interface:connec>onbetweenhost/routerandphysicallink–  routerstypicallyhave

mul>pleinterfaces–  hosttypicallyhasoneac>ve

interface(e.g.,wiredEthernet,wireless802.11)

•  oneIPaddressassociatedwitheachinterface

223.1.1.1

223.1.1.2

223.1.1.3

223.1.1.4 223.1.2.9

223.1.2.2

223.1.2.1

223.1.3.2 223.1.3.1

223.1.3.27

223.1.1.1 = 11011111 00000001 00000001 00000001

223 1 1 1

IPaddressing:introduc>on

13

IPaddressing:introduc>on

14

•  IPaddress:– subnetpart-highorderbits

– hostpart-loworderbits

• what’sasubnet?– deviceinterfaceswithsamesubnetpartofIPaddress

– canphysicallyreacheachotherwithoutinterveningrouter

network consisting of 3 subnets

223.1.1.1

223.1.1.3

223.1.1.4 223.1.2.9

223.1.3.2 223.1.3.1

subnet

223.1.1.2

223.1.3.27 223.1.2.2

223.1.2.1

Subnets

15

WhatisICANN

16

•  InternetCorpora=onforAssignedNamesandNumbers(ICANN):Itisacorpora=onresponsiblefor:

§  Allocatesaddresses§  Assignsdomainnames,resolvesdisputes§  ManagesDNS

•  Example:

•  Educa=onalins=tu=ons

•  Companies

•  Internetserviceproviders.

JazanUniversi=es 223.1.1.0/24

223.1.2.0/24

223.1.4.0/24 STC

ICANN

17

JazanUniversi=esCompanies

STC

223.1.1.0/24

223.1.4.0/24

223.1.2.0/24

Host

223.1.2.9

223.1.1.1

IPaddressing:introduc>on

18

JazanUniversi=es

223.1.1.0/24

223.1.1.1223.1.1.2

223.1.1.3

223.1.1.6 223.1.2.8

223.1.2.4

223.1.2.1

223.1.2.0/24 Companies

ICANN

19

JazanUniversi=esCompanies

STC

223.1.1.0/24

223.1.4.0/24

223.1.2.0/24

223.1.1.1 Host

HowdoesahostgetIPaddress?

223.1.2.9

HowdoesahostgetIPaddress?

20

HostDHCPServer

Port68

Port67

DHCP discover (broadcast)

DHCP offer

DHCP request

DHCP ACK

•  DHCP:DynamicHostConfigura>onProtocol:dynamicallygetaddressfromasserver.

•  Hostbroadcasts“DHCPdiscover” msg[op>onal]

•  DHCPserverrespondswith“DHCPoffer” msg[op>onal].

•  HostrequestsIPaddress:“DHCPrequest” msg

•  DHCPserversendsaddress:“DHCPack” msg

Network Layer

DHCP server: 223.1.2.5 Client DHCP discover

src : 0.0.0.0, 68 dest.: 255.255.255.255,67 yiaddr: 0.0.0.0 transaction ID: 654 DHCP offer

src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 654 lifetime: 3600 secs

DHCP request src: 0.0.0.0, 68 dest:: 255.255.255.255, 67 yiaddrr: 223.1.2.4 transaction ID: 655 lifetime: 3600 secs

DHCP ACK src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 655 lifetime: 3600 secs

Port68

Port67

HowdoesahostgetIPaddress?

DHCPclient-serverscenario

21

22

JazanUniversi=esCompanies

STC

223.1.1.0/24

223.1.4.0/24

223.1.2.0/24 223.1.2.9

Host

arriving DHCP client needs address in this network

DHCP server

223.1.1.1

223.1.1.2

HowdoesahostgetIPaddress?

DHCP

Network Layer 4-23

v  connec>nglaptopneedsitsIPaddress,addroffirst-hoprouter,addrofDNSserver:useDHCP

router with DHCP server built into router

v  DHCP request encapsulated in UDP, encapsulated in IP, encapsulated in 802.3 Ethernet

v  Ethernet frame broadcast (dest: FFFFFFFFFFFF) on LAN, received at router running DHCP server

v  Ethernet demuxed to IP demuxed, UDP demuxed to DHCP

168.1.1.1

DHCP UDP

IP Eth Phy

DHCP

DHCP

DHCP

DHCP

DHCP

DHCP UDP

IP Eth Phy

DHCP

DHCP

DHCP

DHCP DHCP

23

DHCP

Network Layer 4-24

•  DHCPserverformulatesDHCPACKcontainingclient’sIPaddress,IPaddressoffirst-hoprouterforclient,name&IPaddressofDNSserver

v  encapsulation of DHCP server, frame forwarded to client, demuxing up to DHCP at client

router with DHCP server built into router

DHCP

DHCP

DHCP

DHCP

DHCP UDP

IP Eth Phy

DHCP

DHCP UDP

IP Eth Phy

DHCP

DHCP

DHCP

DHCP

v  client now knows its IP address, name and IP address of DSN server, IP address of its first-hop router

24

DHCP

DHCP

25

•  DHCP:DynamicHostConfigura>onProtocol:dynamicallygetaddressfromasserver.

•  DHCPallowshosttodynamicallyobtainitsIPaddressfromnetworkserverwhenitjoinsnetwork.§  Canrenewitsleaseonaddressinuse§  Allowsreuseofaddresses(onlyholdaddresswhileconnected/“on”)§  Supportformobileuserswhowanttojoinnetwork(moreshortly)

26

NAT:networkaddresstransla>on

•  LocalnetworkusesjustoneIPaddressasfarasoutsideworldisconcerned•  RangeofaddressesnotneededfromInternetserviceprovider(ISP):justoneIP

addressforalldevices.•  Canchangeaddressesofdevicesinlocalnetworkwithoutno>fyingoutsideworld.•  CanchangeISPwithoutchangingaddressesofdevicesinlocalnetwork.•  Devicesinsidelocalnetnotexplicitlyaddressable,visiblebyoutsideworld(a

securityplus).

10.0.0.1

10.0.0.2

10.0.0.3

10.0.0.4

138.76.29.7

local network (e.g., home network)

10.0.0/24

rest of Internet

JazanU

10.0.0.1

10.0.0.2

10.0.0.3

10.0.0.4

138.76.29.7

1: host 10.0.0.1 sends datagram to 128.119.40.186, 80

NAT translation table WAN side addr LAN side addr

138.76.29.7, 5001 10.0.0.1, 3345

S: 138.76.29.7, 5001 D: 128.119.40.186, 80 2

2: NAT router changes datagram source addr from 10.0.0.1, 3345 to 138.76.29.7, 5001, updates table

S: 128.119.40.186, 80 D: 138.76.29.7, 5001

3 3: reply arrives dest. address: 138.76.29.7, 5001 4: NAT router

changes datagram dest addr from 138.76.29.7, 5001 to 10.0.0.1, 3345

NAT:networkaddresstransla>on

27

S: 10.0.0.1, 3345 D: 128.119.40.186, 80

1

S: 128.119.40.186, 80 D: 10.0.0.1, 3345

4

implementa?on:NATroutermust:

•  Outgoingdatagrams:replace(sourceIPaddress,port#)ofeveryoutgoingdatagramto(NATIPaddress,newport#),remote clients/servers will respond using (NAT IP address, new port #) as destination addr.

•  Remember(inNATtransla-ontable)every(sourceIPaddress,port#)to(NATIPaddress,newport#)transla>onpair

•  Incomingdatagrams:replace(NATIPaddress,newport#)indestfieldsofeveryincomingdatagramwithcorresponding(sourceIPaddress,port#)storedinNATtable.

28

NetworkLayers

Data:FTP,Email,STMP,IMTP,HTTP

TCP UDPData

IPadd.Data TCPUDP

NetworkLayers

DataLink

Physical

29

ICMP:internetcontrolmessageprotocol

•  Usedbyhosts&routerstocommunicatenetwork-levelinforma>on–  errorrepor>ng:unreachablehost,network,port,

protocol.–  echorequest/reply(usedbyping)

•  ICMPMessage

•  IPprotocolisabest-effortdeliveryservicethatdeliversadatagramfromitssourcetofinaldes>na>on.

•  Whathappensifaroutermustdiscardadatagrambecauseitcannotfindaroutertothefinaldes>na>on,orbecausethe>me-to-livefieldhasazerovalue?

•  Notes

IPadd.Data TCPUDP

ICMP

•  ICMPcarriedinIPdatagrams

ErrorMessg.Queryrept.

ICMPMessg.

Helpingahostoranetworkmanagergetspecificinforma>onfromarouteroranotherhost

30

ICMP:internetcontrolmessageprotocol

Type 0 3 3 3 3 3 3 4 8 9 10 11 12

•  ICMPmessage:type,codeplusfirst8bytesofIPdatagramcausingerror

Code 0 0 1 2 3 6 7 0 0 0 0 0 0

Description echo reply (ping) dest. network unreachable dest host unreachable dest protocol unreachable dest port unreachable dest network unknown dest host unknown source quench (congestion control - not used) echo request (ping) route advertisement router discovery TTL expired bad IP header

31

NetworkLayers

Data:FTP,Email,STMP,IMTP,HTTP

TCP UDPData

IPadd.Data TCPUDP

ICMP

NetworkLayers

DataLink

Physical

IPv4 IPv6

32

IPv6

•  IPv6u>lizes128bitaddress.•  Mo-va-on:

-  Headerformathelpsspeedprocessingforwarding.-  HeaderchangestofacilitateQoS-  Nofragmenta>onallowed.

•  Itisthenextgenera>onversionoftheInternetProtocol(IP),thecommunica>onsprotocolthatprovidesaniden>fica>onandloca>onsystemforcomputersonnetworksandroutestrafficacrosstheInternet.

33

IPv6ChangesFromIPv4

ver length

data (variable length, typically a TCP

or UDP segment)

16-bit identifier header

checksum time to

live

32 bit source IP address

head. len

type of service

flgs fragment offset

upper layer

32 bit destination IP address options (if any)

data

destination address (128 bits)

source address (128 bits)

payload len next hdr hop limit flow label pri ver

32 bits 32 bits

•  Checksum:removeden>relytoreduceprocessing>meateachhop•  Op?ons:allowed,butoutsideofheader,indicatedby“NextHeader”

field.

•  ICMPv6:newversionofICMP-Addi>onalmessagetypes,e.g.“PacketTooBig”

34

IPv6ChangesFromIPv4

35

Transi>onfromIPv4toIPv6

•  Notallrouterscanbeupgradedsimultaneously.•  HowwillnetworkoperatewithmixedIPv4andIPv6routers?

•  Tunneling:IPv6datagramcarriedaspayloadinIPv4datagramamongIPv4routers.

IPv4 source, dest addr IPv4 header fields

IPv4 datagram IPv6 datagram

IPv4 payload

UDP/TCP payload IPv6 source dest addr

IPv6 header fields

36

Interplaybetweenrou>ng,forwarding

1

2 3

IP destination address in arriving packet’s header

routing algorithm

local forwarding table dest address output link

address-range 1 address-range 2 address-range 3 address-range 4

3 2 2 1

routing algorithm determines end-end-path through network

forwarding table determines local forwarding at this router

37

Graphabstrac>on

u

y x

w v

z 2

2 1 3

1

1 2

5 3

5

graph: G = (N,E) N = set of routers = { u, v, w, x, y, z } E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) }

aside: graph abstraction is useful in other network contexts, e.g., P2P, where N is set of peers and E is set of TCP connections

38

Graphabstrac>on:costs

u

y x

w v

z 2

2 1 3

1

1 2

5 3

5 c(x,x’) = cost of link (x,x’) e.g., c(w,z) = 5 cost could always be 1, or inversely related to bandwidth, or inversely related to congestion

cost of path (x1, x2, x3,…, xp) = c(x1,x2) + c(x2,x3) + … + c(xp-1,xp)

key question: what is the least-cost path between u and z ? routing algorithm: algorithm that finds that least cost path

39

Rou>ngalgorithmclassifica>on

Q:globalordecentralizedinforma-on?

global:•  allroutershavecomplete

topology,linkcostinfo•  “linkstate”algorithmsdecentralized:•  routerknowsphysically-

connectedneighbors,linkcoststoneighbors

•  itera>veprocessofcomputa>on,exchangeofinfowithneighbors

•  “distancevector”algorithms

Q:sta-cordynamic?sta-c:v routeschangeslowlyover

>medynamic:v routeschangemore

quickly§  periodicupdate§  inresponsetolinkcostchanges

40

ALink-StateRou>ngAlgorithm

Dijkstra’salgorithm•  nettopology,linkcosts

knowntoallnodes–  accomplishedvia“link

statebroadcast”–  allnodeshavesameinfo

•  computesleastcostpathsfromonenode(‘source”)toallothernodes–  givesforwardingtablefor

thatnode•  itera>ve:anerk

itera>ons,knowleastcostpathtokdes>na>ons

nota-on:•  c(x,y):linkcostfrom

nodextoy;=∞ifnotdirectneighbors

•  D(v):currentvalueofcostofpathfromsourcetodest.v

•  p(v):predecessornodealongpathfromsourcetov

•  N':setofnodeswhoseleastcostpathdefini>velyknown

41

Dijkstra’s algorithm: example

Step

N' D(v)

p(v) 0 1 2 3 4 5

D(w) p(w)

D(x) p(x)

D(y) p(y)

D(z) p(z)

u ∞ ∞ 7,u 3,u 5,u uw ∞ 11,w 6,w 5,u

14,x 11,w 6,w uwx uwxv 14,x 10,v

uwxvy 12,y

This example is to find the forwarding table of router U or the shortest paths from

router U to every routers(X,W,V,Y,Z)

uwxvyz

6}33,7min{ )),()(),(min()( .,.

=+=

+= vwcwDvDvDge

w 3

4

v

x

u

5

3 7 4

y 8

z 2

7 9

42

Dijkstra’s algorithm: example

w 3

4

v

x

u

5

3 7 4

y 8

z 2

7 9

v x y w z

(u,w) (u,x)

(u,w) (u,w) (u,w)

destination link

v  The result will be the forwarding table for router U:

v  Any packet arrives to U, it will be forwarded based on this forwarding table.

4-43

44

Distancevectoralgorithm

Bellman-Fordequa-on(dynamicprogramming)letdx(y):=costofleast-costpathfromxtoythen

dx(y)=min{c(x,v)+dv(y)} cost to neighbor v

min taken over all neighbors v of x

cost from neighbor v to destination y

45

keyidea:v from>me-to->me,eachnodesendsitsowndistancevectores>matetoneighbors

v whenxreceivesnewDVes>matefromneighbor,itupdatesitsownDVusingB-Fequa>on:Dx(y) ← minv{c(x,v) + Dv(y)} for each node y ∊ N

v  under minor, natural conditions, the estimate Dx(y) converge to the actual least cost dx(y)

Distancevectoralgorithm

Network Layer 4-46

x y z

x y z

0 2 7

∞ ∞ ∞ ∞ ∞ ∞

from

cost to

from

fro

m

x y z

x y z

0

x y z

x y z

∞ ∞

∞ ∞ ∞

cost to

x y z

x y z ∞ ∞ ∞ 7 1 0

cost to

∞ 2 0 1

∞ ∞ ∞

2 0 1 7 1 0

time

x z 1 2

7

y

node x table

Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)} = min{2+0 , 7+1} = 2

Dx(z) = min{c(x,y) + Dy(z), c(x,z) + Dz(z)} = min{2+1 , 7+0} = 3

3 2

node y table

node z table

cost to

from

Network Layer 4-47

x y z

x y z

0 2 3

from

cost to

x y z

x y z

0 2 7

from

cost to

x y z

x y z

0 2 3

from

cost to

x y z

x y z

0 2 3 fro

m

cost to x y z

x y z

0 2 7

from

cost to

2 0 1 7 1 0

2 0 1 3 1 0

2 0 1 3 1 0

2 0 1

3 1 0

2 0 1

3 1 0

time

x y z

x y z

0 2 7

∞ ∞ ∞ ∞ ∞ ∞

from

cost to

from

fro

m

x y z

x y z

0

x y z

x y z

∞ ∞

∞ ∞ ∞

cost to

x y z

x y z ∞ ∞ ∞ 7 1 0

cost to

∞ 2 0 1

∞ ∞ ∞

2 0 1 7 1 0

time

x z 1 2

7

y

node x table

Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)} = min{2+0 , 7+1} = 2

Dx(z) = min{c(x,y) + Dy(z), c(x,z) + Dz(z)} = min{2+1 , 7+0} = 3

3 2

node y table

node z table

cost to

from

4-48

Distancevectoralgorithm

4-49

Distancevectoralgorithm

4-50

Distancevectoralgorithm

4-51

Distancevectoralgorithm

52

ComparisonofLSandDValgorithms

messagecomplexity•  LS:withnnodes,Elinks,O(nE)

msgssent•  DV:exchangebetweenneighbors

only–  convergence>mevaries

speedofconvergence•  LS:O(n2)algorithmrequiresO(nE)

msgs–  mayhaveoscilla>ons

•  DV:convergence>mevaries–  mayberou>ngloops–  count-to-infinityproblem

robustness:whathappensifroutermalfunc>ons?

LS:–  nodecanadver>seincorrect

linkcost–  eachnodecomputesonlyits

owntableDV:

–  DVnodecanadver>seincorrectpathcost

–  eachnode’stableusedbyothers

•  errorpropagatethrunetwork

53

Hierarchicalrou>ng

•  collectroutersintoregions,“autonomoussystems”(AS)

•  EachASwithinanISP–  ISPmayconsistofoneormoreASes

•  routersinsameASrunsamerou>ngprotocol–  “intra-AS”rou>ngprotocol

–  routersindifferentAScanrundifferentintra-ASrou>ngprotocol

gatewayrouter:•  at“edge”ofitsownAS•  haslinktorouterinanother

AS

54

InterconnectedASes

3b

1d

3a 1c

2a AS3

AS1

AS2 1a

2c 2b

1b

Intra-AS Routing algorithm

Inter-AS Routing algorithm

Forwarding table

3c

v  forwardingtableconfiguredbybothintra-andinter-ASrou>ngalgorithm.

55

InterconnectedASes

56

Intra-ASRou>ng

v Alsoknownasinteriorgatewayprotocols(IGP)v Mostcommonintra-ASrou>ngprotocols:

§  RIP:Rou>ngInforma>onProtocol§  OSPF:OpenShortestPathFirst§  IGRP:InteriorGatewayRou>ngProtocol(Ciscoproprietary)

57

•  RIP(Rou=ngInforma=onProtocol)•  Usesdistancevectoralgorithm•  distance-vectorrou>ngprotocolswhichemploythehopcount

asarou>ngmetric

D C

B A u v

w

x

y z

subnet hops u 1 v 2 w 2 x 3 y 3 z 2

from router A to destination subnets:

Intra-ASRou>ng

58

•  OSPF(OpenShortestPathFirst)

Intra-ASRou>ng

•  useslinkstatealgorithm–  routecomputa>onusingDijkstra’salgorithm

59

Inter-AStasksv supposerouterinAS1

receivesdatagramdes>nedoutsideofAS1:§  routershouldforwardpackettogatewayrouter

AS3

AS2

3b

3c 3a

AS1

1c 1a

1d 1b

2a 2c

2b other networks

other networks

60

•  Internetinter-ASrou=ng:BGP•  BGP(BorderGatewayProtocol):•  “GluethatholdstheInternettogether”.

•  TheBorderGatewayProtocol(BGP)istheprotocolbackingthecorerou>ngdecisionsontheInternet.

•  Allowssubnettoadver=seitsexistencetorestofInternet:“Iamhere”

Inter-AStasks

61

Broadcastrou>ngv deliverpacketsfromsourcetoallothernodesv sourceduplica>onisinefficient:

R1

R2

R3 R4

source duplication

R1

R2

R3 R4

in-network duplication

duplicate creation/transmission duplicate

duplicate

v  source duplication: how does source determine recipient addresses?

62

Broadcastrou>ng

•  flooding:whennodereceivesbroadcastpacket,sendscopytoallneighbors–  problems:cycles&broadcaststorm

•  spanningtree:–  noredundantpacketsreceivedbyanynode

•  In-networkduplica=on

63

Spanningtree

SpanningTreeProtocol (STP) isanetworkprotocolthat builds a logical loop-free topology forEthernetnetworks.

(a)Broadcastini=atedatA (b)Broadcastini=atedatD

A

B

G

D E

c

F

A

B

G

D E

c

F

64

Shortestpathtree

•  mcastforwardingtree:treeofshortestpathroutesfromsourcetoallreceivers–  Dijkstra’salgorithm

i

router with attached group member

router with no attached group member

link used for forwarding, i indicates order link added by algorithm

LEGEND

R1

R2

R3

R4

R5

R6 R7

2 1

6

3 4 5

s: source

65

Chapter 4: done!

4.5rou>ngalgorithms–  linkstate,distancevector,

hierarchicalrou>ng4.6rou>ngintheInternet

–  RIP,OSPF,BGP4.7broadcastandmul>cast

rou>ng

4.1introduc>on4.2virtualcircuitand

datagramnetworks4.3what’sinsidearouter4.4IP:InternetProtocol

–  datagramformat,IPv4addressing,ICMP,IPv6

v  understand principles behind network layer services: §  network layer service models, forwarding versus routing

how a router works, routing (path selection), broadcast, multicast

v  instantiation, implementation in the Internet