SlideShare a Scribd company logo
THE NETWORK LAYER Chapter 5
OVERVIEW Functions:  Routing issues determine “good” path  (sequence of routers) thru  network from source to dest. Congestion (Not Contention!) More packets enter an area than can be processed Internetworking   connecting different  network technologies together Network layer protocols in  every   host ,  router application transport network data link physical application transport network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical
NETWORK LAYER DESIGN ISSUES Services Provided to the Transport Layer The network layer should shield the transport layer from having to know details of the underlying  subnet   Network Layer Services Can:  Connection-Oriented : Provides  Virtual Circuit (VC)  subnet,  source-to-destination path behaves much like telephone circuit,  Avoids choosing a new route for each packet.  A virtual circuit remembers how to send a packet from source to destination. Connection-less : Provides  Datagram  subnet,  Each packet sent is routed independently of its predecessors
No call setup at network layer Packets forwarded using destination host address packets between same source-dest.  pair may take different paths Use in  Internet   CONNECTIONLESS: DATAGRAM (1) 1. Send Data 2. Receive Data application transport network data link physical application transport network data link physical
CONNECTIONLESS: DATAGRAM (2) Routing within a diagram subnet: The table of router A is changed because of some reasons! Management and update this tables for routing =  Routing algorithm   Store-and-Forward  packet  Subnet Routing tables
C all setup, do for each call  before  data can flow Each packet carries VC identifier Used in  ATM , frame-relay, X.25 VIRTUAL CIRCUITS (1) 1.  Initiate call 2. I ncoming call 3.  Accept call 4.  Call connected 5.  Data flow begins 6.  Receive data application transport network data link physical application transport network data link physical
VIRTUAL CIRCUITS (2) Routing within a virtual-circuit subnet:
ATM (1) ATM  (Asynchronous Transfer Mode)  Is underlying mechanism. Transmits in small fixed-size cells. A connection-oriented network Use  virtual circuits  and small, fixed-size packets ( Cells )
ATM (2) Packet (cell) switching is dramatic change for phone companies. ATM is connection oriented; make connecting request first; then all cells follow the same path. Target is 155 Mbps and 622 Mbps.  Allows TV transmission.
COMPARISON OF VIRTUAL-CIRCUIT AND DATAGRAM Internet ATM
QUALITY OF SERVICE: QOS (1) Factors:  Timing Connection Establishment Delay End-To-End Delay Connection Establishment Failure Probability Throughput  or  Bandwidth Guarantee Ordering Preservation Congestion Control Bit-Error rate  or  Packet-Loss Rate Control Protection Priority …
QUALITY OF SERVICE: QOS (2) Requirements: Reliability, Delay, Jitter, Bandwidth  How stringent the quality-of-service requirements are:
ROUTING (1) The network layer is responsible for routing packets from the source to destination.  The routing algorithm is the piece of software that decides where a packet goes next (e.g., which output line, or which node on a broadcast channel).  For connectionless networks, the routing decision is made for each datagram. For connection-oriented networks, the decision is made once, at circuit setup time.  The routing algorithm must deal with the following issues:  Correctness, simplicity, stability, fairness and optimality Mimizing mean packet delay or maximizing total network throughput  Routing  is different from  Forwarding !: Forwarding: Select the output path using routing table Routing: Management and updating the routing tables
ROUTING (2) There are two types:  Static (Non-Adaptive) routes never update or update slowly over time Examples: Dijkstra, Flooding algorithm Dynamic (Adaptive)  routes update more quickly  use dynamic information of current topology such as load, delay, … Examples: Distance Vector, Link State Routing From another view:  Global: all routers have complete topology, link cost info Decentralized: router knows physically-connected neighbors
DIJKSTRA ALGORITHM (1) N et topology, link costs known to all nodes Global algorithm  Cost of a link is a function of :  Number of  Hop s, Distance,  Average traffic, Delay, … Computes least cost paths (Minimum path) from one node (‘source”) to all other nodes gives  routing table  for that node Iterative: after k iterations, know least cost path to k dest.’s Non-Adaptive Algorithm
DIJKSTRA ALGORITHM (2) Notation:  N:  set of nodes whose least cost path definitively known c(i,j):  link cost from node i to j. cost infinite if not direct neighbors p(v):  nodes along path from source to v D(v):  current value of cost of path from source to dest. V N: A, B, C, D, E, F C(A,C)=5; C(C,A)=5 C(B,D)=2; C(D,B)=3 … Source=A p(F): A-D-E-F D(F)=4 Example: A F D C E B 1 1 1 2 2 2 5 3 5 3 5 3
DIJKSTRA ALGORITHM (3) 1  Initialization:   2  N = {A}  3  For all nodes v  4  If v adjacent to A then 5  D(v) = c(A,v)  6  Else D(v) = infinity  8  Loop   9  Find w not in N such that D(w) is a minimum  10  Add w to N  11  Update D(v) for all v adjacent to w and not in N:  12  D(v) = min(  D(v),   D(w)  + c(w,v)  )  /* new cost to v is either old cost to v or known shortest path  cost to w plus cost from w to v */  13  until  all nodes in N  C version of this algorithm is available in book  v w D(v) c(w,v) D(w) A
DIJKSTRA ALGORITHM (4) Example: computes least cost paths from node  A  to all other nodes Step 0 1 2 3 4 5 start N A AD ADE ADEB ADEBC ADEBCF D(B),p(B) 2,A-B 2,A-B 2,A-B 2,A-B 2,A-B 2,A-B D(C),p(C) 5,A-C 4,A-D-C 3,A-D-E-C 3,A-D-E-C 3,A-D-E-C 3,A-D-E-C D(D),p(D) 1,A-D 1,A-D 1,A-D 1,A-D 1,A-D 1,A-D D(E),p(E) infinity 2,A-D-E 2,A-D-E 2,A-D-E 2,A-D-E 2,A-D-E D(F),p(F) infinity infinity 4,A-D-E-F 4,A-D-E-F 4,A-D-E-F 4,A-D-E-F D(v): Distance (cost) of A to v. P(v): nodes along path fromA to v. A F D C E B 1 1 1 2 2 2 5 3 5 3
DIJKSTRA'S SHORTEST PATH ALGORITHM Find shortest path from s to t. s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6
DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6        0 distance label S = {  } PQ = { s, 2, 3, 4, 5, 6, 7, t }
DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6        0 distance label S = {  } PQ = { s, 2, 3, 4, 5, 6, 7, t } delmin
DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9    14  0 distance label S = { s } PQ = { 2, 3, 4, 5, 6, 7, t } decrease key  X   X X
DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9    14  0 distance label S = { s } PQ = { 2, 3, 4, 5, 6, 7, t }  X   X X delmin
DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9    14  0 S = { s, 2 } PQ = { 3, 4, 5, 6, 7, t }  X   X X
DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9    14  0 S = { s, 2 } PQ = { 3, 4, 5, 6, 7, t }  X   X X decrease key X 33
DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9    14  0 S = { s, 2 } PQ = { 3, 4, 5, 6, 7, t }  X   X X X 33 delmin
DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9    14  0 S = { s, 2, 6 } PQ = { 3, 4, 5, 7, t }  X   X X X 33 44 X X 32
DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 6 } PQ = { 3, 4, 5, 7, t }  X   X X 44 X delmin  X 33 X 32
DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 6, 7 } PQ = { 3, 4, 5, t }  X   X X 44 X 35 X 59 X 24  X 33 X 32
DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 6, 7 } PQ = { 3, 4, 5, t }  X   X X 44 X 35 X 59 X delmin  X 33 X 32
DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 3, 6, 7 } PQ = { 4, 5, t }  X   X X 44 X 35 X 59 X X 51 X 34  X 33 X 32
DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 3, 6, 7 } PQ = { 4, 5, t }  X   X X 44 X 35 X 59 X X 51 X 34 delmin  X 33 X 32 24
DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 3, 5, 6, 7 } PQ = { 4, t }  X   X X 44 X 35 X 59 X X 51 X 34 24 X 50 X 45  X 33 X 32
DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 3, 5, 6, 7 } PQ = { 4, t }  X   X X 44 X 35 X 59 X X 51 X 34 24 X 50 X 45 delmin  X 33 X 32
DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 3, 4, 5, 6, 7 } PQ = { t }  X   X X 44 X 35 X 59 X X 51 X 34 24 X 50 X 45  X 33 X 32
DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 3, 4, 5, 6, 7 } PQ = { t }  X   X X 44 X 35 X 59 X X 51 X 34 X 50 X 45 delmin  X 33 X 32 24
DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 3, 4, 5, 6, 7, t } PQ = { }  X   X X 44 X 35 X 59 X X 51 X 34 X 50 X 45  X 33 X 32
DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 3, 4, 5, 6, 7, t } PQ = { }  X   X X 44 X 35 X 59 X X 51 X 34 X 50 X 45  X 33 X 32
DIJKSTRA'S ALGORITHM - PSEUDOCODE dist[s] ←0  (distance to source vertex is zero) for  all  v ∈ V–{s}         do   dist[v] ←∞  (set all other distances to infinity)  S←∅  (S, the set of visited vertices is initially empty)  Q←V    (Q, the queue initially contains all vertices)                 while  Q ≠∅  (while the queue is not empty)  do    u ←  mindistance (Q,dist) (select the element of Q with the min. distance)         S←S∪{u}  (add u to list of visited vertices)         for all  v ∈ neighbors[u]                 do  if    dist[v] > dist[u] + w(u, v)  (if new shortest path found)                          then       d[v] ←d[u] + w(u, v) (set new value of shortest path) (if desired, add traceback code) return  dist
DIJKSTRA ANIMATED EXAMPLE
DIJKSTRA ANIMATED EXAMPLE
DIJKSTRA ANIMATED EXAMPLE
DIJKSTRA ANIMATED EXAMPLE
DIJKSTRA ANIMATED EXAMPLE
DIJKSTRA ANIMATED EXAMPLE
DIJKSTRA ANIMATED EXAMPLE
DIJKSTRA ANIMATED EXAMPLE
DIJKSTRA ANIMATED EXAMPLE
DIJKSTRA ANIMATED EXAMPLE
One more Ex:
 
Discussion: Algorithm complexity : Suppose there are  n  nodes, except source First iteration: Search through all  n  nodes to determine the node,  w , not in  N  that has the minimum cost. Second iteration: Check  n -1  nodes to determine minimum cost. Third iteration:  n -2  nodes, and so on. Total number of nodes searched:  n ( n +1)/2 The implementation of the algorithm has worst-case complexity of order  n  squared:  O ( n 2 ). A more sophisticated implementation of this algorithm, using a data structure known as a  heap , can reducing the complexity to  O( n log( n )  ) DIJKSTRA ALGORITHM (5)
FLOODING ALGORITHM (1) Flooding does not select a specific route. When a router receives a packet, it sends a copy of the packet out on each line (except the one on which it arrived) To reduce looping even further:  Using  Hop Counter : Each router decrements a hop count contained in the packet header. Whenever the hop count decrements to zero, the router discards the packet.  Keep track of which packet have been flood Add a sequence number to each packet's header.  Each router maintains a private sequence number. When it sends a new packet, it copies the sequence number into the packet, and increments its private sequence number.  Keeps track of the highest sequence number seen from S.  Whenever it receives a packet from S containing a sequence number lower than the one stored in its table, it discards the packet. Otherwise, it updates the entry for S and forwards the packet on  Non-Adaptive Algorithm
FLOODING ALGORITHM (2) Another variation of flooding is  Selective Flooding : Don’t send incoming packets to ALL output lines Just forward on that lines which are going approximately in right direction  Uses:  In  military applications , the network must remain robust in the face of (extreme) hostility  In  distributed databa se applications, it is sometimes necessary to update all the databases concurrently wireless networks , all messages transmitted by a station can be received by all other stations within its radio range metric  against which other routing algorithms can be  compared . Flooding always chooses the shortest path because it chooses every possible path in parallel
DISTANCE VECTOR ROUTING (1) Each router  maintains a table (vector) giving the  best known distance  to a destination and the  line to use  for sending there.  Tables are updated by exchanging information with  neighbors .  Each router knows the distance (cost) of reaching its neighbors (e.g. send echo requests).  Routers periodically exchange routing tables with each of their neighbors.  This algorithm was used in the original ARPANET Adaptive Algorithm
DISTANCE VECTOR ROUTING (3) Distance table for J A subnet.  Input from A, I, H, K, and the new routing table for J. D J  (G,?)=  c(J,H)+min w {D H (G,w)}= 6+12= 18
Consider how J computes its new route to router G.  It knows that it can get to A in 8 msec, and A claims to be able to get to G in 18 msec, so J knows it can count on a delay of 26 msec to G if it forwards packets bound for G to A.  Similarly, it computes the delay to G via I, H, and K as 41 (31 + 10), 18 (6 + 12), and 37 (31 + 6) msec, respectively.  The best of these values is 18, so it makes an entry in its routing table that the delay to G is 18 msec and that the route to use is via H.  The same calculation is performed for all the other destinations, with the new routing table shown in the last column of the figure.
DISTANCE VECTOR ROUTING (4) Problem: Convergence is slow! Good news travels quickly, bad news travels slowly ( count-to-infinity)  problem Example: Propagation of good news  Initially  A  is down and all other routers know this Table for dest.=A There is no path to A In a subnet with longest subnet path=N, after N exchanges everyone will know
DISTANCE VECTOR ROUTING (5) Example: Propagation of good news  The  count-to-infinity  problem A goes down after initially  After this A goes down Counting will continuous to infinity   If the metric is “Number of Hop”, Infinite can define as longest path+1 If the metric is “delay”, there is no well-defined upper bound B thinks that there is a path to A thru C but C itself go to A via B!
LINK STATE ROUTING (1) The DVR Arpanet routing algorithm was replaced in 1979. Problems with old algorithm included:  Network was too  slow in adapting  to congestion, too fast to react to minor changes.  Average queue length was used to estimate delay This works only if all lines have the  same capacity  and propagation delay. Doesn't take into account that packets have varying sizes.  Didn’t take line bandwidth into account when choosing routes Because all the line have same capacity, 56 Kbps Adaptive Algorithm
LINK STATE ROUTING (2) Each router must do the following:    Discover its neighbors, learn their network address. Sends ‘hello' message on booting.    Measure the delay or cost to each of its neighbors. Delay= (Send ‘Echo’ message + Receive its reply)/2     Construct a packet telling all it has just learned. Construct  Link State (LS)  packet, it contains:  Source Add., Seq. No., Age No., List of neighbors + their delay     Send this packet to all other routers. Forwards  link state  packets to  all  other routers using  Flooding  algorithm.     Compute the shortest path to every other router. Each router uses an Dijkstra algorithm to calculate shortest paths based on the current values in its database.
LINK STATE ROUTING (3) The link state packets for this subnet. The packet buffer for router B, Used in step  
THE NETWORK LAYER IN THE INTERNET (1) TCP/IP use the Internet Protocol (IP) in network layer.  Provides connectionless, datagram service:  unreliable The IPv4 header: Using  Big Endian:   store/transmit the most significant byte of a bit stream in the lowest memory address/first (e.g. to the left).  Machines such as IBM and Sun-3 computers use this mechanism  Intel use  Little Endian
THE NETWORK LAYER IN THE INTERNET (2) Version number (4-bits):  Including a version number allows a future version of IP be used along side the current version, facilitating migration to new protocols.  Header length (4-bits):  Length of the datagram header (excluding data) in 32-bit words.  The minimum length is 5 words = 20 bytes, but can be up to 15 words if options are used.  Max. length of Option data=40 bytes    Max for IHL=15 Type-of-service (8-bits):   A hint to the routing algorithms as to what type of service we desire.  Precedence (3-bits): A priority indication, where 0 is the lowest and means normal service, while 7 is highest Delay, Throughput, Reliability bits
THE NETWORK LAYER IN THE INTERNET (3) Total length (16-bits):  Total length of the IP datagram (in bytes).  Max. length of a packet is 2 16 =65K bytes Identification (16-bits),  DF (Don’t fragment), MF (More fragment), Fragment offset (13-bits): These three fields are used for fragmentation and reassembly.  Gateways along a path are free to fragment datagrams as needed; hosts are required to reassemble fragments before passing complete datagrams to the higher layer protocols.  Each fragment contains a complete copy of the original datagram header plus some portion of the data.  All fragments of a datagram will have the same source and destination IP address.
THE NETWORK LAYER IN THE INTERNET (4) Identification: determine the IP Datagram  DF: Don’t fragment this datagram  MF:1 means that the fragmentation is continued, 0 Just for last packet  Fragmented Offset: Determine the position of current packet in datagram, 13 bits   Max. No. of packets in each datagram=8192 Time-to-live: TTL (8-bits):   It guarantees that packets don't stay in the network for longer than 255 seconds, a property needed by higher layer protocols that reuse sequence numbers.  A counter that is decremented by each gateway. Should this hopcount reach 0, discard the datagram.  Protocol (8-bits):  What type of data the IP datagram carries (e.g., TCP, UDP, etc.).  Needed by the receiving IP to know the higher level service that will next handle the data.
THE NETWORK LAYER IN THE INTERNET (5) Header Checksum (16-bits):   A checksum of the IP header (excluding data) use checksum method for error detection  The header must be recalculated at every router since the TTL field is decremented. Source address (32-bits):  Original sender's address.  This is an IP address, not a MAC address. Destination address (32-bits):  Datagram's ultimate destination.  IP Options: IP datagrams allow the inclusion of optional,  varying length fields  that need not appear in every datagram.  Some defined options: Security, Strict source routing, Loose source routing, Record route, Timestamp
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 IP FRAGMENTATION AND REASSEMBLY (1) fragmentation:  in:  one large datagram out:  3 smaller datagrams reassembly
IP FRAGMENTATION AND REASSEMBLY (2) ID =x offset =0 fragflag =0 length =4000 ID =x offset =0 fragflag =1 length =1500 ID =x offset =1480 fragflag =1 length =1500 ID =x offset =2960 fragflag =0 length =1040 One large datagram becomes 3 smaller datagrams. Example 4000 byte datagram MTU = 1500 bytes 0……….3979 data 20 Byte 4000 Bytes 0……….1479 1480…2959
IP ADDRESSES (1) IP address:  32-bit identifier for  host ,  router  interface   interface:  connection between host/router and physical link router’s typically have multiple interfaces host may have multiple interfaces IP addresses associated with each interface 223.1.1 .1 223.1.1 .3 223.1.1 .4 223.1.2 .9 223.1.1.1 = 11011111 00000001 00000001 00000001 223 1 1 1 223.1.1 .2 223.1.2 .2 223.1.2 .1 223.1.3 .2 223.1.3 .1 223.1.3 .27
IP address:   network part (high order bits) host part (low order bits)  What’s a network ?  ( from IP address perspective) device interfaces with same  network part  of IP address can physically reach each other without intervening router IP ADDRESSES (2) 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 network consisting of 3 IP networks LAN
ICANN :  I nternet  C orporation for  A ssigned  N ames and  N umbers  allocates addresses IP ADDRESSES (3) 223.1.1.1 223.1.1.3 223.1.1.4 223.1.2.2 223.1.2.1 223.1.2.6 223.1.3.2 223.1.3.1 223.1.3.27 223.1.1.2 223.1.7.0 223.1.7.1 223.1.8.0 223.1.8.1 223.1.9.1 223.1.9.2 Interconnected  system consisting of six networks.
class-full addressing: IP ADDRESSES (4) 0 network host A C D class 1.0.0.0  to 127.255.255.255 128.0.0.0  to 191.255.255.255 192.0.0.0  to 223.255.255.255 224.0.0.0  to 239.255.255.255 32  bits 65K Hosts 16K Networks 254 Hosts 4M Networks 16M Hosts 126 Networks 110 network host 10 network host B 1110 multicast address
Special Cases 0.0.0.0 :Source IP Addr. Just after Boot network  part of dest. Addr.= 0 :Source and Destination are in same network. Dest. Addr.=255.255.255.255 :Broadcast in Sender’s network. host  part of Dest.=111… : Broadcast in destination network. Dest. Addr. = 127.anything : Loop Back IP ADDRESSES (5) class code network host
IP ADDRESSES (6) Subnets (1):  A large organization or campus might have 30 or more LANs (one for each department). And will probably have only a single connection to the rest of the Internet.  inefficient use of address  space, address space exhaustion e.g., class B net allocated enough addresses for 65K hosts, even if only 2K hosts in that network In order for every local host to be able to communicate with other Internet machines, routing entries for each of the 30 networks must exist in the core gateways.  Wouldn't it be nice if we only needed to advertise a  single network number for all  30 networks?
IP ADDRESSES (7) Subnets (2):  We want to be able to reduce the number of networks seen by the outside world; simplify the management of those many networks within the organization; Using Subnet addressing: IP addresses have a well-defined structure that allows a gateway to extract the network portion of an address by simply looking at its class and an optional  Subnet mask .
IP ADDRESSES (8) CIDR:   C lassless  I nter  D omain  R outing  ( RFC1519 ) network portion of address of arbitrary length address format:  a.b.c.d/x , where x is # bits in network portion of address Ex.:  A class B network subnetted into 64 subnets: MASK=255.255.252.0   or IP Add./22
IP ADDRESSES (9) Subnet: The subnet mask ANDed with the interface address yields the network number of the interface.  If  ( ( port_interface_address & subnet_mask ) == ( DEST & subnet_mask ) ), direct routing with this port can be used.
IP datagram:   GETTING A DATAGRAM FROM SOURCE TO DEST. (1) datagram remains  unchanged , as it travels source to destination addr fields of interest here misc fields source IP addr dest IP addr data 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 A E B Dest. Net.  Next Router  Nhops 223.1.1  1 223.1.2   223.1.1.4  2 223.1.3   223.1.1.4  2 forwarding table in A
GETTING A DATAGRAM FROM SOURCE TO DEST. (2) B Starting at A, send IP datagram addressed to B: look up net. address of B in forwarding table find B is on same net. as A link layer will send datagram directly to B inside link-layer frame B and A are directly connected forwarding table in A A 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 E Dest. Net. Next Router  Nhops 223.1.1  1 223.1.2  223.1.1.4  2 223.1.3  223.1.1.4  2 misc fields 223.1.1.1 223.1.1.3 data
GETTING A DATAGRAM FROM SOURCE TO DEST. (3) Starting at A, dest. E: look up network address of E in forwarding table E on  different  network A, E not directly attached routing table: next hop router to E is 223.1.1.4  link layer sends datagram to router 223.1.1.4 inside link-layer frame datagram arrives at 223.1.1.4  continued….. forwarding table in A 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 E A B Dest. Net. Next Router  Nhops 223.1.1  1 223.1.2  223.1.1.4  2 223.1.3  223.1.1.4  2 misc fields 223.1.1.1 223.1.2.3 data
GETTING A DATAGRAM FROM SOURCE TO DEST. (4) Arriving at 223.1.4, destined for 223.1.2.2 look up network address of E in router’s forwarding table E on  same  network as router’s interface 223.1.2.9   router, E directly attached link layer sends datagram to 223.1.2.2 inside link-layer frame via interface 223.1.2.9   datagram arrives at 223.1.2.2 forwarding table in router 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 A E B misc fields 223.1.1.1 223.1.2.3 data Dest. Net Router  Nhops  Interface 223.1.1  -  1  223.1.1.4   223.1.2  -  1  223.1.2.9 223.1.3  -  1  223.1.3.27
Host, Router network-layer-functions: THE INTERNET NETWORK LAYER OSPF: Open Shortest Path First,  RFC2328 BGP: Border Gateway Protocol,  RFC1771 ICMP: Internet Control Message Protocol,  RFC792 forwarding table Routing protocols path selection 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
How does  host  get IP address? IP addr. is configures into host by admin. in a file Windows: control-panel->network->configuration->tcp/ip->properties DHCP:   D ynamic  H ost  C onfiguration  P rotocol  (RFC2131) : dynamically  get address from as server “ plug-and-play” Allows reuse of addresses (only hold address while connected an “on” Support for mobile users who want to join network (more shortly) DHCP overview: host broadcasts “ DHCP discover ” msg DHCP server responds with “ DHCP offer ” msg host requests IP address: “ DHCP request ” msg DHCP server sends address: “ DHCP ack ” msg  IP ADDRESSES: HOW TO GET ONE?
THE INTERNET NETWORK LAYER PROTOCOLS  (1) ICMP  (Internet Control Message Protocol) : Allows gateways and hosts to send network control information to each other.  Two general types of ICMP messages:  Information messages,  where a sender sends a query to another machine (either host or gateway) and expects an answer. For example, a host might want to know if a gateway is alive.  Error indication messages,  where the IP software on a host or gateway has encountered a problem processing an IP datagram. For example, it may be unable to route a datagram to its destination, or it may have had to drop a frame.
THE INTERNET NETWORK LAYER PROTOCOLS (2) The principal ICMP message types.
THE INTERNET NETWORK LAYER PROTOCOLS (3) ARP  (Address Resolution Protocol) : Map IP add. to MAC add.  Using broadcasting  RARP  (Reverse Address Resolution Protocol) : Map MAC add. to IP add.  Used in diskettes booting OSPF  (Open Shortest Path First) : Routing for inter-AS  (Autonomous system) Using Link State routing BGP  (Border Gateway Protocol) : Routing for intra-AS  Distance vector protocol, but not only does it account for distance, but also for specific route criteria.
MOBILE IP
 
 
 
 
 
 
Remote host and mobile host communication
Mobile IP has two addresses  for a mobile host:  one home address and one care-of address.  The home address is permanent;  the care-of address changes as the mobile  host moves from one network to another.
Registration request and reply
Data transfer
 
 
 
ROUTING FOR MOBILE HOSTS A WAN to which LANs, MANs, and wireless cells are attached.
ROUTING IN AD HOC NETWORKS Possibilities when the routers are mobile: Military vehicles on battlefield. No infrastructure . A fleet of ships at sea. All moving all the time Emergency works at earthquake . The infrastructure destroyed. A gathering of people with notebook computers. In an area lacking 802.11.
ROUTE DISCOVERY  USING  AODV – AD-HOC ON DEMAND DISTANCE VECTOR ROUTING PROTOCOL  (a)  Range of A's broadcast. (b)  After B and D have received A's broadcast. (c)  After C, F, and G have received A's broadcast. (d)  After E, H, and I have received A's broadcast. Shaded nodes are new recipients.  Arrows show possible reverse routes.
ROUTE DISCOVERY (2) Format of a ROUTE REQUEST packet.
ROUTE DISCOVERY (3) Format of a ROUTE REPLY packet.
ROUTE MAINTENANCE (a)  D's routing table before G goes down. (b)  The graph after G has gone down.
CONGESTION
CONGESTION CONTROL ALGORITHMS General Principles of Congestion Control Congestion Prevention Policies Congestion Control in Virtual-Circuit Subnets  Admission control Agreement control Congestion Control in Datagram Subnets  Warning bit (FECN and BECN bit in CISCO routers) Choke Packet Load Shedding Jitter Control
CONGESTION  When too much traffic is offered, congestion sets in and performance degrades sharply.
What is congestion  and why they occur? When too many packets are present in (a part of) the subnet, performance degrades. This situation is called congestion (1)  insufficient memory  to hold packets ..will be lost. ok…lets increse the memory? Adding more memory may help up to a point, but Nagle (1987) discovered that if routers have an infinite amount of memory,  congestion gets worse , not better, because by the  time packets get to the front of the queue, they have already timed out (repeatedly) and duplicates have been sent . All these packets will be dutifully forwarded to the next router, increasing the load all the way to the destination. (2)  Slow processors  can also cause congestion   If the routers' CPUs are slow at performing the bookkeeping tasks required of them (queueing buffers, updating tables, etc.), queues can build up, even though there is excess line capacity. low-bandwidth lines  can also cause congestion Difference between congestion control and flow control
GENERAL PRINCIPLES OF CONGESTION CONTROL Monitor the system . detect when and where congestion occurs. Pass information to where action can be taken. Adjust system operation to correct the problem.
How to monitor the subnet for congestion.    percentage of all packets discarded for lack of buffer space,    average queue lengths,    number of packets that time out and are retransmitted,    average packet delay   standard deviation of packet delay (jitter Control).  The second step in the  feedback loop  is to transfer the information about the congestion from the point where it is detected to the point where something can be done about it.  The obvious way is for the router detecting the congestion to send a packet to the traffic source or sources, announcing the problem.  Several methods: a bit or field can be reserved in every packet  for routers to fill in whenever congestion gets above some threshold level. When a router detects this congested state, it fills in the field in all outgoing packets, to warn the neighbors. hosts or routers periodically send probe packets out to explicitly  ask about congestion. This information can then be used to route traffic around problem areas.
congestion control algorithms open loop  act at the source  act at the destination closed loop Explicit feedback  packets are sent back from the point of congestion to warn the source. Implicit feedback the source deduces the existence of congestion by making local observations, such as the time needed for acknowledgements to come back Increase the resources or  Decrease the load . That is not always possible. So we have to apply some congestion prevention policy.
CONGESTION PREVENTION POLICIES Policies that affect congestion. 5-26
CONGESTION CONTROL IN VIRTUAL-CIRCUIT SUBNETS (a)  A congested subnet.  (b)  A redrawn subnet, eliminates congestion and a virtual circuit from A to B.
HOP-BY-HOP CHOKE PACKETS (a)  A choke packet that affects only the source. (b)  A choke packet that affects each hop it passes through.
Load shedding  when routers cannot handle, they just throw them away Need to implement an intelligent discard policy,  applications must mark their packets in priority classes to indicate how important they are.  If they do this, then when packets have to be discarded, routers can first drop packets from the lowest class, then the next lowest class, and so on.  Ex: VERY IMPORTANT— NEVER, EVER DISCARD  Random Early Detection
JITTER CONTROL (a)  High jitter.  (b)  Low jitter.
QUALITY OF SERVICE Label Switching and MPLS
Adding a label in front of each packet and doing the routing based on the label rather than on the destination address.  Making the label an index into an internal table  makes finding the correct output line becomes just a matter of table lookup.  Using this technique, routing can be done very quickly and any necessary resources can be reserved along the path. X.25, ATM, frame relay, and all other networks with a virtual-circuit subnet also put a label (i.e., virtual-circuit identifier) in each packet, look it up in a table, and route based on the table entry. routing and switching. Routing  is the process of looking up a destination address in a table to find where to send it.  switching  uses a label taken from the packet as an index into a forwarding table.  Since IP packets were not designed for virtual circuits, there is no field available for virtual-circuit numbers within the IP header. For this reason,  a new MPLS header had to be added in front of the IP header . On a router-to-router line using PPP as the framing protocol, the frame format, including the PPP, MPLS, IP, and TCP headers
LABEL SWITCHING AND MPLS Transmitting a TCP segment using IP, MPLS, and PPP.
The generic MPLS header has four fields, the most important of which is the  Label  field, which holds the index.  The  QoS  field indicates the class of service.  The  S field  relates to stacking multiple labels in hierarchical networks If it  hits 0, the packet is discarded . This feature prevents infinite looping in the case of routing instability. When an MPLS-enhanced packet (or cell) arrives at an MPLS-capable router,  the label is used as an index into a table to determine the outgoing line to use and also the new label to use. This label swapping is used in all virtual-circuit subnets because labels have only local significance and  two different routers can feed unrelated packets with the same label  into another router for transmission on the same outgoing line.  To be distinguishable at the other end, labels have to be remapped at every hop. routers to  group multiple flows that end at a particular router  or LAN and use a single label for them. The flows that are grouped together under a single label are said to belong to the same  FEC (Forwarding Equivalence Class)
Virtual-circuit routing  Traditional Method MPLS it is  not possible to group several distinct paths  with different end points onto the same virtual-circuit identifier because there would be no way to distinguish them at the final destination.  With MPLS, the packets still contain their  final destination address +  label ,  so that at the end of the labeled route the  label header can be removed and forwarding can continue the usual way , using the network layer destination address. forwarding table construction in VC when a user wants to establish a connection, a  setup packet is launched  into the network to create the path and make the forwarding table entries forwarding table construction in MPLS there is  no setup phase  for each connection instead there are two ways for the forwarding table entries to be created.  In the  data-driven approach ,  Control-driven approach
Data-driven approach ,  when a packet arrives, the first router it hits  contacts the router downstream where the packet has to go  and  asks it to generate a label for the flow .  This method is applied recursively .  colored threads  a technique is used to avoid loops. The backward propagation of an  FEC can be compared to  pulling a uniquely colored thread back into the subnet. If a router ever sees a color it already has, it knows there is a loop and takes remedial action .  The data-driven approach is primarily used  in ATM kind of network (such as much of the telephone system). Control-driven approach . It has several variants.  One of these works like this.  When a router is booted,  It checks to see for which routes it is the final destination (e.g., which hosts are on its LAN).  It then creates one or more FECs for them, allocates a label for each one, and passes the labels to its neighbors.  They, in turn, enter the labels in their forwarding tables and send new labels to their neighbors, until all the routers have acquired the path.  Resources can also be reserved as the path is constructed to guarantee an appropriate quality of service.
HOW NETWORKS DIFFER Some of the many ways networks can differ. 5-43
HOW NETWORKS CAN BE CONNECTED (a)  Two Ethernets connected  by a switch.  (b)  Two Ethernets connected by routers.
CONCATENATED VIRTUAL CIRCUITS Internetworking using concatenated virtual circuits.
CONNECTIONLESS INTERNETWORKING A connectionless internet.
TUNNELING Tunneling a packet from Paris to London.
THE NETWORK LAYER IN THE INTERNET Mobile IP IPv6
IP ADDRESSES IP address formats.
IP ADDRESSES (2) Special IP addresses.
SUBNETS (2) A class B network subnetted into 64 subnets.
IPV6
IPV6  MAJOR GOALS  Support billions of hosts, even with inefficient address space allocation. Reduce the size of the routing tables. Simplify the protocol, to allow routers to process packets faster. Provide better security (authentication and privacy) than current IP. Pay more attention to type of service, particularly for real-time data. Aid multicasting by allowing scopes to be specified. Make it possible for a host to roam without changing its address. Allow the protocol to evolve in the future. Permit the old and new protocols to coexist for years.
MAJOR IMPROVEMENTS OVER IPV4 IPv6 has longer addresses than IPv4.  They are 16 bytes long provide an effectively unlimited supply of Internet addresses simplification of the header.  It contains only seven fields (versus 13 in IPv4).  This change allows routers to process packets faster and thus improve throughput and delay. better support for options previously were required are now optional.  In addition, the way options are represented is different, making it simple for routers  to skip over options not intended for them . This feature speeds up packet processing time. Security QoS
IPV6 PLANNED SUPPORT LIST 128-bit address space This is what it’s all about… Real-time/QoS services Security and authentication Autoconfiguration Hosts autoconfig with IP address and domain name Idea is to try to make systems more plug-n-play Enhanced routing functionality eg. Mobile hosts Multicast Protocol extensions Smooth transition path from IPv4 Can’t do it all at once! CS 640
ADDRESS SPACE AND NOTATION Allocation is classless Prefixes specify different uses (unicast, multicast, anycast) Anycast:  send packets to nearest member of a group Prefixes can be used to map v4 to v6 space and visa-versa Lots of flexibility with 128 bits! ~1500 address/sqft of the earths surface Standard representation is set of eight 16-bit values separated by colons Eg. 47CD:1234:3200:0000:0000:4325:B792:0428 If there are large number of zeros, they can be omitted with series of colons Eg. 47CD:1234:3200::4325:B792:0428 Address prefixes (slash notation) are the same as v4 Eg. FEDC:BA98:7600::/40 describes a 40 bit prefix CS 640
IPv4 Header IPv6  Header - field ’ s  name  kept from IPv4 to IPv6 - fields not kept in IPv6 -  Name & position changed in IPv6 -  New field in IPv6 Legend Version IHL Type of Service Total Length Identification Flags Fragment Offset Time to Live Protocol Header Checksum Source Address Destination Address Options Padding Version Traffic Class Flow Label Payload Length Next Header Hop Limit Source Address Destination Address
PACKET FORMAT DETAILS Simpler format than v4 Version = 6 Traffic class same as v4 ToS Treat all packets with the same Flow Label equally Support QoS and fair bandwidth allocation Payload length does not include header –limits packets to 64KB There is a “ jumbogram option ” Hop limit = TTL field Next header combines options and protocol If there are no options then NextHeader is the protocol field Options are “extension header” that follow IP header Ordered  list of tuples – 6 common types Quickly enable a router to tell if the options are meant for it Eg. routing, fragmentation, authentication encryption… CS 640
SUMMARY OF HEADER CHANGES BETWEEN IPV4 & IPV6 Streamlined Fragmentation fields moved out of base header IP options moved out of base header Header Checksum eliminated Header Length field eliminated Length field excludes IPv6 header Alignment changed from 32 to 64 bits Revised Time to Live  ’  Hop Limit Protocol  ’  Next Header Precedence & TOS  ’  Traffic Class Addresses increased 32 bits  ’  128 bits Extended Flow Label field added
EXTENSION HEADERS next header = TCP TCP header + data IPv6 header next header = Routing TCP header + data Routing header next header = TCP IPv6 header next header = Routing fragment of TCP header + data Routing header next header = Fragment Fragment header next header = TCP IPv6 header
EXTENSION HEADERS (CONT.) Generally processed only by node identified in IPv6 Destination Address field => much lower overhead than IPv4 options processing exception: Hop-by-Hop Options header Eliminated IPv4’s 40-byte limit on options in IPv6, limit is total packet size, or Path MTU in some cases Currently defined extension headers: Fragment,  Hop-by-Hop Options,  Routing,  Authentication,  Encryption,  Destination Options
FRAGMENT HEADER IPv6 fragmentation & reassembly is an end-to-end function;  routers do not fragment packets   if packet is too big they send ICMP "packet too big" though discouraged, can use IPv6 Fragment header to support upper layers that do not (yet) do path MTU discovery Next Header Original Packet Identifier Reserved Fragment Offset 0 0 M
IPV6 TECHNOLOGY SCOPE IP Service IPv4 Solution IPv6 Solution Mobile IP   with Direct Routing DHCP Mobile IP IGMP/ PIM/Multicast BGP IP Multicast MLD/ PIM/Multicast  BGP, Scope Identifier Mobility Autoconfiguration Serverless , Reconfiguration , DHCP 32-bit, Network  Address Translation 128-bit , Multiple Scopes Addressing Range Quality-of-Service Differentiated Service, Integrated Service Differentiated Service, Integrated Service Security IPSec Mandated,   works End-to-End IPSec
SUMMARY OF MAIN IPV6 BENEFITS Expanded addressing capabilities Structured hierarchy to manage routing table growth Serverless autoconfiguration and reconfiguration Streamlined header format and flow identification Improved support for options / extensions
IPV6 ADVANCED FEATURES Security - Built-in, strong IP-layer encryption and authentication Mobility - More efficient and robust mechanisms Quality of Service Privacy Extensions for Stateless Address Autoconfiguration ( RFC 3041)  Source address selection
KEY DIFFERENCES IN HEADER No checksum Bit level errors are checked for all over the place No length variability in header Fixed format speeds processing No more fragmentation and reassembly in header Incorrectly sized packets are dropped and message is sent to sender to reduce packet size Hosts should do path MTU discovery But of course we have to be able to segment packets! What about UDP packets? CS 640
ROUTING EXTENSION Without this header, routing is essentially the same as v4 With this header essentially same as the source routing option in v4 Loose or strict Header length is in 64-bit words Up to 24 addresses can be included Packet will go to nearest of these in “anycast” configuration Segments left tracks current target CS 640 0 8 16 24 31 Next header Hd. Ext. Len 0 Segmnts left 1 – 24 addresses
THE MAIN IPV6 HEADER The IPv6 fixed header (required).
EXTENSION HEADERS IPv6 extension headers. 5-69
EXTENSION HEADERS (2) The hop-by-hop extension header for large datagrams (jumbograms).
EXTENSION HEADERS (3) The extension header for routing.

More Related Content

PDF
My presentation all shortestpath
PDF
Shortest path algorithms
PPT
SINGLE-SOURCE SHORTEST PATHS
PPT
Inroduction_To_Algorithms_Lect14
PPTX
Linear Combination, Span And Linearly Independent, Dependent Set
PPTX
All pair shortest path by Sania Nisar
PDF
Bellman ford
PDF
Learning Timed Automata with Cypher
My presentation all shortestpath
Shortest path algorithms
SINGLE-SOURCE SHORTEST PATHS
Inroduction_To_Algorithms_Lect14
Linear Combination, Span And Linearly Independent, Dependent Set
All pair shortest path by Sania Nisar
Bellman ford
Learning Timed Automata with Cypher

What's hot (20)

PDF
Longest common subsequence
PPTX
DISCRETE LOGARITHM PROBLEM
PDF
Applied Multivariate Statistical Analysis 6th Edition Johnson Solutions Manual
PDF
linear transformation and rank nullity theorem
PPT
Reduced order observers
DOCX
14 mecv14 dvd
PDF
String Matching with Finite Automata and Knuth Morris Pratt Algorithm
PPT
Linear transformation.ppt
PPT
6 radar range-doppler-angular loops
PPTX
Direct current machine
PPTX
Linear transformations-thestuffpoint.com
PDF
Clase 15 dsp
PDF
Clase 16 dsp
PPTX
Bellmanford . montaser hamza.iraq
PPTX
Matrix of linear transformation
PDF
Chapter4 - The Continuous-Time Fourier Transform
PDF
Chapter3 - Fourier Series Representation of Periodic Signals
DOC
Chapter 6 indices
PDF
Filter design and simulation
PDF
Floyd warshall-algorithm
Longest common subsequence
DISCRETE LOGARITHM PROBLEM
Applied Multivariate Statistical Analysis 6th Edition Johnson Solutions Manual
linear transformation and rank nullity theorem
Reduced order observers
14 mecv14 dvd
String Matching with Finite Automata and Knuth Morris Pratt Algorithm
Linear transformation.ppt
6 radar range-doppler-angular loops
Direct current machine
Linear transformations-thestuffpoint.com
Clase 15 dsp
Clase 16 dsp
Bellmanford . montaser hamza.iraq
Matrix of linear transformation
Chapter4 - The Continuous-Time Fourier Transform
Chapter3 - Fourier Series Representation of Periodic Signals
Chapter 6 indices
Filter design and simulation
Floyd warshall-algorithm
Ad

Viewers also liked (20)

PPT
Network Layer,Computer Networks
PDF
Gaussian Elimination
PPT
Single source stortest path bellman ford and dijkstra
PPTX
Final Presentation on the Network layer
PDF
Dynamics
PPTX
Interfaz dte dce
PPT
Sistema de Señalización de Canal Común SS7
PPT
Ch06 1
DOCX
Interfaz dte
PPTX
Modosdetransmisin
PPT
OSI Model (Data Communication) DC3
PPTX
Datacom module 5 (UART, USRT, Serial Interface, Modem)
PDF
CCNAv5 - S1: Chapter 6 - Network Layer
PPT
Packet Switching and X.25 Protocol
PPTX
X.25 protocol
PPT
Digital data transmission
PPT
Line coding
PPT
Transmission of Digital Data(Data Communication) DC11
PPTX
Internet Access via Cable TV Network
PPTX
Transmission modes
Network Layer,Computer Networks
Gaussian Elimination
Single source stortest path bellman ford and dijkstra
Final Presentation on the Network layer
Dynamics
Interfaz dte dce
Sistema de Señalización de Canal Común SS7
Ch06 1
Interfaz dte
Modosdetransmisin
OSI Model (Data Communication) DC3
Datacom module 5 (UART, USRT, Serial Interface, Modem)
CCNAv5 - S1: Chapter 6 - Network Layer
Packet Switching and X.25 Protocol
X.25 protocol
Digital data transmission
Line coding
Transmission of Digital Data(Data Communication) DC11
Internet Access via Cable TV Network
Transmission modes
Ad

Similar to Jaimin chp-5 - network layer- 2011 batch (20)

PPTX
Dijkstra’s algorithm
PPT
dijkstras example.ppt
PPTX
Networks dijkstra's algorithm- pgsr
PPT
2.3 shortest path dijkstra’s
PDF
Bellman-Ford-Moore Algorithm and Dijkstra’s Algorithm
PPT
barrera.ppt
PPT
barrera.ppt
PPTX
Dijkstra & flooding ppt(Routing algorithm)
PPTX
Discrete Mathematics Presentation
PDF
Dijkstra Shortest Path Visualization
PDF
All pairs shortest path algorithm
PDF
IRJET- Survey on Adaptive Routing Algorithms
PDF
Lecture set 5
PPT
Dijkstra's algorithm for computer science
PDF
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
PDF
Dijkstra's Algorithm
PPTX
Network layer. pptx
PPTX
Network layer of osi model .pptx
PDF
04 greedyalgorithmsii 2x2
PDF
Lec12 on Computer Networks by Tarun Mangla.pdf
Dijkstra’s algorithm
dijkstras example.ppt
Networks dijkstra's algorithm- pgsr
2.3 shortest path dijkstra’s
Bellman-Ford-Moore Algorithm and Dijkstra’s Algorithm
barrera.ppt
barrera.ppt
Dijkstra & flooding ppt(Routing algorithm)
Discrete Mathematics Presentation
Dijkstra Shortest Path Visualization
All pairs shortest path algorithm
IRJET- Survey on Adaptive Routing Algorithms
Lecture set 5
Dijkstra's algorithm for computer science
COMPUTER NETWORKS CHAPTER 3 NETWORK LAYER NOTES CSE 3RD year sem 1
Dijkstra's Algorithm
Network layer. pptx
Network layer of osi model .pptx
04 greedyalgorithmsii 2x2
Lec12 on Computer Networks by Tarun Mangla.pdf

More from Jaimin Jani (8)

PDF
BE_6_SEM_EE_MP_MC-_COMP._OF_8086_FAMILY-AMIT_THAKUR-converted-converted.pdf
PPT
Jaimin chp-7 - application layer- 2011 batch
PPT
Jaimin chp-6 - transport layer- 2011 batch
PPT
Jaimin chp-4 - media access sub-layer- 2011 batch
PPT
Jaimin chp-2 - 2011 batch
PPT
Jaimin chp-1 - introduction - 2011 batch
PPT
Jaimin chp-3 - data-link layer- 2011 batch
PPT
Jaimin chp-8 - network security-new -use this - 2011 batch
BE_6_SEM_EE_MP_MC-_COMP._OF_8086_FAMILY-AMIT_THAKUR-converted-converted.pdf
Jaimin chp-7 - application layer- 2011 batch
Jaimin chp-6 - transport layer- 2011 batch
Jaimin chp-4 - media access sub-layer- 2011 batch
Jaimin chp-2 - 2011 batch
Jaimin chp-1 - introduction - 2011 batch
Jaimin chp-3 - data-link layer- 2011 batch
Jaimin chp-8 - network security-new -use this - 2011 batch

Recently uploaded (20)

PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Cell Types and Its function , kingdom of life
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
master seminar digital applications in india
PDF
Complications of Minimal Access Surgery at WLH
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
Insiders guide to clinical Medicine.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
Supply Chain Operations Speaking Notes -ICLT Program
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Cell Types and Its function , kingdom of life
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
Renaissance Architecture: A Journey from Faith to Humanism
master seminar digital applications in india
Complications of Minimal Access Surgery at WLH
human mycosis Human fungal infections are called human mycosis..pptx
Anesthesia in Laparoscopic Surgery in India
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Abdominal Access Techniques with Prof. Dr. R K Mishra
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
Pharma ospi slides which help in ospi learning
Insiders guide to clinical Medicine.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
STATICS OF THE RIGID BODIES Hibbelers.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Module 4: Burden of Disease Tutorial Slides S2 2025

Jaimin chp-5 - network layer- 2011 batch

  • 1. THE NETWORK LAYER Chapter 5
  • 2. OVERVIEW Functions: Routing issues determine “good” path (sequence of routers) thru network from source to dest. Congestion (Not Contention!) More packets enter an area than can be processed Internetworking connecting different network technologies together Network layer protocols in every host , router application transport network data link physical application transport network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical
  • 3. NETWORK LAYER DESIGN ISSUES Services Provided to the Transport Layer The network layer should shield the transport layer from having to know details of the underlying subnet Network Layer Services Can: Connection-Oriented : Provides Virtual Circuit (VC) subnet, source-to-destination path behaves much like telephone circuit, Avoids choosing a new route for each packet. A virtual circuit remembers how to send a packet from source to destination. Connection-less : Provides Datagram subnet, Each packet sent is routed independently of its predecessors
  • 4. No call setup at network layer Packets forwarded using destination host address packets between same source-dest. pair may take different paths Use in Internet CONNECTIONLESS: DATAGRAM (1) 1. Send Data 2. Receive Data application transport network data link physical application transport network data link physical
  • 5. CONNECTIONLESS: DATAGRAM (2) Routing within a diagram subnet: The table of router A is changed because of some reasons! Management and update this tables for routing = Routing algorithm Store-and-Forward packet Subnet Routing tables
  • 6. C all setup, do for each call before data can flow Each packet carries VC identifier Used in ATM , frame-relay, X.25 VIRTUAL CIRCUITS (1) 1. Initiate call 2. I ncoming call 3. Accept call 4. Call connected 5. Data flow begins 6. Receive data application transport network data link physical application transport network data link physical
  • 7. VIRTUAL CIRCUITS (2) Routing within a virtual-circuit subnet:
  • 8. ATM (1) ATM (Asynchronous Transfer Mode) Is underlying mechanism. Transmits in small fixed-size cells. A connection-oriented network Use virtual circuits and small, fixed-size packets ( Cells )
  • 9. ATM (2) Packet (cell) switching is dramatic change for phone companies. ATM is connection oriented; make connecting request first; then all cells follow the same path. Target is 155 Mbps and 622 Mbps. Allows TV transmission.
  • 10. COMPARISON OF VIRTUAL-CIRCUIT AND DATAGRAM Internet ATM
  • 11. QUALITY OF SERVICE: QOS (1) Factors: Timing Connection Establishment Delay End-To-End Delay Connection Establishment Failure Probability Throughput or Bandwidth Guarantee Ordering Preservation Congestion Control Bit-Error rate or Packet-Loss Rate Control Protection Priority …
  • 12. QUALITY OF SERVICE: QOS (2) Requirements: Reliability, Delay, Jitter, Bandwidth How stringent the quality-of-service requirements are:
  • 13. ROUTING (1) The network layer is responsible for routing packets from the source to destination. The routing algorithm is the piece of software that decides where a packet goes next (e.g., which output line, or which node on a broadcast channel). For connectionless networks, the routing decision is made for each datagram. For connection-oriented networks, the decision is made once, at circuit setup time. The routing algorithm must deal with the following issues: Correctness, simplicity, stability, fairness and optimality Mimizing mean packet delay or maximizing total network throughput Routing is different from Forwarding !: Forwarding: Select the output path using routing table Routing: Management and updating the routing tables
  • 14. ROUTING (2) There are two types: Static (Non-Adaptive) routes never update or update slowly over time Examples: Dijkstra, Flooding algorithm Dynamic (Adaptive) routes update more quickly use dynamic information of current topology such as load, delay, … Examples: Distance Vector, Link State Routing From another view: Global: all routers have complete topology, link cost info Decentralized: router knows physically-connected neighbors
  • 15. DIJKSTRA ALGORITHM (1) N et topology, link costs known to all nodes Global algorithm Cost of a link is a function of : Number of Hop s, Distance, Average traffic, Delay, … Computes least cost paths (Minimum path) from one node (‘source”) to all other nodes gives routing table for that node Iterative: after k iterations, know least cost path to k dest.’s Non-Adaptive Algorithm
  • 16. DIJKSTRA ALGORITHM (2) Notation: N: set of nodes whose least cost path definitively known c(i,j): link cost from node i to j. cost infinite if not direct neighbors p(v): nodes along path from source to v D(v): current value of cost of path from source to dest. V N: A, B, C, D, E, F C(A,C)=5; C(C,A)=5 C(B,D)=2; C(D,B)=3 … Source=A p(F): A-D-E-F D(F)=4 Example: A F D C E B 1 1 1 2 2 2 5 3 5 3 5 3
  • 17. DIJKSTRA ALGORITHM (3) 1 Initialization: 2 N = {A} 3 For all nodes v 4 If v adjacent to A then 5 D(v) = c(A,v) 6 Else D(v) = infinity 8 Loop 9 Find w not in N such that D(w) is a minimum 10 Add w to N 11 Update D(v) for all v adjacent to w and not in N: 12 D(v) = min( D(v), D(w) + c(w,v) ) /* new cost to v is either old cost to v or known shortest path cost to w plus cost from w to v */ 13 until all nodes in N C version of this algorithm is available in book v w D(v) c(w,v) D(w) A
  • 18. DIJKSTRA ALGORITHM (4) Example: computes least cost paths from node A to all other nodes Step 0 1 2 3 4 5 start N A AD ADE ADEB ADEBC ADEBCF D(B),p(B) 2,A-B 2,A-B 2,A-B 2,A-B 2,A-B 2,A-B D(C),p(C) 5,A-C 4,A-D-C 3,A-D-E-C 3,A-D-E-C 3,A-D-E-C 3,A-D-E-C D(D),p(D) 1,A-D 1,A-D 1,A-D 1,A-D 1,A-D 1,A-D D(E),p(E) infinity 2,A-D-E 2,A-D-E 2,A-D-E 2,A-D-E 2,A-D-E D(F),p(F) infinity infinity 4,A-D-E-F 4,A-D-E-F 4,A-D-E-F 4,A-D-E-F D(v): Distance (cost) of A to v. P(v): nodes along path fromA to v. A F D C E B 1 1 1 2 2 2 5 3 5 3
  • 19. DIJKSTRA'S SHORTEST PATH ALGORITHM Find shortest path from s to t. s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6
  • 20. DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6        0 distance label S = { } PQ = { s, 2, 3, 4, 5, 6, 7, t }
  • 21. DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6        0 distance label S = { } PQ = { s, 2, 3, 4, 5, 6, 7, t } delmin
  • 22. DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9    14  0 distance label S = { s } PQ = { 2, 3, 4, 5, 6, 7, t } decrease key  X   X X
  • 23. DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9    14  0 distance label S = { s } PQ = { 2, 3, 4, 5, 6, 7, t }  X   X X delmin
  • 24. DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9    14  0 S = { s, 2 } PQ = { 3, 4, 5, 6, 7, t }  X   X X
  • 25. DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9    14  0 S = { s, 2 } PQ = { 3, 4, 5, 6, 7, t }  X   X X decrease key X 33
  • 26. DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9    14  0 S = { s, 2 } PQ = { 3, 4, 5, 6, 7, t }  X   X X X 33 delmin
  • 27. DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9    14  0 S = { s, 2, 6 } PQ = { 3, 4, 5, 7, t }  X   X X X 33 44 X X 32
  • 28. DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 6 } PQ = { 3, 4, 5, 7, t }  X   X X 44 X delmin  X 33 X 32
  • 29. DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 6, 7 } PQ = { 3, 4, 5, t }  X   X X 44 X 35 X 59 X 24  X 33 X 32
  • 30. DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 6, 7 } PQ = { 3, 4, 5, t }  X   X X 44 X 35 X 59 X delmin  X 33 X 32
  • 31. DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 3, 6, 7 } PQ = { 4, 5, t }  X   X X 44 X 35 X 59 X X 51 X 34  X 33 X 32
  • 32. DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 3, 6, 7 } PQ = { 4, 5, t }  X   X X 44 X 35 X 59 X X 51 X 34 delmin  X 33 X 32 24
  • 33. DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 3, 5, 6, 7 } PQ = { 4, t }  X   X X 44 X 35 X 59 X X 51 X 34 24 X 50 X 45  X 33 X 32
  • 34. DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 3, 5, 6, 7 } PQ = { 4, t }  X   X X 44 X 35 X 59 X X 51 X 34 24 X 50 X 45 delmin  X 33 X 32
  • 35. DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 3, 4, 5, 6, 7 } PQ = { t }  X   X X 44 X 35 X 59 X X 51 X 34 24 X 50 X 45  X 33 X 32
  • 36. DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 3, 4, 5, 6, 7 } PQ = { t }  X   X X 44 X 35 X 59 X X 51 X 34 X 50 X 45 delmin  X 33 X 32 24
  • 37. DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 3, 4, 5, 6, 7, t } PQ = { }  X   X X 44 X 35 X 59 X X 51 X 34 X 50 X 45  X 33 X 32
  • 38. DIJKSTRA'S SHORTEST PATH ALGORITHM s 3 t 2 6 7 4 5 24 18 2 9 14 15 5 30 20 44 16 11 6 19 6 15 9   14  0 S = { s, 2, 3, 4, 5, 6, 7, t } PQ = { }  X   X X 44 X 35 X 59 X X 51 X 34 X 50 X 45  X 33 X 32
  • 39. DIJKSTRA'S ALGORITHM - PSEUDOCODE dist[s] ←0 (distance to source vertex is zero) for  all v ∈ V–{s}         do  dist[v] ←∞ (set all other distances to infinity) S←∅ (S, the set of visited vertices is initially empty) Q←V  (Q, the queue initially contains all vertices)               while Q ≠∅ (while the queue is not empty) do   u ←  mindistance (Q,dist) (select the element of Q with the min. distance)        S←S∪{u} (add u to list of visited vertices)        for all v ∈ neighbors[u]               do  if   dist[v] > dist[u] + w(u, v) (if new shortest path found)                          then      d[v] ←d[u] + w(u, v) (set new value of shortest path) (if desired, add traceback code) return dist
  • 51.  
  • 52. Discussion: Algorithm complexity : Suppose there are n nodes, except source First iteration: Search through all n nodes to determine the node, w , not in N that has the minimum cost. Second iteration: Check n -1 nodes to determine minimum cost. Third iteration: n -2 nodes, and so on. Total number of nodes searched: n ( n +1)/2 The implementation of the algorithm has worst-case complexity of order n squared: O ( n 2 ). A more sophisticated implementation of this algorithm, using a data structure known as a heap , can reducing the complexity to O( n log( n ) ) DIJKSTRA ALGORITHM (5)
  • 53. FLOODING ALGORITHM (1) Flooding does not select a specific route. When a router receives a packet, it sends a copy of the packet out on each line (except the one on which it arrived) To reduce looping even further: Using Hop Counter : Each router decrements a hop count contained in the packet header. Whenever the hop count decrements to zero, the router discards the packet. Keep track of which packet have been flood Add a sequence number to each packet's header. Each router maintains a private sequence number. When it sends a new packet, it copies the sequence number into the packet, and increments its private sequence number. Keeps track of the highest sequence number seen from S. Whenever it receives a packet from S containing a sequence number lower than the one stored in its table, it discards the packet. Otherwise, it updates the entry for S and forwards the packet on Non-Adaptive Algorithm
  • 54. FLOODING ALGORITHM (2) Another variation of flooding is Selective Flooding : Don’t send incoming packets to ALL output lines Just forward on that lines which are going approximately in right direction Uses: In military applications , the network must remain robust in the face of (extreme) hostility In distributed databa se applications, it is sometimes necessary to update all the databases concurrently wireless networks , all messages transmitted by a station can be received by all other stations within its radio range metric against which other routing algorithms can be compared . Flooding always chooses the shortest path because it chooses every possible path in parallel
  • 55. DISTANCE VECTOR ROUTING (1) Each router maintains a table (vector) giving the best known distance to a destination and the line to use for sending there. Tables are updated by exchanging information with neighbors . Each router knows the distance (cost) of reaching its neighbors (e.g. send echo requests). Routers periodically exchange routing tables with each of their neighbors. This algorithm was used in the original ARPANET Adaptive Algorithm
  • 56. DISTANCE VECTOR ROUTING (3) Distance table for J A subnet. Input from A, I, H, K, and the new routing table for J. D J (G,?)= c(J,H)+min w {D H (G,w)}= 6+12= 18
  • 57. Consider how J computes its new route to router G. It knows that it can get to A in 8 msec, and A claims to be able to get to G in 18 msec, so J knows it can count on a delay of 26 msec to G if it forwards packets bound for G to A. Similarly, it computes the delay to G via I, H, and K as 41 (31 + 10), 18 (6 + 12), and 37 (31 + 6) msec, respectively. The best of these values is 18, so it makes an entry in its routing table that the delay to G is 18 msec and that the route to use is via H. The same calculation is performed for all the other destinations, with the new routing table shown in the last column of the figure.
  • 58. DISTANCE VECTOR ROUTING (4) Problem: Convergence is slow! Good news travels quickly, bad news travels slowly ( count-to-infinity) problem Example: Propagation of good news Initially A is down and all other routers know this Table for dest.=A There is no path to A In a subnet with longest subnet path=N, after N exchanges everyone will know
  • 59. DISTANCE VECTOR ROUTING (5) Example: Propagation of good news The count-to-infinity problem A goes down after initially After this A goes down Counting will continuous to infinity If the metric is “Number of Hop”, Infinite can define as longest path+1 If the metric is “delay”, there is no well-defined upper bound B thinks that there is a path to A thru C but C itself go to A via B!
  • 60. LINK STATE ROUTING (1) The DVR Arpanet routing algorithm was replaced in 1979. Problems with old algorithm included: Network was too slow in adapting to congestion, too fast to react to minor changes. Average queue length was used to estimate delay This works only if all lines have the same capacity and propagation delay. Doesn't take into account that packets have varying sizes. Didn’t take line bandwidth into account when choosing routes Because all the line have same capacity, 56 Kbps Adaptive Algorithm
  • 61. LINK STATE ROUTING (2) Each router must do the following:  Discover its neighbors, learn their network address. Sends ‘hello' message on booting.  Measure the delay or cost to each of its neighbors. Delay= (Send ‘Echo’ message + Receive its reply)/2  Construct a packet telling all it has just learned. Construct Link State (LS) packet, it contains: Source Add., Seq. No., Age No., List of neighbors + their delay  Send this packet to all other routers. Forwards link state packets to all other routers using Flooding algorithm.  Compute the shortest path to every other router. Each router uses an Dijkstra algorithm to calculate shortest paths based on the current values in its database.
  • 62. LINK STATE ROUTING (3) The link state packets for this subnet. The packet buffer for router B, Used in step 
  • 63. THE NETWORK LAYER IN THE INTERNET (1) TCP/IP use the Internet Protocol (IP) in network layer. Provides connectionless, datagram service: unreliable The IPv4 header: Using Big Endian: store/transmit the most significant byte of a bit stream in the lowest memory address/first (e.g. to the left). Machines such as IBM and Sun-3 computers use this mechanism Intel use Little Endian
  • 64. THE NETWORK LAYER IN THE INTERNET (2) Version number (4-bits): Including a version number allows a future version of IP be used along side the current version, facilitating migration to new protocols. Header length (4-bits): Length of the datagram header (excluding data) in 32-bit words. The minimum length is 5 words = 20 bytes, but can be up to 15 words if options are used. Max. length of Option data=40 bytes  Max for IHL=15 Type-of-service (8-bits): A hint to the routing algorithms as to what type of service we desire. Precedence (3-bits): A priority indication, where 0 is the lowest and means normal service, while 7 is highest Delay, Throughput, Reliability bits
  • 65. THE NETWORK LAYER IN THE INTERNET (3) Total length (16-bits): Total length of the IP datagram (in bytes). Max. length of a packet is 2 16 =65K bytes Identification (16-bits), DF (Don’t fragment), MF (More fragment), Fragment offset (13-bits): These three fields are used for fragmentation and reassembly. Gateways along a path are free to fragment datagrams as needed; hosts are required to reassemble fragments before passing complete datagrams to the higher layer protocols. Each fragment contains a complete copy of the original datagram header plus some portion of the data. All fragments of a datagram will have the same source and destination IP address.
  • 66. THE NETWORK LAYER IN THE INTERNET (4) Identification: determine the IP Datagram DF: Don’t fragment this datagram MF:1 means that the fragmentation is continued, 0 Just for last packet Fragmented Offset: Determine the position of current packet in datagram, 13 bits  Max. No. of packets in each datagram=8192 Time-to-live: TTL (8-bits): It guarantees that packets don't stay in the network for longer than 255 seconds, a property needed by higher layer protocols that reuse sequence numbers. A counter that is decremented by each gateway. Should this hopcount reach 0, discard the datagram. Protocol (8-bits): What type of data the IP datagram carries (e.g., TCP, UDP, etc.). Needed by the receiving IP to know the higher level service that will next handle the data.
  • 67. THE NETWORK LAYER IN THE INTERNET (5) Header Checksum (16-bits): A checksum of the IP header (excluding data) use checksum method for error detection The header must be recalculated at every router since the TTL field is decremented. Source address (32-bits): Original sender's address. This is an IP address, not a MAC address. Destination address (32-bits): Datagram's ultimate destination. IP Options: IP datagrams allow the inclusion of optional, varying length fields that need not appear in every datagram. Some defined options: Security, Strict source routing, Loose source routing, Record route, Timestamp
  • 68. 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 IP FRAGMENTATION AND REASSEMBLY (1) fragmentation: in: one large datagram out: 3 smaller datagrams reassembly
  • 69. IP FRAGMENTATION AND REASSEMBLY (2) ID =x offset =0 fragflag =0 length =4000 ID =x offset =0 fragflag =1 length =1500 ID =x offset =1480 fragflag =1 length =1500 ID =x offset =2960 fragflag =0 length =1040 One large datagram becomes 3 smaller datagrams. Example 4000 byte datagram MTU = 1500 bytes 0……….3979 data 20 Byte 4000 Bytes 0……….1479 1480…2959
  • 70. IP ADDRESSES (1) IP address: 32-bit identifier for host , router interface interface: connection between host/router and physical link router’s typically have multiple interfaces host may have multiple interfaces IP addresses associated with each interface 223.1.1 .1 223.1.1 .3 223.1.1 .4 223.1.2 .9 223.1.1.1 = 11011111 00000001 00000001 00000001 223 1 1 1 223.1.1 .2 223.1.2 .2 223.1.2 .1 223.1.3 .2 223.1.3 .1 223.1.3 .27
  • 71. IP address: network part (high order bits) host part (low order bits) What’s a network ? ( from IP address perspective) device interfaces with same network part of IP address can physically reach each other without intervening router IP ADDRESSES (2) 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 network consisting of 3 IP networks LAN
  • 72. ICANN : I nternet C orporation for A ssigned N ames and N umbers allocates addresses IP ADDRESSES (3) 223.1.1.1 223.1.1.3 223.1.1.4 223.1.2.2 223.1.2.1 223.1.2.6 223.1.3.2 223.1.3.1 223.1.3.27 223.1.1.2 223.1.7.0 223.1.7.1 223.1.8.0 223.1.8.1 223.1.9.1 223.1.9.2 Interconnected system consisting of six networks.
  • 73. class-full addressing: IP ADDRESSES (4) 0 network host A C D class 1.0.0.0 to 127.255.255.255 128.0.0.0 to 191.255.255.255 192.0.0.0 to 223.255.255.255 224.0.0.0 to 239.255.255.255 32 bits 65K Hosts 16K Networks 254 Hosts 4M Networks 16M Hosts 126 Networks 110 network host 10 network host B 1110 multicast address
  • 74. Special Cases 0.0.0.0 :Source IP Addr. Just after Boot network part of dest. Addr.= 0 :Source and Destination are in same network. Dest. Addr.=255.255.255.255 :Broadcast in Sender’s network. host part of Dest.=111… : Broadcast in destination network. Dest. Addr. = 127.anything : Loop Back IP ADDRESSES (5) class code network host
  • 75. IP ADDRESSES (6) Subnets (1): A large organization or campus might have 30 or more LANs (one for each department). And will probably have only a single connection to the rest of the Internet. inefficient use of address space, address space exhaustion e.g., class B net allocated enough addresses for 65K hosts, even if only 2K hosts in that network In order for every local host to be able to communicate with other Internet machines, routing entries for each of the 30 networks must exist in the core gateways. Wouldn't it be nice if we only needed to advertise a single network number for all 30 networks?
  • 76. IP ADDRESSES (7) Subnets (2): We want to be able to reduce the number of networks seen by the outside world; simplify the management of those many networks within the organization; Using Subnet addressing: IP addresses have a well-defined structure that allows a gateway to extract the network portion of an address by simply looking at its class and an optional Subnet mask .
  • 77. IP ADDRESSES (8) CIDR: C lassless I nter D omain R outing ( RFC1519 ) network portion of address of arbitrary length address format: a.b.c.d/x , where x is # bits in network portion of address Ex.: A class B network subnetted into 64 subnets: MASK=255.255.252.0 or IP Add./22
  • 78. IP ADDRESSES (9) Subnet: The subnet mask ANDed with the interface address yields the network number of the interface. If ( ( port_interface_address & subnet_mask ) == ( DEST & subnet_mask ) ), direct routing with this port can be used.
  • 79. IP datagram: GETTING A DATAGRAM FROM SOURCE TO DEST. (1) datagram remains unchanged , as it travels source to destination addr fields of interest here misc fields source IP addr dest IP addr data 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 A E B Dest. Net. Next Router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 forwarding table in A
  • 80. GETTING A DATAGRAM FROM SOURCE TO DEST. (2) B Starting at A, send IP datagram addressed to B: look up net. address of B in forwarding table find B is on same net. as A link layer will send datagram directly to B inside link-layer frame B and A are directly connected forwarding table in A A 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 E Dest. Net. Next Router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 misc fields 223.1.1.1 223.1.1.3 data
  • 81. GETTING A DATAGRAM FROM SOURCE TO DEST. (3) Starting at A, dest. E: look up network address of E in forwarding table E on different network A, E not directly attached routing table: next hop router to E is 223.1.1.4 link layer sends datagram to router 223.1.1.4 inside link-layer frame datagram arrives at 223.1.1.4 continued….. forwarding table in A 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 E A B Dest. Net. Next Router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 misc fields 223.1.1.1 223.1.2.3 data
  • 82. GETTING A DATAGRAM FROM SOURCE TO DEST. (4) Arriving at 223.1.4, destined for 223.1.2.2 look up network address of E in router’s forwarding table E on same network as router’s interface 223.1.2.9 router, E directly attached link layer sends datagram to 223.1.2.2 inside link-layer frame via interface 223.1.2.9 datagram arrives at 223.1.2.2 forwarding table in router 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 A E B misc fields 223.1.1.1 223.1.2.3 data Dest. Net Router Nhops Interface 223.1.1 - 1 223.1.1.4 223.1.2 - 1 223.1.2.9 223.1.3 - 1 223.1.3.27
  • 83. Host, Router network-layer-functions: THE INTERNET NETWORK LAYER OSPF: Open Shortest Path First, RFC2328 BGP: Border Gateway Protocol, RFC1771 ICMP: Internet Control Message Protocol, RFC792 forwarding table Routing protocols path selection 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
  • 84. How does host get IP address? IP addr. is configures into host by admin. in a file Windows: control-panel->network->configuration->tcp/ip->properties DHCP: D ynamic H ost C onfiguration P rotocol (RFC2131) : dynamically get address from as server “ plug-and-play” Allows reuse of addresses (only hold address while connected an “on” Support for mobile users who want to join network (more shortly) DHCP overview: host broadcasts “ DHCP discover ” msg DHCP server responds with “ DHCP offer ” msg host requests IP address: “ DHCP request ” msg DHCP server sends address: “ DHCP ack ” msg IP ADDRESSES: HOW TO GET ONE?
  • 85. THE INTERNET NETWORK LAYER PROTOCOLS (1) ICMP (Internet Control Message Protocol) : Allows gateways and hosts to send network control information to each other. Two general types of ICMP messages: Information messages, where a sender sends a query to another machine (either host or gateway) and expects an answer. For example, a host might want to know if a gateway is alive. Error indication messages, where the IP software on a host or gateway has encountered a problem processing an IP datagram. For example, it may be unable to route a datagram to its destination, or it may have had to drop a frame.
  • 86. THE INTERNET NETWORK LAYER PROTOCOLS (2) The principal ICMP message types.
  • 87. THE INTERNET NETWORK LAYER PROTOCOLS (3) ARP (Address Resolution Protocol) : Map IP add. to MAC add. Using broadcasting RARP (Reverse Address Resolution Protocol) : Map MAC add. to IP add. Used in diskettes booting OSPF (Open Shortest Path First) : Routing for inter-AS (Autonomous system) Using Link State routing BGP (Border Gateway Protocol) : Routing for intra-AS Distance vector protocol, but not only does it account for distance, but also for specific route criteria.
  • 89.  
  • 90.  
  • 91.  
  • 92.  
  • 93.  
  • 94.  
  • 95. Remote host and mobile host communication
  • 96. Mobile IP has two addresses for a mobile host: one home address and one care-of address. The home address is permanent; the care-of address changes as the mobile host moves from one network to another.
  • 99.  
  • 100.  
  • 101.  
  • 102. ROUTING FOR MOBILE HOSTS A WAN to which LANs, MANs, and wireless cells are attached.
  • 103. ROUTING IN AD HOC NETWORKS Possibilities when the routers are mobile: Military vehicles on battlefield. No infrastructure . A fleet of ships at sea. All moving all the time Emergency works at earthquake . The infrastructure destroyed. A gathering of people with notebook computers. In an area lacking 802.11.
  • 104. ROUTE DISCOVERY USING AODV – AD-HOC ON DEMAND DISTANCE VECTOR ROUTING PROTOCOL (a) Range of A's broadcast. (b) After B and D have received A's broadcast. (c) After C, F, and G have received A's broadcast. (d) After E, H, and I have received A's broadcast. Shaded nodes are new recipients. Arrows show possible reverse routes.
  • 105. ROUTE DISCOVERY (2) Format of a ROUTE REQUEST packet.
  • 106. ROUTE DISCOVERY (3) Format of a ROUTE REPLY packet.
  • 107. ROUTE MAINTENANCE (a) D's routing table before G goes down. (b) The graph after G has gone down.
  • 109. CONGESTION CONTROL ALGORITHMS General Principles of Congestion Control Congestion Prevention Policies Congestion Control in Virtual-Circuit Subnets Admission control Agreement control Congestion Control in Datagram Subnets Warning bit (FECN and BECN bit in CISCO routers) Choke Packet Load Shedding Jitter Control
  • 110. CONGESTION When too much traffic is offered, congestion sets in and performance degrades sharply.
  • 111. What is congestion and why they occur? When too many packets are present in (a part of) the subnet, performance degrades. This situation is called congestion (1) insufficient memory to hold packets ..will be lost. ok…lets increse the memory? Adding more memory may help up to a point, but Nagle (1987) discovered that if routers have an infinite amount of memory, congestion gets worse , not better, because by the time packets get to the front of the queue, they have already timed out (repeatedly) and duplicates have been sent . All these packets will be dutifully forwarded to the next router, increasing the load all the way to the destination. (2) Slow processors can also cause congestion If the routers' CPUs are slow at performing the bookkeeping tasks required of them (queueing buffers, updating tables, etc.), queues can build up, even though there is excess line capacity. low-bandwidth lines can also cause congestion Difference between congestion control and flow control
  • 112. GENERAL PRINCIPLES OF CONGESTION CONTROL Monitor the system . detect when and where congestion occurs. Pass information to where action can be taken. Adjust system operation to correct the problem.
  • 113. How to monitor the subnet for congestion. percentage of all packets discarded for lack of buffer space, average queue lengths, number of packets that time out and are retransmitted, average packet delay standard deviation of packet delay (jitter Control). The second step in the feedback loop is to transfer the information about the congestion from the point where it is detected to the point where something can be done about it. The obvious way is for the router detecting the congestion to send a packet to the traffic source or sources, announcing the problem. Several methods: a bit or field can be reserved in every packet for routers to fill in whenever congestion gets above some threshold level. When a router detects this congested state, it fills in the field in all outgoing packets, to warn the neighbors. hosts or routers periodically send probe packets out to explicitly ask about congestion. This information can then be used to route traffic around problem areas.
  • 114. congestion control algorithms open loop act at the source act at the destination closed loop Explicit feedback packets are sent back from the point of congestion to warn the source. Implicit feedback the source deduces the existence of congestion by making local observations, such as the time needed for acknowledgements to come back Increase the resources or Decrease the load . That is not always possible. So we have to apply some congestion prevention policy.
  • 115. CONGESTION PREVENTION POLICIES Policies that affect congestion. 5-26
  • 116. CONGESTION CONTROL IN VIRTUAL-CIRCUIT SUBNETS (a) A congested subnet. (b) A redrawn subnet, eliminates congestion and a virtual circuit from A to B.
  • 117. HOP-BY-HOP CHOKE PACKETS (a) A choke packet that affects only the source. (b) A choke packet that affects each hop it passes through.
  • 118. Load shedding when routers cannot handle, they just throw them away Need to implement an intelligent discard policy, applications must mark their packets in priority classes to indicate how important they are. If they do this, then when packets have to be discarded, routers can first drop packets from the lowest class, then the next lowest class, and so on. Ex: VERY IMPORTANT— NEVER, EVER DISCARD Random Early Detection
  • 119. JITTER CONTROL (a) High jitter. (b) Low jitter.
  • 120. QUALITY OF SERVICE Label Switching and MPLS
  • 121. Adding a label in front of each packet and doing the routing based on the label rather than on the destination address. Making the label an index into an internal table makes finding the correct output line becomes just a matter of table lookup. Using this technique, routing can be done very quickly and any necessary resources can be reserved along the path. X.25, ATM, frame relay, and all other networks with a virtual-circuit subnet also put a label (i.e., virtual-circuit identifier) in each packet, look it up in a table, and route based on the table entry. routing and switching. Routing is the process of looking up a destination address in a table to find where to send it. switching uses a label taken from the packet as an index into a forwarding table. Since IP packets were not designed for virtual circuits, there is no field available for virtual-circuit numbers within the IP header. For this reason, a new MPLS header had to be added in front of the IP header . On a router-to-router line using PPP as the framing protocol, the frame format, including the PPP, MPLS, IP, and TCP headers
  • 122. LABEL SWITCHING AND MPLS Transmitting a TCP segment using IP, MPLS, and PPP.
  • 123. The generic MPLS header has four fields, the most important of which is the Label field, which holds the index. The QoS field indicates the class of service. The S field relates to stacking multiple labels in hierarchical networks If it hits 0, the packet is discarded . This feature prevents infinite looping in the case of routing instability. When an MPLS-enhanced packet (or cell) arrives at an MPLS-capable router, the label is used as an index into a table to determine the outgoing line to use and also the new label to use. This label swapping is used in all virtual-circuit subnets because labels have only local significance and two different routers can feed unrelated packets with the same label into another router for transmission on the same outgoing line. To be distinguishable at the other end, labels have to be remapped at every hop. routers to group multiple flows that end at a particular router or LAN and use a single label for them. The flows that are grouped together under a single label are said to belong to the same FEC (Forwarding Equivalence Class)
  • 124. Virtual-circuit routing Traditional Method MPLS it is not possible to group several distinct paths with different end points onto the same virtual-circuit identifier because there would be no way to distinguish them at the final destination. With MPLS, the packets still contain their final destination address + label , so that at the end of the labeled route the label header can be removed and forwarding can continue the usual way , using the network layer destination address. forwarding table construction in VC when a user wants to establish a connection, a setup packet is launched into the network to create the path and make the forwarding table entries forwarding table construction in MPLS there is no setup phase for each connection instead there are two ways for the forwarding table entries to be created. In the data-driven approach , Control-driven approach
  • 125. Data-driven approach , when a packet arrives, the first router it hits contacts the router downstream where the packet has to go and asks it to generate a label for the flow . This method is applied recursively . colored threads a technique is used to avoid loops. The backward propagation of an FEC can be compared to pulling a uniquely colored thread back into the subnet. If a router ever sees a color it already has, it knows there is a loop and takes remedial action . The data-driven approach is primarily used in ATM kind of network (such as much of the telephone system). Control-driven approach . It has several variants. One of these works like this. When a router is booted, It checks to see for which routes it is the final destination (e.g., which hosts are on its LAN). It then creates one or more FECs for them, allocates a label for each one, and passes the labels to its neighbors. They, in turn, enter the labels in their forwarding tables and send new labels to their neighbors, until all the routers have acquired the path. Resources can also be reserved as the path is constructed to guarantee an appropriate quality of service.
  • 126. HOW NETWORKS DIFFER Some of the many ways networks can differ. 5-43
  • 127. HOW NETWORKS CAN BE CONNECTED (a) Two Ethernets connected by a switch. (b) Two Ethernets connected by routers.
  • 128. CONCATENATED VIRTUAL CIRCUITS Internetworking using concatenated virtual circuits.
  • 129. CONNECTIONLESS INTERNETWORKING A connectionless internet.
  • 130. TUNNELING Tunneling a packet from Paris to London.
  • 131. THE NETWORK LAYER IN THE INTERNET Mobile IP IPv6
  • 132. IP ADDRESSES IP address formats.
  • 133. IP ADDRESSES (2) Special IP addresses.
  • 134. SUBNETS (2) A class B network subnetted into 64 subnets.
  • 135. IPV6
  • 136. IPV6 MAJOR GOALS Support billions of hosts, even with inefficient address space allocation. Reduce the size of the routing tables. Simplify the protocol, to allow routers to process packets faster. Provide better security (authentication and privacy) than current IP. Pay more attention to type of service, particularly for real-time data. Aid multicasting by allowing scopes to be specified. Make it possible for a host to roam without changing its address. Allow the protocol to evolve in the future. Permit the old and new protocols to coexist for years.
  • 137. MAJOR IMPROVEMENTS OVER IPV4 IPv6 has longer addresses than IPv4. They are 16 bytes long provide an effectively unlimited supply of Internet addresses simplification of the header. It contains only seven fields (versus 13 in IPv4). This change allows routers to process packets faster and thus improve throughput and delay. better support for options previously were required are now optional. In addition, the way options are represented is different, making it simple for routers to skip over options not intended for them . This feature speeds up packet processing time. Security QoS
  • 138. IPV6 PLANNED SUPPORT LIST 128-bit address space This is what it’s all about… Real-time/QoS services Security and authentication Autoconfiguration Hosts autoconfig with IP address and domain name Idea is to try to make systems more plug-n-play Enhanced routing functionality eg. Mobile hosts Multicast Protocol extensions Smooth transition path from IPv4 Can’t do it all at once! CS 640
  • 139. ADDRESS SPACE AND NOTATION Allocation is classless Prefixes specify different uses (unicast, multicast, anycast) Anycast: send packets to nearest member of a group Prefixes can be used to map v4 to v6 space and visa-versa Lots of flexibility with 128 bits! ~1500 address/sqft of the earths surface Standard representation is set of eight 16-bit values separated by colons Eg. 47CD:1234:3200:0000:0000:4325:B792:0428 If there are large number of zeros, they can be omitted with series of colons Eg. 47CD:1234:3200::4325:B792:0428 Address prefixes (slash notation) are the same as v4 Eg. FEDC:BA98:7600::/40 describes a 40 bit prefix CS 640
  • 140. IPv4 Header IPv6 Header - field ’ s name kept from IPv4 to IPv6 - fields not kept in IPv6 - Name & position changed in IPv6 - New field in IPv6 Legend Version IHL Type of Service Total Length Identification Flags Fragment Offset Time to Live Protocol Header Checksum Source Address Destination Address Options Padding Version Traffic Class Flow Label Payload Length Next Header Hop Limit Source Address Destination Address
  • 141. PACKET FORMAT DETAILS Simpler format than v4 Version = 6 Traffic class same as v4 ToS Treat all packets with the same Flow Label equally Support QoS and fair bandwidth allocation Payload length does not include header –limits packets to 64KB There is a “ jumbogram option ” Hop limit = TTL field Next header combines options and protocol If there are no options then NextHeader is the protocol field Options are “extension header” that follow IP header Ordered list of tuples – 6 common types Quickly enable a router to tell if the options are meant for it Eg. routing, fragmentation, authentication encryption… CS 640
  • 142. SUMMARY OF HEADER CHANGES BETWEEN IPV4 & IPV6 Streamlined Fragmentation fields moved out of base header IP options moved out of base header Header Checksum eliminated Header Length field eliminated Length field excludes IPv6 header Alignment changed from 32 to 64 bits Revised Time to Live ’ Hop Limit Protocol ’ Next Header Precedence & TOS ’ Traffic Class Addresses increased 32 bits ’ 128 bits Extended Flow Label field added
  • 143. EXTENSION HEADERS next header = TCP TCP header + data IPv6 header next header = Routing TCP header + data Routing header next header = TCP IPv6 header next header = Routing fragment of TCP header + data Routing header next header = Fragment Fragment header next header = TCP IPv6 header
  • 144. EXTENSION HEADERS (CONT.) Generally processed only by node identified in IPv6 Destination Address field => much lower overhead than IPv4 options processing exception: Hop-by-Hop Options header Eliminated IPv4’s 40-byte limit on options in IPv6, limit is total packet size, or Path MTU in some cases Currently defined extension headers: Fragment, Hop-by-Hop Options, Routing, Authentication, Encryption, Destination Options
  • 145. FRAGMENT HEADER IPv6 fragmentation & reassembly is an end-to-end function; routers do not fragment packets if packet is too big they send ICMP "packet too big" though discouraged, can use IPv6 Fragment header to support upper layers that do not (yet) do path MTU discovery Next Header Original Packet Identifier Reserved Fragment Offset 0 0 M
  • 146. IPV6 TECHNOLOGY SCOPE IP Service IPv4 Solution IPv6 Solution Mobile IP with Direct Routing DHCP Mobile IP IGMP/ PIM/Multicast BGP IP Multicast MLD/ PIM/Multicast BGP, Scope Identifier Mobility Autoconfiguration Serverless , Reconfiguration , DHCP 32-bit, Network Address Translation 128-bit , Multiple Scopes Addressing Range Quality-of-Service Differentiated Service, Integrated Service Differentiated Service, Integrated Service Security IPSec Mandated, works End-to-End IPSec
  • 147. SUMMARY OF MAIN IPV6 BENEFITS Expanded addressing capabilities Structured hierarchy to manage routing table growth Serverless autoconfiguration and reconfiguration Streamlined header format and flow identification Improved support for options / extensions
  • 148. IPV6 ADVANCED FEATURES Security - Built-in, strong IP-layer encryption and authentication Mobility - More efficient and robust mechanisms Quality of Service Privacy Extensions for Stateless Address Autoconfiguration ( RFC 3041) Source address selection
  • 149. KEY DIFFERENCES IN HEADER No checksum Bit level errors are checked for all over the place No length variability in header Fixed format speeds processing No more fragmentation and reassembly in header Incorrectly sized packets are dropped and message is sent to sender to reduce packet size Hosts should do path MTU discovery But of course we have to be able to segment packets! What about UDP packets? CS 640
  • 150. ROUTING EXTENSION Without this header, routing is essentially the same as v4 With this header essentially same as the source routing option in v4 Loose or strict Header length is in 64-bit words Up to 24 addresses can be included Packet will go to nearest of these in “anycast” configuration Segments left tracks current target CS 640 0 8 16 24 31 Next header Hd. Ext. Len 0 Segmnts left 1 – 24 addresses
  • 151. THE MAIN IPV6 HEADER The IPv6 fixed header (required).
  • 152. EXTENSION HEADERS IPv6 extension headers. 5-69
  • 153. EXTENSION HEADERS (2) The hop-by-hop extension header for large datagrams (jumbograms).
  • 154. EXTENSION HEADERS (3) The extension header for routing.

Editor's Notes

  • #147: In addition to the expanded address space, IPv6 offers other benefits: Autoconfiguration - similar to IPX If you deploy large number of appliances, you can’t expect to set an IP address, you need some auto-configuration mechanism which scales DHCP may not be the right way to manage thousands on clients Ipsec is mandated in the architecture Security - NAT compromises end-to-end security in today’s networks by requiring that you trust the end devices. Allows traffic to bypass home subnet - there is still work being done in this area to provide necessary security - similar to “skinny protocol” – imagine IP telephony with no call manager required! Mobile IPv6 removes the triangular issue QoS in IPv6 is the same as IPv4 in QoS and header compression features. Both areas benefited from the work on IPv6! Actually the IPv6 header compresses better than IPv4 header because there are fewer fields! Other features are equivalent but for few details, ie: scope address in multicast,...
  • #148: Note that Quality of Service is not one of the benefits of IPv6 over IPv4, despite what you may have heard. Both versions of IP have exactly the same QoS features defined. The only difference is the presence of the Flow Label field in IPv6, which allows more efficient packet classification by routers, but this is really a minor implementation optimization, rather than a significant new QoS feature.