14
IP Addressing and Subnetting Ali Nezhad

IP Addressing and subnetting

Embed Size (px)

Citation preview

Page 1: IP Addressing and subnetting

IP Addressing and Subnetting

Ali Nezhad

Page 2: IP Addressing and subnetting

2

Outline

• Introduction• IP Address Format• Routing

– Classful– Classless

• IP Subnetting• VLSM• Summary

Page 3: IP Addressing and subnetting

3

Introduction

Node 4Node 2

Node 3Node 1

Router 3

Router 2Router 1

Router 4

Every communication device needs an address.

Page 4: IP Addressing and subnetting

4

IP Address Format

01111111.00001010.00010100.10000010

127 . 10 . 20 . 130

00000000binary= 0decimal

11111111binary= 255decimal

Page 5: IP Addressing and subnetting

5

Packet Routing

212.10.12.14

121.30.112.24

212.10.12.14 DATA

SA121.30.112.24

DA

Page 6: IP Addressing and subnetting

6

Classful Addressing

121. 30.112.24

011101001. 00011110.01110000.00011000Network ID Host ID

Class Pattern 1st Octet #addresses/net

A x.x.x.x 1 – 127 2563

B x.X.x.x 128- 191 2562

C x.X.X.x 192 - 223 256

Page 7: IP Addressing and subnetting

7

Classless Addressing

• Allows for breaking up of a classful address range.

• Helps conserve IP addresses.

• Important for network segmentation

Page 8: IP Addressing and subnetting

8

Subnetting

xxxxxxxx. xxxx xxxx.xxxxxxxx.xxxxxxxxNetwork ID Host ID

xxxxxxxx. xxxx.xxxxxxxx.xxxxxxxxxxxx

• 4 bits are borrowed.

• 24 = 16 subnets are available

• #addresses per subnet = 220

Page 9: IP Addressing and subnetting

9

1111

xxxx xxxx.xxxxxxxx.xxxxxxxx

Subnet Mask

ANDxxxxxxxx.IP Address

1111 1111. 0000.00000000.00000000Subnet Mask

xxxxxxxx. xxxx 0000.00000000.00000000Subnet ID

• CIDR Notation (Classless Inter-Domain Routing) - Specifies the length of the network portion with a number after a slash (/).

•Example Address: 192.168.129.10/18The subnet mask equivalent to this CIDR notation is 255.255.192.0The subnet ID is calculated as: 192.168.129.10 AND 255.255.192.0 = 192.168.128.0

Page 10: IP Addressing and subnetting

10

VLSM (Variable Length Subnet Masks)

• Custom subnet masks generate subnets that are all of the same size.– Note: Subnet masks associated with the A, B and C classes are

called default subnet masks.• This limitation still results in the wastage of addresses.

• Example: A class C network can be divided into 4 subnets each accommodating 62 hosts. On a subnet that requires only 2 hosts, 60 addresses will be wasted.

• VLSM prevents this by allowing recursive subnetting.

Page 11: IP Addressing and subnetting

11

VLSMExample: Given the IP address of 196.220.10.0/24, propose an addressing scheme to accommodate three subnets with 2, 30 and 100 hosts.

Solution: The host portion is initially 8 bits long which supports 254 hosts. Order the subnets in a decreasing number of hosts: Net1: 100, Net2: 30, Net3: 2

Net1: 100 hosts Requires 128 = 27 addresses borrow 1 bit 2 subnets are available, new CIDR prefix = /25 , BS= 128

196.220.10. x | 000 0000

Subnet ID#1: x=0 196.220.10.0/25 (196.220.10.1 to 196.220.10.127)

Assign this subnet to Net1.

Subnet ID#2: x=1 196.220.10.128/25 (196.220.10.127 to 196.220.10.255)

Break this down further for other subnets.

Page 12: IP Addressing and subnetting

12

VLSM (IP address assignments)

Majer Network Original subnets VLSM (L1) VLSM (L2) Assignment

196.220.10.0/24 196.220.10.0//25 Net1

196.220.10.128/25 196.220.10.128/27

Net2

196.220.10.160/27

Reserved

196.220.10.192/27

Reserved

196.220.10.224/27

196.220.10.224/30

Net3

196.220.10.228/30

Reserved

196.220.10.232/30

Reserved

196.220.10.236/30

Reserved

196.220.10.240/30

Reserved

196.220.10.244/30

Reserved

196.220.10.248/30

Reserved

196.220.10.252/30

Reserved

Page 13: IP Addressing and subnetting

13

Summary

• IP addressing techniques are used to segment a given address range.

• Segmentation results in IP address conservation, security and better performance.

Page 14: IP Addressing and subnetting

14

Questions