Nothing Special   »   [go: up one dir, main page]

CS610P Lab 1-16

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 81

Lab 1

a)- Introduction and gathering addresses (IP/MAC) information

In this lab we will learn about

1. Introduction to IP/Mac address


2. Gather information, including the connection, host name, MAC(Layer2) address, and
TCP/IP Network(Layer 3)
3. Learn to use the TCP/IP packet Internet groper (ping) command.
4. Learn to ping Loopback address
5. Learnt to use the trace route (tracert) command.

Introduction to IP and Mac addressing

Every machine on a network has a unique identifier. An IP address provides an identity to a


networked device. Similar to a home or business address supplying that specific physical
location with an identifiable address; devices on a network are differentiated from one another
through IP addresses.

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.

Gather TCP/IP configuration information.

1. Use the Start menu to open the command prompt

(Start>Programs>Accessories>Command Prompt or Start>Programs>Command

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: _______________________________________________

b. Subnet mask: _____________________________________________

c. Default gateway: ___________________________________________

 Compare your computer’s TCP/IP configuration to that of others on the LAN. If


this computer is on a LAN, compare the information of several machines (Hosts).

a. Are there any similarities? ____________________________________________

b. What is similar about the IP addresses? __________________________________

c. What is similar about the default gateway? _______________________________

d. Record a couple of the IP addresses (of your nearby hosts)

1.___________________________________________________________

2.____________________________________________________________

3.____________________________________________________________

Check additional TCP/IP configuration information.

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?

________________________________________________________________

d. Write down the computer’s host name: _______________________________

e. Write down the host names of a couple of other computer:

a. _______________________________________

b. _______________________________________

c. ________________________________________

d. ________________________________________

b) Verification of network connectivity using Ping and trace route

Using PING and TRACERT from a Workstation


Open the Command prompt (MS-DOS). Ping the IP address/domain name of another computer.

In the window, type ping, a space, and the IP address/domain name.

Steps to pinging vu website

1-your computer should be connected to Internet

2-GO to Dos Prompt

3-On Dos Prompt write ping www.vu.edu.pk

4-you will see the Pinging statistics

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.

By default, ping waits Approximately 4,000 milliseconds (4 seconds) for each response to be


returned before displaying the "Request Timed Out" message.

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.

Why we do not need a bigger TTL value.

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:

 Destination Host Unreachable

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.

Step-5: Ping the computer’s loopback IP address.

Type the following command:

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.

Step-6:  Using trace route command

Steps to tracing

1-your computer should be connected to Internet

2-GO to Dos Prompt

3-On Dos Prompt write tracert www.mit.edu

4-you will see the trace route statistics


The result shows the complete route to the site and the number of hops in path. Traces out the
route and permits you to access a particular server. The tracert command gives you a long list of
all servers you pass through on your way to your final destination. (Maximum up to 30hops- if
your route is longer than that, you are expected to give up waiting for the connection).

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).

Mechanism to Conduct Lab:

Students and teacher communicate through Adobe Connect.

Lab 2

Before starting this lab you are required to follow the below procedures:

1. Download Packet Tracer Simulation Tool on your PC.

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.

Packet Tracer Workspaces

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

Packet Tracer Modes

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.

Installation of Packet Tracer

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.

Physical/Logical workspace tabs: These tabs allow you to choose between


the Logical and Physical work areas.
Common tools bar: With help of this toolbar, we can manipulate topologies. For example,
select, move layout, place note, delete, resize shape, add simple/complex Protocol data unit
(PDU).

Workspace: Here, we create topologies and display simulations.


Step 1: Start Packet Tracer and enter in logical work space
Step 2: Choosing Devices and Connections

Single click on each group of devices and connections to display the various choices

Step 3: Adding Hosts using device selection option


 Single click on the End Devices icon.

 Single click and drag the Generic host.


 Add three more hosts.

Step 4: Connect the Hosts to Hub and Switch

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.

Perform the following steps to connect PC0 to Hub0:

1. Click once on PC0

2. Choose Fast Ethernet

3. Drag the cursor to Hub0

4. Click once on Hub0 and choose Port0

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.

 Connect PC2 to Switch0 by first choosing Connections.


 Click once on the Copper Straight-through cable.
 Perform the following steps to connect PC2 to Switch0:

1. Click once on PC2


2. Choose Fast Ethernet

3. Drag the cursor to Switch0

4. Click once on Switch0 and choose FastEthernet0/1

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.

 Repeat the steps above for PC3 connecting it to Port3 on switch0


on port FastEthernet0/2.

 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.

 Click once on PC0.


 Choose the Config tab. It is here that you can change the name of PC0. It is also here
where you would enter a Gateway IP Address, also known as the default gateway. If you
want, you can enter the IP Address 192.168.1.1.
 Click on FastEthernet. Add the IP Address to 192.168.1.10. Click once in the Subnet
Mask field to enter the default Subnet Mask. You can leave this at 255.255.255.0.
Connecting Hub0 to Switch0

 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.

 Move the Connections cursor over Hub0 and click once.



o Select Port2


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

Task: How to configure a network on Packet Tracer.

Software: Packet tracer Software

Configure a Network on Cisco Packet Tracer

Step1: Open Network Topology.

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.

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 4

To study about different physical equipment used for networking Cables

To transmit the data, medium must exist usually in the form of cables or wireless media.
Here are some most commonly used cable types.

Thick Coaxial Cables (thick net) (RG-11)


Thick coaxial cables or thick wire is known as the Ethernet standard RG-11. This cable is
mostly used as backbone cable, distributing Ethernet signal throughout a building, an
office complex or other large installation. It is used in 10base5 Ethernet standard. The
length may be up to 500 meters with a max of five segments connected by repeaters. This
gives a total distance of 2500 meters. This is called a network diameter. RG-11 cable is
typically orange; with black rings around the cable every 2.5-meter to allow taps into the
cable.

Thin coaxial cables (thin net) (RG-58)

 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.

Fig 1: Thin coaxial cables (thin net) (RG-58)

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 Cable Connectors

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 cables

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.

Twisted pair is available in two basic types

a. Unshielded Twisted Pair (UTP)


b. Shielded Twisted Pair (STP)

Twisted pair cables

Unshielded Twisted Pair


Mostly the UTP is used. A twisted pair segment can’t exceed 100 meters. This limitation is the
only drawback to twisted pair. Twisted pair is used for 10/100 based Ethernet networks. UTP
cables are wired as straight through or crossover cables. Straight through cables typically connect
the computer’s networks interface can’t to be a port on the hub. Crossover cables are used for
NIC to communication and for hub-to-hub connections when no crossover port is available.

Characteristics of twisted pair cable

1. Requires amplifiers every 5-6 km for analog signals


2. Requires repeaters every 2-3 km for digital signals
3. Attenuation is a strong function of frequency
4. Susceptible to interference and noise

Fig 3: RJ45 Cables

Applications

1. Used in telephone lines to provide voice


and data channels.

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

Fiber Optic relies on pulsed as light to carry


information. Two types of plastic or glass with different physical properties are used (the inner
core and the outer cladding) to allow a beam of light to reflect off the boundary between the core
and cladding. Some fiber optic cables allow many different paths other allow one single mode.
They are called multimode and single mode fibers. A popular multimode fiber has core/cladding
dimensions of 62.5/125 nanometers.

Fig 4: Fiber Optic cable connector

Task: How to Configure Ip address to PC and Routers in Packet Tracer

Software: Packet Tracer

Configure Ip address to PC and Routers

Step 1: Create a simple topology like this,


Step 2: Click on PC 1->Config, assign Gateway in this case, 10.0.0.1
Step 3:

Click on Fastethernet and assign ip address and subnet mask,


In this case ip 10.0.0.10 and subnet mask 255.0.0.0,Now close PC 1 window. Do like this for
PC2 with appropriate ip and subnet mask.
Step 4: Now Click on Router R1,then click on

CLI(Command Line Interface).


You will see like this, "Continue with configuration dialog? [yes/no]:".Give "no" and Press enter.
Now you will go to user mode.

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.

Router(config)#interface fastEthernet 0/0


Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Interface Line protocol on FastEthernet0/0, changed state to up
Router(config)#interface fastethernet 1/0
Router(config-if)#ip address 20.0.0.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Interface Line protocol on FastEthernet1/0, changed state to up

Step 7: Now lights on all ports become green from red.

Now click on PC1->Desktop->Command Prompt.

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

Objective: Study of following Network Devices in Detail


 Repeater
 Hub
 Switch
 Bridge
 Router
 Gate Way

Tool (Software): No software or hardware required.

Method: Following should be done to understand this practical.


1. Repeater: Functioning at Physical Layer. A repeater is an electronic device that receives a signal
and retransmits it at a higher level and/or higher power, or onto the other side of an
obstruction, so that the signal can cover longer distances. Repeater have two ports ,so cannot
be used to connect for more than two devices

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.

Switch: A network switch is a computer networking device that connects network segments.


The term commonly refers to a network bridge that processes and routes data at the data link
layer (layer 2) of the OSI model. Switches that additionally process data at the network layer
(layer 3 and above) are often referred to as Layer 3 switches or multilayer switches.
4. Bridge: A network bridge connects multiple network segments at the data link layer (Layer 2) of
the OSI model. In Ethernet networks, the term bridge  formally means a device that behaves
according to the IEEE 802.1 D standards. A bridge and switch are very much alike; a switch being
a bridge with numerous ports. Switch or Layer 2 switch  is often used interchangeably with
bridge. Bridges can analyze incoming data packets to determine if the bridge is able to send the
given packet to another segment of the network.

5. Router: A router is an electronic device that


interconnects two or more computer networks, and selectively interchanges packets of data
between them. Each data packet contains address information that a router can use to
determine if the source and destination are on the same network, or if the data packet must be
transferred from one network to another. Where multiple routers are used in a large collection
of interconnected networks, the routers exchange information about target system addresses,
so that each router can build up a table showing the preferred paths between any two systems
on the interconnected networks.

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

1. To study the Routing protocol and Routed protocol


2. Routing basis
3. Static Routing

ROUTING PROTOCOL AND ROUTED PROTOCOL

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.

Examples of routing protocols are RIP, RIPv2, EIGRP, and OSPF.

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.

Examples of routed protocols are IP and IPv6.

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.

There are some pros and cons of static routing

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

 Dynamic routing is easy to configure on large networks.


 More intuitive at selecting the best route, detecting route changes and discovering remote
networks.

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

In this lab we will learn about:

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

1- Available for UNIX and Windows.

2- Capture live packet data.

3- Display packets with very detailed protocol information.

4- Filter packets on many criteria.


5- Save packet data captured.

Wireshark’s Installation

Wireshark can be downloaded from website www.wireshark.org

Get Wireshark installer from: www.wireshark.org/download.html and execute it

Installation Components

• Wireshark - The network protocol analyzer.

• TShark - A command-line network protocol analyzer.

• Plugins & Extensions - Extras for the Wireshark and TShark dissection engines.

• Tools - Additional command line tools to work with capture files

• 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:

How to create a Troubleshooting Profile in Wireshark:

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.

Step1: Right-click the Profile column on the Status Bar.


Step2: In the Configuration Profile window, select New.

Step3: Click the arrow in the Create from area, expand the Global section and select Classic.


This profile uses the most vibrant colors.

Step4: Enter Troubleshooting Book Profile in the Profile Name area. Click OK.

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

How to enhance the Packet List Pane Columns in Wireshark

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

To assign IP address to the PC connected to the internet

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.

Assigning IP address in Windows 7 or Windows 10

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-3:  Right-click on your local adapter and select Properties.

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.

The Structure of Arp Header:

Below listed fields are there in an ARP message.

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

Access a command prompt

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

Ping several URLs

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.

 Use the ARP Help Feature

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

IPv4 Address Subnetting

In this lab we learn about:

1. Classful Addressing
2. Determining Address Class

1. IP Address Class A, B and C Network and Host Capacities

3. IP Addresses with Special Meanings

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.

3. Determining Address Class from the First Octet Bit Pattern


4. IP Address Class A, B and C Network and Host Capacities

5. Special Address Patterns Special IP addresses are constructed by


replacing the normal host ID in an IP address with one of two
special patterns. The two patterns are:
 All Zeroes: When the host bits are replaced by a set of all zeroes, the special meaning is the
equivalent of the Network ID that represent all hosts in that network especially in the routing
table.

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.

Reserved Addresses Several blocks of addresses were designated just as “reserved” with no


specific indication given of what they were reserved for. They may have been set aside for future
experimentation, or for internal use in managing the Internet, or for other purposes. These
address extract along 0.0.0.0 class and 255.0.0.0 class.

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

In this lab we will learn about:

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

1. Subnetting of Classful IP Addressing 

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.

3. IP Subnet Addressing ("Subnetting") Concepts

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.

4. IP Subnet Masks, Notation and Subnet Calculations


We use the subnet mask by applying the Boolean AND function between it and the IP address to
obtain the Network ID and subnet ID of that IP address.

Instead of specifying IP address of 154.71.150.42 with subnet mask of 255.255.248.0, we can


just say 154.71.150.42/21. This is sometimes called slash notation or Classlesss Inter-Domain
Routing (CIDR) notation. It is more commonly used in variable-length masking (VLSM)
environments, and as the second name implies, is also the standard for specifying classless
addresses under the CIDR addressing scheme.

5. IP Default Subnet Masks for Address Classes A, B and C


6. Deciding How Many Subnet Bits to Use

  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

IPv4 Address Subnetting-Part2

In this lab we learn about:

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

 1: Requirements Analysis

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:

 What class is our IP address block?


 How many physical subnets are on the network? (A “physical subnet” generally refers to
a broadcast domain on a LAN; a set of hosts on a physical network bounded by routers.)
 Are we adding more physical networks in the near future? If so then how many?
 How many hosts do we have in the largest subnet today?
 How many hosts do we have in the largest subnet in the near future?

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.

Fundamental trade-off in choosing this number is as follows:

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.

3. Class B Subnetting Design Example


4. Class C Custom Subnet Mask Calculation Example
1. Determine Default Subnet Mask: Each of Classes A, B and C has a default subnet mask,
which is the subnet mask for the network prior to subnetting. It has a 1 for each network ID bit
and a 0 for each host ID bit. For Class C, the subnet mask is 255.255.255.0.

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”.

5. Class B Custom Subnet Mask Calculation Example

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.

6: Determining Subnet Identifiers and Subnet Addresses:

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.

7. VLSM & Route Summarization:

We determine the subnet IDs and addresses as follows:

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.

Class C Subnet ID and Address Determination Example

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.

8. Class B Subnet ID and Address Determination Example

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.

9. CIDR ("Slash") Notation


Classless addressing scheme sometimes called Classless Inter-Domain Routing (CIDR).

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.

Important note about subnetting:

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.

You might also like