Upload
ali-nezhad
View
131
Download
1
Embed Size (px)
Citation preview
IP Addressing and Subnetting
Ali Nezhad
2
Outline
• Introduction• IP Address Format• Routing
– Classful– Classless
• IP Subnetting• VLSM• Summary
3
Introduction
Node 4Node 2
Node 3Node 1
Router 3
Router 2Router 1
Router 4
Every communication device needs an address.
4
IP Address Format
01111111.00001010.00010100.10000010
127 . 10 . 20 . 130
00000000binary= 0decimal
11111111binary= 255decimal
5
Packet Routing
212.10.12.14
121.30.112.24
212.10.12.14 DATA
SA121.30.112.24
DA
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
7
Classless Addressing
• Allows for breaking up of a classful address range.
• Helps conserve IP addresses.
• Important for network segmentation
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
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
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.
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.
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
13
Summary
• IP addressing techniques are used to segment a given address range.
• Segmentation results in IP address conservation, security and better performance.
14
Questions