Download Preference of Class B Addresses over Class C Addresses in IP Networks: Historical View and more Study notes Computer Networks in PDF only on Docsity!
G.Bianchi, G.Neglia, V.Mancuso
Lecture 10.^ Lecture 10.
Subnetting &Subnetting
& Supernetting
Supernetting
G.Bianchi, G.Neglia, V.Mancuso
Outline^ Outline
Î
Subnetting^ Ö
Variable Length Subnet Mask (VLSM)
Î
Supernetting^ Ö
Classless Inter-Domain Routing (CIDR)
G.Bianchi, G.Neglia, V.Mancuso
Need for subnetting^ Need for
subnetting
Î
Net_id-Host_id:
Ö
place host_id on physical network net_id
65534 hosts on a same physical network????
- performance?- management?
CLASS B:From:
To:
G.Bianchi, G.Neglia, V.Mancuso
Idea: further hierarchy level^ Idea: further hierarchy level
Ö
subdivide a network in several subnetworks
Ö
each subnet = a physical network (Ethernet, FDDI, X.25,ATM, Frame Relay, etc….)
Sub-Net
Router Host
131.175.21.
Ethernet
FDDI
ATM
131.175.21.
131.175.21.
131.175.21.
131.175.12.
131.175.12.
131.175.12.
131.175.12.
131.175.12.
131.175.33.
May use third byte to identify subnet: 131.175.
X
.0 (or may not!)
Class B network: 131.175.0.
G.Bianchi, G.Neglia, V.Mancuso
Subnetting^ Subnetting
Class B address exampleClass B address example
1
NET ID (14bit)
HOST ID (16-n bit)
0
SUBNET ID (n bit)
1
NET ID (14bit)
HOST ID (16 bit)
0
network prefix
(network address)
Extended network prefix
(subnet address)
G.Bianchi, G.Neglia, V.Mancuso
Subnet Address^ Subnet
Address &
& Mask
Mask
Î
Host IP address:159.100.9.
Î
Class B - network mask:255.255.0.
Î
Subnet Mask
Ö
Longer than natural class mask; Length set by administrator
Ö
Tells where the boundary network-host really is
Î
Example: class B address with 5 bits subnet_id
Ö
subnet mask = /
Ö
/prefix-length notation
Ö
subnet mask = 255.255.248.
Ö
(dot decimal notation)
Ö
159.100.0.0 = net_id
Ö
159.100.8.0 = extended network address
(net_id+subnet_id)
Ö
To avoid ambiguity: 159.100.8.0/
G.Bianchi, G.Neglia, V.Mancuso
Remember: subnetting^ Remember:
subnetting is arbitrary!
is arbitrary!
Example: subnettingExample:
subnetting Class C 193.1.1.0 Address
Class C 193.1.1.0 Address
1
NET ID (21bit)
HOST ID (8 bit)
1 0
Class C
/24 prefix
Subnetted
/27prefix
1
NET ID (21bit)
Host id
(5bit)
1 0
Subnet
(3 bit)
Base net
Subnet # 0
Subnet # 1
Subnet # 2
Subnet # 3
Subnet # 4
Subnet # 5
Subnet # 6
Subnet # 7
Remember: maximum 30(
5
-2) hosts attachable to each subnet
G.Bianchi, G.Neglia, V.Mancuso
Possible netmask^ Possible
netmask values
values
1
1
1
1
1
1
1
1
= 255
1
1
1
1
1
1
1
0
= 254
1
1
1
1
1
1
0
0
= 252
1
1
1
1
1
0
0
0
= 248
1
1
1
1
0
0
0
0
= 240
1
1
1
0
0
0
0
0
= 224
1
1
0
0
0
0
0
0
= 192
1
0
0
0
0
0
0
0
= 128
G.Bianchi, G.Neglia, V.Mancuso
Subnet routing^ Subnet
routing –
- 2nd example
2nd example
Core routers unaware of subnettingCore routers unaware of subnetting –
- route via class mask
route via class mask
193.1.1.
145.54.3.
162.12.34.
193.1.1.
145.54.55.
…
…
162.12.0.
193.1.1.
…
…
…
…
162.12.0.
193.1.1.
…
…
…
…
162.12.0.
145.54.3.
…
…
…
…
162.12.0.
145.54.3.
…
…
Î
routing tables in theInternet:
Ö
route according to net_id
Ö
Use natural class mask
Net = 162.12.0.
subnet mask = 255.255.255.
162.12.34.
162.12.1.
162.12.2.
162.12.1.
default
162.12.9.
162.12.1.
162.12.1.
162.12.9.
…
…
162.12.2.
Î
Corporate routers & hosts:
Ö
Route according to subnet_id
Ö
Need to KNOW subnet mask
162.12.34.
162.12.2.
G.Bianchi, G.Neglia, V.Mancuso
Router configuration^ Router
configuration
Î
Classful routing:
Ö
All necessary informationincluded in Ipaddr
Î
Subnet routing
Ö
Specific subnet mask(set by admin) required
dest
Next Hop
Subnet mask:
Direct fwd
Routing Table
Net = 162.12.0.0; subnet mask 255.255.255.
162.12.1.
162.12.1.
162.12.34.
162.12.34.
Direct fwd
default
To131.175.0.0131.176.0.
To other nets
162.12.35. 162.12.35.
162.12.70. 162.12.70.
162.12.1.
To othersubnets
162.12.34.
162.12.1.
May be quite a complexRouting table…VLSM will help (later)
G.Bianchi, G.Neglia, V.Mancuso
Subnetting Example (solution?)^ Subnetting
Example (solution?)
A
C
B
Math dept
193.1.1.96/ up to 30 hosts
(97-126)
Computation^ 193.1.1.64/27up to 30 hosts
(65-94)
Link- Link-
algebra
193.1.1.32/27up to 30 hosts
(33-62)
193.1.1.0 network
Where are the errors?
physics
193.1.1.160/ up to 30 hosts
(161-190)
G.Bianchi, G.Neglia, V.Mancuso
Subnetting Example (solution!)^ Subnetting
Example (solution!)
A
C
B
Math dept
193.1.1.96/ up to 29 hosts
(97-126)
Computation^ 193.1.1.64/27up to 29 hosts
(65-94)
Link-
193.1.1.128/
Link-
193.1.1.192/
algebra
193.1.1.32/27up to 29 hosts
(33-62)
193.1.1.0 network
physics
193.1.1.160/ up to 28 hosts
(161-190)
Subnet mask:/
SUBNETS:Math
Algebra 193.1.1.32/27Physics
Comput 193.1.1.64/27Link-
Link-
G.Bianchi, G.Neglia, V.Mancuso
Variable Length Subnet Mask^ Variable Length Subnet Mask
Î
allows more than one subnet mask in thesame network
Ö
A) more efficient use of organization’s IP address space
Æ
Subnets may significantly vary in relative size (computerroom = 200 hosts, secretary = 4 hosts…)
Æ
consider a 4 host network with mask 255.255.255.0: wastes250 IP addresses!
Ö
B) allows route aggregation, thus reducing routinginformation needed
Î
Needs further support by routing protocol
Ö
e.g. RIP1 doesn’t support VLSM
G.Bianchi, G.Neglia, V.Mancuso
A typical problem^ A typical problem
A
C
B
pc-net 100 host ws-net 20 host
x-net-1 20 host^ x-net-2^ 10 host
Link- Link-
Link-
100+20+20+10 = 150 total hosts: 1 class C enough (including growth projections).7 subnets (4 LANS + 3 point to point links): 3 bit subnet ID (= up to 8 subnets)BUT then max 30 host per subnet: no way to accommodate pc-net!!