Lab 5 - Classful IP Addressing
From SOFTICE
|
Pedagogical Objectives
- Review IP addressing fundamentals.
- Introduce the concept of subnetting.
- Introduce IP addressing classes.
Developed by:
Synopsis
IP addresses are 32 bit long, OSI Model Layer 3 addresses. In this lab, we will introduce classful addressing - one of the schemes used to create a hierarchy of IP addresses.
[Briefing]
IP (Internet Protocol) addresses are divided into two parts - a network address, which specifies what network a particular address is located in, and a host address, which is used to uniquely identify a particular host within that network. Classful IP addressing is one scheme that is used to make this division.
There are five IP addressing classes - classes A through E. In this lab, we will deal with A through C, which are used to address individual hosts on the Internet. Class D and E addresses are used for other purposes, and will be discussed in later labs.
The table below shows the differences between class A, B and C addresses:
| Class | Leading Bits | # of Network Bits | Network Mask | # of Host Bits |
|---|---|---|---|---|
| A | 0 | 7 | 255.0.0.0 | 24 |
| B | 10 | 14 | 255.255.0.0 | 16 |
| C | 110 | 21 | 255.255.255.0 | 8 |
IP addresses are generally written out in dotted decimal notation. When using this notation, each of address' four octets (bytes) is written out as a decimal number between 0 and 255. Each of these numbers is separated by a dot.
Subnet masks are used to denote where the network portion of an IP address ends, and the host portion begins. Like IP addresses, subnet masks are 32 bits long, and often written out with dotted decimal notation. All leading bits and network address bits are set to 1. All host bits are set to 0.
You can calculate the number of usable networks by calculating 2x, where x is equal to the number of bits being allocated to the network portion of the address. The first and last networks within the class A IP addressing space (0 or 00000000, and 127 or 01111111) are reserved. Therefore, there are 27-2, or 126 usable class A networks. There are no reserved class B or C networks.
You can calculate the number of usable hosts in a network by calculating 2x-2, where x is equal to the number of bits being allocated to the host portion of the address. Therefore, there are 224-2, or 16,777,214 potential host addresses within a class A network. As you can imagine, this is a large number of host addresses, which few organizations could fully utilize.
[Solved]
Complete the following solved exercise, recording your findings, and the procedures used to obtain them in your log. By doing this, you may be able to obtain partial credit if you are unable to complete any of the exercises.
Note: Before disconnecting from SOFTICE, be sure to shut your virtual hosts down. This procedure is described in Exercise 1-3: Shutdown the Network. This must be done in order to conserve system resources on the SOFTICE cluster.
Solved 5-1: Subnet the Ring Network
The Ring Network has been assigned the 190.0.0.0 Class B IP block. Edit the Ring Network's configuration file, reconfiguring each host appropriately. Use class C subnet masks.
1. Copy the Ring Network's configuration file to a writable directory. The original ring.mln file is in the write-protected mln_files directory.
cd mln cp mln_files/ring.mln files/solved-5-1.mln
2. Edit the solved-5-1.mln configuration file that you just created.
nano files/solved-5-1.mln
- The following example is one possible solution to this exercise. The modified lines are shown in red.
global {
project ring
$console = screen
}
switch lakelandTampa {}
switch lakelandOrlando {}
switch tampaOrlando {}
superclass hosts {
term $console
kernel = /home/sys/net/bin/linux-2.6.18.1/linux
template = DebianNet-3.1-v1.ext2
size 300M
}
host lakeland {
superclass hosts
cow_filesystem lakeland.cow
network eth0 {
switch lakelandTampa
address 190.0.3.1
netmask 255.255.255.0
}
network eth1 {
switch lakelandOrlando
address 190.0.4.1
netmask 255.255.255.0
}
}
host tampa {
superclass hosts
cow_filesystem tampa.cow
network eth0 {
switch lakelandTampa
address 190.0.3.2
netmask 255.255.255.0
}
network eth1 {
switch tampaOrlando
address 190.0.5.1
netmask 255.255.255.0
}
}
host orlando {
superclass hosts
cow_filesystem orlando.cow
network eth0 {
switch tampaOrlando
address 190.0.5.2
netmask 255.255.255.0
}
network eth1 {
switch lakelandOrlando
address 190.0.4.2
netmask 255.255.255.0
}
}
[Exercises]
Complete the following exercises, recording your findings, and the procedures used to obtain them in your log.
Note: Before disconnecting from SOFTICE, be sure to shut your virtual hosts down. This procedure is described in Exercise 1-3: Shutdown the Network. This must be done in order to conserve system resources on the SOFTICE cluster.
Exercise 5-1: Identifying IP Address Classes
Determine which IP address class each of the following IP addresses fall into:
1. 192.168.0.1
2. 65.103.78.9
3. 172.16.0.2
4. 203.54.19.112
Exercise 5-2: Calculating the Number of Hosts and Networks
1. How many usable class B networks are there?
2. How many usable class C networks are there?
3. How many usable host addresses are there in a class B network?
4. How many usable host addresses are there in a class C network?
Exercise 5-3: Subnet the Ring Network
1. The Ring Network has been assigned the 172.16.0.0 Class B IP block. Create a new copy of the ring.mln file, then reconfigure each host appropriately. Use class C subnet masks.
2. Verify connectivity between all hosts located on the same subnet.
Exercise 5-4: Subnet the Two Locations Network
1. The Two Locations network has been assigned the 10.0.0.0 Class A IP block. Create a new copy of the twoLocations.mln file, then reconfigure each host appropriately. Use class B subnet masks.
2. Verify connectivity between all hosts located on the same subnet.
Exercise 5-5: Subnet the Three Locations Network
1. The Three Locations network has been assigned the 65.0.0.0 class A IP block. Create a new copy of the threeLocations.mln file, then reconfigure each host appropriately. Use class C subnet masks.
2. Verify connectivity between all hosts located on the same subnet.




