Lab 06 IP-Addressing
Lab 06 IP-Addressing
Topic
IP Addressing Subnetting
IP Addresses
32 bits
version (4 bits) header length Type of Service/TOS (8 bits) flags (3 bits) Total Length (in bytes) (16 bits) Fragment Offset (13 bits) Header Checksum (16 bits) Identification (16 bits) TTL Time-to-Live (8 bits) Protocol (8 bits)
Ethernet Header
IP Header
TCP Header
Application data
Ethernet Trailer
Ethernet frame
3
IP Addresses
32 bits
0x4 0x5 9d08 12810 0x06 128.143.137.144 128.143.71.21 0x00 0102 4410 00000000000002 8bff
Ethernet Header
IP Header
TCP Header
Application data
Ethernet Trailer
Ethernet frame
4
Host 1
Network A
Network C
TCP
UDP
IP
Classful Addresses
Class A
Class B
Class C
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, corporate location, ) Routers on an IP network know their local subnets Remote routers need to know only the network address
9
Subnetting
University Network
Engineering School Library Medical School
Difficult to manage From the outside of the organization, each network must be addressable.
Subnetting
10
Each part of the organization is allocated a range of IP addresses (subnets or subnetworks) Addresses in each subnet can be administered locally
128.143.0.0/16
University Network
128.143.71.0/24 128.143.136.0/24
Engineering School
Medical School
128.143.56.0/24
Library
128.143.121.0/24
11
Split the host number portion of an IP address into a subnet number and a (smaller) host number. Result is a 3-layer hierarchy network prefix host number
network prefix
subnet number
host number
Then:
Subnets can be freely assigned within the organization Internally, subnets are treated as separate networks Subnet structure is not visible outside the organization
12
Subnetmask
Routers and hosts use an extended network prefix (subnetmask) to identify the start of the host numbers
128.143
network prefix
137.144
host number
128.143
network prefix extended network prefix
137
subnet number
144
host number
Advantages of Subnetting
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.
14
No Subnetting
All hosts think that the other hosts are on the same network
128.143.137.32/16
subnetmask: 255.255.0.0
128.143.71.201/16
subnetmask: 255.255.0.0
128.143.70.0/16
15
With Subnetting
Hosts with same extended network prefix belong to the same network
128.143.137.32/24 128.143.137.144/24
subnetmask: 255.255.255.0
128.143.71.21/24
subnetmask: 255.255.255.0
128.143.71.201/24
subnetmask: 255.255.255.0
subnetmask: 255.255.255.0
128.143.71.0/24 Subnet
16
With Subnetting
Different subnetmasks lead to different views of the size of the scope of the network
128.143.137.32/26 128.143.137.144/26 128.143.71.21/24
subnetmask: 255.255.255.0
128.143.71.201/16
subnetmask: 255.255.0.0
128.143.137.0/26 Subnet
128.143.137.128/26 Subnet
128.143.71.0/24 Subnet
128.143.0.0/16
17
220.78.168.0
220.78.169.0 220.78.170.0
220.78.169.0
Routing Routing Table Table for for Router Router BB 220.78.168.0 255.255.255.0 220.78.168.1 Routing Table for Router B
255.255.255.0 255.255.255.0 255.255.255.0 255.255.255.0 255.255.255.0 255.255.255.0 255.255.255.0 255.255.255.0 220.78.168.1 220.78.168.1 220.78.168.1 220.78.168.1 220.78.168.1 220.78.168.1 220.78.168.1 220.78.168.1
220.78.172.0
220.78.173.0 220.78.174.0 220.78.170.0 220.78.175.0 220.78.170.64
18
END.
19