8/13/2019 Lab 06 IP-Addressing
1/19
1
IP Addressing
andSubnettingH ig hP erf orm an ceS wit ch in gan d R ou tin gTel ecom Center W ork shop: Sept4 ,1997 .
8/13/2019 Lab 06 IP-Addressing
2/19
2
Topic
IP Addressing
Subnetting
8/13/2019 Lab 06 IP-Addressing
3/19
3
IP Addresses
Application dataTCP HeaderEthernet Header Ethernet Trailer
Ethernet frame
IP Header
version
(4 bits)
header
length
Type of Service/TOS
(8 bits)
Total Length (in bytes)
(16 bits)
Identification (16 bits)flags
(3 bits)Fragment Offset (13 bits)
Source IP address (32 bits)
Destination IP address (32 bits)
TTL Time-to-Live
(8 bits)
Protocol
(8 bits) Header Checksum (16 bits)
32 bits
8/13/2019 Lab 06 IP-Addressing
4/19
4
IP Addresses
Application dataTCP HeaderEthernet Header Ethernet Trailer
Ethernet frame
IP Header
0x4 0x5 0x00 4410
9d08 0102
00000000000002
128.143.137.144
128.143.71.21
12810 0x06 8bff
32 bits
8/13/2019 Lab 06 IP-Addressing
5/19
5
Hosts, Networks, and Routers
Network A
Network B
Network CRouter
Host 1
Host 2
Host 7
Host 1
Host 12Host 2
Unique IP Address =
Network Number + Host Number
8/13/2019 Lab 06 IP-Addressing
6/19
6
The Most Common Routing
Protocols
Routing protocols exchange network
reachability information between routers.
IP (and ICMP)
TCP UDP
BGP RIP
OSPF EIGRPIS-IS
Cisco proprietary
8/13/2019 Lab 06 IP-Addressing
7/19
7
Classful Addresses
0nnnnnnn
10nnnnnn nnnnnnnn
nnnnnnnn nnnnnnnn110nnnnn
hhhhhhhh hhhhhhhh hhhhhhhh
hhhhhhhh hhhhhhhh
hhhhhhhh
n= network address bit h= host identifier bit
Class A
Class C
Class B
8/13/2019 Lab 06 IP-Addressing
8/19
8
The Classful Address Space
Class Networks Hosts Share of IP
address space
A 127 16,777,214 1/2
B 16,384 65,534 1/4
C 2,097,152 254 1/8
Leads to very inefficient allocation of addresses
8/13/2019 Lab 06 IP-Addressing
9/19
9
Subnets The idea is to share the same IP network
number among multiple subnets
Subnets of a network should reside in the same
general locale (e.g., college campus, corporatelocation, )
Routers on an IP network know their local
subnets
Remote routers need to know only the network
address
8/13/2019 Lab 06 IP-Addressing
10/19
10
Subnetting
Subnetting
Problem: Organizationshave multiple networks
which are independently
managed Solution 1:Allocate a
separate network address
for each network
Difficult to manage
From the outside of the
organization, each networkmust be addressable.
Solution 2:Add another
level of hierarchy to the IP
addressing structure
University Network
Medical
School
Library
Engineering
School
8/13/2019 Lab 06 IP-Addressing
11/19
11
Each part of the organization is allocated a range of IPaddresses (subnets or subnetworks)
Addresses in each subnet can be administered locally
Address assignment with subnetting
University Network
Medical
School
Library
Engineering
School
128.143.0.0/16
128.143.71.0/24
128.143.136.0/24
128.143.56.0/24
128.143.121.0/24
8/13/2019 Lab 06 IP-Addressing
12/19
12
Basic Idea of Subnetting Split the host number portion of an IP address into a subnetnumberand a (smaller) host number.
Result is a 3-layer hierarchy
Then: Subnets can be freely assigned within the organization Internally, subnets are treated as separate networks
Subnet structure is not visible outside the organization
network prefix host number
subnet numbernetwork prefix host number
extended network prefix
8/13/2019 Lab 06 IP-Addressing
13/19
13
Routers and hosts use an extended network prefix(subnetmask)to identify the start of the host numbers
Subnetmask
128.143 137.144
network prefix host number
128.143 144
network prefix host number subnet
number
137
extended network prefix
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
subnetmask
8/13/2019 Lab 06 IP-Addressing
14/19
14
Advantages of Subnetting
With subnetting, IP addresses use a 3-layer hierarchy:
Network
Subnet
Host
Reduces router complexity. Since external routers do not
know about subnetting, the complexity of routing tables
at external routers is reduced.
Note: Length of the subnet mask need not be identical at
all subnetworks.
8/13/2019 Lab 06 IP-Addressing
15/19
15
No Subnetting
All hosts think that the other hosts are on
the same network
128.143.70.0/16
128.143.137.32/16
subnetmask: 255.255.0.0
128.143.71.21/16
subnetmask: 255.255.0.0
128.143.137.144/16
subnetmask: 255.255.0.0
128.143.71.201/16
subnetmask: 255.255.0.0
8/13/2019 Lab 06 IP-Addressing
16/19
16
128.143.0.0/16
128.143.137.32/24
subnetmask: 255.255.255.0
128.143.71.21/24
subnetmask: 255.255.255.0
128.143.137.144/24
subnetmask: 255.255.255.0
128.143.71.201/24
subnetmask: 255.255.255.0
128.143.137.0/24
Subnet
128.143.71.0/24
Subnet
With Subnetting
Hosts with same extended network prefix
belong to the same network
8/13/2019 Lab 06 IP-Addressing
17/19
17
Different subnetmasks lead to different views of
the size of the scope of the network
128.143.0.0/16
128.143.137.32/26
subnetmask: 255.255.255.192
128.143.71.21/24
subnetmask: 255.255.255.0
128.143.137.144/26
subnetmask: 255.255.255.192
128.143.71.201/16
subnetmask: 255.255.0.0
128.143.71.0/24
Subnet128.143.137.128/26
Subnet
128.143.137.0/26
Subnet
With Subnetting
8/13/2019 Lab 06 IP-Addressing
18/19
18
Optimizing the Allocation of IP Addresses
Routing Table for Router B220.78.168.0 255.255.255.0 220.78.168.1
220.78.169.0 255.255.255.0 220.78.168.1
220.78.170.0 255.255.255.0 220.78.168.1
220.78.171.0 255.255.255.0 220.78.168.1
220.78.172.0 255.255.255.0 220.78.168.1
220.78.173.0 255.255.255.0 220.78.168.1
220.78.174.0 255.255.255.0 220.78.168.1220.78.175.0 255.255.255.0 220.78.168.1
Before Supernetting:
Route
r A
220.78.168.0
220.78.169.0
220.78.170.0
220.78.171.0
220.78.172.0
220.78.173.0
220.78.174.0
220.78.175.0
Router B
Routing Table for Router B
220.78.168.0 255.255.255.0 220.78.168.1
Router B220.78.168.0 Router A
After Supernetting:After Subnetting
Router B
220.78.168.0
220.78.168.64
220.78.168.128220.78.168.192
220.78.169.0
220.78.169.64
220.78.169.128
220.78.169.192
Router
A
220.78.170.0
220.78.170.64
Routing Table for Router B
220.78.168.0 255.255.255.0 220.78.168.1
8/13/2019 Lab 06 IP-Addressing
19/19
19
END.
Top Related