CS610P Lab 1-16
CS610P Lab 1-16
CS610P Lab 1-16
IPv4 uses 32 binary bits to create a single unique address on the network. An IPv4 address is
expressed by four numbers separated by dots. Each number is the decimal (base-10)
representation for an eight-digit binary (base-2) number, also called an octet. For example:
216.27.61.137
A MAC address, or Media Access Control address, is a 48 bit address associated with a
network adapter. While IP addresses are associated with software, MAC addresses are linked
to the hardware of network adapters. The MAC address is a unique value associated with a
network adapter. MAC addresses are also known as hardware addresses or physical
addresses. They uniquely identify an adapter on a LAN.
Prompt).
2. Type ipconfig and press Enter key. The spelling of the ipconfig is critical, but the case is
not.
3. The screen shows the IP address, subnet mask and the default gateway. The IP address
and the default gateway should be in the same network or subnet; otherwise this host
wouldn’t be able to communicate outside the network.
Write down the TCP/IP information for your computer.
a. IP address: _______________________________________________
1.___________________________________________________________
2.____________________________________________________________
3.____________________________________________________________
1. To see more information, type ipconfig/all and press Enter key. The figure shows the
detailed IP configuration of the computer on the screen.
2. You should see the following information:
The host name (computer name), the Physical address of your machine, IP address,
subnet Mask, Default Gateway and DNS Servers.
3. In the LAN, compare your result with a few nearby computers. What similarities do you
see in the physical (MAC) address?
________________________________________________________________
a. _______________________________________
b. _______________________________________
c. ________________________________________
d. ________________________________________
Ping uses the Internet Control Message Protocol (ICMP) echo-request and echo-reply feature to
test physical connectivity. If there will some Dropped or lost packets then a ping/trace route will
usually show as asterisks (*).
Ping the following addresses and verify that result was successful.
1. www.pucit.edu.pk
2. www.aiou.edu.pk
3. www.pu.edu.pk
4. www.microsoft.com
5. www.mit.edu.
Understanding OUTPUT:
Interesting result from ping is round-trip time calculation. Measured in milliseconds, round-trip
time indicates the delay between the sending of a ping request packet and the receipt of the
corresponding response packet. The network delay or latency indicated by ping offers a good
indicator of the responsiveness of network services on that remote host.
In computer networks, hop refers to the number of routers that a packet (a portion of data)
passes through from its source to its destination. The hop count represents the total number of
routing devices Time-to-live (TTL) fields. The TTL value specifies approximately how many
router (i.e. hops) the packet has gone through.
Adding to other answers that TTL value at max can be 255 because of its size of 1 byte ( 8 bits -
> max. value = 255 ). On the internet, it usually takes very less Round Trips ( RT ) to finish a
request. And within each trip, with each hop TTL decreases. Most of the requests get finished
without even reaching TTL value zero
You sent a request to some non-existent server/URL. At first its TTL was 255. It keeps on
hopping from 1 router to other, until TTL becomes zero, which is when a packet is dropped.
Because if you set TTL of a packet to 10000, it keeps on hopping from one device to another
(eventually TTL reaches zero and packet gets dropped) if the server/URL is not found. But think
if there are lots of packets circulating, without a destination, slowing the whole network.
Error messages:
This message indicates one of two problems: either the local system has no route to the desired
destination, or a remote router reports that it has no route to the destination. When you ping to an
IP address in a different network, ping packets reach default gateway. My default gateway sends
the packet to remote gateway. So ping packet finally reaches the remote network. However, if
the remote gateway failed to find the remote host, it will send an echo Destination host
unreachable.
The error message "Destination Host Unreachable” tells that the ping request from our computer
cannot find the route to the destination IP address (destination host). It means, the Packet send
from your computer reached the destination network successfully but the remote gateway failed
to find the destination host. So the remote gateway sends an Echo message Destination host
unreachable. One major possibility for this error; there is no route listed in the remote gateway,
for the packet send from your computer, to the destination host. If there is no route available, it is
impossible to find the destination host and your computer will receive an error message
"Destination host unreachable" from remote gateway. So one of the reason for this can be faulty
routing table. If the destination host is down at the time the packet send, it may result destination
host unreachable error message.
Request Timed Out
By default, ping/trace route waits Approximately 4,000 milliseconds (4 seconds) for each
response to be returned before displaying the "Request Timed Out" message. This error message
indicates that your host did not receive the ping message back from the destination device within
the designated time period. This is an indicator that the destination device is not connected to the
network, is powered off, or is not configured correctly.
ping 127.0.0.1
The address 127.0.0.1 is reserved for loopback testing. If the ping is successful, then TCP/IP is
properly installed and functioning on this computer.
Steps to tracing
Tracert uses the same echo requests and replies as the ping command but in a slightly different
way. Observe that tracert actually contacted each router three times. Compare the results to
determine the consistency of the route. Each router represents a point where one network
connects to another network and the packet was forwarded through.
Trace a local host name or IP address in your local area network (LAN).
Lab 2
Before starting this lab you are required to follow the below procedures:
2. To get familiar with the Packet Tracer environment, watch this video named "Interface
Overview" from the Help Tutorials.
In this Lab, we will design a simple network topology by selecting some devices and suitable
media. In this lab we will keep it simple by using End Devices, Switches, Hubs, and
Connections.
Two workspaces are supported; logical and physical. In the logical workspace, we can build
logical network topologies by placing, connecting, and clustering virtual network devices. The
physical workspace provides a sense of scale and placement in how network devices such as
routers, switches, and hosts would look in a real environment
It supports two operating modes—real-time mode and simulation mode. In real-time mode, all
network activities take place with immediate real-time response. The simulation mode allows a
user to control time intervals, and the propagation of data across a network.
You can download the latest version of Packet Tracer for free from www.netacad.com/about-
networking-academy/packet-tracer.
Menu bar: This is a commonly found menu. It is used to open, close, print, save, change
preferences, and so on.
Main toolbar: This bar contains shortcut icons to menu options that are frequently accessed. For
example, open, save, zoom, undo, and redo.
Single click on each group of devices and connections to display the various choices
Adding a Hub: Select a hub, by clicking once on Hubs and once on a Generic hub.
Connect PC0 to Hub0 by a suitable Connection.
Click once on the Copper Straight-through cable.
5. Notice the green link lights on both the PC0 Ethernet NIC and the Hub0 Port0 showing that
the link is active
Repeat the steps above for PC1 connecting it to Port1 on Hub0.
Adding a Switch: Select a switch, by clicking once on Switches and once on a 2950-24 switch.
5. Notice the green link lights on PC2 Ethernet NIC and amber light Switch0 FastEthernet0/1
port. The switch port is temporarily not forwarding frames, while it goes through the stages for
the Spanning Tree Protocol (STP) process.
6. After a about 30 seconds the amber light will change to green indicating that the port has
entered the forwarding stage. Frames can now be forwarded out the switch port.
Move the cursor over the link light to view the port. Fa means FastEthernet, 100 Mbps
Ethernet.
Step 5: Configuring IP Addresses and Subnet Masks on the Hosts Before we can communicate
between the hosts we need to configure IP Addresses and Subnet Masks on the devices.
To connect like-devices, like a Hub and a Switch, we will use a Cross-over cable. Click
once the Cross-over Cable from the Connections options.
o Move the Connections cursor to Switch0.
o Click once on Switch0 and choose FastEthernet0/3 (actual port does not matter).
o The link light for switch port FastEthernet0/3 will begin as amber and eventually
change to green
Adding routers
o In the Network Component Box, click on the router
o Select an 1841 router.
o Move the cursor to the Logical Workspace and click on the desired location.
NOTE: If multiple instances of the same device are needed press and hold the Ctrl button, click
on the desired device, and then release the Ctrl button. A copy of the device will be created and
can now be move to the desired location.
o Click on the router to bring up the Configuration Window. This window has three
modes: Physical, Config, and CLI (Physical is the default mode).
Lab 3
Access your network and identify the components of your network, for example; Servers,
Routers, End Devices, etc.
Step2: Complete the cabling.
Access the cables section and connect completely and correctly the cables between the networks
in order to ensure connectivity between the devices in the network using the connections table
given.
Step 3: Configure the IP addresses on the end devices.
Configure the IP addresses on the end devices. Using the address table still, correctly and
completely configure the IP addresses on all end devices. This can be done by accessing the
desktop platform on each device and locating the IP configuration section. The reason for doing
this is to enable the devices be on the right network.
Step 4: Configure the IP addresses on your routers and switches.
After configuring the right IP addresses on the end devices, you will have to do the same on the
routers and switches also, using the address table. But this time in a different way because there's
no desktop platform on the routers and switches. You will have to access the configuration panel
on both devices and this can be done in two ways:
Click on the device and open the Command Line Interface (CLI) and then type in the
right commands to configure the right addresses for the router using the addressing table.
Use a console cable from an end device and connect it to the device you wish to
configure and access the terminal platform on the end device and it will take you to the
device's Command Line Interface and then type in the commands in other to configure
the right addresses.
Step5: Configure the default gateway.
After configuring the IP addresses, you will need to configure the default gateway also. The
reason for this is so the end devices would know what network they are operating on. You can
find the default gateway either in the addressing table (if given) or in the network topology.
Step 6: Test connectivity
After configuring the addresses, you will have to test connectivity by opening a command
prompt window on the end devices and try pinging the address which the network operates on. If
it gives you a reply, it means your network was configured correctly.
Students and teacher communicate through Adobe Connect. Students perform the task using the
following simulator:
[https://www.netacad.com/courses/packet-tracer]
Lab 4
To transmit the data, medium must exist usually in the form of cables or wireless media.
Here are some most commonly used cable types.
RG-58 is typically used for wiring laboratories and offices, or another small group of
computers. The maximum length of thin wire Ethernet segment is 185 meters, which is due
to the nature of the CSMA/CD method of operation, the cable attenuation, and the speed at
which signals propagate inside the coax.
The length is limited to guarantee that collision is detected when machines that are apart transmit
at the same time. BNC connectors are used to terminate each end of the cable. When many
machines are connected to the same Ethernet segment, a daisy chain approach is used. The BNC
connectors allow the network interface card to the next machine. The machine each end of the
cable must use a terminating resistor to eliminate collision-causing reflection in the cable.
Coaxial connectors are needed to connect coaxial cable to devices. The most common type
of connector used today is the Bayone-Neil-Concelman, in short, BNC connector.
Fig 2: Coaxial Cable Connector
The three popular types of connectors are: the BNC connector, the BNC T connector, and
the BNC terminator. The BNC connector is used to connect the end of the cable to a
device, such as a TV set. The BNC T connector is used in Ethernet networks to branch out
to a connection to a computer or other device.
The BNC terminator is used at the end of the cable to prevent the reflection of the signal.
Applications
1. Coaxial cable was widely used in analog telephone networks, and later with digital
telephone networks.
2. Cable TV networks use coaxial cables (RG-59) at the network boundaries. However,
coaxial cable has largely been replaced today with fiber-optic cable due to its higher
attenuation.
3. Traditional Ethernet LAN
10Base-2, or thin Ethernet, uses RG-58 coax cable with BNC connectors.
10Base-5, or thick Ethernet, uses RG-11 coax cable with specialized connectors.
Twisted pair is probably the most widely used cabling system in Ethernet in networks. Two
copper wires twist around each other to form the twisted pair cable. Depending on category
several insulated wire strands can reside in the cable.
Applications
2. The local loop –the line connecting the subscriber to the central telephone office-
commonly consists of UTP cables.
3. DSL lines are also UTP cables.
4. LANs such as, 10Base-T and 100Base-T use UTP cables.
Fiber Optic
Step 5: Now give "enable" and press enter. Now you get into the Privileged Mode, now type
"configure terminal" and press enter to get into global configuration mode.
Step 6: Now configure router interface with ip address and subnet mask then give no shutdown
to make this interface and line protocol up(i.e. Carefully configure ip address with proper
interfaces in this case f0/0 and f1/0,f is short form of fast ethernet.
Step 8: Now give this command "ping 20.0.0.10" and press enter. You will get, connectivity
between 10.0.0.10 and 20.0.0.10 is ok. Now PC1 communicates with PC2
Mechanism to Conduct Lab:
Students and teacher communicate through Adobe Connect. Students perform the task using the
following simulator:
[https://www.netacad.com/courses/packet-tracer]
Lab 5
Repeater
Hub
Switch
Bridge
Router
Gate Way
2. Hub: An Ethernet hub, active hub, network hub, repeater hub, hub or concentrator
is a device for connecting multiple twisted pair or fiber optic Ethernet devices together and
making them act as a single network segment. Hubs work at the physical layer (layer 1) of the
OSI model. The device is a form of multiport repeater. Repeater hubs also participate in
collision detection, forwarding a jam signal to all ports if it detects a collision.
3.
6. GateWay: In a communications network, a network node prepared 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.
LAB # 6
CASE STUDY ON ROUTING
AIM
You must understand the difference between a routing protocol and a routed protocol.
1. A routing protocol is used by routers to dynamically find all the networks in the
internetwork and to ensure that all routers have the same routing table. Basically, a
routing protocol determines the path of a packet through an internetwork.
2. Once all routers know about all networks, a routed protocol can be used to send user data
(packets) through the established enterprise. Routed protocols are assigned to an interface
and determine the method of packet delivery.
ROUTING BASIS
The term routing is used for taking a packet from one device and sending it through the network
to another device on a different network. Routers do not really care about hosts; they only care
about networks and the best path to each network.
The logical network address of the destination host is used to get packets to a network through a
routed network, and then the hardware address of the host is used to deliver the packet from a
router to the correct destination host.
If a network is not directly connected to the router, then the router must use one of two ways to
learn how to get to the remote network:
Static routing
Dynamic routing
STATIC ROUTING
Static routing is a type of network routing technique. Static routing is not a routing protocol;
instead, it is the manual configuration and selection of a network route, usually managed by the
network administrator. It is employed in scenarios where the network parameters and
environment are expected to remain constant.
Static routing is only optimal in a few situations. Network degradation, latency and congestion
are inevitable consequences of the non-flexible nature of static routing because there is no
adjustment when the primary route is unavailable.
Pros
· There is no overhead on the router CPU, which means that you could possibly buy a cheaper
router than you would use if you were using dynamic routing.
· There is no bandwidth usage between routers, which means you could possibly save money on
WAN links.
· It adds security because the administrator can choose to allow routing access to certain
networks only.
Cons
· The administrator must really understand the internetwork and how each router is connected in
order to configure routes correctly.
· If a network is added to the internetwork, the administrator has to add a route to it on all routers
—by hand.
· It’s not feasible in large networks because maintaining it would be a full-time job in itself.
Dynamic Routing
Dynamic routing is a networking technique that provides optimal data routing. Unlike static
routing, dynamic routing enables routers to select paths according to real-time logical network
layout changes. In dynamic routing, the routing protocol operating on the router is responsible
for the creation, maintenance and updating of the dynamic routing table. In static routing, all
these jobs are manually done by the system administrator.
Dynamic routing uses multiple algorithms and protocols. The most popular are Routing
Information Protocol (RIP) and Open Shortest Path First (OSPF).
There are some pros and cons of dynamic routing
Pros
Cons
Because routers share updates, they consume more bandwidth than in static routing; the
routers CPUs and RAM may also face additional loads as a result of routing protocols.
Dynamic routing is less secure than static routing.
Lab 7
1. Introduction to Wireshark
2. How to create a Troubleshooting Profile in Wireshark
Introduction to Wireshark
Wireshark is a network packet analyzer which captures network packets and displays that packet
data as detailed as possible. Wireshark is free open source software program available
at www.wireshark.org
Intended Purposes:
When run on a host connected to a wired or wireless network, Wireshark captures and decodes
the network frames. People use it to learn network protocol internals. Network administrators use
it to troubleshoot network problems. Network security engineers use it to examine security
problems.
Wireshark’s Features
Wireshark’s Installation
Installation Components
• Plugins & Extensions - Extras for the Wireshark and TShark dissection engines.
• User’s Guide
Installing WinPcap: With WinPcap installed you would be able to capture live network traffic.
The main window is shown next.
The different interfaces available that WinPcap driver sees in the machine are shown and you
can either click start or click options for more options regarding capturing packets before starting
the capture
Task 1:
Until you create a new profile, you are working in Wireshark's Default profile. The profile you
are working in is shown in the right side column of the Status Bar. This is shown next.
You can create profiles to customize Wireshark with buttons, colors, and more. You can create
separate profiles for different needs. For example, you may want to make a VoIP profile, a
WLAN profile, and a general troubleshooting profile. You can quickly switch between profiles
depending on your needs.
As soon as you create your new profile, the Wireshark Status Bar indicates that you are working
in the Troubleshooting Book Profile, as shown next
You will be able to add capabilities and customization to this new profile. Wireshark also allows
download/import a predefined profile for immediate use.
Task-2
By default, the Packet List pane contains: No. (number), Time, Source, Destination, Protocol,
Length, and Info columns. This is shown next.
You can add columns to display additional information about packets to speed up your analysis
process.
Lab 8
Learning Objective: At the end of the lab you will be able to know how to assign IP address to a PC
connected to the Internet.
Step-1: To assign or change the computer’s IP address in Windows, type network and sharing into the
Search box in the Start Menu and select Network and Sharing Center when it comes up. If you’re in
Windows 7 or 10 it’ll be in the start menu.
Step-2: Then when the Network and Sharing Center opens, click on Change adapter settings. This will be
the same on Windows 7 or 10
Step-4: In the Local Area Connection Properties window highlight Internet Protocol Version 4 (TCP/IPv4)
then click the Properties button.
Now select the radio button Use the following IP address and enter in the correct IP, Subnet mask, and
Default gateway that corresponds with your network setup. Then enter your Preferred and Alternate
DNS server addresses. Here we’re on a home network and using a simple Class C network configuration
and Google DNS.
Step-5: Check Validate settings upon exit so Windows can find any problems with the addresses you
entered. When you’re finished click OK
Step-6: Now close out of the Local Area Connections Properties window.
Windows will run network diagnostics and verify the connection is good. Here we had no problems with
it, but if you did, you could run the network troubleshooting wizard.
Step-7: Now you can open the command prompt and do an ipconfig to see the network adapter
settings have been successfully changed.
Lab 9
Objective:
Introduce Address Resolution Protocol (ARP) and the arp –a workstation command.
Explore the arp command help feature using the -? Option.
Background / Preparation
ARP is used as a tool for confirming that a computer is successfully resolving network Layer 3 addresses
to Media Access Control (MAC) Layer 2 addresses.
ARP maintains a table in the computer of IP and MAC address combinations. In other words, it keeps
track of which MAC address is associated with an IP address. If ARP does not know the MAC address of a
local device, it issues a broadcast using the IP address. This broadcast searches for the MAC address that
corresponds to the IP address. If the IP address is active on the LAN, it will send a reply from which ARP
will extract the MAC address. ARP will then add the address combination to the local ARP table of the
requesting computer.
MAC addresses and therefore ARP are only used within the LAN. When a computer prepares a packet
for transmission, it checks the destination IP address to see if it is part of the local network. It does this
by checking to see if the network portion of the IP address is the same as the local network. If it is, the
ARP process is consulted to get the MAC address of the destination device using the IP address. The
MAC address is then applied to the data packet and used for delivery.
If the destination IP address is not local, the computer will need the MAC address of the default
gateway. The default gateway is the router interface that the local network is connected to in order to
provide connectivity with other networks. The gateway MAC address is used because the packet will be
delivered there and the router will then forward it to the network it is intended for.
If the computer does not receive any packets from an IP address after a few minutes, it will drop the
MAC/IP entry from the ARP table assuming the device has logged off. Later attempts to access that IP
address will cause ARP to do another broadcast and update the table.
1. Hardware Type: This is to specify the type of hardware used by the local network to transmit
the Address Resolution Protocols message. Once common hardware under this category would
be the ‘Ethernet’ with a value equal to 1.
2. Protocol Type: The protocol type is a 16-bit field used to specify the type of protocol.
3. Hardware size: This is the length in bytes for the MAC address; generally, we see the ethernet
has a MAC address of 6 bytes long.
4. Protocol Size: It represents the length of the IPV4 logical address, IPV4 address re generally 4
bytes long.
5. OpCode: . Operation Code indicates that the packet is an ARP Request (1) or an ARP Response
(2).It specifies the nature of the ARP message.An ARP Request has an assigned value of 1,
whereas the ARP reply holds the value of 2.
6. Sender MAC address: Layer 2 (MAC) address for the device sending the message.
7. Sender IP address: Protocol address in IPV4 for the device sending the message.
8. Target MAC address: Layer 2 (MAC) address of the intended receiver. This field does not hold
any value during the request phase and works only during the reply phase.
9. Target IP address: This address the protocol address for the intended receiver.
Step 1
Establish a network connection If the connection to the Internet is dial-up, connect to the ISP to ensure
that the computer has an IP address. In a TCP/IP LAN with a Dynamic Host Configuration Protocol
(DHCP) server it should not be necessary to do this step.
Step 2
One of the quickest ways to launch the Command Prompt, in any modern version of Windows, is to use
the Run window. Then, type cmd or cmd.exe and press Enter or click/tap OK
Step 3
a. Display the ARP table a. In the window type arp -a and press Enter. Do not be surprised if there
are no entries. The message displayed will probably be, ‘No ARP Entries Found’. Windows
computers remove any addresses that are unused after a couple minutes.
b. Try pinging a couple local addresses and a website URL. Then re-run the command. The figure
below shows a possible result of the arp -a command. The MAC address for the website will be
listed because it is not local, but that will cause the default gateway to be listed. In the example
below 10.36.13.1 is the default gateway while the 10.36.13.92 and 10.36.13.101 are other
network computers. Notice that for each IP address there is a Physical Address, or MAC, and
type, indicating how the address was learned.
Step 4
a. Ping the following URLs and note the IP address of each. Also select one additional URL to ping
and record it below:
www.cisco.com: _____________________________
www.vu.edu.pk:_______________________________
b. Now run the arp –a command again and record the MAC addresses for each of the above next
to their IP addresses.
Try the command arp -? To see the help feature and look over the options.
The purpose of this step is not so much the ARP command options but to demonstrate using the? To
access help, if available.
Lab 10
1. Classful Addressing
2. Determining Address Class
2. Classful Addressing
The original IP addressing scheme is set up so that the dividing line occurs only in one of a few
locations: on octet boundaries. There are five classes of available IP ranges: Class A, Class B,
Class C, Class D and Class E, while only A, B, and C are commonly used. Each class allows for
a range of valid IP addresses. They allow the Internet to provide addressing for a small number
of very large networks, a moderate number of medium-sized organizations, and a large number
of smaller companies.
Network Identifier (Network ID): A certain number of bits, starting from the left-most bit, are
used to identify the network where the host or other network interface is located. This is also
sometimes called the network prefix or even just the prefix.
Host Identifier (Host ID): The remainder of the bits is used to identify the host on the network.
As IP address split into network ID and host ID components, these addresses are assigned special
meanings. For example, if the network ID is used with all ones in the host ID portion, this
indicates a broadcast to the entire network. Similarly, if the network ID is used by itself with all
zeroes in the host portion indicates the network ID.
If you move a device from one network to a different one the network ID must change to that of
the new network. Therefore, the IP address must change as well.
All Ones: When the host bits are replaced by a set of all ones, this has the special meaning of the
broadcast ID of the network, this address used to send a common message for all hosts exists in
this network.
There are several other sets of IP addresses set aside for various special uses, which are
not available for normal address assignment.
Loopback Addresses
The purpose of the loopback range is testing of the TCP/IP protocol implementation on a host.
Private/Unregistered/Non-Routable Addresses
Lab 11
IPv4 Address Subnetting
1. Subnetting of Classful IP Addressing
2. Classless Addressing
3. IP Subnet Addressing ("Subnetting") Concepts
4. IP Subnet Masks, Notation and Subnet Calculations
5. IP Default Subnet Masks for Address Classes A, B and C
6. Deciding How Many Subnet Bits to Use
7. Trading Off Bit Allocations to meet Subnetting Requirements
In the subnet addressing system, the two-tier network/host division of the IP address is made into
a three-tier system by taking some number of bits from a class A, B or C host ID and using them
for a subnet identifier or number. The network ID is unchanged. The subnet ID is used for
routing within the different subnetworks that form a complete network, providing extra
flexibility for administrators. For example, consider a class C address that normally uses the first
24 bits for the network ID and remaining 8 bits for the host ID. The host ID can be split into, say,
3 bits for a subnet ID and 5 for the host ID.
2. Classless Addressing
In the classless system, the division between the network ID and host ID can occur at an arbitrary
point, not just on octet boundaries like in the “Classful” scheme. In the original “Classful”
scheme the division between network ID and host ID is implied. However, if either Subnetting or
classless addressing is used, then the subnet mask or “slash number” are required to fully qualify
the address.
The original “Classful” IP addressing scheme conceptually divides a large internetwork into a
simple two-level hierarchy: many networks of different sizes, each of which contains a number
of hosts. The system works well for smaller organizations that may connect all their machines in
a single network. However, it lacks flexibility for large organizations that often have many
subnetworks, or subnets. To better meet the administrative and technical requirements of larger
organizations, the “Classful” IP addressing system was enhanced through a technique known
as subnet addressing, or Subnetting.
A three-level hierarchy is thus created: networks, which contain subnets, each of which then has
a number of hosts.
The key decision in Subnetting is how many bits to take from the host ID portion of the IP
address to put into the subnet ID. The number of subnets possible on our network is two to the
power of the number of bits we use to express the subnet ID, and the number of hosts possible
per subnet is two to the power of the number of bits left in the host ID (less two, one for network
id and one for broadcast).
7. Trading Off Bit Allocations to Meet Subnetting Requirements
The key design decision in Subnetting is how to divide the “Classful” host ID into subnet ID and
host ID bits. We must make this choice based on our requirements for the number of subnets that
exist in the network, and also on the maximum number of hosts that need to be assigned to each
subnet in the network.
Lab 12
1. Requirements Analysis
2. Partitioning Network Address Host Bits
3. Class B Subnetting Design Example
4. Class C Custom Subnet Mask Calculation Example
5. Class B Custom Subnet Mask Calculation Example
6. Determining Subnet Identifiers and Subnet Addresses
7. VLSM & Route Summarization
8. Class B Subnet ID and Address Determination Example
9. CIDR ("Slash") Notation
Analyzing the requirements of the network for subnetting isn't difficult, because there are only a
few issues that we need to consider. Since requirements analysis is usually done by asking
questions, here's a list of the most important questions in analyzing subnetting requirements:
We need to analyze the requirements above not only for the present network, but for the near
future as well.
2: Partitioning Network Address Host Bits
After we complete our brief requirements analysis, we should know the two critical parameters
that we must have in order to subnet our network: the number of subnets required for the
network, and the maximum number of hosts per subnetwork. In using these two figures to design
our Subnetted network, we will decide while subnetting: how to divide the 8, 16 or 24 bits in the
“classful” host ID into subnet ID and host ID. We need to decide how many bits to borrow from
the host ID to use for the subnet ID.
There are six possible ways this decision can be made for a Class C network, as the following
figure illustrates:
The relationship between the bits and the number of subnets and hosts is as follows:
o The number of subnets allowed in the network is two to the power of the number
of subnet ID bits.
o The number of hosts allowed per subnet is two to the power of the number of host
ID bits, minus two.
We subtract two from the number of hosts in each subnet to exclude the “special meaning” cases
where the host ID is all zeroes or all ones. First we must calculate the number of subnets and
hosts when we use the subnet ID bits and leave the rest for the host ID.
2. Change Left-Most Zeroes to Ones for Subnet Bits: We have decided to use 3 bits for the
subnet ID. The subnet mask has to have a 1 for each of the network ID or subnet ID bits. The
network ID bits are already 1 from the default subnet mask, so, we change the 3 left-most 0 bits
in the default subnet mask from a 0 to 1
3. Convert Subnet Mask To Dotted Decimal Notation: We take each of the octets in the
subnet mask and convert it to decimal. The result is our custom subnet mask in the form we
usually see it: 255.255.255.224.
4. Express Subnet Mask In “Slash Notation”: Alternately, we can express the subnet mask in
“slash notation”. This is just a slash followed by the number of ones in the subnet mask.
255.255.255.224 is equivalent to “/27”.
Now, let's do the same example with our Class B network (166.113.0.0) with 5 bits for the
subnet ID (with a bit less narration this time):
1. Determine Default Subnet Mask: For Class B, the subnet mask is 255.255.0.0. In binary,
this is:11111111 11111111 00000000 00000000
2. Change Left-Most Zeroes to Ones for Subnet Bits: We have decided to use 5 bits for the
subnet ID, so, we change the 5 left-most 0 bits from 0 to 1.
3. Convert Subnet Mask to Dotted Decimal Notation: We take each of the octets in the subnet
mask and convert it to decimal, to give us a custom subnet mask of 255.255.248.0
4. Express Subnet Mask in “Slash Notation”: We can express the subnet mask 255.255.248.0
as “/21”, since it is 21 ones followed by 11 zeroes. In other words, its prefix length is 21.
The network ID assigned to our network applies to the entire network. This includes all subnets
and all hosts in all subnets. Each subnet, however, needs to be identified with a unique subnet
identifier called subnet ID, so it can be differentiated from the other subnets in the network. This
is of course the purpose of the subnet ID bits that we took from the host ID bits in subnetting.
After we have identified each subnet we need to determine the address of each subnet, so we can
use this in assigning hosts specific IP addresses.
The key to understanding how to determine subnet IDs and subnet addresses is to always work in
binary form, and then convert to decimal later.
1. Subnet ID: This is just the subnet number, and can be expressed in either binary or decimal
form.
2. Subnet Address: This is the address formed by taking the address of the network as a whole,
and substituting the (binary) subnet ID in for the subnet ID bits. We need to do this in binary, but
only for the octets where there are subnet ID bits; the ones where there are only network ID bits
or only host ID bits are left alone.
This diagram shows each of the 8 possible subnets created when we use 3 bits for the subnet ID
in a Class C network. The binary subnet ID is simply substituted for the subnet bits, and the
resulting 32-bit number converted to dotted decimal form. The address of any subnet can be
found by adding 32 to the last octet of the previous subnet. This pattern occurs for all subnetting
choices; the increment depends on how many bits we are using for the subnet ID.
Here, the increment is 32, which is 25; 5 is the number of host ID bits left after we took 3 subnet
ID bits.
Class B network 166.113.0.0. We are using 5 bits for the subnet ID, leaving 11 hosts ID bits.
This diagram shows how both subnet addresses and host addresses are determined in a two-step
process. The subnet addresses are found by substituting subnet ID values (shown in red) for the
subnet ID bits of the network. Then, for any given subnet address, we can determine a host
address by substituting a host number (shown in blue) for the host ID bits within that subnet. So,
for example, host #2 in subnet #6 has “110” for the subnet ID and “00010” for the host ID,
resulting in a final octet value of “11000010” or 194.
Just as subnetting required the use of a subnet mask to show which bits belong to the network ID
or subnet ID and which to the host ID, CIDR uses a subnet mask to show where the line is drawn
between host ID and network ID. However, for simplicity, under CIDR we don't usually work
with 32-bit binary subnet masks. Instead, we use slash notation, more properly called CIDR
notation. In this method, we show the size of the network, sometimes called the prefix length, by
following an IP address by an integer that tells us how many bits are used for the network ID
(prefix).
For example, consider the network specification 184.13.152.0/22. The “22” means this network
has 22 bits for the network ID and 10 bits for the host ID. This is equivalent to specifying a
network with an address of 184.13.152.0 and a subnet mask of 255.255.252.0. This sample
network provides a total of 1,022 hosts (210 minus 2). The table in the following topic shows all
the different possible network sizes that can be configured under CIDR.
The network ID is the same for all hosts in all subnets, and all subnets in the network.
The subnet ID is the same for all hosts in each subnet, but unique to each subnet in the network.
The host ID is unique within each subnet. Each subnet has the same set of host IDs.