Internet Protocol Address

Similar documents
RARP: Reverse Address Resolution Protocol

ICS 351: Today's plan

Internetworking and IP Address

03 Internet Addressing

Internet Protocols. Addressing & Services. Updated:

Internetworking and Internet-1. Global Addresses

Efficient Addressing. Outline. Addressing Subnetting Supernetting CS 640 1

Guide to TCP/IP, Third Edition. Chapter 2: IP Addressing and Related Topics

Computer Networks. Lecture 3: IP Protocol. Marcin Bieńkowski. Institute of Computer Science University of Wrocław

Tutorial (03) IP addresses & Sub netting

Address Resolution Protocol (ARP), Reverse ARP, Internet Protocol (IP)

CE363 Data Communications & Networking. Chapter 6 Network Layer: Logical Addressing

Internet Addresses (You should read Chapter 4 in Forouzan)

Computer Network Foundation. Chun-Jen (James) Chung. Arizona State University

IP Addressing A Simplified Tutorial

Classful IP Addressing (cont.)

IP Addressing Introductory material.

How To Make A Network Address Prefix Smaller

Advanced IP Addressing

Chapter 19 Network Layer: Logical Addressing 19.1

CS 348: Computer Networks. - IP addressing; 21 st Aug Instructor: Sridhar Iyer IIT Bombay

Variable length subnetting

APPENDIX B. Routers route based on the network number. The router that delivers the data packet to the correct destination host uses the host ID.

Networking Test 4 Study Guide

Internet Working 5 th lecture. Chair of Communication Systems Department of Applied Sciences University of Freiburg 2004

Introduction to LAN/WAN. Network Layer (part II)

2. What is the maximum value of each octet in an IP address? A. 28 B. 255 C. 256 D. None of the above

Network and Host Addresses , Cisco Systems, Inc. All rights reserved. INTRO v1.0a 6-4

Computer Networks. Introduc)on to Naming, Addressing, and Rou)ng. Week 09. College of Information Science and Engineering Ritsumeikan University

IP Addressing. IP Addresses. Introductory material.

PART IV. Network Layer

CCNA Tutorial Series SUBNETTING

WHITE PAPER. Understanding IP Addressing: Everything You Ever Wanted To Know

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

IP Addressing. -Internetworking (with TCP/IP) -Classful addressing -Subnetting and Supernetting -Classless addressing

TCP/IP Basis. OSI Model

Lab#2: IP Addressing and Subnetting

Future Internet Technologies

TCP/IP works on 3 types of services (cont.): TCP/IP protocols are divided into three categories:

Lecture 15. IP address space managed by Internet Assigned Numbers Authority (IANA)

Desirable Properties Of An Internet Addressing Scheme

Guide to TCP/IP, Third Edition. Chapter 3: Data Link and Network Layer TCP/IP Protocols

Network-Oriented Software Development. Course: CSc4360/CSc6360 Instructor: Dr. Beyah Sessions: M-W, 3:00 4:40pm Lecture 2

1. How many unique network IDs are there in class A addresses? # of unique hosts?

One of the most important topics in any discussion of TCP/IP is IP. IP Addressing

Lecture Computer Networks


- IPv4 Addressing and Subnetting -

Networking Basics for Automation Engineers

IP addressing. Interface: Connection between host, router and physical link. IP address: 32-bit identifier for host, router interface

8.2 The Internet Protocol

Scaling the Network: Subnetting and Other Protocols. Networking CS 3470, Section 1

Chapter 5. IPv4 Addresses. TCP/IP Protocol Suite 1 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

1 Data information is sent onto the network cable using which of the following? A Communication protocol B Data packet

IP Subnetting. Subnetting

IP Address Structure

256 4 = 4,294,967,296 ten billion = 18,446,744,073,709,551,616 ten quintillion. IP Addressing. IPv4 Address Classes

Computer Networks By Bahaa Q. Al-Mussawi Subnetting Basics Reduced network traffic Optimized network performance Simplified management

Unix System Administration

Lab IP Addressing Overview

Savera Tanwir. Internet Protocol

Introduction to IP v6

Transport and Network Layer

Dynamic Host Configuration Protocol (DHCP) 02 NAT and DHCP Tópicos Avançados de Redes

Neighbour Discovery in IPv6

SUPPORT DE COURS. Dr. Omari Mohammed Maître de Conférences Classe A Université d Adrar Courriel : omarinmt@gmail.com

How to Create Subnets To create subnetworks, you take bits from the host portion of the IP address and reserve them to define the subnet address.

Chapter 3: Review of Important Networking Concepts. Magda El Zarki Dept. of CS UC Irvine

5. Classless and Subnet Address Extensions 최 양 희 서울대학교 컴퓨터공학부

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

TCP/IP Networking Terms you ll need to understand: Techniques you ll need to master:

Internet Control Protocols Reading: Chapter 3

IPv4 Addressing Simplified. by Ken Foster B.S. IT Information; Security and Forensics Kaplan University January 23, 2011

04 Internet Protocol (IP)

SFWR 4C03: Computer Networks & Computer Security Jan 3-7, Lecturer: Kartik Krishnan Lecture 1-3

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

IP address format: Dotted decimal notation:

This tutorial will help you in understanding IPv4 and its associated terminologies along with appropriate references and examples.

IP Addressing and Subnetting. 2002, Cisco Systems, Inc. All rights reserved.

Network Layer, Part 1 Internet Architecture. History

IP Subnetting and Addressing

Introduction. Internet Address Depletion and CIDR. Introduction. Introduction

VLSM & IP ADDRESSING EXAMPLE QUESTIONS with answers;

Introduction to Network Operating Systems

Network Security TCP/IP Refresher

Type of addressing in IPv4

How To Manage Address Management In Ip Networks (Netware)

Interconnection of Heterogeneous Networks. Internetworking. Service model. Addressing Address mapping Automatic host configuration

The IP Transmission Process. V1.4: Geoff Bennett

IP Networking Part 3- IP Address Management A webinar to help you prepare for the CBNE Certification

Internet Protocol version 4 Part I

You can probably work with decimal. binary numbers needed by the. Working with binary numbers is time- consuming & error-prone.

TCP/IP Addressing and Subnetting. an excerpt from: A Technical Introduction to TCP/IP Internals. Presentation Copyright 1995 TGV Software, Inc.

Communications and Networking

Internetworking. Problem: There is more than one network (heterogeneity & scale)

Transcription:

SFWR 4C03: Computer Networks & Computer Security Jan 17-21, 2005 Lecturer: Kartik Krishnan Lecture 7-9 Internet Protocol Address Addressing is a critical component of the internet abstraction. To give the appearance of a single, uniform system, all host computers must use an uniform addressing scheme. Unfortunately, physical network addresses (discussed in the previous lecture) do not suffice because an internet can include multiple network technologies, each with its own address format. Thus, the addresses used by two technologies may be incompatible because they are of different sizes or have different formats. Each host on the internet is assigned a unique 32 bit internet address (IP address) that is used in all communication with that host. An IP address does not identify a specific computer. Instead, each IP address identifies a connection between the computer and a network. A computer with multiple network connections, e.g., a router must be assigned one IP address for each connection. Users, application programs, and the higher layers of the protocol software (TCP,IP) use IP addresses to communicate. On the other hand physical addresses are used by the lower layers of the protocol software such as the network interface layer. Conceptually, each 32 bit IP address is divided into two parts: a prefix and a suffix. This two level hierarchy is designed to make routing efficient. The address prefix is some sort of network id, and it identifies the physical network to which the computer is attached, while the suffix (host id) identifies an individual computer on that network. Each physical network in the internet is assigned a unique prefix and each computer on a given physical network is assigned a unique address suffix. Routing through the internet is based on the network portion of the address. Once the packet reaches the destination network, the host id is used to direct the frame to the appropriate destination machine. In a classful addressing scheme, each IP address is said to be self-identifying because the boundary between prefix and suffix can be computed from the address alone, without reference to external information. In particular, the class of an address can be determined from the three higher order bits. There are five classes of 32 bit IP addresses. 1. Class A: Class A addresses start with a 0 in the first bit and use the first octet for the network address, leaving three octets for the host address. Hence, the first octet of a class A address has a value between 0 and 127 7-9-1

(i.e., binary numbers 00000000 and 01111111 respectively). network consists of (2 24 ), i.e., 16,777,216 host computers. A class A 2. Class B: Organizations that did not require such a large number of hosts could be allocated a class B address. A class B address starts with 10 in the first two bits and uses the first two octets for the network address and the last two octets for the host address. A class B address consists of 2 16, i.e., 65536 host computers. 3. Class C: Even smaller organizations could be allocated class C addresses that start with 110 in the first three bits and use the first three octets for the network address and only the last octet for the host address. Each class C network has 2 8, i.e., 256 hosts. 4. Class D: Class D addresses begin with 1110 are used for multicast traffic sent to a collection of machines. 5. Class E: Class E addresses starting with 11110 are reserved for future use. The division along octet boundaries motivated the representation of IP addresses in dotted-decimal notation, which represents each octet as a decimal number ranging from 0 to 255. There are some special address conventions: 1. An IP address consisting of 32 zeros refers to the concerned host computer. 2. An IP address with the net id of zeros refers to a particular host computer. 3. An IP address consisting of all ones is used for limited broadcast. 4. An IP address with a valid net id and a host id of all ones is intended as a directed broadcast for all the hosts on that network. 5. Finally, the address 127.0.0.1 is intended as a loopback address. This is used for testing TCP/IP and inter-process communications on the local computer. The Internet Corporation for Assigned Names and Numbers (ICANN) assigns net id s, while the local Internet Service Provider or the System Administrator on a University network typically assigns the host id s. Classless interdomain routing (CIDR) and Subnet Masks Restricting IP addresses to 32 bits imposes a major limitation in the number of hosts on the Internet. The rapid increase in the number of computers on the Internet in the 1990s led to a depletion of available address space. The original ARPANET was only designed to support a relatively small number of hosts. Allocating 32 bit addresses in three main classes seemed reasonable at that time. The version of the IP protocol with a 32 bit address space is referred to as version 4 (IPv4). The latest version of this protocol (IPv6) calls for a 128 bit address space. However, IPv6 requires significant changes throughout much of the internet. Instead, people have found alternative ways to limit the depletion of the IPv4 address space. 7-9-2

A variety of techniques have been applied to limit the explosion in the number of IP addresses. To slow the depletion of IP addresses, the Internet infrastructure evolved to support greater flexibility in the allocation of blocks of IP addresses. The restriction of having fixed address blocks was abandoned in the early 1990s with the introduction of classless interdomain routing (CIDR). CIDR allows the division between the network and host portions of the IP address to occur at any point in the 32 bit number. A CIDR network, then, is identified by a network address and a mask length that indicates how many bits are devoted to the network part of the address. As an example, consider the Art Router To ISP PC CS English EE French Main router Math Music Ethernet Physics Figure 1: campus network at McMaster University shown in figure 1. We will assume that all machines at McMaster University are assigned class B addresses (with 14 bits 7-9-3

for the network number and 16 bits for the host number). We will assume that the first two bytes in these IP addresses are 130 and 50 respectively. Let us assume that McMaster University has 35 departments in all, each with its own LAN network, constituting a subnet. So, Mac decides to take away some bits from the host number to create a subnet number for each department. It uses a 6 bit subnet number and a 10 bit host number, allowing for up to 64 Ethernets, each with a maximum of 1022 hosts (all zeros and all ones are not available, as mentioned earlier!). To implement subnetting, the main router on campus needs a subnet mask that indicates the split between network + subnet number and host, as shown in figure 2. The subnet mask can also be represented in dotted decimal notation as 255.255.252.0. An alternative notation is /22 to indicate that the subnet mask is 22 bits long. Outside the network, the subnetting is 32 Bits Subnet mask 10 Network Subnet Host 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 Figure 2: 7-9-4

not visible, so allocating a new subnet does not require contacting ICANN or changing any external databases. In this example, the first subnet might use IP addresses starting at 130.50.4.1; the second subnet might start at 130.50.8.1; the third subnet might start at 130.50.12.1; can you explain why?. Address Resolution Protocol Although each machine has one or more IP addresses, these cannot be used for sending frames because the network interface layer does not understand IP addresses. Mapping between a protocol (IP) address and a hardware (Ethernet) addresses is called address resolution. A host or router uses address resolution when it needs to send to another computer on the same physical address, and also knows the destination computer s IP address. There are three types of address resolution algorithms. 1. Table lookup: Address bindings are stored in a table in memory which the software searches when it needs to resolve an address. 2. Closed-form computation: The protocol address assigned to a computer is carefully chosen so that the computer s hardware address can be computed from the protocol address using basic Boolean and arithmetic operations. 3. Message exchange: Computers exchange messages across the network to resolve an address. The last approach is generally implemented on Ethernet networks and utilizes its broadcast capability. To guarantee that all computers agree on the exact format and meaning of messages used to resolve addresses, the TCP/IP protocol suite includes an Address Resolution Protocol (ARP). There are two ARP message types: a request and a response. The request message contains an IP address and requests the corresponding hardware address. This message is broadcast, i.e., all computers on the network receive this message. The network interface card on each machine passes on this message to its IP layer; the IP layer of the intended recipient sends out a reply (only to the sender) and the reply contains both the IP address sent in the request and the hardware address. Essential to the efficient operation of ARP is the maintenance of an ARP cache on each host. The cache maintains the recent mappings from Internet addresses to hardware addresses. The normal expiration time of an entry is 20 minutes from the moment the entry was created. A host computer normally examines its ARP cache, and if unable to find the binding sends out an ARP request. Since the ARP request is broadcast, and the sending machine includes both its IP and hardware addresses in the ARP frame, all hosts on the machine can update their caches with the senders IP to physical address mapping too. ARP Packet format The ARP message format is contained in the data portion of an Ethernet frame. It is given in Figure 5.3 of Comer [1]. It contains the following fields: 1. Hardware Type: This is a 2 octet field that specifies the type of the hardware address employed in the physical network; it contains the value 1 for Ethernet. 7-9-5

2. Protocol Type: A 2 octet field that specifies the high level protocol employed, i.e., the type of the high level protocol address the sender has supplied. It contains (0800) 16 for IP addresses. 3. HLEN: This is a one octet field that specifies the length of the hardware address in bytes. This is 6 for Ethernet addresses. 4. PLEN: This is also a one octet field that specifies the length of the protocol address which is 4 for IP addresses. 5. Operation: This is a 2 octet field that specifies whether the operation is an ARP request (1), ARP response (2), RARP request (3), or RARP response (4). 6. Finally, the last four fields contain the sender s hardware and protocol addresses, and the target s hardware and protocol addresses. For an ARP request all the fields are filled in except the target hardware address. When a machine receives an ARP request directed to it, it fills in its hardware address, swaps the two sender addresses with the two target addresses, sets the Operation field to 2 and sends the reply. The ARP message is sent in the data portion of the hardware frame. The frame header contains the usual 6 byte Ethernet source and destination hardware addresses (for an ARP request the Ethernet destination hardware address is the 6 byte all one broadcast address). Finally, the 2 byte Frame Type is (0806) 16 for ARP requests/replies. Proxy ARP Proxy ARP lets a router answer ARP requests on one of its networks for a host on another of its networks. This fools the sender of the ARP request into thinking that the router is the destination host, when in fact the destination host is on the other side of the router. The router, here, is acting as a proxy agent for the destination host, relaying packets to it from other hosts. There is a nice discussion on proxy ARP in section 10.5 of Comer [1]. A good overview can also be found in Section 5.6.3 of Tanenbaum [3], and Section 4.6 of Stevens [2]. RARP: Reverse Address Resolution Protocol When a system with a local disk is bootstrapped it normally obtains its IP address from a configuration file that is present on the disk. But a system without a disk, such as an X terminal or a diskless workstation, needs some other way to obtain its IP address. The IP address is normally not built into the operating system of the computer. Each computer on a network has a unique hardware address, assigned by the manufacturer of the network interface. The principle of RARP is for the diskless workstation to read its unique hardware address from the interface card and send an RARP request (an RARP request broadcast in a frame over the network) asking for someone to reply with the diskless system s IP address (in a RARP reply). The format of an RARP request is identical to an ARP request discussed in the earlier sections of this lecture. The only differences are that the Frame 7-9-6

Type (in the frame header) is (8035) 16 for an RARP request or reply and the Operation field in the Ethernet data portion has the value 3 for an RARP request and 4 for an RARP reply. An RARP server attached to the physical network normally provides the mapping from a hardware address to an IP address for many hosts (the diskless systems on the network). The mapping is contained in a disk file, normally /etc/ethers on Unix systems. The reply from the server is unicast (to the sender of the RARP request). As with ARP requests, RARP requests are sent as hardware (Ethernet) level broadcasts. This means they are not forwarded by routers. Thus, the server must be present on the same physical network as the diskless workstation. To allow diskless stations to bootstrap even when the main RARP server is down, multiple RARP servers are provided on a single network. As the number of servers increases, the network traffic increases, since every server sends an RARP reply to every RARP request. The diskless system normally uses the first RARP reply that it receives. Furthermore, there is a chance that each RARP server can try to respond at about the same time, increasing the probability of collisions on an Ethernet. Remember, this is not a problem with ARP because only a single host sends an ARP reply. Suggested Readings 1. Chapter 4 of Comer [1], Chapter 3 of Stevens [2], and Section 5.6.2 of Tanenbaum [3] for a discussion of IP addresses. A discussion of Classless and Subnet Address Extensions (CIDR) appears in Chapter 10 of Comer [1]. 2. Chapter 5 of Comer [1], Chapter 4 of Stevens [2], and Section 5.6.3 of Tanenbaum [3] for a discussion of the ARP protocol. 3. Chapter 6 of Comer [1] and Chapter 5 of Stevens [2] for a discussion of the RARP protocol. References [1] D.E. Comer, Internetworking with TCP/IP: Principles, Protocols, and Architectures, 4th edition, Prentice Hall, NJ, 2000. [2] W. Richard Stevens, TCP/IP Illustrated, Volume I: The Protocols, Addison Wesly Professional Computing Series, 1994. [3] A. Tanenbaum, Computer Networks, 4th edition, Prentice Hall, NJ, 2003. 7-9-7