course_1

26
1 Virgil Dobrota Technical University of Cluj-Napoca, Romania [email protected] Internet Protocols Copyright © Virgil Dobrota 2008-2014, All rights reserved

Upload: alex-postiniuc

Post on 20-Nov-2015

224 views

Category:

Documents


5 download

DESCRIPTION

adsfasdfsdsfsdfssdf

TRANSCRIPT

  • 1Virgil Dobrota Technical University of Cluj-Napoca, [email protected]

    Internet Protocols

    Copyright Virgil Dobrota 2008-2014, All rights reserved

  • 2References Supplementary ReferencesIntroduction 1. TCP/IP Architecture2. Types of ProtocolsNetwork Layer Routed Protocols3. IP Protocol: Header Format

    Course 1 - Outline

    Copyright Virgil Dobrota 2008-2014, All rights reserved

  • 3References

    Copyright Virgil Dobrota 2008-2014, All rights reserved

  • 4References

    [Dob14] Virgil DOBROTA, Internet Protocols, Technical University of Cluj-Napoca, 2014-2015 http://el.el.obs.utcluj.ro/pi/en_index.htm[Dob03] Virgil DOBROTA, Digital Networks in Telecommunications. Volume III: OSI and TCP/IP. Second Edition. Mediamira Science Publishers, Cluj-Napoca 2003 (in Romanian)[Pet11] Larry PETERSON & Bruce DAVIE Computer Networks. A Systems Approach. Fifth Edition. Morgan Kaufmann, 2011

    https://www.facebook.com/pages/Computer-Networks-A-Systems-Approach/110933578952503http://booksite.elsevier.com/9780123850591/figures.php

    [Tan10] Andrew S. TANENBAUM, David J. Wetherall- Computer Networks. Fifth Edition, Prentice Hall 2010[Los03] Pete LOSHIN, IPv6 Clearly Explained. Second Edition. Morgan Kaufmann, 2003

    Copyright Virgil Dobrota 2008-2014, All rights reserved

  • 5Supplementary References

    Copyright Virgil Dobrota 2008-2014, All rights reserved

  • 6Supplementary References (I)

    [Com08] D.E. Comer, Computer Networks and Internets with Internet Applications. Fifth Edition, Prentice Hall, 2008[Day08] J. Day, Patterns in Network Architecture. A Return to Fundamentals. Pearson Education, 2008[How12] W. Howe, Glossary of Internet Terms , 2012 http://www.walthowe.com/glossary/index.html[How12] W. Howe, A Brief History of the Internet, 2012 http://www.walthowe.com/navnet/history.html[ISC11] Internet Systems Consortium, http://www.isc.org/[Lei13] B.M. Leiner, V.G. Cerf, D.D.Clark, R.E. Kahn, L.Kleinrock, D.C. Lynch, J. Postel, L.G. Roberts, S.Wolff, Brief History of the Internet, Internet Society, 2013, http://www.internetsociety.org/internet/internet-51/history-internet/brief-history-internet[Nem10] E. Nemeth, G. Snyder, T.R. Hein, B. Whaley, UNIX and Linux System Administration Handbook.4th Edition, Prentice Hall, 2010[Per98] C.E. Perkins, Mobile IP. Design, Principles and Practices. Second Edition, Addison-Wesley, 1998

    Copyright Virgil Dobrota 2008-2014, All rights reserved

  • 7Supplementary References (II)

    [ [Rye08] http://www.ryerson.ca/acs/usersguide/[Zak11] ZAKON, Robert, Hobbes Internet Timeline v10.2, http://www.zakon.org/robert/internet/timeline/

    Copyright Virgil Dobrota 2008-2014, All rights reserved

  • 81. TCP/IP Architecture

    Copyright Virgil Dobrota 2008-2014, All rights reserved

  • 9TCP/IP Architecture

    Copyright Virgil Dobrota 2008-2014, All rights reserved

  • 10

    2. Types of Protocols

    Copyright Virgil Dobrota 2008-2014, All rights reserved

  • 11

    Classification based on OSI Reference Model (I)

    Copyright Virgil Dobrota 2008-2014, All rights reserved

    Types of Protocols (I)

    Layer 2 or Data Link Layer ProtocolsExample: ARP (Address Resolution Protocol) *

    Layer 3 or Network Layer ProtocolsExamples: IP (Internet Protocol) IPv6 (Internet Protocol Version 6)Mobile IP (Mobile Internet Protocol)Mobile IPv6 (Mobile Internet Protocol Version 6)ICMP (Internet Control Message Protocol)ARP (Address Resolution Protocol) * OSPF (Open Shortest Path First)

    * ARP is both L2 and L3 protocol.

  • 12Copyright Virgil Dobrota 2008-2014, All rights reserved

    Types of Protocols (II)

    Layer 4 or Transport Layer ProtocolsExamples: TCP (Transmission Control Protocol)UDP (User Datagram Protocol) SCTP (Stream Control Transmission Protocol)

    Application Layer ProtocolsExamples: DNS (Domain Name System) DHCP (Dynamic Host Configuration Protocol)RIPv1 (Routing Information Protocol Version 1) RIPv2 (Routing Information Protocol Version 2) RIPng (Routing Information Protocol Next Generation)HTTP (Hypertext Transfer Protocol) etc.Some classifications from references are not academically correct. For instanceRIP is an Application Layer protocol (and not L3!!!), as it works on top of UDP(i.e. L4 protocol) in a client-server architecture.

    Classification based on OSI Reference Model (II)

  • 13

    Classification based on connection orientation

    Copyright Virgil Dobrota 2008-2014, All rights reserved

    Types of Protocols (III)

    Connection-Oriented ProtocolsExample: TCP (Transmission Control Protocol)

    Connectionless ProtocolsExample: IP (Internet Protocol)

    Protocols with confirmationExample: TCP (Transmission Control Protocol)Protocols without confirmationExample: IP (Internet Protocol)

    Classification based on confirmation

  • 14Copyright Virgil Dobrota 2008-2014, All rights reserved

    Types of Protocols (IV)

    Routed ProtocolsExamples: IP (Internet Protocol)IPX (Internetwork Packet Exchange) **AppleTalk **

    Routing ProtocolsExamples: RIPv1 (Routing Information Protocol Version 1) RIPv2 (Routing Information Protocol Version 2) RIPng (Routing Information Protocol Next Generation)OSPF (Open Shortest Path First)

    Non Routed Protocols) **Example:NetBEUI (NetBios Extended User Interface) **

    ** These protocols are not studied this semester. Note that there are alsoprotocols that may not play any direct role in traffic forwarding!

    Classification based on role in traffic forwarding

  • 15

    3. IP Protocol: Header Format

    Copyright Virgil Dobrota 2007, All rights reserved

  • 16

    IP Protocol: Header Format (I)

    Source: [Tan10]

  • 17

    IP Protocol: Header Format (II)

    Version: 4 bits, 0100 -> IPv4, 0110 -> IPv6IHL: 4 bits, IP header length, 32-bit words. Minimum value: 0101 -> 20 bytes (5x4=20), maximum value: 1111 -> 60 bytes (15x4=60)TOS: Type of Service IntServ (Integrated Services) IETFs QoS model for Layer 3 per-flow basis between source and destination 3 bits: precedence value

    000 -> normal priority (minimum) 111 -> control packet (maximum) Flow control mechanisms for congestion avoidance nodes (routers, servers, hosts) take decisions regarding packet

    discarding in case of congestion 3bits: D (Delay) flag, T (Throughput) flag, R (Reliability) flag 2 bits: ECN (Explicit Congestion Notification) [RFC2481]

    Copyright Virgil Dobrota 2008-2014, All rights reserved

  • 18

    IP Protocol: Header Format (III)

    DiffServ (Differentiated Services) new significance for TOS !!! IETFs QoS model for Layer 3 does not use individual flows Aggregate flow receives the service level according to its

    priority SLA (Service Level Agreement) between the client and

    the service provider per-hop behavior DSCP (DiffServ Code Point) = most significant 6 bits to

    classify the traffic within DS (DiffServ Domain)

    Copyright Virgil Dobrota 2008-2014, All rights reserved

  • 19

    IP Protocol: Header Format (IV)

    Total Length: 16 bits, header+data length, maximum value: 65,535 bytes Identification: fragments belonging to the same datagram have the same 16-bit IDDF (Dont Fragment) =1: fragmentation is not allowedMF (More Fragments) =1: more fragments are expectedFragment Offset: 13 bits, position of the fragment within datagram

    OBSERVATIONS: Maximum fragment length: 72x8=576 bytes One fragment: minimum 8 bytes

    TTL (Time to Live): =0: packet is dropped and an ICMP packet is sent to the source 1: number of hops (i.e. Layer 3 devices)

    Copyright Virgil Dobrota 2008-2014, All rights reserved

  • 20

    IP Protocol: Header Format (V)

    Protocol: type of protocol used within data field. According to [RFC3232], recommendation [RFC1700] was replaced by on-line database at: http://www.iana.org/protocols. Examples of decimal values: 1 (ICMP), 4 (IP in IP), 6 (TCP), 17 (UDP) etc.

    Header Checksum: 16 bits, 1s complement applied to headerSource Address: 32 bits, Internet Layer Service Access Point Destination Address: 32 bits, Internet Layer Service Access Point(see Lab1)Options: security strict source routing loose source routing record route timestamp

    Copyright Virgil Dobrota 2008-2014, All rights reserved

  • 21

    PROBLEM 1

    Explain why 1s complement is used to calculate the IP header checksuminstead of 2s complement , XOR and CRC?

    Copyright Virgil Dobrota 2008-2014, All rights reserved

    IP Protocol (VI)

  • 22

    SOLUTION FOR PROBLEM 1:In 1s complement the carry bit is not eliminated (like in 2s complement).Furthermore this bit is added to the least significant bit. This is mechanism is calledend-arround carry. For instance: -5 (i.e. 1010) +6 (i.e. 0110) = (0000) + 1 (carrybit) = +1 (i.e. 0001). [RFC1071] presents the arguments for preferring 1scomplement. This is due the requirements of the IP Header checksum:(P1) It should be commutative;(P2) It should have at least an identity element: actually there are two: +0 (i.e. 0000)and -0 (i.e. 1111);(P3) It should have an inverse (adding of the calculated sum at receiving side to thereversed value written within the header at transmission side should give the resultzero);(P4) It should be associative;(P5) It should be a fast calculation;(P6) The code should be systematic (i.e. adding the sum to a packet should not alterthe information bytes);(P7) The sum should be incrementally modified.

    2s Complement: is not equally sensitive to all bit error positions, CRC is notsystematic and XOR is considered as not satisfactory enough (it fulfills therequirements (P1)(P4).

    Copyright Virgil Dobrota 2008-2014, All rights reserved

    IP Protocol (VII)

  • 23

    GRID TEST 11. Suppose a host has the address 203.226.5.35/27. Determine the address of the subnetwork it belongs to.a) 203.226.5.0b) 203.226.5.255 c) 203.226.5.64 d) 203.226.5.32 2. How many bits were borrowed for subnetwork field in Class C IP address with the subnet mask 255.255.255.224?a) 5 b) 2 c) 4 d) 83. Which of the following are Application Layer protocols ?a) DNSb) IPc) TCPd) DHCP

    Copyright Virgil Dobrota 2008-2014, All rights reserved

    IP Protocol (VIII)

  • 24

    ANSWERS FOR GRID TEST COURSE 11. d)2. -3. a),d)

    Copyright Virgil Dobrota 2008-2014, All rights reserved

    IP Protocol (VIII)

  • 25

    Conclusions

    Copyright Virgil Dobrota 2008-2014, All rights reserved

  • 26

    Conclusions

    32-bit addresses20 up to 60-byte variable header (due to options)ConnectionlessWithout confirmation QoS Models: Best Effort, IntServ, DiffServ

    Copyright Virgil Dobrota 2008-2014, All rights reserved