ip addressing, subnetting & vlsm 1. decimal vs. binary numbers – decimal numbers are...

36
IP ADDRESSING , SUBNETTING & VLSM 1

Upload: lizbeth-newton

Post on 02-Jan-2016

244 views

Category:

Documents


4 download

TRANSCRIPT

IP ADDRESSING , SUBNETTING & VLSM

1

Decimal vs. Binary Numbers– Decimal numbers are represented by the numbers 0 through 9.– Binary numbers are represented by a series of 1s and 0s.

Binary Numbers Chart

MSB LSB

Baseexponent 27 26 25 24 23 22 21 20

Column Value 1 1 1 0 1 0 0 1

Decimal Weight 128 64 32 16 8 4 2 1

Column Value 128 64 32 0 8 0 0 1

Base-2 Binary Conversion—1110100 (233)

128 + 64 + 32 + 0 + 8 + 0 + 0 + 1 = 233

Powers of 2

Decimal-to-Binary Conversion

35 = 25 + 21 + 20

35 = (32 * 1) + (2 * 1) + (1 * 1)

35 = 0 + 0 + 1 + 0 + 0 + 0 +1 + 1

35 = 00100011

Binary-to-Decimal Conversion

1 0 1 1 1 0 0 1 = (128 * 1) + (64 * 0) + (32 * 1) + (16 * 1) + (8 * 1) + (4 * 0) + (2 * 0) + (1 * 1)

1 0 1 1 1 0 0 1 = 128 + 0 + 32 + 16 + 8 + 0 + 0 + 1

1 0 1 1 1 0 0 1 = 185

Decimal and Binary Conversion

IP Addressing

• An IP address is a 32-bit sequence of 1s and 0s.• To make the IP address easier to use, the address is

usually written as four decimal numbers separated by periods.

• This way of writing the address is called the dotted decimal format.

IPv4 Addressing

Class A, B, C, D, and E IP Addresses

Reserved IP Addresses • Certain host addresses are

reserved and cannot be assigned to devices on a network.

• An IP address that has binary 0s in all host bit positions is reserved for the network address.

• An IP address that has binary 1s in all host bit positions is reserved for the broadcast.

Public and Private IP Addresses • No two machines that connect to a public network can have the

same IP address because public IP addresses are global and standardized.

• However, private networks that are not connected to the Internet may use any host addresses, as long as each host within the private network is unique.

• RFC 1918 sets aside three blocks of IP addresses for private, internal use.

• Connecting a network using private addresses to the Internet requires translation of the private addresses to public addresses using Network Address Translation (NAT).

IPv4 versus IPv6

• IP version 6 (IPv6) has been defined and developed.

• IPv6 uses 128 bits rather than the 32 bits currently used in IPv4.

• IPv6 uses hexadecimal numbers to represent the 128 bits.

IPv4

Mechanics of Subnetting

Classes of Network IP Addresses

Introduction to Subnetting• Host bits must

are reassigned (or “borrowed”) as network bits.

• The starting point is always the leftmost host bit.

3 bits borrowed allows 23-2 or 6 subnets

5 bits borrowed allows 25-2 or 30 subnets

12 bits borrowed allows 212-2 or 4094 subnets

Router(config)#ip subnet zero

Reasons for Subnetting• High traffic volume can slow throughput time on a single segment network. Because

each incoming and outgoing data packet is forced to search the entire range of IP addresses to find its assigned destination, there is a high collision rate when large volumes of traffic are competing for space across every node on the network. Higher collision rates create lost packets, higher latency and reduce overall transmission rates. Breaking down the network into smaller segments reduces the number of nodes any single packet contacts in its search for the proper destination. If, for example, the computers in the marketing department don't need to communicate directly with the computers on the manufacturing floor, both can be placed on separate segments. The result is an increase in throughput for both departments.

• Placing individual departments on individual subnets incidentally improves security as well. Because computers on one segment don't connect directly with other segments .

• One of the most common and compelling reasons to segment a network is when you are routing traffic for wide area network for a remote location(s). Setting up office communications for a single network in multiple locations requires subnets for effective operation. Minimizing unnecessary traffic between remote routers is a primary requirement for maintaining adequate transmission speed between locations

Establishing the Subnet Mask Address

• Determines which part of an IP address is the network field and which part is the host field.

• Follow these steps to determine the subnet mask:– 1. Express the subnetwork IP address in binary form.– 2. Replace the network and subnet portion of the

address with all 1s.– 3. Replace the host portion of the address with all 0s.– 4. Convert the binary expression back to dotted-

decimal notation.

Establishing the Subnet Mask Address

• To determine the number of bits to be used, the network designer needs to calculate how many hosts the largest subnetwork requires and the number of subnetworks needed.

• The “slash format” is a shorter way of representing the subnet mask:– /25 represents the 25 one bits in the subnet mask

255.255.255.128

Establishing the Subnet Mask Address

Creating 8 Subnetwork

Subnetting Class A and B Networks• The available bits for assignment to the subnet

field in a Class A address is 22 bits while a Class B address has 14 bits.

Calculating the Subnetwork With ANDing

• ANDing is a binary process by which the router calculates the subnetwork ID for an incoming packet. – 1 AND 1 = 1; 1 AND 0 = 0; 0 AND 0 = 0

• The router then uses that information to forward the packet across the correct interface.

Packet Address 192.168.10.65 11000000.10101000.00001010.010 00001

Subnet Mask 255.255.255.224 11111111.11111111.11111111.111 00000

Subnetwork Address 192.168.10.64 11000000.10101000.00001010.010 00000

Subnetting Review

• To identify subnets, you will “borrow” bits from the host ID portion of the IP address:– The number of subnets available depends on the number of bits

borrowed.• The available number of subnets = 2s, I which s is the number of bits

borrowed.

– The number of hosts per subnet available depends upon the number of host ID bits not borrowed.

• The available number of hosts per subnet = 2h -2, in which h is the number of host bits not borrowed.

• One address is reserved as the network address.• One address is reserved as the broadcast address.

Possible Subnets and Hosts for a Class C Network

Possible Subnets and Hosts for a Class B Network

Possible Subnets and Hosts for a Class A Network

Subnetting Review Exercise

• Subnet a network with a private network address of 172.16.0.0./16 so that it provides 100 subnets and maximizes the number of host addresses for each subnet.– How many bits will need to be borrowed?– What is the new subnet mask?– What are the first four subnets?– What are the range of host addresses for the four

subnets?

VLSM

What Is VLSM and Why Is It Used?

What Is a Variable-Length Subnet Mask?

Subnet 172.16.14.0/24 is divided into smaller subnets.

– Subnet with one mask (/27).

– Then further subnet one of the unused /27 subnets into multiple /30 subnets.

A Waste of Space

When to Use VLSM?

Calculating Subnets with VLSM

Allows up to 62 hosts per subnet

Allows further 64 subnets

A Working VLSM Example (Cont.)

A Working VLSM Example (Cont.)

A Working VLSM Example (Cont.)