Data Communications and Networking

Slides:



Advertisements
Similar presentations
Chapter 5 IPv4 Addresses TCP/IP Protocol Suite
Advertisements

19.1 Chapter 19 Network Layer: Logical Addressing Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 19 Network Layer: Logical Addressing Stephen Kim.
1 Computer Communication & Networks Lecture 17 & 18 Network Layer: Logical Addressing Waleed Ejaz.
Logical addressing Engr.Jawad Ali.
Network Layer: Logical Addressing. 4-1 IPv4 ADDRESSES An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a device.
TCP/IP Protocol Suite 1 Chapter 4 Objectives Upon completion you will be able to: IP Addresses: Classful Addressing Understand IPv4 addresses and classes.
Prepared By: Eng.Ola M. Abd El-Latif
1 IP Addressing (IPv4 ADDRESSES). 2 Universal Service Concept Any computer can communicate with any other computer in the world. Multiple independently.
TCP/IP Protocol Suite 1 Chapter 4 Objectives Upon completion you will be able to: IP Addresses: Classful Addressing Understand IPv4 addresses and classes.
Network Layer. The Network layer, or OSI Layer 3, provides services to exchange the individual pieces of data over the network between identified end.
7/3/2015 Unit-3 : Network Layer 1 CS 1302 Computer Networks — Unit - 3 — — Network Layer — Text Book Behrouz.A. Forouzan, “Data communication and Networking”,
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 4 IP Addresses: Classful Addressing.
NETE0510 Presented by Dr.Apichan Kanjanavapastit
NETWORK LAYER (2) T.Najah AlSubaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
19.1 Chapter 19 Network Layer: Logical Addressing Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 19 Network Layer: Logical Addressing
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 19 Network Layer Logical Addressing © 2012 by McGraw-Hill Education. This is proprietary material.
21-IP addressing Dr. John P. Abraham Professor UTPA.
Types of Addresses in IPv4 Network Range
Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing.
1 Kyung Hee University Part 4 : Network Layer. 2 Kyung Hee University Role and Position of Network Layer o Network layer in the Internet model is responsible.
IP Addressing and Network Software. IP Addressing  A computer somewhere in the world needs to communicate with another computer somewhere else in the.
IP Addresses & Classes Presented By: M.Usman Khan Ghauri Nauman Aslam.
19.1 Chapter 19 Network Layer: Logical Addressing Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Network Layer: Logical Addressing. Address Space Notations Classful Addressing Classless Addressing Network Address Translation (NAT) Topics Discussed.
Chapter 4 IP Addressing : Classful Addressing
Chapter 4 Objectives Upon completion you will be able to: Classful Internet Addressing Understand IPv4 addresses and classes Identify the class of an.
1 Chapter 4 IP Addressing : Classful Addressing Chapter 4 IP Addressing : Classful Addressing Mi-Jung Choi Dept. of Computer Science, KUN
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 5 IPv4 Addresses.
Chapter 5 IPv4 Address.
IP Internet Protocol Fundamental packet format that computers use to exchange information. Is a set of technical rules that defines how computers communicate.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Network Layer PART IV.
21-IP addressing Dr. John P. Abraham Professor UTPA.
IP v 4 TOPIC : IP v 4 Group members :- Basabi Malakar Archana Nayak Reecha Satpathy Lipsa Priyadarshini.
IP ADDRESSING Lecture 2: IP addressing Networks and Communication Department 1.
CS4500CS4500 Dr. ClincyLecture1 Lecture #1 Chapter 5: Addressing (part 1 of 3)
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 5 IPv4 Addresses.
TCP/IP Protocol Suite 1 Chapter 4 Objectives Upon completion you will be able to: IP Addresses: Classful Addressing Understand IPv4 addresses and classes.
TCP/IP Protocol Suite 1 Objectives Upon completion you will be able to: IP Addresses: Classful Addressing Understand IPv4 addresses and classes Identify.
1 Kyung Hee University Chapter 19 Network Layer: Logical Addressing.
Network Layer/IP Protocols 1. Outline IP Datagram (IPv4) NAT Connection less and connection oriented service 2.
19.1 Chapter 19 Network Layer: Logical Addressing Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
19.1 Chapter 19 Network Layer: Logical Addressing Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
UNIT 4 NETWORK LAYER. Position of network layer 7/8/2016 UNIT-3 : NETWORK LAYER 2.
Behrouz A. Forouzan TCP/IP Protocol Suite, 3 rd Ed. IP Addressing.
Internet Architecture
IP Addresses: Classful Addressing
NET 221D:Computer Networks Fundamentals
4.3 Network Layer Logical Addressing
IP Addresses: Classful Addressing IP Addresses. CONTENTS INTRODUCTION CLASSFUL ADDRESSING Different Network Classes Subnetting Classless Addressing Supernetting.
Network Layer, and Logical Addresses
Chapter 5 IPv4 Addresses TCP/IP Protocol Suite
Chapter-5 TCP/IP Suite.
PART IV Network Layer.
4 Network Layer Part I Computer Networks Tutun Juhana
IPV4.
Network Layer Client: Date Descriptor V Th SEM
IP Addresses: Classful Addressing
An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a device (for example, a computer or a router) to the Internet.
CS 1302 Computer Networks — Unit - 3 — — Network Layer —
IP Addresses: Classful Addressing
Chapter 19 Network Layer: Logical Addressing
Network Layer: Logical Addressing
Dr. John P. Abraham Professor UTPA
INTERNET PROTOCOL Presented by: Md:Faruque-A-Azam ID:1642CSE00570 Batch:42 CSE,MIU.
Dr. John P. Abraham Professor UTRGV
Part IV Network layer 10. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Dr. John P. Abraham Professor UTPA
Introduction to Network
Presentation transcript:

Data Communications and Networking CSCS 311 Data Communications and Networking Lecture 26 Lecture Focus: NETWORK Layer 1

Network Layer The data link layer oversees the delivery of the packet between two systems on the same network (links). Network layer is responsible for the source-to-destination delivery of a packet, possibly across multiple networks (links). Network layer ensures that each packet gets from its point of origin to its final destination. The network layer adds a header that includes the logical addresses of the sender and receiver to the packet coming from the upper layer. If a packet travels through the Internet, we need this addressing system to help distinguish the source and destination. When independent networks or links are connected together to create an internetwork, routers or switches route packets to their final destination. One of the functions of the network layer is to provide a routing mechanism. 2

For this level of communication, we need a global addressing scheme: Network Layer Communication at the network layer is host-to-host (computer-to-computer): A computer somewhere in the world needs to communicate with another computer somewhere else in the world. Usually, computers communicate through the Internet. The packet transmitted by the sending computer may pass through several LANs or WANs before reaching the destination computer. For this level of communication, we need a global addressing scheme: We call this logical addressing or IP address or Internet address. 3

The Internet addresses are 32 bits in length. Network Layer The Internet addresses are 32 bits in length. This gives us a maximum of 232 addresses. These addresses are referred to as IPv4 (IP version 4) addresses or simply IP addresses. The need for more addresses motivated a new design of the IP layer called the new generation of IP or IPv6 (lP version 6). In this version, the Internet uses 128-bit addresses that give much greater flexibility in address allocation. These addresses are referred to as IPv6 (IP version 6) addresses. 4

Network Layer IPv4 ADDRESSES: An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a device (for example, a computer or a router) to the Internet. IPv4 addresses are unique because each address defines one, and only one, connection to the Internet. Two devices on the Internet can never have the same address at the same time. An address may be assigned to a device for a time period and then taken away and assigned to another device. If a device operating at the network layer has m connections to the Internet, it needs to have m addresses. A router is such a device. 5

Network Layer Address Space: An address space is the total number of addresses used by the protocol. If a protocol uses N bits to define an address, the address space is 2N. IPv4 uses 32-bit addresses, which means that the address space is 232 or 4,294,967,296 (more than 4 billion). 1 Billion = 100 Crore This means that, theoretically, if there were no restrictions, more than 4 billion devices could be connected to the Internet. The actual number is much less because of the restrictions imposed on the addresses. 6

There are two prevalent notations to show an IPv4 address: Network Layer Address Notation: There are two prevalent notations to show an IPv4 address: Binary notation Dotted decimal notation Binary Notation: In binary notation, the IPv4 address is displayed as 32 bits. Each octet is often referred to as a byte. So it is common to hear an IPv4 address referred to as a 32-bit address or a 4-byte address. Example of an IPv4 address in binary notation: 01110101 10010101 00011101 00000010 7

0255 . 0255 . 0255 . 0255 Network Layer Address Notation: Dotted-Decimal Notation: To make the IPv4 address more compact and easier to read, Internet addresses are usually written in decimal form with a decimal point (dot) separating the bytes. The following is the dotted decimal notation of the above address: 117.149.29.2 Each byte (octet) is 8 bits, each number in dotted-decimal notation is a value ranging from 0 to 255. 0255 . 0255 . 0255 . 0255 8

Network Layer Address Notation: 9

Network Layer Address Notation: Example: Solution: Find the error, if any, in the following IPv4 addresses. 111.56.045.78 221.34.7.8.20 75.45.301.14 11100010.23.14.67 Solution: There must be no leading zero (045). There can be no more than four numbers in an IPv4 address. Each number needs to be less than or equal to 255 (301 is outside this range). A mixture of binary notation and dotted-decimal notation is not allowed. 10

Network Layer Classful Addressing: IPv4 addressing, at its inception, used the concept of classes. This architecture is called classful addressing. The address space is divided into five classes: A, B, C, D, and E. Each class occupies some part of the address space. We can find the class of an address when given the address in binary notation or dotted-decimal notation. If the address is given in binary notation, the first few bits can immediately tell us the class of the address. If the address is given in decimal-dotted notation, the first byte defines the class. 11

Finding the class in binary notation Network Layer Classful Addressing Finding the class in binary notation 12

128 + 64 + 32 + 16 + 16 Network Layer Classful Addressing Finding the class in dotted decimal notation 128 + 64 + 32 + 16 + 16 13

Find the class of each address: Network Layer Classful Addressing Finding the class in dotted decimal notation Example: Find the class of each address: a. 227.12.14.87 b. 252.5.15.111 c. 134.11.78.56 Solution: a. The first byte is 227 (between 224 and 239); the class is D. b. The first byte is 252 (between 240 and 255); the class is E. c. The first byte is 134 (between 128 and 191); the class is B. 14

Find the class of each address. a. 00000001 00001011 00001011 11101111 Network Layer Classful Addressing Finding the class Example: Find the class of each address. a. 00000001 00001011 00001011 11101111 b. 11000001 10000011 00011011 11111111 c. 14.23.120.8 d. 252.5.15.111 Solution: a. The first bit is 0. This is a class A address. b. First 2 bits are 1. Third bit is 0. This is a class C address. c. First byte is 14 (between 0 and 127); the class is A. d. First byte is 252 (between 240 and 255); the class is E. 15

27 224 214 216 221 28 Network Layer Classes and Blocks: Classful Addressing Classes and Blocks: Each class is divided into a fixed number of blocks (Networks). Each block has a fixed size. 27 214 221 224 216 28 = 16

Network Layer Classful Addressing Classes and Blocks Class A addresses were designed for large organizations with a large number of attached hosts or routers. Class B addresses were designed for midsize organizations with tens of thousands of attached hosts or routers. Class C addresses were designed for small organizations with a small number of attached hosts or routers. We can see the flaw in this design. A block in class A address is too large for almost any organization. This means most of the addresses in class A were wasted and were not used. A block in class B is also very large, probably too large for many of the organizations that received a class B block. A block in class C is probably too small for many organizations. Class D addresses were designed for multicasting. Each address in this class is used to define one group of hosts on the Internet. The Internet authorities wrongly predicted a need for 268,435,456 groups. This never happened and many addresses were wasted here too. And lastly, the class E addresses were reserved for future use; only a few were used, resulting in another waste of addresses. 17

Network Layer Netid and Hostid Classful Addressing An IP address in class A, B, or C is divided into netid and hostid. These parts are of varying lengths, depending on the class of the address. Figure below shows some netid and hostid bytes. The netid is in white, the hostid is in color. Note that the concept does not apply to classes D and E. In class A, one byte defines the netid and three bytes define the hostid. In class B, two bytes define the netid and two bytes define the hostid. In class C, three bytes define the netid and one byte defines the hostid. 18

Network Layer Classful Addressing Netid and Hostid 19

Network Layer Classful Addressing Blocks in class A 20

Network Layer Classful Addressing Blocks in class B 21

Network Layer Classful Addressing Blocks in class C 22

Network Layer Classful Addressing In classful addressing, network address is the one that is assigned to the organization. Network Address 23

Given the address 23.56.7.91, find the network address. Network Layer Classful Addressing Network Address Example: Given the address 23.56.7.91, find the network address. Solution: The class is A. Only the first byte defines the netid. We can find the network address by replacing the hostid bytes (56.7.91) with 0s. Therefore, the network address is 23.0.0.0. 24

Given the address 132.6.17.85, find the network address. Network Layer Classful Addressing Network Address Example: Given the address 132.6.17.85, find the network address. Solution: The class is B. The first 2 bytes defines the netid. We can find the network address by replacing the hostid bytes (17.85) with 0s. Therefore, the network address is 132.6.0.0. 25

Given the network address 17.0.0.0, find the class. Network Layer Classful Addressing Network Address Example: Given the network address 17.0.0.0, find the class. Solution: The class is A because the netid is only 1 byte. A network address is different from a netid. A network address has both netid and hostid, with all 0s for the hostid. 26

Network Layer Mask Classful Addressing Although the length of the netid and hostid (in bits) is predetermined in classful addressing, we can also use a mask (also called the default mask), a 32-bit number made of contiguous 1s followed by contiguous 0s. The masks for classes A, B, and C are shown in table below. The concept does not apply to classes D and E. Class In Binary In Dotted-Decimal Using Slash A 11111111 00000000 00000000 00000000 255.0.0.0 /8 B 11111111 11111111 00000000 00000000 255.255.0.0 /16 C 11111111 111111111 11111111 00000000 255.255.255.0 /24 The mask can help us to find the netid and the hostid. For example, the mask for a class A address has eight 1s, which means the first 8 bits of any address in class A define the netid; the next 24 bits define the hostid. 27

It retains the netid of the block and sets the hostid to 0s. Network Layer Classful Addressing Mask The network address can be found by applying the default mask to any address in the block (including itself). It retains the netid of the block and sets the hostid to 0s. 28

Network Layer Mask Example: Solution Classful Addressing A router outside the organization receives a packet with destination address 190.240.7.91. Show how it finds the network address to route the packet. Solution The router follows three steps: Router looks at first byte of the address to find class. It is class B. The default mask for class B is 255.255.0.0. The router ANDs this mask with the address to get 190.240.0.0. The router looks in its routing table to find out how to route the packet to this destination. 29

Network Layer Classful Addressing Subnetting: During the era of classful addressing, subnetting was introduced. If an organization was granted a large block in class A or B, it could divide the addresses into several contiguous groups and assign each group to smaller networks (called subnets). Subnetting increases the number of 1s in the mask (will see later). 30

Network Layer Classful Addressing Supernetting: Class A and class B addresses much wastage There was still a huge demand for midsize blocks. The size of a class C block with a maximum number of 256 addresses did not satisfy the needs of most organizations. Even a midsize organization needed more addresses. One solution was supernetting. In supernetting, an organization can combine several class C blocks to create a larger range of addresses. Several networks are combined to create a supernetwork or a supemet. An organization can apply for a set of class C blocks instead of just one. For example, an organization that needs 1000 addresses can be granted four contiguous class C blocks. The organization can then use these addresses to create one supernetwork. Supernetting decreases the number of 1s in the mask. For example, if an organization is given four class C addresses, the mask changes from /24 to /22. 31