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

Chapter 2: IP Addressing and Related Topics2profs.net/steve/CISNTWK413/PPTs/ch02.pdfCISNTWK-11 IP Addressing Basics Permissions • Computers deal with network addresses as bit patterns

  • Upload
    voduong

  • View
    226

  • Download
    2

Embed Size (px)

Citation preview

Guide to TCP/IP, Third Edition

Chapter 2:pIP Addressing and Related Topics

1

CISNTWK-11PermissionsObjectives

• Understand IP addressing, anatomy and structures, and addresses from a computer’s point of viewaddresses from a computer s point of view

• Recognize and describe the various IP address classes from A to E, and explain how they’re composed and usedp y p

• Understand the nature of IP address limitations, and how techniques like Classless Inter-Domain Routing and Network Address Translation ease those limitationsNetwork Address Translation ease those limitations

2IP Addressing and Related Topics 2

CISNTWK-11PermissionsObjectives (continued)

• Define the terms subnet and supernet, and apply your knowledge of how subnets and supernets work to solveknowledge of how subnets and supernets work to solve specific network design problems

• Understand how public and private Internet addresses are p passigned, how to obtain them, and how to use them properly

• Recognize the importance and value of an IP addressing• Recognize the importance and value of an IP addressing scheme

3IP Addressing and Related Topics 3

CISNTWK-11PermissionsIP Addressing Basics

• Computers deal with network addresses as bit patterns IP h dd i h• IP uses a three-part addressing scheme– Symbolic

• Example “support.dell.com”– Logical numeric

• Example 172.16.1.10– Physical numericPhysical numeric

• Six-byte numeric address, burned into firmware (on a chip) by network interface manufacturers

4IP Addressing and Related Topics 4

CISNTWK-11PermissionsIP Addressing Basics (continued)

• Address Resolution Protocol (ARP)– Permits computers to translate numeric IP addresses to MAC layer

addressesaddresses

• ReverseARP (RARP)– Translates MAC layer addresses into numeric IP addresses

5IP Addressing and Related Topics 5

CISNTWK-11PermissionsAnatomy of an IP Address

• IP addresses D tt d d i l t ti– Dotted decimal notation

– Take the form n.n.n.n, where n is guaranteed to be between 0 and 255

– Each number is an 8-bit number called an octet– Duplication is not allowed

6IP Addressing and Related Topics 6

CISNTWK-11PermissionsIP Address Classes

• IP addressesS bdi id d i t fi l Cl A t Cl E– Subdivided into five classes: Class A to Class E

• For first three classes octets are divided as follows– Class A n. h.h.h– Class B n.n. h.h– Class C n.n.n. h

• n = network h = hostn network, h host

7IP Addressing and Related Topics 7

CISNTWK-11PermissionsIP Address Classes (continued)

• Address Classes D and E are for special usesCl D dd– Class D addresses

• Multicast communications– Class E addresses

• Reserved entirely for experimental use

8IP Addressing and Related Topics 8

CISNTWK-11PermissionsMore About Class A Addresses

• Class A addresses in binary form– 0bbbbbbb bbbbbbbb bbbbbbbb bbbbbbbb– 0bbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb– b can be 1s or 0s

• Reserved for special usesAdd i i f ll 0 d ll 1– Addresses consisting of all 0s and all 1s

• Reserved for private network use– Address for network 10 (00001010)

• Reserved for loopback testing– Address 127.n.n.n

9IP Addressing and Related Topics 9

CISNTWK-11Permissions

10IP Addressing and Related Topics 10

CISNTWK-11PermissionsMore About Class B Addresses

• Class B addresses take the following binary form10bbbbbb bbbbbbbb bbbbbbbb bbbbbbbb– 10bbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb

– b can be 1s or 0s

• 214 – 2 – Maximum number of usable network addresses

• 16,366M i b f bli IP dd– Maximum number of public IP addresses

11IP Addressing and Related Topics 11

CISNTWK-11Permissions

12IP Addressing and Related Topics 12

CISNTWK-11PermissionsMore About Class C Addresses

• Class C addresses take the following binary form110bbbbb bbbbbbbb bbbbbbbb bbbbbbbb– 110bbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb

– b can be 1s or 0s

• 221 – 2 – The maximum number of usable network addresses

• Reserved for private use256 Cl C dd f 192 168 0 0 t 192 168 255 255– 256 Class C addresses, from 192.168.0.0 to 192.168.255.255

13IP Addressing and Related Topics 13

CISNTWK-11Permissions

14IP Addressing and Related Topics 14

CISNTWK-11PermissionsMore About Address Classes D and E

• Class D addresses – 1110bbbb bbbbbbbb bbbbbbbb bbbbbbbb– 1110bbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb– b can be 1s or 0s– Multicast addresses

• Class E addresses• Class E addresses – 11110bbb.bbbbbbbb.bbbbbbbb.bbbbbbbb– b can be 1s or 0s

O l f i l– Only for experimental purposes

15IP Addressing and Related Topics 15

CISNTWK-11Permissions

Network, Broadcast, Multicast, and Other Special IP AddressesSpecial IP Addresses

• Network address– Any IP address where all host bits are “0”

• Broadcast address– Address that all hosts on a network must read

• Broadcast traffic• Broadcast traffic– Seldom forwarded from one physical network to another

16IP Addressing and Related Topics 16

CISNTWK-11PermissionsBroadcast Packet Structures

• IP broadcast packets have two destination address fieldsD t Li k l d ti ti dd fi ld– Data Link layer destination address field

– Destination network address field

17IP Addressing and Related Topics 17

CISNTWK-11Permissions

18IP Addressing and Related Topics 18

CISNTWK-11PermissionsMulticast Packet and Address Structures

• IP gatewayR t th d i th t ill f d t ffi t th h t’– Router or other device that will forward traffic to the host’s physical network

• The Internet Corporation for Assigned Names and Numbers (ICANN)– Allocates multicast addresses on a controlled basis

19IP Addressing and Related Topics 19

CISNTWK-11Permissions

20IP Addressing and Related Topics 20

CISNTWK-11Permissions

21IP Addressing and Related Topics 21

CISNTWK-11PermissionsThe Vanishing IP Address Space

• Address space saving techniquesCl l I t D i R ti (CIDR)– Classless Inter-Domain Routing (CIDR)

– Trade in existing IP network addresses – RFC 1918

• Reserves three ranges of IP addresses for private use– Network Address Translation (NAT)

• Lets networks use private IP addresses internally and maps them to public IP address externally

22IP Addressing and Related Topics 22

CISNTWK-11PermissionsUnderstanding Basic Binary Arithmetic

• Four binary calculations must be masteredConverting binary to decimal– Converting binary to decimal

– Converting decimal to binary– Understanding how setting increasing numbers of high-order bits

1 i i h bi bi b d ifi d i lto 1 in eight-bit binary numbers corresponds to specific decimal numbers

– Understanding how setting increasing low-order bits to 1 in eight-bit bi b d t ifi d i l bbit binary numbers corresponds to specific decimal numbers

23IP Addressing and Related Topics 23

CISNTWK-11PermissionsConverting Decimal to Binary

• Converting decimal number 125 to binary125 divided by 2 equals 62 remainder 1125 divided by 2 equals 62, remainder 162 divided by 2 equals 31, remainder 031 divided by 2 equals 15, remainder 115 di id d b 2 l 7 i d 115 divided by 2 equals 7, remainder 17 divided by 2 equals 3, remainder 13 divided by 2 equals 1, remainder 11 di id d b 2 l 0 i d 11 divided by 2 equals 0, remainder 1

24IP Addressing and Related Topics 24

CISNTWK-11PermissionsConverting Binary to Decimal

• Count the total number of digits in the number S b 1 f h l (8 1 7)• Subtract 1 from the total (8 - 1 = 7)

• Convert to exponential notation, using all the digits as multipliersmultipliers

• 11011011converts as follows– 11011011 = 1*27+1*26+0*25+1*24+1*23+0*22+1*21+1*20 =

128 64 0 16 8 0 2 1 219128+64+0+16+8+0+2+1 = 219

25IP Addressing and Related Topics 25

CISNTWK-11PermissionsHigh-Order Bit Patterns

Binary Decimal10000000 12811000000 19211100000 22411110000 24011111000 24811111000 24811111100 25211111110 25411111110 25411111111 255

26IP Addressing and Related Topics 26

CISNTWK-11PermissionsLow-Order Bit Patterns

Binary Decimal Exponent00000001 1 21 - 100000011 3 22 - 1

300000111 7 23 - 100001111 15 24 - 100011111 31 25 100011111 31 25 - 100111111 63 26 - 101111111 127 27 101111111 127 27 - 111111111 255 28 - 1

27IP Addressing and Related Topics 27

CISNTWK-11PermissionsIP Networks, Subnets, And Masks

S b t k• Subnet mask– Special bit pattern that “blocks off ” the network portion of an IP

address with an all-ones patternf l k f l d• Default masks for Classes A, B, and C

Class Layout Default MaskClass A n h.h.h 255.0.0.0Class B n.n h.h 255.255.0.0Class C n.n.n h 255.255.255.0

28IP Addressing and Related Topics 28

CISNTWK-11PermissionsIP Subnets and Supernets

• SubnettingSt li (b i ) bit f th h t ti t f th bdi id– Stealing (borrowing) bits from the host portion to further subdivide the network portion of an address

• Supernetting– Stealing bits from network portion

• Using them to create a single, larger contiguous address space for host addresses

29IP Addressing and Related Topics 29

CISNTWK-11PermissionsCalculating Subnet Masks

• Types of subnet masking techniquesC t t l th b t ki (CLSM)– Constant-length subnet masking (CLSM)

– Variable-length subnet masking (VLSM)

• In a VLSM addressing schemeg– Different subnets may have different extended network prefixes

30IP Addressing and Related Topics 30

CISNTWK-11PermissionsDesigning a Constant-Length Subnet Mask

• Decide how many subnets are neededAdd 2 b f b d d h j h• Add 2 to number of subnets needed then jump to the nearest higher power of two

• Reserve bits of host portion’s address from the top downReserve bits of host portion s address from the top down• Be sure that there are enough host addresses left over on

each subnet to be usable• If using RIP

– Use the formula 2b – 2 to calculate the number of usable subnets from a mask

31IP Addressing and Related Topics 31

CISNTWK-11PermissionsDesigning a Variable-Length Subnet Mask

• Analyze requirements for individual subnetsA i b h i l i hi h• Aggregate requirements by their relationships to the nearest power of two

• Use subnets that require largest number of devicesUse subnets that require largest number of devices – To decide the minimum size of the subnet mask

• Aggregate subnets that require fewer of hosts • Define VLSM scheme that

– Provides the necessary number of subnets of each size to fit its intended use best

32IP Addressing and Related Topics 32

CISNTWK-11PermissionsCalculating Supernets

• Supernets “St l” bit f t k ti f IP dd t “l d” th– “Steal” bits from network portion of an IP address to “lend” those bits to the host

– Permit multiple IP network addresses to be combined – Allow an entire group of hosts to be reached through a single

router address

33IP Addressing and Related Topics 33

CISNTWK-11PermissionsClassless Inter-Domain Routing

• Limitations– Network addresses must be contiguous– Network addresses must be contiguous– When address aggregation occurs

• CIDR address blocks work best when they come in sets that are greater than 1 and equal to some lower order bit pattern thatgreater than 1 and equal to some lower-order bit pattern that corresponds to all 1s

– Addresses commonly applied to Class C addresses– To use a CIDR address on any networkTo use a CIDR address on any network

• Routers in routing domain must “understand” CIDR notation

34IP Addressing and Related Topics 34

CISNTWK-11PermissionsPublic Versus Private IP Addresses

• Private IP addresses ranges– May be in the form of IP network addresses– May be in the form of IP network addresses

• Address masquerading– May be performed by boundary devices that include proxy server

capabilities • Private IP address limitation

– Some IP services require a secure end-to-end connectionq

35IP Addressing and Related Topics 35

CISNTWK-11Permissions

36IP Addressing and Related Topics 36

CISNTWK-11Permissions

Public Versus Private IP Addresses (continued)(continued)

• Public IP addresses R i i t t f id tif i ll i th t t– Remain important for identifying all servers or services that must be accessible to the Internet

• Most organizations need public IP addresses only for two classes of equipment– Devices that permit organizations to attach networks to the Internet– Servers designed to be accessible to the InternetServers designed to be accessible to the Internet

37IP Addressing and Related Topics 37

CISNTWK-11PermissionsManaging Access To IP Address Information

• Reverse proxying– Permits the proxy server to front for servers inside the boundary

I i h id• Important service that proxy server provides– Manages what source addresses appear in outbound packets that pass

through it

38IP Addressing and Related Topics 38

CISNTWK-11PermissionsObtaining Public IP Addresses

• Public IP addresses– Issued by ISPs– Issued by ISPs

• IP renumbering– Switching addresses on every machine that uses address from old

ISP to unique address obtained from new ISPISP to unique address obtained from new ISP• ICANN

– Manages all IP-related addresses, protocol numbers, and well-k t ddknown port addresses

– Assigns MAC layer addresses for use in network interfaces

39IP Addressing and Related Topics 39

CISNTWK-11PermissionsIP Addressing Schemes

• IP addressing scheme constraints – Number of physical locations– Number of physical locations– Number of network devices at each location– Amount of broadcast traffic at each location

Availability of IP addresses– Availability of IP addresses– Delay caused by routing from one network to another

40IP Addressing and Related Topics 40

CISNTWK-11PermissionsThe Network Space

• Application Specific Integrated Circuits (ASICs)H d d b it h t k d i i– Hardware used by switches to make decisions

• Layer-3 switch– Implements the layer-3 logic from the software into its own ASICsp y g– Allows you to partition a large network into many smaller subnets

with almost no loss of performance

41IP Addressing and Related Topics 41

CISNTWK-11PermissionsThe Host Space

• Reasons for using binary boundariesY t t i l t l 3 it hi t d th– You may want to implement layer-3 switching to reduce the broadcast traffic

– One day you will want to classify your traffic to apply Quality of S i (Q S) li i f tService (QoS) or policies of some sort

– Can be applied to firewall rules

42IP Addressing and Related Topics 42

CISNTWK-11PermissionsSummary

• IP addresses P id f d ti f id tif i i di id l t k i t f– Provide foundation for identifying individual network interfaces on TCP/IP networks

• IP addresses – Come in five classes named through E

• Understanding binary arithmetic– Essential to knowing how to deal with IP addressesEssential to knowing how to deal with IP addresses

43IP Addressing and Related Topics 43

CISNTWK-11PermissionsSummary (continued)

• Classless Inter-Domain Routing (CIDR)– Permits network-host boundary to fall away from octet boundaries

• Subnetting – Permits additional bits to be taken from the host portion of aPermits additional bits to be taken from the host portion of a

network

• Address masquerading and address substitution– Techniques used to hide internal network IP addresses from

outside view

44IP Addressing and Related Topics 44

CISNTWK-11PermissionsSummary (continued)

• Within the Class A, B, and C IP address rangesIETF h d i t IP dd dd– IETF has reserved private IP addresses or address ranges

• Internet Corporation For Assigned Names and Numbers (ICANN)( )– Ultimate authority for obtaining public IP addresses

45IP Addressing and Related Topics 45