networking — network layer · networking — network layer three concepts • naming • a way to...
TRANSCRIPT
Networking—Networklayer
Threeconcepts
• Naming
• Awaytoidentifythesource/destination• E.g.,houseaddress
• Routing• Finding“howto”movetowardsthedestination
• E.g.,whichairplaneshouldthestuffgoon
• Forwarding• Actually“moving”towardsthedestination
• E.g.,Usingairplane/truck/rail
Networklayer—Forwarding
Networklayer—Forwarding
Letscomeupwithanapproach?GeneralizeEthernetideas?
Networklayer—Forwarding
Attempt1:Broadcast
Networklayer—Forwarding
Attempt1:Broadcast
• Sendtoeverybody
Networklayer—Forwarding
Attempt1:Broadcast
• Sendtoeverybody• Goods
Networklayer—Forwarding
Attempt1:Broadcast
• Sendtoeverybody• Goods
• Oh,well,simplicity
Networklayer—Forwarding
Attempt1:Broadcast
• Sendtoeverybody• Goods
• Oh,well,simplicity
• Not-so-goods
Networklayer—Forwarding
Attempt1:Broadcast
• Sendtoeverybody• Goods
• Oh,well,simplicity
• Not-so-goods• Oh,well,everythingelse
Networklayer—Forwarding
Attempt1:Broadcast
• Sendtoeverybody• Goods
• Oh,well,simplicity
• Not-so-goods• Oh,well,everythingelse
• Bandwidthoverheads
Networklayer—Forwarding
Networklayer—Forwarding
Attempt2:TimedivisionMultiplexing
Networklayer—Forwarding
Attempt2:TimedivisionMultiplexing
• Eachsource-destinationpairassignedatimeslot
Networklayer—Forwarding
Attempt2:TimedivisionMultiplexing
• Eachsource-destinationpairassignedatimeslot
• Cansenddataonlyduringthatslot
Networklayer—Forwarding
Attempt2:TimedivisionMultiplexing
• Eachsource-destinationpairassignedatimeslot
• Cansenddataonlyduringthatslot
• Goods
Networklayer—Forwarding
Attempt2:TimedivisionMultiplexing
• Eachsource-destinationpairassignedatimeslot
• Cansenddataonlyduringthatslot
• Goods• Nocollisions
Networklayer—Forwarding
Attempt2:TimedivisionMultiplexing
• Eachsource-destinationpairassignedatimeslot
• Cansenddataonlyduringthatslot
• Goods• Nocollisions
• Not-so-goods
Networklayer—Forwarding
Attempt2:TimedivisionMultiplexing
• Eachsource-destinationpairassignedatimeslot
• Cansenddataonlyduringthatslot
• Goods• Nocollisions
• Not-so-goods• Underutilizationofresources
Networklayer—Forwarding
Networklayer—Forwarding
Attempt3:FrequencydivisionMultiplexing
Networklayer—Forwarding
Attempt3:FrequencydivisionMultiplexing
• Eachsource-destinationpairassignedasubsetofresources
Networklayer—Forwarding
Attempt3:FrequencydivisionMultiplexing
• Eachsource-destinationpairassignedasubsetofresources• Canuseonly“assigned”resources(e.g.,bandwidth)
Networklayer—Forwarding
Attempt3:FrequencydivisionMultiplexing
• Eachsource-destinationpairassignedasubsetofresources• Canuseonly“assigned”resources(e.g.,bandwidth)
• Goods
Networklayer—Forwarding
Attempt3:FrequencydivisionMultiplexing
• Eachsource-destinationpairassignedasubsetofresources• Canuseonly“assigned”resources(e.g.,bandwidth)
• Goods• Predictableperformance
Networklayer—Forwarding
Attempt3:FrequencydivisionMultiplexing
• Eachsource-destinationpairassignedasubsetofresources• Canuseonly“assigned”resources(e.g.,bandwidth)
• Goods• Predictableperformance
• Not-so-goods
Networklayer—Forwarding
Attempt3:FrequencydivisionMultiplexing
• Eachsource-destinationpairassignedasubsetofresources• Canuseonly“assigned”resources(e.g.,bandwidth)
• Goods• Predictableperformance
• Not-so-goods• Underutilizationofresources
Networklayer—Forwarding
Networklayer—Forwarding
Attempt2and3:CircuitSwitching
Networklayer—Forwarding
Attempt2and3:CircuitSwitching
• Sourceestablishesconnection
Networklayer—Forwarding
Attempt2and3:CircuitSwitching
• Sourceestablishesconnection• Resourcesalongthepatharereserved
Networklayer—Forwarding
Attempt2and3:CircuitSwitching
• Sourceestablishesconnection• Resourcesalongthepatharereserved
• Sourcesendsdata
Networklayer—Forwarding
Attempt2and3:CircuitSwitching
• Sourceestablishesconnection• Resourcesalongthepatharereserved
• Sourcesendsdata• Transmitdatausingthereservedresources
Networklayer—Forwarding
Attempt2and3:CircuitSwitching
• Sourceestablishesconnection• Resourcesalongthepatharereserved
• Sourcesendsdata• Transmitdatausingthereservedresources
• Sourcetearsdownconnection
Networklayer—Forwarding
Attempt2and3:CircuitSwitching
• Sourceestablishesconnection• Resourcesalongthepatharereserved
• Sourcesendsdata• Transmitdatausingthereservedresources
• Sourcetearsdownconnection• Freeresourcesforotherstouse
Networklayer—Forwarding
Networklayer—Forwarding
CircuitSwitching
Networklayer—Forwarding
CircuitSwitching
• Goods:
Networklayer—Forwarding
CircuitSwitching
• Goods:• Predictableperformance
Networklayer—Forwarding
CircuitSwitching
• Goods:• Predictableperformance
• Reliabledelivery
Networklayer—Forwarding
CircuitSwitching
• Goods:• Predictableperformance
• Reliabledelivery• Simpleforwardingmechanism
Networklayer—Forwarding
CircuitSwitching
• Goods:• Predictableperformance
• Reliabledelivery• Simpleforwardingmechanism
• Not-so-goods
Networklayer—Forwarding
CircuitSwitching
• Goods:• Predictableperformance
• Reliabledelivery• Simpleforwardingmechanism
• Not-so-goods• Resourceunderutilization
Networklayer—Forwarding
CircuitSwitching
• Goods:• Predictableperformance
• Reliabledelivery• Simpleforwardingmechanism
• Not-so-goods• Resourceunderutilization• Blockedconnections
Networklayer—Forwarding
CircuitSwitching
• Goods:• Predictableperformance
• Reliabledelivery• Simpleforwardingmechanism
• Not-so-goods• Resourceunderutilization• Blockedconnections• Connectionsetupoverheads
Networklayer—Forwarding
CircuitSwitching
• Goods:• Predictableperformance
• Reliabledelivery• Simpleforwardingmechanism
• Not-so-goods• Resourceunderutilization• Blockedconnections• Connectionsetupoverheads• Per-connectionstateinswitches(scalabilityproblem)
Networklayer—Forwarding
Networklayer—Forwarding
Attempt4:PacketSwitching
Networklayer—Forwarding
Attempt4:PacketSwitching
• Dividethemessageintopackets
Networklayer—Forwarding
Attempt4:PacketSwitching
• Dividethemessageintopackets
• Putdestinationaddressintheheaderofeachpacket
Networklayer—Forwarding
Attempt4:PacketSwitching
• Dividethemessageintopackets
• Putdestinationaddressintheheaderofeachpacket• Justlikeshippingstuff
Networklayer—Forwarding
Attempt4:PacketSwitching
• Dividethemessageintopackets
• Putdestinationaddressintheheaderofeachpacket• Justlikeshippingstuff
• Eachdevicestoresa“look-uptable”
Networklayer—Forwarding
Attempt4:PacketSwitching
• Dividethemessageintopackets
• Putdestinationaddressintheheaderofeachpacket• Justlikeshippingstuff
• Eachdevicestoresa“look-uptable”• Whatsthenexthoptowardsthedestination?
Networklayer—Forwarding
Attempt4:PacketSwitching
• Dividethemessageintopackets
• Putdestinationaddressintheheaderofeachpacket• Justlikeshippingstuff
• Eachdevicestoresa“look-uptable”• Whatsthenexthoptowardsthedestination?
• Destinationreceivesthepacket(s)
Networklayer—Forwarding
Attempt4:PacketSwitching
• Dividethemessageintopackets
• Putdestinationaddressintheheaderofeachpacket• Justlikeshippingstuff
• Eachdevicestoresa“look-uptable”• Whatsthenexthoptowardsthedestination?
• Destinationreceivesthepacket(s)• Andreconstructsthemessage
Networklayer—Forwarding
Networklayer—Forwarding
PacketSwitchedforwarding
Networklayer—Forwarding
PacketSwitchedforwarding
• Hop-by-hopforwarding
Networklayer—Forwarding
PacketSwitchedforwarding
• Hop-by-hopforwarding• Eachrouterhasa“look-uptable”(forwardinginformationbase)
Networklayer—Forwarding
PacketSwitchedforwarding
• Hop-by-hopforwarding• Eachrouterhasa“look-uptable”(forwardinginformationbase)
• Whatshouldbestoredinthistable?
Networklayer—Forwarding
PacketSwitchedforwarding
• Hop-by-hopforwarding• Eachrouterhasa“look-uptable”(forwardinginformationbase)
• Whatshouldbestoredinthistable?
Networklayer—Forwarding
PacketSwitchedforwarding
• Hop-by-hopforwarding• Eachrouterhasa“look-uptable”(forwardinginformationbase)
• Whatshouldbestoredinthistable?
• Prefix-basedforwarding(longest-prefixmatching)
Networklayer—Forwarding
PacketSwitchedforwarding
• Hop-by-hopforwarding• Eachrouterhasa“look-uptable”(forwardinginformationbase)
• Whatshouldbestoredinthistable?
• Prefix-basedforwarding(longest-prefixmatching)
• Mapsprefixestothenext-hop
Networklayer—Forwarding
Networklayer—Forwarding
PacketSwitching
Networklayer—Forwarding
PacketSwitching
• Goods:
Networklayer—Forwarding
PacketSwitching
• Goods:• Noresourceunderutilization
Networklayer—Forwarding
PacketSwitching
• Goods:• Noresourceunderutilization
• Asourcecansendmoreifothersdon’tuseresources
Networklayer—Forwarding
PacketSwitching
• Goods:• Noresourceunderutilization
• Asourcecansendmoreifothersdon’tuseresources
• Noblockedconnectionproblem
Networklayer—Forwarding
PacketSwitching
• Goods:• Noresourceunderutilization
• Asourcecansendmoreifothersdon’tuseresources
• Noblockedconnectionproblem• Noper-connectionstate
Networklayer—Forwarding
PacketSwitching
• Goods:• Noresourceunderutilization
• Asourcecansendmoreifothersdon’tuseresources
• Noblockedconnectionproblem• Noper-connectionstate• Noset-upcost
Networklayer—Forwarding
PacketSwitching
• Goods:• Noresourceunderutilization
• Asourcecansendmoreifothersdon’tuseresources
• Noblockedconnectionproblem• Noper-connectionstate• Noset-upcost
• Not-so-goods:
Networklayer—Forwarding
PacketSwitching
• Goods:• Noresourceunderutilization
• Asourcecansendmoreifothersdon’tuseresources
• Noblockedconnectionproblem• Noper-connectionstate• Noset-upcost
• Not-so-goods:• Packetheaderoverhead
Networklayer—Forwarding
PacketSwitching
• Goods:• Noresourceunderutilization
• Asourcecansendmoreifothersdon’tuseresources
• Noblockedconnectionproblem• Noper-connectionstate• Noset-upcost
• Not-so-goods:• Packetheaderoverhead• Networkfailuresbecomeaproblem
Networklayer—Forwarding
Networking—Networklayer
Threeconcepts
• Naming
• Awaytoidentifythesource/destination• E.g.,houseaddress
• Routing• Finding“howto”movetowardsthedestination
• E.g.,whichairplaneshouldthestuffgoon
• Forwarding• Actually“moving”towardsthedestination
• E.g.,Usingairplane/truck/rail
Networklayer—Example
C
1
23
17
B
A
Dest.
Networklayer—Routing
Letscomeupwitharoutingscheme
Networklayer—Routing
Networklayer—Routing
C
1
23
17
B
A
Dest.
Networklayer—Routing
C
1
23
17
B
A
Dest.
Awantsto
findapathto
Dest.
{(A,0)}
Networklayer—Routing
C
1
23
17
B
A
Dest.
Awantsto
findapathto
Dest.
{(A,0)}
Awantstofinda
pathtoDest.
{(A,0),(B,2)}
Networklayer—Routing
C
1
23
17
B
A
Dest.
Awantsto
findapathto
Dest.
{(A,0)}
Awantstofinda
pathtoDest.
{(A,0),(B,2)}
Awantstofinda
pathtoDest.
{(A,0),(C,7)}
Networklayer—Routing
C
1
23
17
B
A
Dest.
Awantsto
findapathto
Dest.
{(A,0)}
Awantstofinda
pathtoDest.
{(A,0),(B,2)}
Awantstofinda
pathtoDest.
{(A,0),(C,7)}
Pathto
Dest.
{(A,0),(B,2),
(D,3)}
Networklayer—Routing
C
1
23
17
B
A
Dest.
Awantsto
findapathto
Dest.
{(A,0)}
Awantstofinda
pathtoDest.
{(A,0),(B,2)}
Awantstofinda
pathtoDest.
{(A,0),(C,7)}
Pathto
Dest.
{(A,0),(B,2),
(D,3)}
Pathto
Dest.
{(A,0),(C,7),
(D,1)}
Networklayer—Routing
C
1
23
17
B
A
Dest.
Awantsto
findapathto
Dest.
{(A,0)}
Awantstofinda
pathtoDest.
{(A,0),(B,2)}
Awantstofinda
pathtoDest.
{(A,0),(C,7)}
Pathto
Dest.
{(A,0),(B,2),
(D,3)}
Awantstofinda
pathtoDest.
{(A,0),(B,2),(C,1)}
Pathto
Dest.
{(A,0),(C,7),
(D,1)}
Networklayer—Routing
C
1
23
17
B
A
Dest.
Awantsto
findapathto
Dest.
{(A,0)}
Awantstofinda
pathtoDest.
{(A,0),(B,2)}
Awantstofinda
pathtoDest.
{(A,0),(C,7)}
Pathto
Dest.
{(A,0),(B,2),
(D,3)}
Awantstofinda
pathtoDest.
{(A,0),(B,2),(C,1)}
Pathto
Dest.
{(A,0),(C,7),
(D,1)}Path
toDest.
{(A,0),(B,2),
(C,1),
(D,1)}
Networklayer—Routing
Attempt1:DynamicSourceRouting
Networklayer—Routing
Attempt1:DynamicSourceRouting
• BroadcastaRouteRequestPacketfordestinationd
Networklayer—Routing
Attempt1:DynamicSourceRouting
• BroadcastaRouteRequestPacketfordestinationd• PutsourceIDinthepacketheader
Networklayer—Routing
Attempt1:DynamicSourceRouting
• BroadcastaRouteRequestPacketfordestinationd• PutsourceIDinthepacketheader
• Ateachrouter
Networklayer—Routing
Attempt1:DynamicSourceRouting
• BroadcastaRouteRequestPacketfordestinationd• PutsourceIDinthepacketheader
• Ateachrouter• Ifapathnotknowntothedestination
Networklayer—Routing
Attempt1:DynamicSourceRouting
• BroadcastaRouteRequestPacketfordestinationd• PutsourceIDinthepacketheader
• Ateachrouter• Ifapathnotknowntothedestination
• Putits{ID,cost}inthepacketheader
Networklayer—Routing
Attempt1:DynamicSourceRouting
• BroadcastaRouteRequestPacketfordestinationd• PutsourceIDinthepacketheader
• Ateachrouter• Ifapathnotknowntothedestination
• Putits{ID,cost}inthepacketheader• BroadcasttheRouteRequestPacket
Networklayer—Routing
Attempt1:DynamicSourceRouting
• BroadcastaRouteRequestPacketfordestinationd• PutsourceIDinthepacketheader
• Ateachrouter• Ifapathnotknowntothedestination
• Putits{ID,cost}inthepacketheader• BroadcasttheRouteRequestPacket
• Else
Networklayer—Routing
Attempt1:DynamicSourceRouting
• BroadcastaRouteRequestPacketfordestinationd• PutsourceIDinthepacketheader
• Ateachrouter• Ifapathnotknowntothedestination
• Putits{ID,cost}inthepacketheader• BroadcasttheRouteRequestPacket
• Else• RespondwithaRouteReplypacket
Networklayer—Routing
Attempt1:DynamicSourceRouting
• BroadcastaRouteRequestPacketfordestinationd• PutsourceIDinthepacketheader
• Ateachrouter• Ifapathnotknowntothedestination
• Putits{ID,cost}inthepacketheader• BroadcasttheRouteRequestPacket
• Else• RespondwithaRouteReplypacket• Putknownpathinthepacketheader
Networklayer—Routing
Attempt1:DynamicSourceRouting
• BroadcastaRouteRequestPacketfordestinationd• PutsourceIDinthepacketheader
• Ateachrouter• Ifapathnotknowntothedestination
• Putits{ID,cost}inthepacketheader• BroadcasttheRouteRequestPacket
• Else• RespondwithaRouteReplypacket• Putknownpathinthepacketheader
• Challenge?
Networklayer—Routing
Networklayer—Routing
C
1
23
17
B
A
Dest.
Networklayer—Routing
C
1
23
17
B
A
Dest.
{(A-B,0),
(A-C,7)}
Networklayer—Routing
C
1
23
17
B
A
Dest.
{(A-B,0),
(A-C,7)}
{(A-B,2),
(B-C,1),
(B-D,3)}
Networklayer—Routing
C
1
23
17
B
A
Dest.
{(A-B,0),
(A-C,7)}
{(A-B,2),
(B-C,1),
(B-D,3)}
{(A-C,7),
(B-C,1)}
Networklayer—Routing
C
1
23
17
B
A
Dest.
{(A-B,0),
(A-C,7)}
{(A-B,2),
(B-C,1),
(B-D,3)}
{(A-C,7),
(B-C,1)}
{(B-D,3),
(C-D,1)}
Networklayer—Routing
C
1
23
17
B
A
Dest.
{(A-B,0),
(A-C,7)}
{(A-B,2),
(B-C,1),
(B-D,3)}
{(A-C,7),
(B-C,1)}
{(B-D,3),
(C-D,1)}
{(A-B,0),
(A-C,7)}
Networklayer—Routing
C
1
23
17
B
A
Dest.
{(A-B,0),
(A-C,7)}
{(A-B,2),
(B-C,1),
(B-D,3)}
{(A-C,7),
(B-C,1)}
{(B-D,3),
(C-D,1)}
{(A-B,0),
(A-C,7)}
{(B-D,3),
(C-D,1)}
Networklayer—Routing
C
1
23
17
B
A
Dest.
{(A-B,0),
(A-C,7)}
{(A-B,2),
(B-C,1),
(B-D,3)}
{(A-C,7),
(B-C,1)}
{(B-D,3),
(C-D,1)}
{(A-B,0),
(A-C,7)}
{(B-D,3),
(C-D,1)}
{(A-C,7),
(B-C,1)}
Networklayer—Routing
Attempt2:LinkStateRouting
Networklayer—Routing
Attempt2:LinkStateRouting
• Eachroutermaintainsitslocal“linkstate”(LS)
Networklayer—Routing
Attempt2:LinkStateRouting
• Eachroutermaintainsitslocal“linkstate”(LS)
• Eachrouterperiodically“floods”itsLS
Networklayer—Routing
Attempt2:LinkStateRouting
• Eachroutermaintainsitslocal“linkstate”(LS)
• Eachrouterperiodically“floods”itsLS• AndforwardsalltheLSreceivedfromotherrouters
Networklayer—Routing
Attempt2:LinkStateRouting
• Eachroutermaintainsitslocal“linkstate”(LS)
• Eachrouterperiodically“floods”itsLS• AndforwardsalltheLSreceivedfromotherrouters
• Atonepoint
Networklayer—Routing
Attempt2:LinkStateRouting
• Eachroutermaintainsitslocal“linkstate”(LS)
• Eachrouterperiodically“floods”itsLS• AndforwardsalltheLSreceivedfromotherrouters
• Atonepoint• Everyrouterknowstheentiretopology
Networklayer—Routing
Attempt2:LinkStateRouting
• Eachroutermaintainsitslocal“linkstate”(LS)
• Eachrouterperiodically“floods”itsLS• AndforwardsalltheLSreceivedfromotherrouters
• Atonepoint• Everyrouterknowstheentiretopology
• Runashortestpathalgorithm(e.g.,Dijkstra)locally
Networklayer—Routing
Attempt2:LinkStateRouting
• Eachroutermaintainsitslocal“linkstate”(LS)
• Eachrouterperiodically“floods”itsLS• AndforwardsalltheLSreceivedfromotherrouters
• Atonepoint• Everyrouterknowstheentiretopology
• Runashortestpathalgorithm(e.g.,Dijkstra)locally
• Findpathtothedestination
Networklayer—Routing
Attempt2:LinkStateRouting
• Eachroutermaintainsitslocal“linkstate”(LS)
• Eachrouterperiodically“floods”itsLS• AndforwardsalltheLSreceivedfromotherrouters
• Atonepoint• Everyrouterknowstheentiretopology
• Runashortestpathalgorithm(e.g.,Dijkstra)locally
• Findpathtothedestination
• Moreimportantly,findnext-hoptothedestination
Networklayer—Routing
Attempt2:LinkStateRouting
• Eachroutermaintainsitslocal“linkstate”(LS)
• Eachrouterperiodically“floods”itsLS• AndforwardsalltheLSreceivedfromotherrouters
• Atonepoint• Everyrouterknowstheentiretopology
• Runashortestpathalgorithm(e.g.,Dijkstra)locally
• Findpathtothedestination
• Moreimportantly,findnext-hoptothedestination
• Challenge?
Networklayer—Routing
Networklayer—Routing
Attempt3:DistanceVectorRouting
Networklayer—Routing
Attempt3:DistanceVectorRouting
• Eachrouter
Networklayer—Routing
Attempt3:DistanceVectorRouting
• Eachrouter• maintainsits“currentdistancetodestination”
Networklayer—Routing
Attempt3:DistanceVectorRouting
• Eachrouter• maintainsits“currentdistancetodestination”
• Periodicallyannouncesittoallitsneighbors
Networklayer—Routing
Attempt3:DistanceVectorRouting
• Eachrouter• maintainsits“currentdistancetodestination”
• Periodicallyannouncesittoallitsneighbors• Updateitslocaltable
Networklayer—Routing
Attempt3:DistanceVectorRouting
• Eachrouter• maintainsits“currentdistancetodestination”
• Periodicallyannouncesittoallitsneighbors• Updateitslocaltable
• d(A,dest)=min{d(A,neighbor)+d(neighbor,dest)}
Networklayer—Routing
Attempt3:DistanceVectorRouting
• Eachrouter• maintainsits“currentdistancetodestination”
• Periodicallyannouncesittoallitsneighbors• Updateitslocaltable
• d(A,dest)=min{d(A,neighbor)+d(neighbor,dest)}
• {dest—distance,neighbor-that-minimizes-distance}
Networklayer—Routing
Attempt3:DistanceVectorRouting
• Eachrouter• maintainsits“currentdistancetodestination”
• Periodicallyannouncesittoallitsneighbors• Updateitslocaltable
• d(A,dest)=min{d(A,neighbor)+d(neighbor,dest)}
• {dest—distance,neighbor-that-minimizes-distance}
• Broadcasttoallitsneighbors
Networklayer—Routing