Internet Addresses (You should read Chapter 4 in Forouzan)

Similar documents
IP Addresses 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

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

IP Addressing and Subnetting

Network Layer/IP Protocols

Chapter 06 IP Address

Networking and IP Addressing TELECOMMUNICATIONS AND NETWORKING

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

Full file at

Lecture 8 Network Layer: Logical addressing

CCNA Exploration Network Fundamentals. Chapter 06 Addressing the Network IPv4

OSI Data Link & Network Layer

TSIN02 - Internetworking

OSI Data Link & Network Layer

Computer Networks and Data Systems

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

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

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

Chapter 6 Addressing the Network- IPv4

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

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

OSI Data Link & Network Layer

IP Addressing - Subnetting

Network+ Guide to Networks

NETWORK LAYER: IP Addressing

IP: Addressing, ARP, Routing

Chapter 18. Introduction to Network Layer

TDC 563 Protocols and Techniques for Data Networks

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

IP addresses and Subnetting

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

Chapter Motivation For Internetworking

Subnetting. This Hour. Subnetting. Hour 5

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

1 Connectionless Routing

CCE1030 Computer Networking

Internet Network Protocols IPv4/ IPv6

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

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

Network Layer: Logical Addressing

IP - The Internet Protocol

Unit C - Network Addressing Objectives Purpose of an IP Address and Subnet Mask Purpose of an IP Address and Subnet Mask

Vorlesung Kommunikationsnetze

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

Lab 8 (IP Addressing)

Network Layer: Logical 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.

IP Addresses. IP Addresses

Configuring IPv4 Addresses

Computer Networks and Data Systems

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

Lecture 10: Addressing

Addressing the Network IPv4

CS 43: Computer Networks. 21: The Network Layer & IP November 7, 2018

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

Inter-networking. Problem. 3&4-Internetworking.key - September 20, LAN s are great but. We want to connect them together. ...

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

Subnet Design and IP Addressing

Linux System Administration

Binary Octet to Decimal Format Conversion

CS 356: Computer Network Architectures. Lecture 15: DHCP, NAT, and IPv6. [PD] chapter 3.2.7, 3.2.9, 4.1.3, 4.3.3

CS118 Discussion, Week 6. Taqi

TCP /IP Fundamentals Mr. Cantu

Exercise Sheet 4. Exercise 1 (Routers, Layer-3-Switches, Gateways)

TCP/IP and the OSI Model

Network layer: Overview. Network layer functions IP Routing and forwarding NAT ARP IPv6 Routing

Network layer: Overview. Network Layer Functions

6 Chapter 6. Figure 1 Required Unique Addresses

Router Architecture Overview

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia

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

CSCD 330 Network Programming Spring 2017

TSIN02 - Internetworking

Addressing and Routing

Figure 11 Two-level addressing in classful addressing

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

Networks: Communicating and Sharing Resources

Top-Down Network Design

Addressing & Subnetting

Internet Addresses Reading: Chapter 4. 2/11/14 CS125-myaddressing

Internet Fundamentals

IP Address Assignment

Network Protocols - Revision

LECTURE -4 IP ADDRESSES. IP Addresses: Classful Addressing

ECE 461 Internetworking. Problem Sheet 1

Networking Potpourri: Plug-n-Play, Next Gen

Lecture 4 The Network Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Subnetting and Classless Addressing

CSCD 330 Network Programming Spring 2018

Networking Basics. EC512 Spring /15/2015 EC512 - Prof. Thomas Skinner 1

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

ECE 158A: Lecture 7. Fall 2015

Network Layer PREPARED BY AHMED ABDEL-RAOUF

CSCI Computer Networks Fall 2016

TCP/IP. Model and Layers Bits and Number Bases IPv4 Addressing Subnetting Classless Interdomain Routing IPv6

IP Basics Unix/IP Preparation Course June 29, 2010 Pago Pago, American Samoa

Lecture 1: Introduction

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

Chapter 3 - Implement an IP Addressing Scheme and IP Services to Meet Network Requirements for a Small Branch Office

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

Transcription:

Internet Addresses (You should read Chapter 4 in Forouzan) IP Address is 32 Bits Long Conceptually the address is the pair (NETID, HOSTID) Addresses are assigned by the internet company for assignment of names and numbers ICANN ICANN: Country Code Names Supporting Organization (ccnso) Generic Name Supporting Organization (GNSO) Address Supporting Organization (ASO) Regional Internet Registries American Registry for Internet Numbers (ARIN) http://www.arin.net/registration/fee_schedule.html www.arin.net www.icann.org Reference IP Fundamentals Chapter 1 and 2 by Maufer 1

Formats for IP addresses: (classful addressing) Class A 0 Network (7 bits) Host (24 bits) Class B 10 Network (14 bits) Host (16 bits) Class C 110 Network (21 bits) Host (8 bits) Class D 1110 Multicast address (28 bits) ( There is a class E reserved for future use) Historically a class A address was assigned to networks with > 2 16 (65, 536) hosts Class B to networks with 2 8 (256) to 2 16 hosts Class C to networks with < 2 8 hosts 2

Internet Addresses Cont. For Humans easier to deal with decimal so dotted decimal notation is used. Group 8 bits.8 bits.8 bits.8 bits and use decimal numbers Example 10000000 00001010 00000010 00011110 => 128.10.2.30 Class Lowest Address Highest Address A 0.0.0.0 127.255.255.255 B 128.0.0.0 191.255.255.255 C 192. 0.0.0 223.255.255.255 D 224.0.0.0 239.255.255.255 Some addresses are reserved Example 127.0.0.0/8 is reserved for loop back *see next slide for complete list 3

Scaling Issues: 1. Eventual exhaustion of the IPV4 address space. 2. Ability to route traffic between ever increasing number of networks that comprise the internet. IP version 4 uses 32 bit address 2 32 and 6.7 billion live on earth at present 4.3 billion addresses Classless inter-domain routing (CIDR) discussed later slowed down address exhaustion. 4

IP addresses cont. Class A all 0 s network number is used to represent the default route ( 0.0.0.0) this is a routing table entry which means any destination not matching any other table entry should be sent to the default route. (more later) Class A all 1 s network number is loopback. 127.0.0.1 usually means This same machine all 127.anything.anything.anything is loopback. There are a total of 2 7-2 = 126 class A networks. There are 2 14-2 = 16, 382 class B networks (again all 0 s & all 1 s network addresses reserved) There are 2 21-2 = 2,097,150 class C networks. There are 2 28 = 268, 435, 456 class D multicast addresses. 5

Classful addressing allows using only the first 1,2,3 or 4 bits to determine the class. (I.E. if MSB = 0 => class A Notation: Class A has 8 bit network prefix this is called a slash 8 s /8 can write 127.0.0.0 as 127/8 or 127.0.0.0/8 / 8 prefixes ( class A) / 8 address block has 2 31 out of 2 32 total IP addresses => / 8 takes up 50% total IPV4 addresses / 16 prefixes ( class B) 2 30 total addresses => 25% total IPV4 addresses / 24 prefixes ( class C ) 2 29 out of 2 32 => 12.5% total IPV4 addresses Class D with 1110 most significant bits used for multicast Class E with 1111 most significant bits and are reserved for experimental use 6

In the Beginning - IP addresses assigned based on request, not need - 32 bit address was thought to be plenty - classful addresses easy to understand and implement but not efficient / 24 supports 254 hosts too small / 16 supports 65,534 too large 7

IP Routing For a host IP routing is simple: If destination is directly connected to host then IP datagram is sent directly to the destination. otherwise host sends datagram to a default router The IP layer can be configured to act as a router in addition to acting as a host A host never forwards datagrams from one of its interfaces to another, while a router forwards datagrams IP Layer has a routing table in memory that it searches each time it receives a a datagram to send Each entry in routing table contains: - Destination IP address - IP address of a next hop router or IP address of a directly connected network - Flags (specify if network or host address) - Specification of which network interface the datagram should go to for transmission 8

IP Routing Performs The Following Actions: 1. Search routing table for entry that matches complete destination IP address 2. Search table for match of destination network IP. This check must take into account a possible Subnet Mask ( Defined Later ). 3. Search for default entry. 4. If none of the above discard and send host unreachable or network unreachable error back. Note: Hop by hop nature of this process. 9

Classical Subnetting Reference IP Fundamentals Chapter 3 Before : Network - Prefix Host - Number After : Network - Prefix Subnet - Number Host - Number Extended-Network-Prefix Subnetting attacks the expanded routing table problem by making the subnet structure of a network invisible outside the organization s private network. External Internet Does Not Need To Know Internal Subnet Structure 10

Example : 172. 27. 0.0. / 16 Internet R A Subnet 1 R C Subnet 3 Subnet 4 R B Subnet 2 R D Subnet 5 Internet sees R A R B I need 5 subnets so I use 3 bits in the subnet - number field 11

This means I have Subnet Number Binary representation of least-significant two bytes Available host addresses within each subnet 0 172.27.0.0 00000000.00000000.0 -> 1-31. 254 1 172.27.32.0 00100000.00000000.32 -> 32-63.254 2 172.27.64.0 01000000.00000000.64 -> 64-95.254 3 172.27.96.0 01100000.00000000.96 -> 96-127.254 4 172.27.128.0 10000000.00000000.128 -> 128-159.254 5 172.27.160.0 10100000.00000000.160 -> 160-191.254 6 172.27.192.0 11000000.00000000.192 -> 192-223.254 7 172.27.224.0 11100000.00000000.224 -> 224-255.254 Need a method to know how many bits are used for subnet-number => subnet mask In this example the subnet mask is 255.255.224.0 11111111.11111111.11100000.00000000 12

Subnet Mask At boot time a machine gets its own IP address ( stored on disk for example ) Host also needs to be told how many bits are to be used for subnet ID and how many for host ID. This is the subnet mask. Subnet mask is 32 bit value containing one bits for the network ID and subnet ID, zero valued bits for host ID. Two examples for class B addresses: Class B 16 bits 8 bits 8 bits Net ID Subnet ID Host ID Subnet mask 11111111 11111111 11111111 00000000 = 0Xff ff ff 00 This is a /24 extended network prefix = 255.255.255.0 (Subnet masks are only occasionally written in Hexadecimal) Class B 16 bits 10 bits 6 bits Net ID Subnet ID Host ID Subnet mask 11111111 11111111 11111111 11 000000 = 0Xff ff ff C0 This is a /26 extended network prefix = 255.255.255.192 13

When a host is given its own IP address and its subnetwork mask it can then figure out: Am I class A, B, or C address? ( Look at higher order bits ) Where is the boundary between the network ID and the subnet ID? ( Defined by class definition ) Where is the boundary between the subnet ID and the host ID? ( Host ID is 0 s in mask ) 14

Subnet Addressing Hosts are required to consider the Host ID Portion of an IP address as a Subnet ID Part and a Host ID Part. Class A and class B addresses have too many bits allocated for the host ID 2 24-2 and 2 16-2 respectively (-2 address because all 0 s all 1 s for a host ID not allowed ) Example: Class B 16 Bits 8 Bits 8 Bits Net ID = 130.207 Subnet ID Host ID => 256 subnets with 254 hosts per subnet (Assuming can use all 1 s and all 0 s subnet) Subnet hides the details of an internal network from external routers so that the external Router table is smaller To reach any host whose ID address begins with 130.207 external routers only need to know the path to the Gateway router for the entire subnetwork. 15

Gateway 130.207.1.1... etc 130.207.230.0 130.207.231.0 * Aside: A host address has a non zero ID and ID s one host, a network address has a host ID of Zero and ID s all hosts on that network. If we used multiple class C addresses external routing tables need at most one entry for each of the multiple class C addresses. Subnetting reduces the size of routing tables. 16

Example: For a class B host address of 140.252.1.1 and a subnet mask of 255.255.255.0 Note we have 8 bits for subnet and 8 bits for host ID If a destination IP address is 140.252.4.5 16 bits 8 bits 8 bits Class B 140 252 1 1 Subnet mask 11111111 11111111 11111111 00000000 = 255.255.255.0 Network Subnet Class B 140 252 4 5 The network ID s are the same ( 140.252 ) the subnetwork ID s are different ( 1 and 4 ) 17

Cont If the destination IP address is 140.252.1.22 the network ID s are the same (140.252) the subnet ID s are the same (1) the host ID s are different. If the destination IP address is 192.43.235.6 ( This is a class C address ) The network ID s are different IP routing function makes comparisons like this all the time [ REF: TCP/IP Illustrated vol 1, Stevens CH 3] 18

Subnet addressing Plan 1. How many total subnets does the organization need today? 2. How many total subnets will the organization need in the future? 3. How many hosts on largest subnet today? 4 How many hosts on largest subnet in future? Example Problem: An organization has been assigned the network number 193.1.1.0/24 and it needs to define six subnets. The largest subnet is required to support 25 hosts. Answer: 6 subnets => 2 3 = 8 3 bits Use a /27 extended - network - prefix => 255.255.255.224 This leaves 5 bits to define host addresses on each subnet since all 0 s and all 1 s host addresses are reserved there are 2 5-2 = 30 assignable host addresses 19

Cont This is >= 25 specified so ok Base Net 11000001. 00000001. 00000001. 00000000 = 193. 1. 1. 0/24 Subnet # 0 11000001. 00000001. 00000001. 00000000 = 193. 1.1.0/27 # 1. 001 = 193. 1.1.32/27 # 2. 010 = 193. 1.1.64/27 # 3. 011 =.96/27 # 4. 100 =.128/27 # 5. 101 =.160/27 # 6. 110 =.192/27 # 7. 111 =.224/27 Note: All multiples of subnet #1 (the 32) 20

All 0 s and all 1 s subnets Initially all 0 s and all 1 s subnets were forbidden. This was true to eliminate the following confusion: ( in a classful router ) When 193. 1. 1. 0 is an advertised route we do not know for example if we are advertising 193.1.1. 0/24 11000001. 00000001. 00000001. 000 00000 24 bits 193.1.1. 0/27 11000001. 00000001. 00000001. 000 00000 or 27 bits Which is a subnet with 000 in the Extended-Network-Prefix - Without knowing the Prefix - Length or mask, a router cannot tell the difference in these two cases. ( Is it a route to an all 0 s subnet or is it a route to entire network? ) - Early routing protocols like RIP-1 do not supply a mask or Prefix - Length with each route - Now days, with the development of routing protocols that do carry this info you can use all 0 s and all 1 s subnet 21

All 0 s And All 1 s Host Addresses All 0 s host number is used to identify the base network ( or subnetwork ) All 1 s host number represents broadcast address for the network ( or subnetwork ) Example Possible Host Addresses For A Subnet Given subnet #2 11000001.00000001. 00000001. 01000000 = 193.1.1.64/27 Host #1 00001 = 193.1.1.65......... Host #30 11110 = 193.1.1.94 Broadcast For This Subnet is 11111 = 193.1.1.95 Aside: One can deploy network numbers from the private address space ( see RFC - 1918 ) for internal connectivity and use a network address translator ( NAT ) to provide external internet access 22