6/12/2016© 2010 Raymond P. Jefferis IIILect The Network Layer
6/12/2016© 2010 Raymond P. Jefferis IIILect OSI Network Layer
6/12/2016© 2010 Raymond P. Jefferis IIILect TCP/IP Model Uses a subset of the OSI layers Session and Presentation layers not present
6/12/2016© 2010 Raymond P. Jefferis IIILect TCP/IP Model
6/12/2016© 2010 Raymond P. Jefferis IIILect Node Types Source node Intermediate node Destination node
6/12/2016© 2010 Raymond P. Jefferis IIILect Source Node Functions Receives packets from transport layer Moves packets from source to destination –typically through a chain of nodes –requires a route Passes packets to data link layer for eventual transmission
6/12/2016© 2010 Raymond P. Jefferis IIILect Intermediate Node Functions Receives packets from data link layer Routes packets from source to destination –typically through a chain of nodes –requires a route Passes packets back to data link layer for eventual retransmission to destination via selected route
6/12/2016© 2010 Raymond P. Jefferis IIILect Intermediate Node Layers
6/12/2016© 2010 Raymond P. Jefferis IIILect Routing Functions Interconnection of multiple networks Determines output line for incoming packet Path selection based on destination address and routing algorithm Alternates based on network status (link state)
6/12/2016© 2010 Raymond P. Jefferis IIILect Multiway Routing
6/12/2016© 2010 Raymond P. Jefferis IIILect Routing Algorithms Algorithms –flooding –shortest path distance vector routing link state routing –flow-based
6/12/2016© 2010 Raymond P. Jefferis IIILect Flooding Algorithm Incoming packets sent on all lines except incoming (many duplicate packets) Each packet has hop counter, initially set to expected path length Decremented each hop, discard pkt if zero First arriving packet took shortest path Puts a lot of extra traffic on network
6/12/2016© 2010 Raymond P. Jefferis IIILect Shortest Path Routing Network consists of nodes and arcs Arcs have costs assigned Routing occurs at nodes Routing should minimize total path cost –requires cost metric –requires computation
6/12/2016© 2010 Raymond P. Jefferis IIILect Route Computations Follows link state distribution to all routers Each router contains all link delays Shortest path to each router computed, using path cost as metric –frame delay cost –other cost factors (distance, traffic, equipment) Algorithm
6/12/2016© 2010 Raymond P. Jefferis IIILect Shortest Path Algorithm For each possible starting node –Put starting node in optimal list –Repeat Compute total costs to all new neighbors Assign lowest as optimal for that node Delete other possibilities for that node –Until each node has optimum assigned for given starting node End
6/12/2016© 2010 Raymond P. Jefferis IIILect Route Computation to Node A
6/12/2016© 2010 Raymond P. Jefferis IIILect Route Computation to Node A
6/12/2016© 2010 Raymond P. Jefferis IIILect Route Computation to Node A
6/12/2016© 2010 Raymond P. Jefferis IIILect One-Hop Costs to Node A
6/12/2016© 2010 Raymond P. Jefferis IIILect Route Computation to Node A
6/12/2016© 2010 Raymond P. Jefferis IIILect Belman-Ford Routing Distance vector method Uses shortest path algorithm Results in routing table for each node
6/12/2016© 2010 Raymond P. Jefferis IIILect Distance Vector Routing Each router has vector of optimal paths to each destination Tables updated by neighbor exchange Metrics (measurements) –hops (trace) –queue length (known internally) –delay (ping)
6/12/2016© 2010 Raymond P. Jefferis IIILect Link State Routing Routers learn neighbor addresses (“hello” packet sent at bootup) Cost or delay measured to each (measured by “echo” packets) State information distributed to all routers (“link state packet”) Shortest delay to all other routers computed
6/12/2016© 2010 Raymond P. Jefferis IIILect Network with Link State Delays
6/12/2016© 2010 Raymond P. Jefferis IIILect Routing Table at Node A
6/12/2016© 2010 Raymond P. Jefferis IIILect Network with Link State Delays
6/12/2016© 2010 Raymond P. Jefferis IIILect Link State Packets Each sends on all outgoing lines Duplicates and lower sequence numbers discarded Age decremented, packet discarded when zero
6/12/2016© 2010 Raymond P. Jefferis IIILect Maximal Flow in Network Ford-Fulkerson theorem Each link has known capacity in each direction Cuts made separating source from destination Maximal flow is capacity across cut having minimum capacity
6/12/2016© 2010 Raymond P. Jefferis IIILect Problem! Networks have many paths All possible cuts have to be examined Number of possible cuts can be VERY large
6/12/2016© 2010 Raymond P. Jefferis IIILect Algorithmic Solution Uses distance metric –hop count –delay –other calculates capacity sequentially avoids combinatorial problem
6/12/2016© 2010 Raymond P. Jefferis IIILect Maximum Flow Algorithm Expand from start node to adjacent nodes Expand by node layers until final node Subtract capacity of minimal link from path Repeat until no more capacity (cut) Capacity of network is capacity of cut Paths have minimal hop count
6/12/2016© 2010 Raymond P. Jefferis IIILect Maximal Flow Example Numbers shown are channel capacities
6/12/2016© 2010 Raymond P. Jefferis IIILect First Layer Branch
6/12/2016© 2010 Raymond P. Jefferis IIILect Second Layer Branch
6/12/2016© 2010 Raymond P. Jefferis IIILect Third Layer Branch
6/12/2016© 2010 Raymond P. Jefferis IIILect ABCD Capacity Reduced by 4
6/12/2016© 2010 Raymond P. Jefferis IIILect First Layer
6/12/2016© 2010 Raymond P. Jefferis IIILect Second Layer
6/12/2016© 2010 Raymond P. Jefferis IIILect Third Layer
6/12/2016© 2010 Raymond P. Jefferis IIILect AFKD Capacity Reduced by 2
6/12/2016© 2010 Raymond P. Jefferis IIILect First Layer
6/12/2016© 2010 Raymond P. Jefferis IIILect Second Layer
6/12/2016© 2010 Raymond P. Jefferis IIILect Third Layer
6/12/2016© 2010 Raymond P. Jefferis IIILect AFED Capacity Reduced by 2
6/12/2016© 2010 Raymond P. Jefferis IIILect First Layer
6/12/2016© 2010 Raymond P. Jefferis IIILect Second Layer
6/12/2016© 2010 Raymond P. Jefferis IIILect Third Layer
6/12/2016© 2010 Raymond P. Jefferis IIILect Fourth Layer
6/12/2016© 2010 Raymond P. Jefferis IIILect AGJCD Capacity Reduced by 2
6/12/2016© 2010 Raymond P. Jefferis IIILect First Layer
6/12/2016© 2010 Raymond P. Jefferis IIILect Second Layer
6/12/2016© 2010 Raymond P. Jefferis IIILect Third Layer
6/12/2016© 2010 Raymond P. Jefferis IIILect Fourth Layer
6/12/2016© 2010 Raymond P. Jefferis IIILect AFHKD Capacity Reduced by 2
6/12/2016© 2010 Raymond P. Jefferis IIILect First Layer
6/12/2016© 2010 Raymond P. Jefferis IIILect Second Layer
6/12/2016© 2010 Raymond P. Jefferis IIILect Third Layer
6/12/2016© 2010 Raymond P. Jefferis IIILect Fourth Layer
6/12/2016© 2010 Raymond P. Jefferis IIILect Fifth Layer
6/12/2016© 2010 Raymond P. Jefferis IIILect AFHJCD Capacity Reduced by 1
6/12/2016© 2010 Raymond P. Jefferis IIILect Minimal Cut (Capacity = 13)