Jaimin chp-5 - network layer- 2011 batch


Published on

GTU-MCA-SEM IV - Fundamentals of Networking

Published in: Education
1 Comment
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • 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,...
  • 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.
  • Jaimin chp-5 - network layer- 2011 batch

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