4 Network Layer The NL software controls the flow of packets ( datagrams ) in the network core. It does not, however, move packets around; its role is to provide end to end service (like TL) where the ends are two routers (endpoints of a link). a Link NL DLL DLL NL a In TL the ends are hosts. 4

5 The Network Layer is responsible for: Path determination (routing algorithm). Switching (forwarding packets). Addressing and handling conventions. Fragmentation and reassembly of T PDUs. If needed, call setup (virtual link to link circuits within the network cloud). Call setup is done only in some networks; the Internet protocol (IP) does not do it. 5

6 Routing vs. forwarding The life of a packet is divided into 3 phases: 1. Its life in the source host (possibly including the travel to the host s access point). 2. Its journey through the network core. This journey is made of hops; before each hop the packet is routed and forwarded. 3. Its life in destination host (possibly including the trip from the destination host s access point to the host itself). The first and third phases are deterministic. They involve TL activity in the host and (possibly) DLL activity when transferring the packet between the host and its access point (through a LAN). The NL takes care of the second (and most important) phase. 6

8 Packet in a router When a (packet) datagram reaches a router, it is placed in an input buffer. The NL protocol determines the fate of this packet, which can be one of the 3 possibilities: 1. Drop it (the packet disappears without a trace). 2. Pass it to the TL of the destination host. 3. Send it to another router. If option 3 is chosen the router must pick the next router (this is called routing) and move the packet from the input buffer to the appropriate output buffer a (forwarding). Many authors use the term forwarding to describe the whole physical process of moving the bits of a packet from the input link to the output link. a One input and one output buffer is associated with each link connected to the router. 8

9 Network Layer in the Internet While there are many internets (and many internetworking protocols), the most important is the Internet and its main networking protocol, IP (Internet Protocol) defined in RFC791. The main property of IP is that it is a connectionless service, essentially complementing UDP inside the network core. IP cannot operate alone anymore a and it is complemented by a number of auxiliary protocols. The auxiliaries are not universally deployed and a router must be prepared to interact with other routers that use different auxiliaries. a Too many routers in a dynamically changing configuration plus ever more stringent demands on timeliness. 9

10 The role of IP IP is responsible for the following: 1. Next hop determination (part of the routing process). 2. Switching (forwarding packets). 3. Addressing and handling conventions. 4. Fragmentation and reassembly of T PDUs. Instead of determining the whole path of a datagram, the IP in a router chooses one of the router s neighbours as the destination of the next hop a based on its current knowledge of the state of the Internet. The standard does not impose any rules on selecting the next hop and every router is free to use its own approach; these approaches range from the most primitive hot potato algorithm to complex semi global optimisation algorithms. a Using local as opposed to global optimisation in the lingo of algorithm design. 10

11 IPv4 IP describes (among other things): Addressing conventions: host address formats and how multicast is represented. Datagram format. Packet handling conventions. Several other protocols complement IP by regulating how addresses can be assigned, how non standard addresses should be represented, etc. 11

12 Addressing conventions An IPv4 address is made of two parts: a prefix and a suffix. The prefix indicates the network and the suffix the host within this network (a simplistic view). Network prefixes must be unique. They are coordinated by IANA, a subset of the Internet Corporation for Assigned Names and Numbers (formerly Internet Assigned Number Authority). Within each network, it is up to the Internet Service Provider to define the meaning of the suffix. 12

14 IP Address structure An IPv4 address is made of 4 bytes and the most popular ( dotted ) notation (also known as classful) represents each byte separately: Each byte takes values from 0 (all bits equal 0) to 255 (all bits equal 1). The exact interpretation of the address depends on the class of addresses that it belongs. At the NL, addresses are typically filtered using a network mask, which looks like an IP address itself. The standard operation is to compare a masked IP address (ip 1 ) with another address (ip 2 ) taken from a table: if( ip 1 & mask == ip 2 ) A mask of implies that all the bits are relevant, a mask of drops the first bit and the last 24 bits. 14

17 Special addresses Multicast multicast address Broadcast Local broadcast is achieved by sending a datagram to the address Directed broadcast (local, but to another net) is achieved by sending a datagram to an address made of the network prefix followed by all ones, i.e. prefix in class A, prefix in class B, or prefix.127 in class C. 17

18 Multiple addresses and subnets Important: A host has one IP address for each link (DLL interface) that it is connected to. Irrelevant: The set of all the entities (hosts and routers) connected to one link is called a subnet. It is easy to extend this concept into a hierarchy: a set of subnets connected to the outside world by one link is a supernet and so on. The subnet concept is obsolete. 18

19 Network address When the suffix part of the address is all zeroes, the address denotes a network as opposed to any host/subnet within this network. (This is used by some non standard limited broadcast techniques). Example: is the network containing all the machines with addresses of the form: x.y. Local host During bootstrap, the IP address of the host is not known locally. To obtain it, the host refers to itself as A fully booted host refers to itself by its IP address or by the loopback address: 127.anything (by convention: ). 19

20 CIDR cider A network mask allows to cut out parts of IP classful addresses but not to specify non classful addresses or blocks of addresses. To allow block addressing IETF released CIDR (rfc1518 and rfc1519) standardising other prefix lengths than the standard 8, 16, and 24. CIDR addressing can be used for masking, but most commonly, a CIDR address is interpreted as a block address, CIDR prefix size is signalled by the notation: a.b.c.d/x where x denotes the length of the prefix. The a.b.c.d portion of a CIDR address can be any address belonging to the block. 20

21 Class Default prefix mask CIDR prefix A /8 B /16 C /24 classless /12 classless ? The last entry filters out all the addresses that do not match the first 2 bytes or the mask for the third byte. A CIDR address that matches this mask could look like: /23. 21

22 For example: /20 denotes the block of addresses ranging from to (the lowest 12 bits are masked out by the /20). Note that /20 and /20 have exactly the same meaning as /20. 22

23 Block assignment When an organisation is assigned a contiguous block of IP addresses, it can use CIDR to advertise its subnet. Typically, the network address is used. For example, if a block of 32 addresses from to is assigned, the block can be advertised as /28 and will be considered to be the network address of the block. 23

24 When nonstandard addresses are involved, IP must choose the address with the longest matching prefix in case of conflicts. For example: A packet is addressed to and the routing algorithm finds in its routing table two matching IP addresses: /20 and /23. Both of them match, but the second matches 23 bits while the first matches only 20. Therefore, the packet must be routed to /23. 24

Internet Protocols Addressing & Services Updated: 9-29-2012 Virtual vs. Physical Networks MAC is the part of the underlying network MAC is used on the LAN What is the addressing mechanism in WAN? WAN is

Application Note IP Addressing A Simplified Tutorial July 2002 COMPAS ID 92962 Avaya Labs 1 All information in this document is subject to change without notice. Although the information is believed to

IP Addressing and Routing 1 Basic IP Addressing Each host connected to the Internet is identified by a unique IP address. An IP address is a 32-bit quantity. Expressed as a dotted-decimal notation W.X.Y.Z.

Module 6 Internetworking Lesson 2 Internet Protocol (IP) Specific Instructional Objectives At the end of this lesson, the students will be able to: Explain the relationship between TCP/IP and OSI model

The Internet Internet Technologies and Applications Aim and Contents Aim: Review the main concepts and technologies used in the Internet Describe the real structure of the Internet today Contents: Internetworking

SFWR 4C03: Computer Networks and Computer Security January 19-22 2004 Lecturer: Kartik Krishnan Lectures 7-9 RARP: Reverse Address Resolution Protocol When a system with a local disk is bootstrapped it

Chapter 4 Network Layer A note on the use of these ppt slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you can add, modify, and delete

PART IV Network Layer Position of network layer Network layer duties Internetworking : heterogeneous Physical Networks To look Like a single network to he upper layers The address at Network layer must

1 Hardware Addressing - IPv4 Addressing and Subnetting - A hardware address is used to uniquely identify a host within a local network. Hardware addressing is a function of the Data-Link layer of the OSI

Computer Networks Introduc)on to Naming, Addressing, and Rou)ng Week 09 College of Information Science and Engineering Ritsumeikan University MAC Addresses l MAC address is intended to be a unique identifier

TCP/IP Network Essentials Linux System Administration and IP Services Layers Complex problems can be solved using the common divide and conquer principle. In this case the internals of the Internet are

OSI Network Layer OSI Layer 3 Network Fundamentals Chapter 5 ١ Objectives Identify the role of the Network Layer, as it describes communication from one end device to another end device Examine the most

CS335 Sample Questions for Exam #2.) Compare connection-oriented with connectionless protocols. What type of protocol is IP? How about TCP and UDP? Connection-oriented protocols Require a setup time to

The fundamentals of TCP/IP networking TCP/IP (Transmission Control Protocol / Internet Protocols) is a set of networking protocols that is used for communication on the Internet and on many other networks.

CHAPTER 2 LITERATURE REVIEW 2.1 Routing Process Routers are amongst the most crucial components of the internet, as each bit of information on the internet passes through many routers [2]. Routing is the

Networking Test 4 Study Guide True/False Indicate whether the statement is true or false. 1. IPX/SPX is considered the protocol suite of the Internet, and it is the most widely used protocol suite in LANs.

About the Tutorial Internet Protocol version 4 (IPv4) is the fourth version in the development of the Internet Protocol (IP) and the first version of the protocol to be widely deployed. IPv4 is described

Subnetting and Network Management Omer F. Rana Networks and Data Communications 1 Subnetting Subnetting is an important concept in establishing TCP/IP based networks important in integrating small Local