+ All Categories
Home > Documents > addressing

addressing

Date post: 21-Mar-2016
Category:
Upload: alaura
View: 48 times
Download: 1 times
Share this document with a friend
Description:
addressing. Introduction ‘ Classfull ’ ‘ Subnetting ’ ‘VLSM’ ‘CIDR’. addressing. An IP address provides a hierarchical structure to separate networks Consider the following address as an example: 158.80.164.3 An IP address is separated into four octets Each octet is 8 bits long - PowerPoint PPT Presentation
Popular Tags:
58
addressing Introduction ‘Classfull’ ‘Subnetting’ ‘VLSM’ ‘CIDR’ 1
Transcript
Page 1: addressing

1

addressing➢ Introduction➢ ‘Classfull’➢ ‘Subnetting’➢ ‘VLSM’➢ ‘CIDR’

Page 2: addressing

2

addressing• An IP address provides a hierarchical structure

to separate networks• Consider the following address as an example:

– 158.80.164.3– An IP address is separated into four octets– Each octet is 8 bits long– resulting in a 32-bit IP address

• A computer understands an IP address in its binary form• First Octet Second Octet Third Octet Fourth Octet 10011110 .01010000 .10100100 .00000011

Page 3: addressing

3

• Part of the above IP address identifies the network.• The other part of the address identifies the host.

• A net mask helps make this distinction.

• Consider the following– 158.80.164.3 255.255.0.0– The above IP address has a net mask of 255.255.0.0.

• The net mask follows two rules:– If a binary bit is set to a 1 (or on) in a net mask, the corresponding bit in the

address identifies the network.– If a binary bit is set to a 0 (or off) in a net mask, the corresponding bit in the

address identifies the host.

Page 4: addressing

4

Question?

• What is the usefulness of a net mask ?

– (A) Identifying the net associated to an IP address

– B) Increasing the addressing space

– (C) Hiding the network address

Page 5: addressing

5

Question?

• @IP 192.168.1.1 and Netmask 255.255.255.0, @Net(A) 192.168.1.0(B) 192.168.0.1(C) 192.0.1.1(D) 0.168.1.1

Page 6: addressing

6

addressing• Looking at 158.80.164.3 and mask 255.255.0.0 in binary• Address: 10011110.01010000.10100100.00000011• net Mask: 11111111.11111111.00000000.00000000• The first 16 bits of the net mask are set to 1. Thus,

the first 16 bits of the address (158.80) identify the network.

• The last 16 bits of the net mask are set to 0. Thus, the last 16 bits of the address (164.3) identify the unique host on that network.

• Hosts on the same logical network will have identical network addresses, and can communicate freely.

• For example, the following two hosts are on the same network:– Host A: 158.80.164.100 255.255.0.0– Host B: 158.80.164.101 255.255.0.0

Page 7: addressing

7

addressing• Both share the same network address (158.80), which is

determined by the 255.255.0.0 subnet mask.• Hosts that are on different networks cannot communicate

without an intermediating device. For example:– Host A: 158.80.164.100 255.255.0.0– Host B: 158.85.164.101 255.255.0.0– The net mask has remained the same, but the network

addresses are now different (158.80 and 158.85 respectively).– Thus, the two hosts are not on the same network, and cannot

communicate without a router between them.– Routing is the process of sending packets from one network

to another.

Page 8: addressing

8

addressing

Are these hosts on the same network?• Host A: 158.80.1.1 255.248.0.0• Host B: 158.79.1.1 255.248.0.0

Page 9: addressing

9

addressing

Are these hosts on the same network?• Host A: 158.80.1.1 255.248.0.0• Host B: 158.79.1.1 255.248.0.0

Host A Address: 10011110.01010000.00000001.00000001Host B Address: 10011110.01001111.00000001.00000001Subnet Mask: 11111111.11111000.00000000.00000000

Page 10: addressing

10

Rmq• We can identify the number of binary bits set to a 1 (or

on) in a netmask, preceded by a slash.• Consider the following netmask: 255.255.255.240

– Looking at the above net mask in binary: 11111111.11111111.11111111.11110000

– The first 28 bits of the above net mask are set to 1.– We can represent : /28

• Consider this next example: 192.168.1.1 255.255.255.0• The above address/netmask can be represented as follows:

192.168.1.1 /24

Page 11: addressing

11

addressing

Classfull

Page 12: addressing

12

IP address Classes• The IPv4 address space has been structured into several classes.• The value of the first octet of an address determines the class of

the network:Class First Octet Range Default Subnet MaskClassA 1 - 127 255.0.0.0Class B 128 - 191 255.255.0.0Class C 192 - 223 255.255.255.0

Page 13: addressing

13

IP address Classes• Class A networks range from 1 to 127.• The default net mask is 255.0.0.0;• thus, by default, the first octet defines the network,• and last three octets define the host.

• N°of network: from 1 to 126 (0 and 127 are reserved ).• This results in a maximum of 127 Class A networks,• with 16,777,214 hosts per network! (extremely large networks )• Example of a Class A address:

• Address: 64.32.254.100• net Mask: 255.0.0.0

Page 14: addressing

14

IP address Classes• Class B networks range from 128 to 191.• The default net mask is 255.255.0.0;• thus, by default, the first two octets define the network,• and the last two octets define the host.

• N of networks : from 128.0 to 191.255. (2^14)• This results in a maximum of 16,384 Class B networks,• with 65,534 hosts per network. (2^16-2) (for medium sized

company)• Example of a Class B address:

● Address: 152.4.12.195● net Mask: 255.255.0.0

Page 15: addressing

15

IP address classes• Class C networks range from 192 to 223.• The default net mask is 255.255.255.0;• thus, by default, the first three octets define the network,• and the last octet defines the host.

• N°of networks: from 192.0.0 to 223.255.255• This results in a maximum of 2,097,152 Class C networks (2^21),• with 254 (2^8 -2) hosts per network.• Example of a Class C address:

– Address: 207.79.233.6– net Mask: 255.255.255.0

Page 16: addressing

16

Question

• Netmask associated to IP@ 34.208.123.12 ?(A) 255.0.0.0(B) 255.255.0.0(C) 255.255.255.0(D) 255.255.255.255

Page 17: addressing

17

IP classfull problems

• 1-Lack of Internal Address Flexibility– big companies get assigned a rather large (Class B) or truly enormous

(Class A) block of addresses,– all of which is considered by the Internet routers a single “network”

with one “network ID”.– Now, imagine that you are running a medium-to-large-sized company

with 5,000 computers, and you are assigned a Class B address for your network.

– Do you really have 5,000 computers all hooked into a single network?– Yet you would be forced to try to fit all of these into a single IP

“network” in the original “classful” method. There was no way to create an internal hierarchy of addresses.

Page 18: addressing

18

IP Classfull problems• 2- Inefficient Use of Address Space:

– The existence of only three block sizes (classes A, B and C) leads to waste of limited IP address space.

• 3- Proliferation of Router Table Entries– As the Internet grows, more and more entries are

required for routers to handle the routing of IP datagrams,

– which causes performance problems for routers.– Attempting to reduce inefficient address space

allocation leads to even more router table entries.

Page 19: addressing

19

Rmqs• Two addresses have been reserved on each network for special

use.• Each network must have

– a network address,– and a broadcast address.

• Neither of these addresses can be assigned to a host device.• The network address is used to identify the network itself.• Routing tables contain lists of networks, and each network is

identified by its address.• Network addresses contain all 0 bits in the host portion of

the address.– For example, the following is a network address:

192.168.1.0/24

Page 20: addressing

20

• The broadcast address identifies all hosts on a particular network.

• A packet sent to the broadcast address will be received and processed by every device on that network.

• Broadcast addresses contain all 1 bits in the host portion of the address.

• For example, the following is a broadcast address: 192.168.1.255/24.

• Broadcasts are one of three types of IP packets:– Unicasts are packets sent from one host to another host– Multicasts are packets sent from one host to a group of hosts– Broadcasts, as stated earlier, are packets sent from one host

to all other hosts on the local network

Page 21: addressing

21

Subnetting• way to create an internal hierarchy of addresses.• Internal to a network of Class A, B, C• 3 levels : network, subnetwork, host

• Avoid requesting more network @ from any classes

Page 22: addressing

22

Subnetting• Subnetting is the process of creating new networks (or subnets)

by stealing bits from the host portion of a subnet mask.• Stealing bits from hosts creates more networks but fewer hosts

per network.• Consider the following Class C network: 192.168.254.0• The default subnet mask for this network is 255.255.255.0.• This single network can be segmented, or subnetted, into multiple

networks.• For example, assume a minimum of 10 new networks are

required.• Resolving this, is possible using the following magical formula:

– 2n

• The exponent ‘n’ identifies the number of bits to steal from the host portion of the net mask.

Page 23: addressing

23

• The default Class C mask (255.255.255.0) looks as follows in binary:– 11111111.1111111.1111111.00000000

• There are a total of 24 bits set to 1, which are used to identify the network.• There are a total of 8 bits set to 0, which are used to identify the host,• and these host bits can be ‘stolen.’• Stealing bits essentially involves changing host bits (set to 0 or off) in the net

mask to network bits (set to 1 or on).• Network bits in a net mask must always be sequential, skipping bits is not

allowed.• Consider the result if 3 bits are stolen.• Using the above formula:

– 2n = 23 = 8 new networks created– However, a total of eight new networks does not meet the original requirement

of at least 10 networks.– Consider the result if four bits are stolen: 2n = 24 = 16 new networks created.

A total of sixteen new networks does meet the original requirement.– Stealing four host bits results in the following new subnet mask:

• 11111111.11111111.11111111.11110000 = 255.255.255.240

Page 24: addressing

24

Subnetting• In the previous example, a Class C network was subnetted to

create 16 new networks,• using a subnet mask of 255.255.255.240 (or /28 ).• Four bits were stolen in the subnet mask,• leaving only four bits for hosts.• To determine the number of hosts this results in, for each of

the new 16 networks,• the used formula is: 2n – 2.• Consider the result if four bits are available for hosts:• 2n – 2 = 24 – 2 = 16 – 2 = 14 usable hosts per network• Thus, subnetting a Class C network with a /28 mask creates 16

new networks, with 14 usable hosts per network.

Page 25: addressing

25

Subnetting• Determining the ‘Range’ of Subnetted Networks• The ‘shortcut’ method involves taking the subnet mask

(255.255.255.240 from the previous example), and subtracting the subnetted octet (240) from 256.– 256 – 240 = 16– the first network will begin at 0. Then, simply continue adding

16 to list the first address of each new network:0 16 32 48 64 80 96 112 128 144 160 176 192 208 224

240

Page 26: addressing

26

Subnetting

Hosts on the same network (such as 192.168.254.2 and 192.168.254.14) can communicate freely.

• Hosts on different networks (such as 192.168.254.61 and 192.168.254.66) require a router to communicate.

Page 27: addressing

27

Question• Network @ 135.28.0.0

– Class? (A/B/C/D)– 10 subnets, how many bits do we need

• A) 3 bits• B) 4 bits• C) 5 bits

– Subnet mask 255.255.240.0– Subnets size

• A) same• B) variable

Page 28: addressing

28

Question

• How many networks of variable length should we design– A) 4– B) 5– C) 6– D) 7

Page 29: addressing

29

Review - Magic Numbers• To make the job of subnetting easier,

there is a method that allows you tocalculate a "magic" number.

• The magic number we're looking foris the number of addresses in eachnetwork, including the network,broadcast and host range.

• The calculation 2number_ of_ host_ bits yields the "magic" number.

• We have 5 host bits remaining so…..• 25 = 32 - our "magic" number.

Page 30: addressing

30

Review - Subnetting - Class C• Network: 192.168.80.0 Subnet Mask: 255.255.255.224• Network: 27 bits Host: 5 bits Magic Number: 25 = 32

192.168.80.255192.168.80.225 – 192.168.80.254192.168.80.2247

192.168.80.223192.168.80.193 – 192.168.80.222192.168.80.1926

192.168.80.191192.168.80.161 – 192.168.80.190192.168.80.1605

192.168.80.159192.168.80.129 – 192.168.80.158192.168.80.1284

192.168.80.127192.168.80.97 – 192.168.80.126192.168.80.963

192.168.80.95192.168.80.65 – 192.168.80.94192.168.80.642

192.168.80.63192.168.80.33 – 192.168.80.62192.168.80.321

192.168.80.31192.168.80.1 – 192.168.80.30192.168.80.00

Broadcast Address

Subnet AddressRange

NetworkAddressID

Page 31: addressing

Dividing Networks Into the Right Size

192.168.80.0/27

192.168.80.32/27

192.168.80.64/27 192.168.80.96/27

192.168.80.128/27

192.168.80.160/27

192.168.80.192/27

Page 32: addressing

Dividing Networks Into the Right Size

192.168.80.0/27

Available: 30Required: 5Wasted: 25

192.168.80.96/27

Available: 30Required: 4Wasted: 26

192.168.80.128/27

Available: 30Required: 2Wasted: 28

Page 33: addressing

Assigned Required Wasted

Network 1 30 5 25

Network 2 30 5 25

Network 3 30 4 26

Network 4 30 5 25

Network 5 30 2 28

Network 6 30 2 28

Network 7 30 5 25

Total 210 28 182

Page 34: addressing

34

Subnetting Problem• Site with a Class C address 192.15.34.0, needs five subnets

with 60, 60, 60, 30, and 30 hosts• Problems

– cannot use subnet mask 255.255.255.192, since it allows only 4 subnets, each with 62 hosts

– cannot use subnet mask 255.255.255.224, since it allows 8 subnets, each with only 30 hosts

Page 35: addressing

35

Variable Length Subnet Masking (VLSM)

• A serious limitation of using only a single subnet mask across a given network-prefix (the number of network or 1 bits in the mask) was that an organization is locked into a fixed-number of fixed-sized subnets.

• VLSM enables a network number to be configured with different subnet masks on different interfaces.– Subnet an already subnetted network address.– Conserves IP addresses. – More efficient use of available address space.

• Allows for more hierarchical levels within an addressing plan.

Page 36: addressing

10.2.0.0/24 10.2.0.1 10.2.0.254 10.2.0.255Sub-subnet 10.2.1.0/24 10.2.1.1 10.2.1.254 10.2.1.255Using /24 10.2.2.0/24 10.2.2.1 10.2.2.254 10.2.2.255

Etc.10.2.255.0/24 10.2.255.1 10.2.255.254 10.2.255.255

Variable Length Subnet Masking (VLSM)

10.0.0.0/8 Subnet using /16

Subnet 1st Host Last Host Broadcast

10.0.0.0/16 10.0.0.1 10.0.255.254 10.0.255.255

10.1.0.0/16 10.1.0.1 10.1.255.254 10.1.255.255

10.2.0.0/16 10.2.0.1 10.2.255.254 10.2.255.255

10.3.0.0/16 10.3.0.1 10.3.255.254 10.3.255.255

Etc.

10.255.0.0/16 10.255.0.1 10.255.255.254 10.255.255.255

Subnet 1st Host Last Host Broadcast

Page 37: addressing
Page 38: addressing

38

Variable Length Subnet Masking (VLSM)192.168.20.0/27

192.168.20.32/27 192.168.20.96/27 192.168.20.64/27

192.168.20.64/27

192.168.20.128/27

192.168.20.128/27

7 Networks with 30 usable addresses for each network

Wasted 28 addresses on each WAN link

Page 39: addressing

39

Variable Length Subnet Masking (VLSM)192.168.20.0/27

192.168.20.192/30 192.168.20.196/30 192.168.20.200/30

192.168.20.32/27

192.168.20.64/27

192.168.20.96/27

Page 40: addressing

1 1 0 0 0 0 0 0 192.168.20.192

1 1 0 0 0 1 0 0 192.168.20.196

1 1 0 0 1 0 0 0 192.168.20.200

1 1 0 0 1 1 0 0 192.168.20.204

1 1 0 1 0 0 0 0 192.168.20.208

1 1 0 1 0 1 0 0 192.168.20.212

1 1 0 1 1 0 0 0 192.168.20.216

1 1 0 1 1 1 0 0 192.168.20.220

255.255.255.252Sub-Subnet

MaskMagic Number

= 41 1 1 1 1 1 0 0

Variable Length Subnet Masking (VLSM)

OriginalSubnet Mask

Magic Number= 32

255.255.255.224

1 1 1 0 0 0 0 0

192.168.20.0 0 0 0 0 0 0 0 0

192.168.20.32 0 0 1 0 0 0 0 0

192.168.20.64 0 1 0 0 0 0 0 0

192.168.20.96 0 1 1 0 0 0 0 0

192.168.20.128 1 0 0 0 0 0 0 0

192.168.20.160 1 0 1 0 0 0 0 0

192.168.20.192 1 1 0 0 0 0 0 0

192.168.20.224 1 1 1 0 0 0 0 0

Page 41: addressing

41

Variable Length Subnet Masking (VLSM)

“If you know how to subnet, you can do VLSM.”

What’s the trick?

Always satisfy the requirements of your biggest LAN and then work your way

down ….

Page 42: addressing

42

Variable Length Subnet Masking (VLSM)

• Steps for VLSM:1. List the number of hosts required per network beginning

with the largest to the smallest.2. Convert the subnet mask to binary.3. Draw a line where the network portion ends.4. Ask yourself the question… How many bits do I need to

support the required number of hosts?5. Move the line to show your new network portion.6. Determine your new magic number????.7. Finish subnetting using the new magic number.

• The starting address is always the first network.

Page 43: addressing

43

Question

Page 44: addressing

44

CIDR Supernetting Using VLSM and subnetting increase the number

of sub-networks. Routes to each network have to be advertised to

the Internet and added to routers. This increase the size of routing table Supernetting is a new addressing scheme that

allows for more efficient allocation of IP addresses Aggregating network addresses by decreasing the

number of bits recognized as the network

Page 45: addressing

45

Classless IP Addressing

• To CIDR-compliant routers, address class is meaningless.– The network portion of the address is determined by the network

subnet mask, also known as the network prefix, or prefix length (/8, /19, etc.).

• The network address is no longer determined by the class of the address.

Page 46: addressing

46

CIDR and Route Summarization

• The capability for routes to be summarized as a single route helped reduce the size of Internet routing tables.

• A Supernet summarizes multiple network addresses with a mask that is less than (or a summary of) the classful mask.

Page 47: addressing

47

CIDR and Route Summarization

• Networks are converted to binary.• The summary route is comprised of the least number

of bits that are common to all subnets.

192.168.0.0/23 11000000.10101000.00000000.00000000

192.168.2.0/23 11000000.10101000.00000010.00000000

192.168.4.0/22 11000000.10101000.00000100.00000000

192.168.8.0/21 11000000.10101000.00001000.00000000

192.168.0.0/20 11000000.10101000.00000000.00000000Summary

Networks to be summarized MUST be contiguous.

Page 48: addressing

48

CIDR and Route Summarization

• Requires a classless routing protocol (RIPv2, EIGRP, OSPF).• The subnet mask of the network MUST be included with

the routing update.

192.168.0.0/23 11000000.10101000.00000000.00000000

192.168.2.0/23 11000000.10101000.00000010.00000000

192.168.4.0/22 11000000.10101000.00000100.00000000

192.168.8.0/21 11000000.10101000.00001000.00000000

192.168.0.0/20 11000000.10101000.00000000.00000000Summary

Page 49: addressing

49

Classless Routing Protocol

R2 sends a summarized route out s0/0/1

R3 applies the default /16 subnet mask

Classful Update

Page 50: addressing

50

Classless Routing Protocol

Networks 172.16.0.0/16, 172.17.0.0/16, 172.18.0.0/16, and 172.19.0.0/16 can be summarized into theSupernet 172.16.0.0/14.

The /14 (255.252.0.0) subnet mask is included in the routing update.

Classless Update

CIDR

Page 51: addressing

51

CIDR Example• 16 class C addresses: mask 255.255.255.0

192.92.240.0 192.92.248.0192.92.241.0 192.92.249.0192.92.242.0 192.92.250.0192.92.243.0 192.92.251.0192.92.244.0 192.92.252.0192.92.245.0 192.92.253.0192.92.246.0 192.92.254.0192.92.247.0 192.92.255.0

• We look to the binary representation of the third octet of these addresses

Page 52: addressing

52

Page 53: addressing

53

• The first four bits in this octet do not change, but the last four bits do.

• The last four bits are represented in their full range of values, from 0000 to 1111.

• So, if we choose to ignore the last four bits in this octet, we get a single address that represents the full range of 16 addresses.

• That address is 192.92.240.0 (the first address of the group), and its mask is 255.255.240.0 (the natural mask minus the last four bits).

• This mask is termed the supernet mask.• Thus, the single advertisement of 192.92.240.0 with supernet

mask 255.255.240.0 is the equivalent of 16 advertisements for addresses 192.92.240.0 through 192.92.255.0.

Page 54: addressing

54

CIDR:‘Classless Inter Domain Routing’

• Instead of being limited to network identifiers (or "prefixes") of 8, 16 or 24 bits,

• CIDR currently uses prefixes anywhere from 13 to 27 bits.• This allows for address assignments that much more closely fit an

organization's specific needs.

Page 55: addressing

55

Cont. The number of addresses in a CIDR block is a power of 2,

based on the number of bits that is not recognized by the maskExample: 192.92.240.0/20. 2 power 12 possible addresses

Each time we decrease the mask length, we increase the number of possible networks by a factor of 2.

240 = 1111 0000 241= 1111 0001

Page 56: addressing

56

Example 1• We desire building a new IP network : containing 2000 hosts.• How many bits do we need??• We need a block of addresses allowing 2**11 : => 2048>2000 addresses

– =>the mask (32-11)=> /21.

• Suppose that IP has a free block 194.16.32.0/19• Can this block be used??• How many blocks can be given to the customer??• What are these blocks ??

– Net (1) 194.16.32.0/21– Net (2) 194.16.40.0/21– Net (3) 194.16.48.0/21– Net (4) 194.16.56.0/21

Page 57: addressing

57

Example 2Suppose this is a hot @; 172.16.19.40/21 :Q : Mask ?R : 255.255.248.0.Q : Does this host belong to a subnet?? Q :How many bits are allocated for subnetting ?R : Class B, 5bits for subnetworksQ : How many subnets are available ?R :Q : How many hosts/subnets ?R : 32 -21 = 11 bits. 2048. 2046 host @.

Page 58: addressing

58

ExempleQ : To which subnet belong the host of the example ?R : 172.16.16.0.Q : The broadcat @ for the subnet to which belong the host of the example ?R : 172.16.23.255.


Recommended