CSE 338-438 Lab Manual 6 (Spring 23)
CSE 338-438 Lab Manual 6 (Spring 23)
IP Address Classes
A classful network is a network addressing architecture used in the Internet from 1981 until
the introduction of Classless Inter-Domain Routing in 1993. The method divides the address
space for Internet Protocol Version 4 (IPv4) into five address classes by address range. All IP
addresses are placed in a particular class based on the decimal values of their first octets. In
the first octet, an IP address can start with a decimal value between 1 and 255.
Size of
Total
Leadin networ Size of rest Number Addresses Start
Class addresse End address
g bits k bit field of networks per network address
s in class
number
bit field
Class A 0 8 24 27 224 231 0.0.0.0 127.255.255.25
5
Class B 10 16 16 214 216 230 128.0.0. 191.255.255.25
0 5
Class C 110 24 8 221 28 229 192.0.0. 223.255.255.25
0 5
Class D not
1110 not defined not defined not defined 228 224.0.0. 239.255.255.25
(multicast) defined
0 5
Class E not
1111 not defined not defined not defined 228 240.0.0. 255.255.255.25
(reserved) defined
0 5
IP addresses are described as consisting of two groups of bits in the address: the most
significant bits are the network address (or network prefix or network block), which identifies a
whole network or subnet, and the least significant set forms the host identifier, which specifies a
particular interface of a host on
Prepared by Tousif
Osman
that network. This division is used as the basis of traffic routing between IP networks and for
address allocation policies. Classful network design for IPv4 sized the network address as one
or more 8-bit groups, resulting in the blocks of Class A, B, or C addresses. Classless Inter-
Domain Routing allocates address space to Internet service providers and end users on any
address bit boundary, instead of on 8- bit segments. In IPv6, however, the interface identifier
has a fixed size of 64 bits by convention, and smaller subnets are never allocated to end users.
Subnet Mask
A subnetwork or subnet is a logical subdivision of an IP network. The practice of dividing a
network into two or more networks is called subnetting.
Example:
Here network prefix 12.34.158 and host address is 5. Furthermore corresponding network has a
subnet mask 255.255.255.0 therefor this network can have IP addresses from 12.34.158.0 -
12.34.158.255. As the subnet mas is of 24 bit any particular IP in this network can also be
written as 12.34.158.XXX / 24. To get the host address the logical AND operation is performed
on IP address with subnet mask.
Prepared by Tousif
Osman
Exercise 1: Experiment with subnet
Step 1: Make the physical connection
Routing:
A router is a networking device that forwards data packets between computer networks.
Routers perform the traffic directing functions on the Internet. A data packet is typically
forwarded from one router to another through the networks that constitute the internetwork until
it reaches its destination node.
Gateways:
In telecommunications, the term gateway refers to a piece of networking hardware that
has the following meaning:
In a communications network, a network node equipped for interfacing with another
network that uses different protocols.
A gateway may contain devices such as protocol translators, impedance matching
devices, rate converters, fault isolators, or signal translators as necessary to provide
system interoperability. It also requires the establishment of mutually acceptable
administrative procedures between both networks.
A protocol translation/mapping gateway interconnects networks with different network
protocol technologies by performing the required protocol conversions.
Loosely, a computer or computer program configured to perform the tasks of a
gateway. For a specific case, see default gateway.
Prepared by Tousif
Osman
Exercise 2: Connecting two networks with a router
Step 1: Make the physical connection like the below figure.
Step 2: Configure the DHCP so that it assigns IPs to end devices leaving 2 IPs at the
beginning subnetwork IP block.
Step 3: Configure the DHCP server to setup gateway IP
Step 4: Configure Router’s 2 First Ethernet IP address same as the respective
subnetwork’s default gateway.
Step 5: Turn on First Ethernet ports of router
Step 6: Use PDU too to verify connection between to two subnetworks
Prepared by Tousif
Osman
Step 3: Write the below command in router to configure them
In Router 1
Prepared by Tousif
Osman
Exercise 5: Connect two networks over Fiber Optic Cable
Step 1: Add “NM-1FE-FX” interface in the router and make the physical connection
like the below figure.
Lab Tasks:
Complete all 6 exercise
Home task:
1. Hand write the CLI instructions to configure the 2 routers in exercise. Lets assume left
and right network has network prefix respectively “192.168.1.0/8”, “192.168.2.0/8”
2. Who to subnet the IP “192.168.1.0” in to 4 subnets? What will be the most appropriate
subnet mask?
Reading References:
1. https://en.wikipedia.org/wiki/Subnetwork
2. https://en.wikipedia.org/wiki/Router_(computing)
3. https://en.wikipedia.org/wiki/Gateway_(telecommunications)
4. http://www.ipaddresslocation.org/ipaddress.shtml
Prepared by Tousif
Osman