+ All Categories
Home > Documents > Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses...

Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses...

Date post: 31-Mar-2015
Category:
Upload: braden-leadbeater
View: 225 times
Download: 0 times
Share this document with a friend
32
Efficient IP Addressing Subnetting 1
Transcript
Page 1: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

Efficient IP Addressing

Subnetting

1

Page 2: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

Review: IP Addressing• Suppose hosts had arbitrary addresses

– Then every router would need a lot of information– …to know how to direct packets toward the host

2

host host host

LAN 1

... host host host

LAN 2

...

router router routerWAN WAN

1.2.3.4 5.6.7.8 2.4.6.8 1.2.3.5 5.6.7.9 2.4.6.9

1.2.3.4

1.2.3.5

forwarding table

Page 3: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

3

Review: IP Addressing scalability• Number related hosts from a common subnet

– 1.2.3.0/24 on the left LAN– 5.6.7.0/24 on the right LAN

host host host

LAN 1

... host host host

LAN 2

...

router router routerWAN WAN

1.2.3.4 1.2.3.7 1.2.3.156 5.6.7.8 5.6.7.9 5.6.7.212

1.2.3.0/24

5.6.7.0/24

forwarding table

Page 4: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

4

Review: Scalability- Adding new hosts • No need to update the routers

– E.g., adding a new host 5.6.7.213 on the right– Doesn’t require adding a new forwarding entry

host host host

LAN 1

... host host host

LAN 2

...

router router routerWAN WAN

1.2.3.4 1.2.3.7 1.2.3.156 5.6.7.8 5.6.7.9 5.6.7.212

1.2.3.0/24

5.6.7.0/24

forwarding table

host

5.6.7.213

Page 5: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

Some Questions: IP Addressing

• How are IP addresses managed– Given out

• Single point– Hierarchical

– Documentation• Record of what is given out and to whom

– Accounting• What remains?

5

Page 6: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

6

Giving out: Obtaining a Block of Addresses

• The Internet Assigned Numbers Authority (IANA) is responsible for the global coordination of IP addressing, and other Internet protocol resources– Internet Corporation for Assigned Names and Numbers (ICANN)

• Allocates large address blocks to Regional Internet Registries– Regional Internet Registries (RIRs)

• Allocates address blocks within their regions• Allocated to Internet Service Providers and large institutions

– Internet Service Providers (ISPs)• Allocate address blocks to their customers• Who may, in turn, allocate to their customers…• Prefix: assigned to an institution

– Addresses: assigned by the institution to their nodes

Page 7: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

Regional Internet Registries

• Five RIRs to cater to five large global regions• African Network Information Centre (AfriNIC) for Africa • American Registry for Internet Numbers (ARIN) for the

United States, Canada, and several parts of the Caribbean region.

• Asia-Pacific Network Information Centre (APNIC) for Asia, Australia, and neighboring countries

• Latin America and Caribbean Network Information Centre (LACNIC) for Latin America and parts of the Caribbean region

• RIPE NCC (RIPE NCC) for Europe, the Middle East, and Central Asia

7

Page 8: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

8

Record: Figuring Out Who Owns an Address

• Address registries– Public record of address allocations– Internet Service Providers (ISPs) should update when

giving addresses to customers– However, records are notoriously out-of-date

• Ways to query– http://www.db.ripe.net/whois to find RIPE NCC

database for IP addresses– http://www.geektools.com/whois.php– …

Page 9: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

9

Are 32-bit Addresses Enough?• Not all that many unique addresses

– 232 = 4,294,967,296 (just over four billion)– Plus, some are reserved for special purposes– And, addresses are allocated in larger blocks

• And, many devices need IP addresses– Computers, PDAs, routers, tanks, toasters, …

• Long-term solution: a larger address space– IPv6 has 128-bit addresses (2128 = 3.403 × 1038)

• Short-term solutions: limping along with IPv4– Private addresses– Network address translation (NAT)– Dynamically-assigned addresses (DHCP)

Page 10: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

10

Hard Policy Questions• How much address space per geographic region?

– Equal amount per country?– Proportional to the population?– What about addresses already allocated?

• Address space portability?– Keep your address block when you change providers?

• Keeping the address registries up to date?– What about mergers and acquisitions?– Delegation of address blocks to customers?

• As a result, the registries are horribly out of date

Page 11: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

What the IP Address Meltdown Means For You

Article in PC world: posted on Dec 1, 2010 5:39 pm: Brief synopsis

• The world is running out of IPv4 Internet addresses, without which the Internet can't function in its existing form.

• This has been known for some time, of course, but the situation has become a little more urgent with the news that in October and November, nearly all of the remaining blocks of addresses were assigned to various Regional Internet Registries (RIR) around the world…….

• Remaining five blocks of IP addresses given out by beginning of 2011 to the five RIRs…..

11

Page 12: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

Objectives• Economising IP address use:• To subnet an IP Address from given network

requirements– Why subnet– Hierarchy in subnetted addresses– How to subnet

• Identify network class• Identify network requirements• Calculate sub-network addresses• Calculate available host addresses• Calculate new subnet mask• Assign new addresses

12

Page 13: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

Advantages of Subnetting

• With subnetting, IP addresses use a 3-layer hierarchy:» Network » Subnet» Host

• Improves efficiency of IP addresses by not consuming an entire address space for each physical network.

• Reduces router complexity. Since external routers do not know about subnetting, the complexity of routing tables at external routers is reduced.

• Note: Length of the subnet mask need not be identical at all subnetworks.

13

Page 14: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

Subnetting

Subnetting• Problem: Organizations have

multiple networks which are independently managed – Solution 1: Allocate one or

more addresses for each network

• Difficult to manage• From the outside of the

organization, each network must be addressable.

– Solution 2: Add another level of hierarchy to the IP addressing structure

University NetworkUniversity Network

Medical School

Library

EngineeringSchool

14

Page 15: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

• The network prefix identifies a network and the host number identifies a specific host (actually, interface on the network).

• How do we know how long the network prefix is? – The network prefix is implicitly defined using class-based

addressing– The network prefix is indicated by a subnet mask or

netmask

Two-level hierarchy

network prefixnetwork prefix host numberhost number

15

Page 16: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

Subnetting- Three level Hierarchy• Split the host number portion of an IP address into a subnet number and a

(smaller) host number. • Result is a 3-layer hierarchy

• Then:

• Subnets can be freely assigned within the organization• Internally, subnets are treated as separate networks• Subnet structure is not visible outside the organization

network prefixnetwork prefix host numberhost number

subnet numbersubnet numbernetwork prefixnetwork prefix host numberhost number

extended network prefix

16

Page 17: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

• Each layer-2 network (Ethernet segment, FDDI segment) is allocated a subnet address.

128.143.17.0 / 24

128.143.71.0 / 24

128.143.7.0 / 24

128.143.16.0 / 24

128.143.8.0 / 24

128.143.22.0 / 24

128.143.136.0 / 24

Typical Addressing Plan for an Organization that uses subnetting

128.143.0.0/16

18

Page 18: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

Advantages of Subnetting

• With subnetting, IP addresses use a 3-layer hierarchy:

»Network »Subnet»Host

• Improves efficiency of IP addresses by not consuming an entire address space for each physical network.

• Note: Length of the subnet mask need not be identical at all subnetworks.

19

Page 19: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

Task: Create subnetwork addresses

2 0 1 .2 2 2 .5 .1 2

2 0 1 .2 2 2 .5 .1 3

2 0 1 .2 2 2 .5 .1 4

2 0 1 .2 2 2 .5 .1 0

N E TWO R K 2 0 1 .2 2 2 .5 .0

2 0 1 .2 2 2 .5 .11

2 0 1 .2 2 2 .5 .1 9

2 0 1 .2 2 2 .5 .2 0

2 0 1 .2 2 2 .5 .2 1

2 0 1 .2 2 2 .5 .2 2

2 0 1 .2 2 2 .5 .1 8

R o u te rS u bn e two rk

2 0 1 .2 2 2 .5 .8

S u bn e two rk

2 0 1 .2 2 2 .5 .1 6E02 0 1 .2 2 2 .5 .9

E12 0 1 .2 2 2 .5 .1 7

R o u t in g Ta ble2 0 1 .2 2 2 .5 .8 E02 0 1 .2 2 2 .5 .1 6 E12 0 1 .2 2 2 .5 .2 4 E22 0 1 .2 2 2 .5 .3 2 E3

Create subnetwork addresses for 20 different network addresses, using IP address 201.222.5.0

sales Admin

20

Page 20: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

Convert the decimal dotted notation address 201.222.5.0 to binary:

11001001.11011110.00000101.00000000

STEP 1: Convert the decimal dotted notation

21

Page 21: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

Determine the Class of the IP Address 201.222.5.0:

CLASS C

Step 2: Class of the IP Address

22

Page 22: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

Based on the Class, determine what part of the IP address is the network portion and what part of the

address is the host portion:201.222.5.0

11001001.11011110.00000101.00000000 Network .Network .Network .Host

Step 3. Find Network portion and Host portion

201. 222. 5. 0

23

Page 23: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

Determine how many bits you need to borrow from the last octet (host portion) of the IP

Address to give you the needed 20 subnets:

2 to the power of 2 = 4 subnets (less 2)2 to the power of 3 = 8 subnets (less 2)2 to the power of 4 = 16 subnets (less 2)2 to the power of 5 = 32 subnets (less 2)2 to the power of 5 = 32 subnets (less 2) 2 to the power of 6 - 64 subnets (less 2)

Step 4: How many bits to borrow

24

Page 24: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

Since you borrowed five bits from the host for subnets, determine how many hosts can you

have on each of those subnets?

2 to the power of 3 = 8 hosts (less 2) giving you 6 hosts per subnet.

Step 5: Determine how many hosts can you have on each of those subnets

11001001.11011110.00000101.00000000

Remaining bits = Number of hosts

25

Page 25: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

Determine the Subnetworks’ Numbers from the borrowed 5 bits: 32 possible combinations

Subnet # Binary Subnetwork 1 000002 00001 3 00010 4 00011 5 00100 6 00101 7 00110 8 00111 9 01000 10 01001 11 01010 12 01011 13 01100 .. ……..32 11111

Step 6: Determine the Binary Subnetworks Field Numbers

26

Page 26: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

Determine the Range of Binary Host Field Numbers for Each Subnetwork: 3 bits: 8 possible hosts on each subnet

Subnet # Binary Subnetwork Range of Host #’s 1 000002 00001 000 - 111 3 00010 000 - 111 4 00011 000 - 111 5 00100 000 - 111 6 00101 000 - 111 7 00110 000 - 111 8 00111 000 - 111 9 01000 000 - 111

12 01100 000 - 111 .. …….. ----------- 32 11111

Step 7: Determine the Range of Binary Host Field Numbers for Each Subnetwork:

27

Page 27: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

Subnet # Binary Subnetwork Range of Host #’s Decimal Host Numbers 1 000002 00001 000 - 111 .8 - .15 3 00010 000 - 111 .16 - .23 4 00011 000 - 111 .24 - .31 5 00100 000 - 111 .32 - .39 6 00101 000 - 111 .40 - .47 7 00110 000 - 111 .48 - .55 8 00111 000 - 111 .56 - .63 9 01000 000 - 111 .64 - .71 10 01001 000 - 111 .72 - .79 11 01010 000 - 111 .80 - .87 12 01011 000 - 111 .88 - .95 13 01100 000 - 111 .96 - 103 .. …….. ----------- ---------- 32 11111

Step 8: Determine Decimal Host Numbers for Each Subnetwork

28

Page 28: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

Step 9. Determine Our Subnet Addresses:

# Binary Subnetwork Range of Host #’s Subnet Address 1 0000 0000 2 0000 1000 201.222.5.8 3 000 1 0 000 201.222.5.16 4 0001 1000 201.222.5.24 5 0010 0000 201.222.5.32 6 0010 1000 201.222.5.40 7 0011 0000 201.222.5.48 8 0011 1000 201.222.5.56 9 0100 0000 201.222.5.64 10 0100 1000 201.222.5.72 11 0101 0000 201.222.5.80 12 0101 1000 201.222.5.88 13 0110 0000 201.222.5.96 .. .……. ----------- ---------- ---------------

32 1111 1000

29

Page 29: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

Step 10. Determine Host Addresses of the Six Nodes of Each Subnet:

# Subnetwork Range of Host #’s Decimal Host #’s Subnet Address Host Address Range

1 00000 2 00001 000 - 111 .8 - .15 201.222.5.8 201.222.5.9 thru 201.222.5.14

3 00010 000 - 111 .16 - .23 201.222.5.16 201.222.5.17 thru 201.222.5.224 00011 000 - 111 .24 - .31 201.222.5.24 201.222.5.25 thru 201.222.5.30 5 00100 000 - 111 .32 - .39 201.222.5.32 201.222.5.33 thru 201.222.5.38 6 00101 000 - 111 .40 - .47 201.222.5.40 201.222.5.41 thru 201.222.5.46 7 00110 000 - 111 .48 - .55 201.222.5.48 201.222.5.49 thru 201.222.5.54 8 00111 000 - 111 .56 - .63 201.222.5.56 201.222.5.57 thru 201.222.5.62 9 01000 000 - 111 .64 - .71 201.222.5.64 201.222.5.65 thru 201.222.5.70 10 01001 000 - 111 .72 - .79 201.222.5.72 201.222.5.73 thru 201.222.5.78 11 01010 000 - 111 .80 - .87 201.222.5.80 201.222.5.81 thru 201.222.5.86 12 01011 000 - 111 .88 - .95 201.222.5.88 201.222.5.89 thru 201.222.5.94 13 01100 000 - 111 .96 - 103 201.222.5.96 201.222.5.97 thru 201.222.5.-- .. .……. ----------- ---------- --------------- ------------------------------------- 32 11111

30

Page 30: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

Based on the Class, determine the subnet mask for network 201.222.5.0

(remember that 5 bits were borrowed):

11111111.11111111.11111111.11111 000 Network Network Network Subnet Host

Step 12: Find New Subnet mask

255. 255. 255. 248

31

Page 31: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

YOU DID IT!

2 0 1 .2 2 2 .5 .1 2

2 0 1 .2 2 2 .5 .1 3

2 0 1 .2 2 2 .5 .1 4

2 0 1 .2 2 2 .5 .1 0

N E TWO R K 2 0 1 .2 2 2 .5 .0

2 0 1 .2 2 2 .5 .11

2 0 1 .2 2 2 .5 .1 9

2 0 1 .2 2 2 .5 .2 0

2 0 1 .2 2 2 .5 .2 1

2 0 1 .2 2 2 .5 .2 2

2 0 1 .2 2 2 .5 .1 8

R o u te rS u bn e two rk

2 0 1 .2 2 2 .5 .8

S u bn e two rk

2 0 1 .2 2 2 .5 .1 6E02 0 1 .2 2 2 .5 .9

E12 0 1 .2 2 2 .5 .1 7

R o u t in g Ta ble2 0 1 .2 2 2 .5 .8 E02 0 1 .2 2 2 .5 .1 6 E12 0 1 .2 2 2 .5 .2 4 E22 0 1 .2 2 2 .5 .3 2 E3

32

Page 32: Efficient IP Addressing Subnetting 1. Review: IP Addressing Suppose hosts had arbitrary addresses – Then every router would need a lot of information.

• African Network Information Centre (AfriNIC)[1] for Africa • American Registry for Internet Numbers (ARIN)[2] for the United States, Canada, and several parts of the Caribbean region. • Asia-Pacific Network Information Centre (APNIC)[3] for Asia, Australia, and neighboring countries • Latin America and Caribbean Network Information Centre (LACNIC)[4] for Latin America and parts of the Caribbean region • RIPE NCC[5] for Europe, the Middle East, and Central Asia

33


Recommended