1 / 35

Network Layer

CEG-4188 Lecture 2: Internetworking and the Internet Protocol (IP) Prof. Gregor v. Bochmann SITE - University of Ottawa These course notes are based on slides prepared by Drs. Makrakis and Shirmohammadi. Network Layer. Provides the upper layers with independence from the data

tod
Download Presentation

Network Layer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CEG-4188Lecture 2:Internetworking andthe Internet Protocol (IP) Prof. Gregor v. BochmannSITE - University of OttawaThese course notes are based on slides prepared by Drs. Makrakis and Shirmohammadi CEG 4188

  2. Network Layer • Provides the upper layers with • independence from the data • transmission and physical • networking technologies. • Responsible for sending data • from source to destination. • This includes the nodes in- between (and therefore it is not end-to-end) • Responsible for requesting • network facilities, such as • priority, bit-rate, etc… • Responsible for routing. Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer CEG 4188

  3. Basic network functions • Data transfer (in packet switching mode) • Two modes of transfer: • Connection-oriented (end-to-end connection must be established before data transfer can occur) • Connection-less • Addressing • Address identifies destination • Multicasting (broadcasting only over small networks) • Additional features: • Ordered delivery • Flow control • Error control CEG 4188

  4. Connection-oriented vs. Connection-less • Debate in the 1970ies • The connection-less IP protocol was adopted • Simpler to realize, especially for inter-networking • Cannot provide ordered delivery, flow control and error control (if this is required by application, TCP must be used) • Circuit-switched networks favor connection-oriented service. Also in optical networks, technology favors connection-orientation. However, IP is expected to remain the main internetworking protocol. CEG 4188

  5. Internetworking Internetworking is a scheme for interconnecting multiple networks of notidenticaltechnologies Uses both hardware and software Extra hardware positioned between networks Software on each attached computer System of interconnected networks is called an internetwork or an internet CEG 4188

  6. TCP/IP Protocol Suite vs. OSI CEG 4188

  7. Internetworking architecture CEG 4188

  8. Autonomous System (AS) AS is a set of routers and networks managed by a single organization. AS consists of a group of routers exchanging information via a common routing protocol. Claiming that an AS is “connected”, means that (excluding times of failures) there is always a “path” between any pair of nodes. CEG 4188

  9. Example: A 2-AS formed Internet CEG 4188

  10. A “possible” Internet Architecture(1) CEG 4188

  11. A “possible” Internet Architecture(3) AS-5 AS-4 AS-1 AS-2 AS-3 CEG 4188

  12. Routing • Autonomous System (AS): set of networks and routers operated by a single organization. • Interior Router Protocol (IRP): passing routing information within and AS. • Exterior Router Protocol (ERP): passing routing information between different ASs. CEG 4188

  13. Routing Approaches • Distance Vector Routing: each node exchanges information with its neighboring nodes; e.g. Routing Information Protocol (RIP). • Link-state Routing: sends link costs of each of its network interfaces to all routers (not just neighboring). Typically used with a Dijkstera-based algorithm; e.g., Open Shortest Path First (OSPF). • Path-vector Routing: router provides information about which networks can be reached by a given router and the ASs that must be crossed; e.g. Border Gateway Protocol (BGP). CEG 4188

  14. Internet Protocol (IP) v4 defined in RFC 791 part of TCP/IP suite will (eventually) be replaced by IPv6 CEG 4188

  15. IP Header CEG 4188

  16. IP Header Fields • Version (4 bits): currently 4 • Internet Header Length (4 bits) • Minimum is 5, for 20 octets • Header may include options and padding • Type of Service (8 bits) • rarely used, for differentiated services and congestion notification • Total Length (16 bits) of datagram, in octets (header & data) • Identification (16 bits) • Sequence number • Together with addresses and user protocol, this field identifies the datagram uniquely (used for fragmentation) • Flags (3 bits) • Only 2 bits used for fragmentation: More bit, and Don’t Fragment bit CEG 4188

  17. IP Header Fields (…) • Fragmentation offset ( 13 bits) • Time to Live (8 bits) • Protocol (8 bits) • Next higher layer to receive data field at destination • Header Checksum (16 bits) • Re-verified and recomputed at each router • 16 bit ones-complement sum of all 16 bit words in the header • Source Address (32 bits) • Destination Address (32 bits) • Options (Security, timestamp, …) • Padding, to fill to multiple of 32 bits long Following the header: Data field (contains user data): maximum lengths 65 535 octets CEG 4188

  18. Internetworking RequirementsAre they satisfied by IP ? Design requirements: accommodate differences in constituting sub-networks: • Different maximum packet size • Different addressing schemes • Different network access mechanism • Different maximum packet lifetime • Different transmission modes (connection-oriented, connectionless) • Error control • Flow control CEG 4188

  19. (1) Fragmentation and Reassembly: Why? Main reason: Different maximal packet sizes Lower-level protocols may need to break data up into smaller blocks, an action called fragmentation Each network only accepts blocks of a certain size, or it has a minimum and maximum limit for the allowed size of data blocks (e.g. ATM: 53 bytes cell size (48 payload + 5 control) Ethernet frames: minimum size = 72 bytes; maximum size = 1526 bytes Other reasons more efficient error control & smallerretransmission units fairer access to shared facilities Less waiting times of packets of higher priority in queues smaller buffers Disadvantages more bandwidth wasted in overhead related data more interrupts & processing time CEG 4188

  20. PDUs and Fragmentation CEG 4188

  21. Fragmentation Example CEG 4188

  22. (2) Different Addressing Schemes • Introduce IP address as a global address • All hosts on the Internet must have a unique IP address • Exception: techniques such as NAT (network address translation) allow private IP addresses that might be duplicated somewhere else. • NAT is very common (because IP v4 does not have enough address space) CEG 4188

  23. IP Address Each IP address is divided into a prefix and a suffix prefix identifies the network to which the computer is attached suffix identifies the computer within that network we allocate some bits for prefix, some for suffix (total of 32 bits) large prefix, small suffix - many networks, few hosts per network small prefix, large suffix - few networks, many hosts per network Network numbers are unique assignment of network numbersmust be coordinated globally; assignment of host addresses can be managed locally CEG 4188

  24. IP Address format 32 8 netid hostid Class A 0 16 32 netid hostid Class B 10 24 32 netid hostid Class C 110 32 multicast Class D 1110 CEG 4188

  25. IP Address format Reserved for future use Class E 11110 Address Class No. of Networks No. of Hosts Comments Very Large Networks A 126 16777214 B 16384 65534 Medium Size Network Large number of small networks C 2097151 254 Host id 0 is never assigned to an individual host. It refers to the network itself. CEG 4188

  26. Example Class A Class B Class C 26 CEG 4188

  27. Subnets and Subnet Masks • Allow arbitrary complexity of internetworked LANs within organization. • Insulate overall internet from growth of network numbers and routing complexity. • To rest of internet, site looks like single network. CEG 4188

  28. Routing Using Subnets CEG 4188

  29. Address Mapping (ARP) • Sometimes, in order to reach a destination, there is no need to go through an IP router. • E.g.? • In that case, the physical address can be used directly. CEG 4188

  30. ARP (Address Resolution Protocol) CEG 4188

  31. (4) Different maximum packet lifetime Why limiting the maximum packet lifetime ? • Datagrams could loop indefinitely • Consumes resources • Transport protocol may need upper bound on datagram lifetime Solution proposed for IP: • Time To Live (TTL) field in IP header • the value represents the maximum hop count • It is decremeted each time the packet passes through a router • When the value of TTL becomes zero, the datagram is discarded (not forwarded) • Note: This does not solve the problem of the Transport protocol, since the time waiting in a router is not bounded, so there is no enforced maximum lifetime, only a maximum hop count. CEG 4188

  32. Internetworking Requirements Design requirements: accommodate differences in constituting networks: • Different maximum packet size • Different addressing schemes • Different network access mechanism (implemented in each router, as required) • Different maximum packet lifetime • Different transmission modes (connection-oriented, connectionless) • Error control (not provided by IP) • Flow control (not provided by IP) CEG 4188

  33. IP v6 Why Change IP ? Address space exhaustion (this is the main reason) growth of networks and the Internet Requirements for new types of services new addressing features flow identification features for resource allocation New header structure for more efficient processing CEG 4188

  34. IPv6 Enhancements (1) Expanded IP address: 128 bit address space increase of address space by a factor of 296 allows (on the order of) 6  1023 unique addresses per square meter of the surface of the earth, which seems inexhaustible. Improved (flexible) option mechanism options are placed in separate optional headers ( between IPv6 header & transport- layer header). most optional headers are not examined/processed by any internet router on the packet's path. simplifies and speeds upIPv6 (vs. IPv4) packet routing processing. Easier to add additional options. CEG 4188

  35. IPv6 Enhancements (2) dynamic address assignment(using address auto-configuration) Increasedaddressing flexibility includes anycast & multicast anycast:packet is delivered to just one of a set of nodes. scalability of multicast routing is improved by adding scope field to multicast addresses. Support for resource allocation labelled packet flows distinguishes different flows coming from the same (IP address) source (e.g. can identify a Video over IP or Voice over IP session (having real-time constraints) from a file transfer or web browsing session (which are fine with best effort treatment). CEG 4188

More Related