IP Addresses McGraw-Hill The McGraw-Hill Companies, Inc., 2000

Similar documents
Network Layer/IP Protocols

Figure 11 Two-level addressing in classful addressing

Computer Networks Lecture -5- IPv4 Addresses. Dr. Abbas Abdulazeez

5.7 K E Y TE R M S 5.8 SUM M A R Y

McGraw-Hill The McGraw-Hill Companies, Inc., 2000

The identifier used in the IP layer of the TCP/IP protocol suite to identify each device connected to the Internet is called the Internet address or

Lecture 8 Network Layer: Logical addressing

Subnetting/Supernetting and Classless Addressing

Objectives. Note: An IP address is a 32-bit address. The IP addresses are unique. The address space of IPv4 is 2 32 or 4,294,967,296.

LECTURE -4 IP ADDRESSES. IP Addresses: Classful Addressing

Network Layer: Logical Addressing

Chapter 06 IP Address

Chapter 5. Subnetting/Supernetting and Classless Addressing

Communication at the network layer is host-to-host Length of address. Total number of addresses used by the protocol. IPv4 & IPv6

NETWORK LAYER: IP Addressing

Subnetting and Classless Addressing

Internet Fundamentals

Subnetting/Supernetting and Classless Addressing

Chapter 19 Network Layer: Logical Addressing 19.1

Network Layer: Logical Addressing

IP Addressing and Subnetting

Internet Addresses (You should read Chapter 4 in Forouzan)

Subnetting And Supernetting

TSIN02 - Internetworking

Computer Networks and Data Systems

VLSM and CIDR. Routing Protocols and Concepts Chapter 6. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1

TDC 563 Protocols and Techniques for Data Networks

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

Computer Networks and Data Systems

Chapter 18 and 22. IPv4 Address. Data Communications and Networking

Network+ Guide to Networks

Chapter 18. Introduction to Network Layer

Data Communication & Computer Networks Week # 13

Networking and IP Addressing TELECOMMUNICATIONS AND NETWORKING

EITF25 Internet Techniques and Applications L7: Internet. Stefan Höst

Network Layer: outline

CC231 Introduction to Networks Dr. Ayman A. Abdel-Hamid. Internet Protocol Suite

IP Addresses. IP Addresses

Full file at

Top-Down Network Design

Basics of communication. Grundlagen der Rechnernetze Introduction 31

Module 4. Planning the Addressing Structure

Network Layer: Logical Addressing

CCE1030 Computer Networking

R (2) Write a program to demonstrate Subneting & find the Subnet Mask.

Network Layer: Logical Addressing

Lab 8 (IP Addressing)

Subnetting. This Hour. Subnetting. Hour 5

IP Addressing and Subnetting NETWORK INFRASTRUCTURES NETKIT - LECTURE 2 MANUEL CAMPO, MARCO SPAZIANI

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061. Lecture 2. Internetworking IPv4, IPv6

Configuring IPv4 Addresses

Subnet Design and IP Addressing

Network Technology 1 4th - Subnet.! Mario Lombardo -

Chapter 19 Network Layer: Logical Addressing 19.1

The Internet Protocol. IP Addresses Address Resolution Protocol: IP datagram format and forwarding: IP fragmentation and reassembly

IP Addressing - Subnetting

Addressing & Subnetting

IP Addressing. Introductory material. An entire module devoted to IP addresses. Pedro Brandão (PhD) University of Évora

5. Providing a narrower address space is the primary design goal for IPv6.

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 10: IP Routing and Addressing Extensions

IP Addressing Week 6. Module : Computer Networks Lecturer: Lucy White Office : 324

CENG393 Computer Networks Labwork 2

Manipal Institute of Technology

6.6 Subnetting and Variable Length Subnet Masks (VLSMs)

IP addresses and Subnetting

Lecture 10: Addressing

OSI Data Link & Network Layer

Lecture 12: Addressing. CSE 123: Computer Networks Alex C. Snoeren

OSI Data Link & Network Layer

x.x.x :: Notes: 128 binary bits

Note: This case study utilizes Packet Tracer. Please see the Chapter 4 Packet Tracer file located in Supplemental Materials.

INTRODUCTION OF IPV6. Ravikumar Naik 21/11/2011

IP Address Assignment

LOGICAL ADDRESSING. Faisal Karim Shaikh.

Internet Protocol Addressing and Routing. Redes TCP/IP

IP: Addressing, ARP, Routing

Integrated Services. Integrated Services. RSVP Resource reservation Protocol. Expedited Forwarding. Assured Forwarding.

Table of Contents Chapter 1 IP Addressing Configuration

Chapter 6 Addressing the Network- IPv4

SPLITTING IPV4 NETWORKS INTO SUBNETS (CLASS, CIDR, VLSM)

OSI Data Link & Network Layer

Lecture 1: Introduction

This talk will cover the basics of IP addressing and subnetting. Topics covered will include:

Chapter 8: Subnetting IP networks. Introduction to Networks v5.1

IP Addressing: IPv4 Addressing Configuration Guide, Cisco IOS Release 15S

FIGURE 3. Two-Level Internet Address Structure. FIGURE 4. Principle Classful IP Address Formats

IP - The Internet Protocol

Tutorial 9. SOLUTION Since the number of supported interfaces is different for each subnet, this is a Variable- Length Subnet Masking (VLSM) problem.

Chapter 4: VLSM and Classless Inter Domain Routing. ITE PC v4.0 Chapter Cisco Systems, Inc. All rights reserved.

Chapter Motivation For Internetworking

IP Addressing: IPv4 Addressing Configuration Guide, Cisco IOS Release 12.4

Binary Octet to Decimal Format Conversion

1 Connectionless Routing

Chapter 7: IP Addressing CCENT Routing and Switching Introduction to Networks v6.0

Chapter 4 Network Layer

Hostname and IP Address

Network+ Guide to Networks 5 th Edition. Chapter 10 In-Depth TCP/IP Networking

Chapter 8: Subnetting IP Networks CCENT Routing and Switching Introduction to Networks v6.0

Lab Calculating IPv4 Subnets

Communication and Networks. Problems

Transcription:

IP Addresses

The IP addresses are unique. An IPv4 address is a 32-bit address. An IPv6 address is a 128-bit address.

The address space of IPv4 is 2 32 or 4,294,967,296. The address space of IPv6 is 2 128

IPv4 Notations: 1. Binary Notation 2. Dotted Decimal Notation 3. HexaDecimal Notation

Binary Notation 01110101 10010101 00011101 11101010

Dotted-decimal notation

Hexadecimal Notation 0111 0101 1001 0101 0001 1101 1110 1010 75 95 1D EA 0x75951DEA

In classful addressing, the address space is divided into five classes: A, B, C, D, and E.

Finding the class in binary notation

Finding the address class

Finding the class in decimal notation

Netid and hostid

Unicast, Multicast, and Broadcast Addresses Unicast communication is one-to-one. Multicast communication is one-to-many. Broadcast communication is one-to-all.

Blocks in class A

Blocks in class B

Blocks in class C

Class D addresses are used for multicasting; there is only one block in this class.

Class E addresses are reserved for special purposes; most of the block is wasted.

Class Range Total # of Networks (blocks) N1 A 0.0.0.0 to 127.255.255.255 Netid : 1 Byte Hostid : 3 Byte B C D 128.0.0.0 to 191.255.255.255 Netid : 2 Byte Hostid : 2 Byte 192.0.0.0 to 223.255.255.255 Netid : 3 Byte Hostid : 1 Byte 224.0.0.0 to 239.255.255.255 Multicast address (Leftmost bit =0 from 1 byte (8-1 = 7)) 2 7 = 128 blocks (Leftmost two bit =10 from 2 byte (16-2 =14)) 2 14 = 16,384 blocks (Leftmost three bit =110 from 3 byte (24-3 =21)) 2 21 = 2,097,152 blocks (Leftmost Four bit =1110) = 1 block Host Address per Network N2 256 * 256 * 256 = 16,777,216 256 * 256 = 65,536 Total # of Address in each class N1*N2 2,147,483,648 1,073,741,824 256 536,870,912 2 28 = 268,435,456 268,435,456 E 240.0.0.0 to (Leftmost four bit = 1111) 2 28 268,435,456 255.255.255.255 =1 block = 268,435,456 Reserved for future use Total 2,113,666 2 32 =4,294,967,296

Network Addresses The network address is the first address in the block. The network address defines the network to the rest of the Internet. Given the network address, we can find the class of the address, the block, and the range of the addresses in the block

In classful addressing, the network address (the first address in the block) is the one that is assigned to the organization. Network address is not allocated to any physical device.

Given the network address 17.0.0.0, find the class, the block, and the range of the addresses. Solution The class is A because the first byte is between 0 and 127. The block has a netid of 17. The addresses range from 17.0.0.0 to 17.255.255.255.

Given the network address 220.34.76.0, find the class, the block, and the range of the addresses. Solution The class is C because the first byte is between 192 and 223. The block has a netid of 220.34.76. The addresses range from 220.34.76.0 to 220.34.76.255.

Mask A mask is a 32-bit binary number that gives the first address in the block (the network address) when bitwise ANDed with an address in the block.

Masking concept

The network address is the beginning address of each block. It can be found by applying the default mask to any of the addresses in the block (including itself). It retains the netid of the block and sets the hostid to zero. Class Network Mask / Default Mask A 255.0.0.0 B 255.255.0.0 C 255.255.255.0

Given the address 201.180.56.5 and the class C default mask, find the beginning address (network address). Solution The default mask is 255.255.255.0, which means that the first 3 bytes are preserved and the last byte is set to 0. The network address is 201.180.56.0.

Network addresses

Private Addresses A number of blocks in each class are assigned for private use. They are not recognized globally. These blocks are depicted in Table. Class Range Total# of Address A 10.0.0.0 to 10.255.255.255 256 * 256 * 256 = 16,777,216 B 172.16.0.0 to 172.31.255.255 16 * 256 * 256 = 1,048,576 B 169.254.0.0 to 169.254.255.255 256 * 256 =65,536 C 192.168.0.0 to 192.168.255.255 256*256 = 65,536

Three-level Addressing : Subnetting TWO-LEVEL HIERARCHY NETWORK HOST NUMBER THREE-LEVEL HIERARCHY NETWORK SUBNET HOST NUMBER

A network with three levels of hierarchy (subnetted)

Default mask and subnet mask

Example What is the subnetwork address if the destination address is 200.45.34.56 and the subnet mask is 255.255.240.0?

Solution 11001000 00101101 00100010 00111000 11111111 11111111 11110000 00000000 11001000 00101101 00100000 00000000 The subnetwork address is 200.45.32.0.

The number of subnets must be a power of 2.

Example A company is granted the site address 201.70.64.0 (class C). The company needs six subnets. Design the subnets. Solution The number of 1s in the default mask is 24 (class C).

Solution (Continued) The company needs six subnets. This number 6 is not a power of 2. The next number that is a power of 2 is 8 (2 3 ). We need 3 more 1s in the subnet mask. The total number of 1s in the subnet mask is 27 bits (24 + 3). The total number of 0s is 5 (32-27). The mask is

Solution (Continued) 11111111 11111111 11111111 11100000 or 255.255.255.224 The number of subnets is 8. The number of addresses in each subnet is 2 5 (5 is the number of 0s) or 32.

Subnetwork Subnetid (3 bits) Hostid (5 bits) Range 1 000 00000 to 11111 201.70.64.0 201.70.64.31 2 001 00000 to 11111 201.70.64.32 201.70.64.63 3 010 00000 to 11111 201.70.64.64 201.70.64.95 4 011 00000 to 11111 201.70.64.96 201.70.64.127 5 100 00000 to 11111 201.70.64.128 201.70.64.159 6 101 00000 to 11111 201.70.64.160 201.70.64.191 7 110 00000 to 11111 201.70.64.192 201.70.64.223 8 111 00000 to 11111 201.70.64.224 201.70.64.255

Example

Supernetting Supernetting combines multiple network addresses into a single network address In supernetting, bits from the network ID are borrowed to be used as the host ID. Supernetting decreases the number of networks an organization can have, but increases the number of hosts that can be on each network.

Comparison of subnet, default, and supernet masks

A supernetwork

Special Addresses Class Address Network Address Subnet work address Direct Broadcast Address E 255.255.255.255 Limited Broadcast Address B Loop Back Address 127.0.0.0 to 127.255.255.255 A 0.0.0.0 All Zero Address Purpose First address in block First address in a sub network Last address in block. used to send packet to all hosts in a specific network. Host used this address as a destination address, to send message to every other host machine. Loopbacks are used for testing. An IP loopback is application-level testing. Allows the node to send test packet to itself without generating network traffic. Reserved for communication when host needs to send an IPv4 packet but it does not know its own address. Used during bootstrap time.

Classless Addressing In classless addressing, the prefix defines the network and the suffix defines the host. The prefix length in classless addressing can be 1 to 32. There is only one condition on the number of addresses in a block; it must be a power of 2 (2, 4, 8,...).

Variable-length blocks

Slash notation

Slash notation is also called CIDR (Class less Inter Domain Routing) notation.

Example A small organization is given a block with the beginning address and the prefix length 205.16.37.24/29 (in slash notation). What is the range of the block? Solution The beginning address is 205.16.37.24. To find the last address we keep the first 29 bits and change the last 3 bits to 1s. Beginning:11001111 00010000 00100101 00011000 Ending : 11001111 00010000 00100101 00011111 There are only 8 addresses in this block.

length of the suffix is 32-29 or 3. So there are 2 3 = 8 addresses in this block. If the first address is 205.16.37.24, the last address is 205.16.37.31 (24 + 7 = 31).

A block in classes A, B, and C can easily be represented in slash notation as A.B.C.D/ n where n is either 8 (class A), 16 (class B), or 24 (class C).

Example What is the network address if one of the addresses is 167.199.170.82/27? Solution The prefix length is 27. we must keep the first 27 bits as is and change the remaining bits (32-27 = 5) to 0s. The last byte is 01010010. Changing the last 5 bits to 0s, we get 01000000 or 64. The network address is 167.199.170.64/27.

Prefix Length

Two Level Addressing In Class less addressing, the prefix defines the network and suffix defines host. Prefix = n bits suffix = 32 n bits Network Mask = First n bits set to 1s and rest of the bits set to 0s.

The number of addresses in the block = N = 2 32 n, n is prefix length First Address =(any address) AND (network mask) Last Address = keep n bits(prefix bits) as it is and set 32-n bits to 1s.

Example One of the addresses in a block is 110.23.120.24/20. Find the number of addresses, the first address and the last address in the block. Solution The prefix length is 20. Network Mask = 255.255.240.0 Number of address = 2 32-20 = 2 10 = 4096 First Address = 110.23.112.0/20 Last Address = 110.23.127.255/20

In classless addressing, the last address in the block does not necessarily end in 255.

Subnetting Three level hierarchy can be created using sub netting. Number of addresses in each sub network should be a power of 2.

Example An organization is granted the block 130.34.12.64/26. The organization needs to have four subnets. What are the subnet addresses and the range of addresses for each subnet? Solution The suffix length is 6 (32-26= 6). Total number of addresses in the block is 64 (2 6 ). 4 subnet require = 2 bits from suffix.

130.34.12.64/26 10000010 00100010 00001100 0100 0000 The subnet prefix is then /28. Subnet Last byte range 1 0100 0000 to 0100 1111 2 0101 0000 to 0101 1111 3 0110 0000 to 0110 1111 4 0111 0000 to 0111 1111 130.34.12.64/28 130.34.12.79/28 130.34.12.80/28 130.34.12.95/28 130.34.12.96/28 130.34.12.111/28 130.34.12.112/28 130.34.12.127/28

Example

Example The address of a class B host is to be split into subnets with a 6-bit subnet number. What is the maximum number of subnets and the maximum number of hosts in each subnet? (GATE 2007) (A)62 subnets and 262142 hosts. (B) 64 subnets and 262142 hosts. (C) 62 subnets and 1022 hosts. (D) 64 subnets and 1024 hosts.

Example The subnet mask for a particular network is 255.255.31.0. Which of the following pairs of IP addresses could belong to this network? (GATE 2003) (A)172.57.88.62 and 172.56.87.233 (B) 10.35.28.2 and 10.35.29.4 (C) 191.203.31.87 and 191.234.31.88 (D) 128.8.129.43 and 128.8.161.55

Example GATE 2008 If a class B network on the Internet has a subnet mask of 255.255.248.0, what is the maximum number of hosts per subnet? (A)1022 (B) 1023 (C) 2046 (D) 2047 GATE 2012

Example Suppose computers A and B have IP addresses 10.105.1.113 and 10.105.1.91 respectively and they both use the same net mask N. Which of the values of N given below should not be used if A and B should belong to the same network? (GATE 2010) (A)255.255.255.0 (B) 255.255.255.128 (C) 255.255.255.192 (D) 255.255.255.224

NAT: Network Address Translation It provides mapping between the private and universal (public/live/global) addresses. It allows to use a set of private addresses for internal communication and set of global internet addresses for communication with the rest of the world.

NAT :