setting IP addresses copyright 2015 Robert Montante

Similar documents
No need to operate a DHCP server. If a server s IP address changes, clients will lose the ability to access it!

Network Layer: Logical Addressing

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

Binary Octet to Decimal Format Conversion

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

Networking and IP Addressing TELECOMMUNICATIONS AND NETWORKING

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

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

Networking Potpourri: Plug-n-Play, Next Gen

RSC Part II: Network Layer 3. IP addressing (2nd part)

Chapter 9: Subnetting IP Networks

IP Addresses. IP Addresses

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

End-to-End Communication

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

Hostname and IP Address

Top-Down Network Design

Computer Networks and Data Systems

SCALABLE INTERNET ROUTING

The trace is here:

Internet Network Protocols IPv4/ IPv6

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

TDC 563 Protocols and Techniques for Data Networks

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

Lecture 8 Network Layer: Logical addressing

Network layer: Overview. Network Layer Functions

CTS2134 Introduction to Networking. Module : Troubleshooting

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

Computer Networks and Data Systems

Addressing & Subnetting

TCP/IP Protocol Suite and IP Addressing

Addressing protocols. TELE3118 lecture notes Copyright by Tim Moors Aug-09. Copyright Aug-09, Tim Moors

IP Addressing and Subnetting

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

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

CCNA Exploration Network Fundamentals. Chapter 06 Addressing the Network IPv4

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

LAN Setup Reflection

OSI Data Link & Network Layer

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

OSI Data Link & Network Layer

IP - The Internet Protocol

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

Networking Technologies and Applications

Chapter 3 LAN Configuration

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

Network Access Layer Internet Layer Transport Layer Application Layer. Presentation. Transport. Physical

LECTURE -4 IP ADDRESSES. IP Addresses: Classful Addressing

NETWORK LAYER: IP Addressing

2/22/2008. Outline Computer Networking Lecture 9 IP Protocol. Hop-by-Hop Packet Forwarding in the Internet. Internetworking.

Chapter 18. Introduction to Network Layer

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

Module 4. Planning the Addressing Structure

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

CCE1030 Computer Networking

IPv4 addressing, NAT. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.

Computer Network Addressing. The TCP/IP Layers and Addresses. Topics. The Internet Communication. The TCP/IP Layers and Addresses IP Address

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

College of DuPage. CCNA3 V3.0 Switching Basics and Intermediate Routing: Module 1: Introduction to Classless Routing

ELEC / COMP 177 Fall 2015

IT220 Network Standards & Protocols. Unit 8: Chapter 8 The Internet Protocol (IP)

ms-help://ms.technet.2004jun.1033/win2ksrv/tnoffline/prodtechnol/win2ksrv/reskit/tcpip/part2/tcpch04.htm

Chapter 5 Network Layer

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

Guide to TCP/IP, Third Edition. Chapter 8: The Dynamic Host Configuration Protocol

LAN Setup Reflection. Ask yourself some questions: o Does your VM have the correct IP? o Are you able to ping some locations, internal and external?

OSI Data Link & Network Layer

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

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

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

Network Management. IPv6 Bootcamp. Zhiyi Huang University of Otago

Subnetting and Classless Addressing

CENG393 Computer Networks Labwork 2

Chapter 7 LAN Configuration

Internet Addresses (You should read Chapter 4 in Forouzan)

Network+ Guide to Networks, Seventh Edition Chapter 2, Solutions

Network Layer/IP Protocols

Addressing and Routing

Last time. Network layer. Introduction. Virtual circuit vs. datagram details. IP: the Internet Protocol. forwarding vs. routing

Chapter 8: Subnetting IP Networks

CS118 Discussion, Week 6. Taqi

DHCP Client. Finding Feature Information. Restrictions for the DHCP Client

Lab 8 (IP Addressing)

Internet Technology 3/23/2016

A+ Certification Guide. Chapter 16 (Part B) Networking

Troubleshooting DHCP server configuration 28

Subnetting/Supernetting and Classless Addressing

DHCP & NAT. Module : Computer Networks Lecturer : Lucy White Office : 324

Internet Fundamentals

Network Protocols - Revision

Router Architecture Overview

CS 348 Computer Networks. IP and Routing. Indian Institute of Technology, Bombay

IP Addressing, monitoring and packet analyzing

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.

Network+ Guide to Networks 5 th Edition. Chapter 4 Introduction to TCP/IP Protocols

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

Chapter 6. Variable Length Subnet Masking (VLSM) Classless Inter-Domain Routing (CIDR) CCNA2-1 Chapter 6

6 Chapter 6. Figure 1 Required Unique Addresses

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

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

Transcription:

setting IP addresses copyright 2015 Robert Montante

What IP Address to Choose? Computers connect to the Internet by way of a Local Area Network LANs have network IDs - the leftmost part of the IP address - assigned by an ISP or network administrator So this part is usually a fixed value Host IDs - the rightmost part of the IP address - are chosen by a local administrator, or generated automatically

Who Assigns Network IDs? Internet Assigned Numbers Authority (IANA) manages IP address blocks IANA assigns blocks to RIRs RIRs assign sub-blocks to specific organizations for their own use or for redistribution (ISPs do this) ISPs assign sub-blocks or individual IP addresses to customers Some IP address blocks are reserved for special uses e.g. 127.0.0.0/8 always refers back to the local host known as the loopback address

RIRs Regional Internet Registries RIRs receive blocks of IP addresses from IANA assign sub-blocks to ISPs, other organizations

IPv4 Allocation by RIR 2017 All unreserved blocks have been allocated

(What is a Hilbert curve?) These are Hilbert curves of increasing degree... They tend to keep numbers "close" to their neighbors Used for IPv4 "/8" address blocks

IPv4 Allocation by RIR 2013 Black squares: legacy allocations, not controlled by RIRs

IPv4 Allocations by Year From "ipv6now.com.au" North American usage grew in the 1990s Asia and Europe exploded around 2006-2007

Special IP addresses from RFC 6890, 2013 Address Block CIDR mask Address Range Uses - from RFC 6890 0.0.0.0 /8 10.0.0.0 /8 127.0.0.0 /8 169.254.0.0 /16 172.16.0.0 /12 192.168.0.0 /16 224.0.0.0 /4 240.0.0.0 /4 0.0.0.0-0.255.255.255 10.0.0.1-10.255.255.254 127.0.0.1-127.255.255.254 169.254.0.1-169.254.255.254 172.16.0.0-172.31.255.254 192.168.0.1-192.168.255.254 224.0.0.1-239.255.255.254 240.0.0.1-255.255.255.254 255.255.255.255 /0 255.255.255.255 Refers to "This" network (only 0.0.0.0 used) Private-use networks - not routed Loopback addresses Link Local (e.g. APIPA, used in Windows) Private-use networks - not routed Private-use networks - not routed Multicast (former class D) Reserved (former class E, "experimental") IP "universal broadcast" address (not routed or used)

Private, Non-Routed Blocks: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 IANA reserves blocks of IP addresses for local use Internet routers drop packets with addresses in these blocks Edge networks usually use subsets of 192.168.0.0/16 172.16.0.0/12 less common Intermediate-level routers (access, gateway) frequently use 10.0.0.0/8 subnets

Special Host Addresses On a Network h host bits yield 2 h different values for host addresses Unusable host-bits values: Host bits are all 0s: the IP address equals the network ID, and refers to the entire subnet Host bits are all 1s: the IP address is the subnet's broadcast address Thus, h host bits yield (2 h - 2) valid host addresses

Static Host ID Assignments Suitable for small networks No need to operate a DHCP server Necessary for server systems If a server s IP address changes, clients will lose the ability to access it! Accidentally giving two hosts the same address, or specifying an incorrect subnet mask, can isolate a host or even break the network

Setting static IP addresses Linux the "ifconfig" command can be used: > sudo ifconfig eth0 192.168.0.5 Windows the "netsh" command can be used: > netsh interface ip set address name="local Area Connection" static 192.168.0.5 GUI tools are also available

Dynamic IP Address Assignments Dynamic Host Configuration Protocol (DHCP) used to distribute IP addresses to hosts when they connect (or reconnect) to the network Based on earlier BOOTP protocol Full IP address (network ID, host ID), network mask, IP addresses of gateway router and DNS server, other configuration information can all be handed out DHCP server assigns host ID from a "pool" of available values One server can hand out different network IDs and information, based on location of requesting host

DHCP Operation Starting host broadcasts DHCP Discovery packet Local gateway forwards packet to one or more DHCP servers DHCP servers respond with DHCP Offer Offer contains IP address, subnet mask, other information Host then broadcasts DHCP Request for offered IP address Server returns DHCP lease acknowledgement Limited lease lifetime: typically weeks, days, or hours Host renews lease periodically Renewals typically occur when the lease is half over

DHCP exploration activity (preferably on a virtual client) Start wireshark Display filter: bootp Release your DHCP-assigned IP address: Linux: sudo dhclient -r Windows: ipconfig /release Obtain a new DHCP lease: Linux: sudo dhclient -4 Windows: ipconfig /renew Do you see the DHCP exchange? What are the source, destination IP addresses?

Configuring a Windows DHCP Server: Address pool Network mask (subnet mask)

example of a dhcpd.conf file (OpenBSD)

subnetting

Dividing an IP Address - Two Approaches The original approach IP classes Five network classes, determined by numeric value class A: the biggest networks; only 126 such class B: medium-size networks; 16,384 total class C: small networks; over 2 million possible class D, class E: special uses Wasteful and limiting Since 1993 Classless Internet Domain Routing (CIDR) IP addresses divided based on network mask

IP Address Classes (the old way) class A: 1.0.0.0 to 126.0.0.0 class B: 128.0.0.0 to 191.255.0.0 class C: 192.0.0.0 to 223.255.255.0 class D: 224.0.0.0 to 239.255.255.255 class E: 240.0.0.0 to 255.255.255.254

CIDR Classless Internet Domain Routing Network address blocks use as many network bits as needed remaining bits are host bits note: the fewer the network bits, the bigger the network Network masks (a.k.a. subnet masks) mark off network bits Network administrator can subdivide a network into subnets by lengthening the subnet mask

CIDR Notation Network addresses include the network mask information class A addresses are written 1.0.0.0/8.. 126.0.0.0/8 class B addresses are written 128.0.0.0/16.. 191.255.0.0/16 class C addresses are written 192.0.0.0/24.. 223.255.255.0/24 148.137.0.0 / 16 (former class B network) 148.137.59.0/24, 148.137.141.0/25, 148.137.141.128/25 these are three subnets of 148.137.0.0/16

Subnetting Start with a network block: 172.16.0.0/16 (only part of the 2 nd private address range) Decide what's needed: Do you need so-many subnets?...or do you need so-many hosts-per-subnet? Determine number of bits needed to count each subnet or each host-on-a-subnet Move leftmost bits from host ID to network ID according to subnet/hosts needs Defines corresponding subnet mask

Subnetting example Network block 172.16.0.0/16 10101100 00010000 hhhhhhhh hhhhhhhh network mask: 11111111 11111111 00000000 00000000 = 255.255.0.0 75 subnets needed so, need enough bits to count at least 75 2 7 = 128 >= 75, so 7 bits needed to count subnets Move 7 leftmost host-id bits into network ID 10101100 00010000 nnnnnnnh hhhhhhhh 9 bits left available to count hosts within a subnet New subnet mask: 11111111 11111111 11111110 00000000 = 255.255.254.0

Subnetting example subnet addresses Network ID bits: 16 (original block) + 7 (subnetting) = 23 2 7 = 128 possible subnets Subnetworks: 172.16.x.0/23 where x varies from one subnet to the next Subnet mask: 255.255.254.0 Host ID bits: 32 23 = 9 2 9 2 = 510 hosts per subnet 1 st subnet: 10101100 00010000 00000000 00000000 = 172.16.0.0/23 2 nd subnet: 10101100 00010000 00000010 00000000 = 172.16.2.0/23 3 rd subnet: 10101100 00010000 00000100 00000000 = 172.16.4.0/23 4 th subnet: 10101100 00010000 00000110 00000000 = 172.16.6.0/23 last subnet: 10101100 00010000 11111110 00000000 = 172.16.254.0/23

Subnetting example 2 Network block 172.16.0.0/16 10101100 00010000 hhhhhhhh hhhhhhhh network mask: 11111111 11111111 00000000 00000000 = 255.255.0.0 1000 hosts needed per subnet so, need enough host bits to count at least 1000 2 10 = 1024 >= 1000, so 10 bits needed to count hosts 10 rightmost host-id bits leave 6 left over for subnet IDs 10101100 00010000 nnnnnnhh hhhhhhhh New subnet mask: 11111111 11111111 11111100 00000000 = 255.255.252.0

Subnetting example 2 subnet addresses Network ID bits: 16 (original block) + 6 (subnetting) = 22 2 6 = 64 possible subnets Subnetworks: 172.16.x.0/22 where x varies from one subnet to the next Subnet mask: 255.255.252.0 1 st subnet: 10101100 00010000 00000000 00000000 = 172.16.0.0/22 2 nd subnet: 10101100 00010000 00000100 00000000 = 172.16.4.0/22 3 rd subnet: 10101100 00010000 00001000 00000000 = 172.16.8.0/22 4 th subnet: 10101100 00010000 00001100 00000000 = 172.16.12.0/22 last subnet: 10101100 00010000 11111100 00000000 = 172.16.252.0/22

another DHCP server with subnetting

done