Download as pdf or txt
Download as pdf or txt
You are on page 1of 95

Computer Laboratory Manual

Data Communication
TABLE OF CONTENT

Lab# Topic Page#

1 An Overview of Networking 1-14

2 Making Network Cables and Connectors 15-21

3 Diagnostic Utilities 22-32

4 The Cisco IOS CLI- Architecture & Network Simulation Tool 33-41

5 Basic Switch Configuration 42-48

6 Mac Address & Address Resolution Protocol (ARP) 49-58

7 Open Ended Lab-I 59


Configure Domain Name Server (DNS) & Dynamic Host Configuration Protocol
8 60-68
(DHCP) Server
9 Remote Accessing of Switch Using Telnet & Secure Shell (SSH) 69-72

10 Configure Virtual Lan (VLAN) 73-76

11 Configure Port Security 77-82

12 Configure Spanning Tree Protocol (STP) 83-86

13 Capturing ARP, DHCP & DNS Packets on Wire-shark 87-92

14 Open Ended Lab-II 93

15 Final Exams -----


LAB # 1
AN OVERVIEW OF NETWORKING &
NETWORK DEVICES
OBJECTIVE 1 (A)
To discover the different network topologies and network devices.

THEORY

COMPUTER NETWORKING
Computer networking is the engineering discipline concerned with communication
between computer systems or devices. Networking, routers, routing protocols, and
networking over the public Internet have their specifications.

 A computer network can be two computers connected:

 A computer network can also consist of, and is usually made for, more than
two computers:

CE-307L: Data Communication 1


CHARACTERISTICS OF A COMPUTER NETWORK

The primary purpose of a computer network is to share resources:


 You may have a computer with a CD writer or a backup system but the other
computer doesn’t have it; In this case, you can burn CDs or make backups on
a computer that has one of these but using data from a computer that doesn’t
have a CD writer or a backup system
 You can connect a printer (or a scanner, or a fax machine) to one computer
and let other computers of the network print (or scan, or fax) to that printer (or
scanner, or fax machine)
 You can place a CD with pictures on one computer and let other computers
access those pictures
 You can create files and store them in one computer, then access those files
from the other computer(s) connected to it

CABLING
Cable is the medium through which information usually moves from one network
device to another. There are several types of cable, which are commonly used with
LANs. In some cases, a network will utilize only one type of cable, other networks
will use a variety of cable types. The type of cable chosen for a network is related to
the network's topology, protocol, and size. Understanding the characteristics of
different types of cable and how they relate to other aspects of a network is necessary
for the development of a successful network.
The following sections discuss the types of cables used in networks and other related
topics.
 Unshielded Twisted Pair (UTP) Cable
 Shielded Twisted Pair (STP) Cable
 Coaxial Cable
 Fiber Optic Cable
 Installing Cable - Some Guidelines

UNSHIELDED TWISTED PAIR (UTP) CABLE


Twisted pair cabling comes in two varieties: shielded and unshielded. Unshielded
twisted pair (UTP) is the most popular and is generally the best option for school
networks (See fig. 1.1).

Fig.1.1: Unshielded Twisted Pair


CE-307L: Data Communication 2
The quality of UTP may vary from telephone-grade wire to high-speed cable. The
cable has four pairs of wires inside the jacket. Each pair is twisted with a different
number of twists per inch to help eliminate interference from adjacent pairs and other
electrical devices. The EIA/TIA (Electronic Industry Association/Telecommunication
Industry Association) has established standards of UTP and rated five categories of
wire.

Table 1.1: Categories of Unshielded Twisted Pair


Type Use
Category 1 Voice Only (Telephone Wire)
Category 2 Data to 4 Mbps (LocalTalk)
Category 3 Data to 10 Mbps (Ethernet)
Category 4 Data to 20 Mbps (16 Mbps Token Ring)
Category 5 Data to 100 Mbps (Fast Ethernet)
Category 5e Data to 10 Gbps (Giga Ethernet)
Category 6 Data to 100 Gbps

One difference between the different categories of UTP is the tightness of the twisting
of the copper pairs. The tighter the twisting, the higher the supported transmission rate
and the greater the cost per foot. Buy the best cable you can afford; most schools
purchase Category 3, Category 5 or Category 5e. Category 5e cable is highly
recommended.
If you are designing a 10 Mbps Ethernet network and are considering the cost savings
of buying Category 3 wire instead of Category 5, remember that the Category 5 cable
will provide more "room to grow" as transmission technologies increase. Both
category 3 and category 5 UTP have a maximum segment length of 100 meters.
10BaseT refer to the specifications for unshielded twisted pair cable (category 3, 4, or
5) carrying Ethernet signals.

UNSHIELDED TWISTED PAIR CONNECTOR


The standard connector for unshielded twisted pair cabling is a RJ-45 connector. This
is a plastic connector that looks like a large telephone-style connector (See fig. 1.2).
A slot allows the RJ-45 to be inserted only one way. RJ stands for Registered Jack,
implying that the connector follows a standard borrowed from the telephone industry.
This standard designates which wire goes with each pin inside the connector.

Fig.1.2. RJ-45 Connector

CE-307L: Data Communication 3


SHIELDED TWISTED PAIR (STP) CABLE
A disadvantage of UTP is that it may be susceptible to radio and electrical frequency
interference. Shielded twisted pair (STP) is suitable for environments with electrical
interference; however, the extra shielding can make the cables quite bulky. Shielded
twisted pair is often used on networks using Token Ring technology.

COAXIAL CABLE
Coaxial cabling has a single copper conductor at its center. A plastic layer provides
insulation between the center conductor and a braided metal shield (See Fig. 1.3). The
metal shield helps to block any outside interference from fluorescent lights, motors,
and other computers.

Fig 1.3 Coaxial Cable


Although coaxial cabling is difficult to install, it is highly resistant to signal
interference. In addition, it can support greater cable lengths between network devices
than twisted pair cable. The two types of coaxial cabling are thick coaxial and thin
coaxial.
Thin coaxial cable is also referred to as thinnet. 10Base2 refer to the specifications for
thin coaxial cable carrying Ethernet signals. The 2 refer to the approximate maximum
segment length being 200 meters. In actual fact the maximum segment length is 185
meters. Thin coaxial cable is popular in school networks, especially linear bus
networks.
Thick coaxial cable is also referred to as thicknet. 10Base5 refer to the specifications
for thick coaxial cable carrying Ethernet signals. The 5 refer to the maximum segment
length being 500 meters. Thick coaxial cable has an extra protective plastic cover that
helps keep moisture away from the center conductor. This makes thick coaxial a great
choice when running longer lengths in a linear bus network. One disadvantage of
thick coaxial is that it does not bend easily and is difficult to install.

COAXIAL CABLE CONNECTORS


The most common type of connector used with coaxial cables is the Bayone-Neill-
Concelman (BNC) connector (See fig.1.4). Different types of adapters are available
for BNC connectors, including a T-connector, barrel connector, and terminator.
Connectors on the cable are the weakest points in any network. To help avoid
problems with your network, always use the BNC connectors that crimp, rather than
screw, onto the cable.

Fig 1.4 BNC Connector

CE-307L: Data Communication 4


FIBER OPTIC CABLE
Fiber optic cabling consists of a center glass core surrounded by several layers of
protective materials (See fig. 1.5). It transmits light rather than electronic signals,
eliminating the problem of electrical interference. This makes it ideal for certain
environments that contain a large amount of electrical interference. It has also made it
the standard for connecting networks between buildings, due to its immunity to the
effects of moisture and lighting.
Fiber optic cable has the ability to transmit signals over much longer distances than
coaxial and twisted pair. It also has the capability to carry information at vastly
greater speeds. This capacity broadens communication possibilities to include services
such as video conferencing and interactive services. The cost of fiber optic cabling is
comparable to copper cabling; however, it is more difficult to install and modify.

Fig 1.5 Fiber Optic Cable


10BaseF refer to the specifications for fiber optic cable carrying Ethernet signals.
Facts about fiber optic cables:
 Outer insulating jacket is made of Teflon or PVC.
 Kevlar fiber helps to strengthen the cable and prevent breakage.
 A plastic coating is used to cushion the fiber center.
 Center (core) is made of glass or plastic fibers.

FIBER OPTIC CONNECTOR


The most common connector used with fiber optic cable is a ST (Straight Tip)
connector. It is barrel shaped, similar to a BNC connector. A newer connector, the SC
(Subscriber Connector), is becoming more popular. It has a squared face and is easier
to connect in a confined space.

Table 1.2: Ethernet Cable Summary


Specification Cable Type Maximum length
10BaseT Unshielded Twisted Pair 100 meters
10Base2 Thin Coaxial 185 meters
10Base5 Thick Coaxial 500 meters
10BaseF Fiber Optic 2000 meters

CE-307L: Data Communication 5


Installing Cable - Some Guidelines
When running cable, it is best to follow a few simple rules:
 Always use more cable than you need. Leave plenty of slack.
 Test every part of a network as you install it. Even if it is brand new, it may
have problems that will be difficult to isolate later.
 Stay at least 3 feet away from fluorescent light boxes and other sources of
electrical interference.
 If it is necessary to run cable across the floor, cover the cable with cable
protectors.
 Label both ends of each cable.
 Use cable ties (not tape) to keep cables in the same location together.

TOPOLOGY
There are two types of topology: physical and logical. The physical topology of a
network refers to the configuration of cables, computers, and other peripherals.
Logical topology is the method used to pass the information between workstations.

Main Types of Physical Topologies


The following sections discuss the physical topologies used in networks and other
related topics.
 Linear Bus
 Star
 Star Wired Ring
 Tree
 Considerations When Choosing a Topology
 Summary Chart

LINEAR BUS

Fig 1.6 Linear Bus Topology

CE-307L: Data Communication 6


A linear bus topology consists of a main run of cable with a terminator at each end
(See Fig. 1.6). All nodes (file server, workstations, and peripherals) are connected to
the linear cable. Ethernet and LocalTalk networks use a linear bus topology.

Advantages of Linear Bus Topology

 Easy to connect a computer or peripheral to a linear bus.


 Requires less cable length than a star topology.

Disadvantages of Linear Bus Topology

 Entire network shuts down if there is a break in the main cable.


 Terminators are required at both ends of the backbone cable.
 Difficult to identify the problem if the entire network shuts down.
 Not meant to be used as a stand-alone solution in a large building.

STAR
A star topology is designed with each node (file server, workstations, and peripherals)
connected directly to a central network hub or concentrator (See Fig. 1.7).
Data on a star network passes through the hub or concentrator before continuing to its
destination. The hub or concentrator manages and controls all functions of the
network. It also acts as a repeater for the data flow. This configuration is common
with twisted pair cable; however, it can also be used with coaxial cable or fiber optic
cable.
The protocols used with star configurations are usually Ethernet or Local Talk. Token
Ring uses a similar topology, called the star-wired ring.

Fig 1.7. Star Topology

Advantages of Star Topology

 Easy to install and wire.


 No disruptions to the network when connecting or removing devices.
 Easy to detect faults and to remove parts.

CE-307L: Data Communication 7


Disadvantages of Star Topology

 Requires more cable length than a linear topology.


 If the hub or concentrator fails, nodes attached are disabled.
 More expensive than linear bus topologies because of the cost of the
concentrators.

STAR-WIRED RING
A star-wired ring topology may appear (externally) to be the same as a star topology.
Internally, the MAU (multi-station access unit) of a star-wired ring contains wiring
that allows information to pass from one device to another in a circle or ring (See Fig.
1.8). The Token Ring protocol uses a star-wired ring topology.

TREE

Fig 1.8. Star-Wired Ring Topology

Fig 1.9. Tree Topology


A tree topology combines characteristics of linear bus and star topologies. It consists
of groups of star-configured workstations connected to a linear bus backbone cable
(See Fig. 1.9). Tree topologies allow for the expansion of an existing network, and
enable schools to configure a network to meet their needs.

CE-307L: Data Communication 8


Advantages of Tree Topology

 Point-to-point wiring for individual segments.


 Supported by several hardware and software venders.

Disadvantages of Tree Topology

 Overall length of each segment is limited by the type of cabling used.


 If the backbone line breaks, the entire segment goes down.
 More difficult to configure and wire than other topologies.

Considerations when choosing a Topology

 Money. A linear bus network may be the least expensive way to install a
network; you do not have to purchase concentrators.
 Length of cable needed. The linear bus network uses shorter lengths of cable.
 Future growth. With a star topology, expanding a network is easily done by
adding another concentrator.
 Cable type. The most common cable in schools is unshielded twisted pair,
which is most often used with star topologies.

Table 1.3: Summary Chart of Cables and Topologies

Physical Topology Common Protocol


Common Cable
Coax Ethernet
Linear Bus TwistedPair LocalTalk
Fiber
Twisted Pair Ethernet
Star
Fiber LocalTalk
Star-Wired Ring Twisted Pair Token Ring
Coax
Tree Twisted Pair Ethernet
Fiber

CE-307L: Data Communication 9


OBJECTIVE 1 (B)
To learn about the network devices of layer 1(Physical Layer) and layer 2 (Data link
Layer) of OSI model.

THEORY

HUB
A network hub is a device for connecting multiple twisted pair or fiber optic Ethernet
devices together and thus making them act as a single network segment. Hubs work at
the physical layer (layer 1) of the OSI model. The device is thus a form of multiport
repeater. Repeater hubs also participate in collision detection, forwarding a jam signal
to all ports if it detects a collision.
Hubs also often come with a BNC and/or AUI connector to allow connection to
legacy 10BASE2 or 10BASE5 network segments. The availability of low-priced
network switches has largely rendered hubs obsolete but they are still seen in older
installations and more specialized applications.
A network hub is a fairly unsophisticated broadcast device. Hubs do not manage any
of the traffic that comes through them, and any packet entering any port is broadcast
out on all other ports. Since every packet is being sent out through all other ports,
packet collisions result—which greatly impedes the smooth flow of traffic.
Technically speaking, three different types of hubs exist:

1. Passive (A hub which does not need an external power source, because it does
not regenerate the signal and therefore falls as part of the cable, with respect to
maximum cable lengths)
2. Active (A hub which regenerates the signal and therefore needs an external
power supply)
3. Intelligent (A hub which provides error detection (e.g. excessive collisions)
and also does what an active hub does)

Fig 1.1(B) 4-port Ethernet hub

CE-307L: Data Communication 10


REPEATER
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 without degradation. Because repeaters work with the
actual physical signal, and do not attempt to interpret the data being transmitted, they
operate on the physical layer, the first layer of the OSI model.

SWITCH

Fig 1.2(B) A wireless repeater

Switches are often confused with bridges because they also operate at the data link
layer of the OSI model. Similar to a hub, switches provide a central connection
between two or more computers on a network, but with some intelligence. They
provide traffic control for packets; rather than forwarding data to all the connected
ports, a switch forwards data only to the port on which the destination system is
connected. They use a database of MAC (Media Access Control) addresses to
determine where computers are located and very efficiently send packets only where
they need to go. The database is created dynamically as computers communicate on
the network. The switch simply watches the incoming packets and memorizes the
MAC address and port a packet arrives on. If a packet arrives with a destination
computer that the switch does not have an address for in its MAC address table, it will
flood the packet out all connected ports. A switch creates separate collision domains
for each physical connection. A switch will only create separate broadcast domains if
separate VLANs (Virtual Local Area Networks) are assigned to different ports on the
switch. Otherwise, a broadcast received on one port will be flooded out all ports
except the one it came in on.

Fig 1.3(B) Interconnection of workstations with switch

CE-307L: Data Communication 11


BRIDGE
Bridges can be identified by the fact that they operate at the data link layer of the OSI
model. Bridges have intelligence and can "bridge" two of their ports together at very
high speed. They use a database of MAC addresses to determine where computers are
located and very efficiently send frames only where they need to go. The database is
created dynamically as computers communicate on the network. A bridge simply
watches the incoming frame and memorizes the MAC address and port a frame
arrives on. It uses this information to locate a computer if a packet comes in that must
be forwarded to it. If a frame arrives at the bridge and the bridge does not know where
to send it, the bridge will flood the frame just like a hub does. Bridging is often
inaccurately called switching.

Fig 1.4(B) Bridge connecting LAN segments

MODEM
Modem (from modulator-demodulator) is a device that turns the digital 1s and 0s of a
personal computer into sounds that can be transmitted over the telephone lines of
Plain Old Telephone Systems (POTS), and once received on the other side, converts
those 1s and 0s back into a form used by a USB, Ethernet, serial, or network
connection. Modems are generally classified by the amount of data they can send in a
given time, normally measured in bits per second, or "bps".

Fig 1.5(B) Modem connectivity

CE-307L: Data Communication 12


ACCESS POINT
A wireless access point (WAP or AP) is a device that allows wireless communication
devices to connect to a wireless network using Wi-Fi, Bluetooth or related standards.
The WAP usually connects to a wired network, and can relay data between the
wireless devices (such as computers or printers) and wired devices on the network and
it is also operate at the data link layer of the OSI model.
A typical corporate use involves attaching several WAPs to a wired network and then
providing wireless access to the office Local Area Network. Within the range of the
WAPs, the wireless end user has a full network connection with the benefit of
mobility. In this instance, the WAP functions as a gateway for clients to access the
wired network.
A Hot Spot is a common public application of WAPs, where wireless clients can
connect to the Internet without regard for the particular networks to which they have
attached for the moment. The concept has become common in large cities, where a
combination of coffeehouses, libraries, as well as privately owned open access points,
allow clients to stay more or less continuously connected to the Internet, while
moving around. A collection of connected Hot Spots can be referred to as a lily-pad
network.
Home networks generally have only one WAP to connect all the computers in a
home. Most are wireless routers, meaning converged devices that include a WAP,
router, and often an Ethernet switch in the same device. Many also converge a
broadband modem. In places where most homes have their own WAP within range of
the neighbors' WAP, it's possible for technically savvy people to turn off their
encryption and set up a wireless community network, creating an intra-city
communication network without the need of wired networks.

Fig 1.6(B) Wireless Access Point

CE-307L: Data Communication 13


NETWORK INTERFACE CARD
A network interface card is a computer hardware component designed to allow
computers to communicate over a computer network. It is both an OSI layer 1
(physical layer) and layer 2 (data link layer) device, as it provides physical access to a
networking medium and provides a low-level addressing system through the use of
MAC addresses. It allows users to connect to each other either by using cables or
wirelessly. Most motherboards today come equipped with a network interface card in
the form of a controller, with the hardware built into the board itself, eliminating the
need for a standalone card.

LAB TASKS

Fig 1.7(B) NIC Card

Q1: Write down the types of LAN Cards.


Q2: Write down the types of Modem.
Q2: Differentiate between manageable and unmanageable switches/bridges.
Q3: Describe the different types of ports in manageable switches.
Q4: Difference between Layer 2 and Layer 3 switches.
Q5: Describe the brief operation of the following SERVER.
Aurangzeb

HOME ASSIGNMENT.
Q1: How many computer laboratories are in the SIR SYED University? Name them.
Q2: Briefly describe any four (4)-network types.
Q3: Describe the five (6) categories of UTP cable.
Q4: Briefly describe:
1) PCI Card
2) ISA Card
3) SCSI Port
4) AUI Port

CE-307L: Data Communication 14


LAB # 2
MAKING NETWORK CABLES AND
CONNECTORS
OBJECTIVE
To construct the different types of UTP Cable:
1. Straight through Cable
2. Cross over Cable

THEORY
There are several classifications of cable used for twisted-pair
networks. Skip right over them and state that we use and recommend
Category 5 or 5e (or CAT 5) cable for all new installations. Likewise, there
are several fire code classifications for the outer insulation of CAT 5
cable. We use CMR cable, or "riser cable," for most of the wiring we
do. You should also be aware of CMP or plenum cable (a plenum is used to
distribute air in a building). You may be required by local, state or national
codes to use the more expensive plenum-jacketed cable if it runs through
suspended ceilings, ducts, or other areas, if they are used to circulate air or
act as an air passage from one room to another. If in doubt, use
plenum. CMR cable is generally acceptable for all applications not requiring
plenum cable.
Fig 2.1 A UTP Cable
CAT 5 wire is available in reel-in-box packaging. This is very handy for pulling the
wire without putting twists in it. Without this kind of package or a cable reel stand,
pulling wire is a two-person job. Before the advent of the reel-in-box, we used to put
a reel of wire on a broom handle to pull it. One person would hold the broom handle
and the other would pull and measure the cable. You will produce a tangled mess, if
you pull the wire off the end of the reel.
Stranded wire patch cables are often specified for cable segments running from a wall
jack to a PC and for patch panels. They are more flexible than solid core
wire. However, the rational for using it is that the constant flexing of patch cables
may wear-out solid core cable--break it. We don't think this is a real concern in the
average small network. For example, we are having one solid core cable going to our
workbench. It has probably flexed and average person's lifetime of flexes from the
many times we have connected customer computers to our network. Also, stranded
cable is susceptible to degradation from moisture infiltration, may use an alternate
color code, and should not be used for cables longer than 3 Meters (about 10 feet).
Most of the wiring we do simply connects computers directly to other computers or
hubs. Solid core cable is quite suitable for this purpose and for many home and small
business networks. We find it also quite acceptable for use as patch cables. You

15
might consider stranded wire patch cables if you have a notebook computer you are
constantly moving around.
CAT 5 cable has four twisted pairs of wire for a total of eight individually insulated
wires. Each pair is color coded with one wire having a solid color (blue, orange,
green, or brown) twisted around a second wire with a white background and a stripe
of the same color. The solid colors may have a white stripe in some cables. Cable
colors are commonly described using the background color followed by the color of
the stripe; e.g., white-orange is a cable with a white background and an orange stripe.

CONNECTORS

Fig 2.2 RJ-45 Connector


The straight through and cross-over patch cables discussed in this article are
terminated with CAT 5 RJ-45 modular plugs. RJ-45 plugs are similar to those you'll
see on the end of your telephone cable except they have eight versus four or six
contacts on the end of the plug and they are about twice as big. Make sure they are
rated for CAT 5 wiring. (RJ means "Registered Jack"). Also, there are RJ-45 plugs
designed for both solid core wire and stranded wire. Others are designed specifically
for one kind of wire or the other. Be sure you buy plugs appropriate for the wire you
are going to use. we use plugs designed to accommodate both kinds of wire.

NETWORK CABLE TOOLS


Modular Plug Crimp Tool: You will need a modular crimp tool. This one is very
similar to the one we have been using for many years for all kinds of telephone cable
work and it works just fine for Ethernet cables. You don't need a lot of bells and
whistles, just a tool which will securely crimp RJ-45 connectors. Even though the
crimper has cutters which can be used to cut the cable and individual wires, and
possibly stripping the outer jacket.

Fig 2.3 Modular Plug Crimp Tool

16
Universal UTP Stripping Tool (Eclipse): It makes a much neater cut. We
recommend that you purchase one if you will be making many cables.

Fig 2.4 Eclipse

Diagonal Cutters ("4 to 6"): It is easier to use diagonal cutters ("diags" or "dikes") to
cut the cable off at the reel and to fine tune the cable ends during assembly. Also, if
you don't have a stripper, you can strip the cable by using a small knife (X-acto,
utility, etc.) to carefully slice the outer jacket longitudinally and use the diags to cut it
off around the circumference.

Fig 2.5 Diagonal Cutters

BASIC THEORY
The 10BASE-T and 100BASE-TX Ethernets consist of two transmission lines. Each
transmission line is a pair of twisted wires. One pair receives data signals and the
other pair transmits data signals. A balanced line driver or transmitter is at one end of
one of these lines and a line receiver is at the other end. A (much) simplified
schematic for one of these lines and its transmitter and receiver follow:

Fig 2.6 Schematic Diagram of transmission line

Pulses of energy travel down the transmission line at about the speed of light (186,000
miles/second). The principal components of one of these pulses of energy is the
voltage potential between wires and current flowing near the surface of the
wires. This energy can also be considered as residing in the magnetic field which
surrounds the wires and the electric field between the wires. In other words, an
electromagnetic wave which is guided by, and travels down the wires.

17
The main concern is the transient magnetic fields which surrounds the wires and the
magnetic fields generated externally by the other transmission lines in the cable, other
network cables, electric motors, fluorescent lights, telephone and electric lines,
lightning, etc. This is known as noise. Magnetic fields induce their own pulses in a
transmission line which may literally bury the Ethernet pulses, the conveyor of the
information being sent down the line.
The twisted-pair Ethernet employs two principle means for combating noise. The first
is the use of balanced transmitters and receivers. A signal pulse actually consists of
two simultaneous pulses relative to ground: a negative pulse on one line and a positive
pulse on the other. The receiver detects the total difference between these two
pulses. Since a pulse of noise (shown in red in the diagram) usually produces pulses
of the same polarity on both lines one pulse is essentially canceled by out the other at
the receiver. Also, the magnetic field surrounding one wire from a signal pulse is a
mirror of the one on the other wire. At a very short distance from the two wires the
magnetic fields are opposite and have a tendency to cancel the effect of each other
out. This reduces the line's impact on the other pair of wires and the rest of the world.
The second and the primary means of reducing cross-talk--the term cross-talk came
from the ability to (over) hear conversations on other lines on your phone--between
the pairs in the cable, is the double helix configuration produced by twisting the wires
together. This configuration produces symmetrical (identical) noise signals in each
wire. Ideally, their difference, as detected at the receiver, is zero. In actuality it is
much reduced.

Fig 2.7 wire configuration

Again, the wires with colored backgrounds may have white stripes and may be
donated that way in diagrams found elsewhere. For example, the green wire may be
labeled Green-White. The background color is always specified first.
Now, all you need to remember, to properly configure the cables, are the diagrams for
the two cable ends and the following rules:
 A straight-thru cable has identical ends.
 A crossover cable has different ends.
It makes no functional difference which standard you use for a straight-thru
cable. You can start a crossover cable with either standard as long as the other end is
the other standard.

18
It makes no functional difference which end is which. Despite what you may have
read elsewhere, a 568A patch cable will work in a network with 568B wiring and
568B patch cable will work in a 568A network. The electrons couldn't care less.

EXERCISE TO MAKE CABLE


1. Pull the cable off the reel to the desired length and cut The total length of wire
segments between a PC and a hub or between two PC's cannot exceed 100 Meters
(328 feet or about the length of a football field) for 100BASE-TX and 300 Meters for
10BASE-T.
2. Strip one end of the cable with the stripper or a knife and diags. If you are using
the stripper, place the cable in the groove on the blade (left) side of the stripper and
align the end of the cable with the right side of the stripper. This will strip about 1/2"
of the jacket off the cable. Turn the stripper about 1 1/4 turns and pull. If you turn it
more, you will probably nick the wires. If you are using a knife and diags, carefully
slit the cable for about an inch or so and neatly trim around the circumference of the
cable with diags to remove the jacket.
3. Inspect the wires for nicks. Cut off the end and start over if you see any. You may
have to adjust the blade with the screw at the front stripper. Cable diameters and
jacket thicknesses vary.
4. Spread and arrange the pairs roughly in the order of the desired cable end.
5. Untwist the pairs and arrange the wires in the order of the desired cable
end. Flatten the end between your thumb and forefinger. Trim the ends of the wires
so they are even with one another. It is very important that the unstripped
(untwisted) end be slightly less than 1/2" long. If it is longer than 1/2" it will be out-
of-spec and susceptible to crosstalk. If it less than slightly less than 1/2" it will not be
properly clinched when RJ-45 plug is crimped on. Flatten again. There should be little
or no space between the wires.

Fig 2.8 CAT 5 cable

6. Hold the RJ-45 plug with the clip facing down or away from you. Push the
wire firmly into the plug. Now, inspect before crimping and wasting the
plug! Looking through the bottom of the plug, the wire on the far left side will
have a white background. The wires should alternate light and dark from left to
right. The furthest right wire is brown. The wires should all end evenly at the front

19
of the plug. The jacket should end just about where you see it in the diagram--right
on the line.

ALL ABOUT CRIMPING


7. Hold The Wire Near The Rj-45 Plug With The Clip Down And Firmly Push It
Into The Left Side Of The Front Of The Crimper (It Will Only Go In One
Way). Hold The Wire In Place Squeeze The Crimper Handles Quite Firmly. This
Is What Will Happen:

Fig 2.9 crimping the wire


(Crimp it once.) The crimper pushes two plungers down on the RJ-45 plug. One
forces what amounts to a cleverly designed plastic plug/wedge onto the cable jacket
and very firmly clinches it. The other seats the "pins," each with two teeth at its end,
through the insulation and into the conductors of their respective wires.
8. Test the crimp... If done properly an average person will not be able to pull the
plug off the cable with his or her bare hands. And that quite simply, besides lower
cost, is the primary advantage of twisted-pair cables over the older thin wire, coaxial
cables. In fact, we would say the RJ-45 and ease of its installation is the main reason
coaxial cable is no longer widely used for small Ethernets. But, don't pull that hard on
the plug. It could stretch the cable and change its characteristics. Look at the side of
the plug and see if it looks like the diagram and give it a fairly firm tug to make sure it
is crimped well.
9. Prepare the other end of the cable so it has the desired end and crimp.
10. If both ends of the cable are within reach, hold them next to each other and with
RJ-45 clips facing away. Look through the bottom of the plugs. If the plugs are wired
correctly, and they are identical, it is a straight-thru cable. If they are wired correctly
and they are different, it is a crossover cable.

CABLING RULES
1. Try to avoid running cables parallel to power cables.
2. Do not bend cables to less than four times the diameter of the cable.
3. If you bundle a group of cables together with cable ties (zip ties), do not over-
cinch them. It’s okay to snug them together firmly; but don't tighten them so much
that you deform the cables.

20
4. Keep cables away from devices which can introduce noise into them. Here's a
short list: copy machines, electric heaters, speakers, printers, TV sets, fluorescent
lights, copiers, welding machines, microwave ovens, telephones, fans, elevators
motors, electric ovens, dryers, washing machines, and shop equipment.
5. Avoid stretching UTP cables (the force should not exceed 25 LBS).
6. Do not run UTP cable outside of a building. It presents a very dangerous lightning
hazard!
7. Do not use a stapler to secure UTP cables. Use telephone wire hangers which are
available at most hardware stores.

HOME ASSIGNMENTS

1. Which standardization organization has standardized the cable configuration of


UTP (unshielded twisted pair) cable?
2. Find out the configuration for Telephone cable?
3. On which pins of Cross cable and Straight cable the signals can be receive and
transmit explain through an example and figure? What is the usage of that signal
in computer communication?

21
LAB # 3
DIAGNOSTIC UTILITIES
OBJECTIVE
To show some of the diagnostic Utilities for Computer networks.

THEORY
Following table gives the descriptions of different diagnostic Utilities
Diagnostics Utility Functions

IPCONFIG Verifies a TCP/IP configuration, including DHCP, DNS, and


WINS server addresses.

FINGER Retrieves system information from a remote computer that


supports the TCP/IP Finger service.

NSLOOKUP Examines entries in the DNS database that pertain to a


particular host or domain.

HOSTNAME Returns the local computer’s hostname for authentication.

NETSTAT Displays protocol statistics and the current state of TCP/IP


connections.

NBTSTAT Check the state of current NetBIOS over TCP/IP connections,


updates the LMHOSTS cache, or determines your registered
name &scope ID.

Route Views or modifies the local routing table

Tracert Verifies the route used from the local host to a remote host.

Address Resolution Displays a cache of locally resolved IP addresses to Media


Access Protocol (ARP) Control (MAC) addresses.

Table 3.1 Diagnostic tools


PING

OBJECTIVE
Verify connections to a remote computer or computers

THEORY
The ping command verifies connections to remote computer or computers, by sending
ICMP echo packets to the computer and listening for echo reply packets. Ping waits
for up to 1 second for each packet sent and prints the number of packets transmitted
and received. Each received packet is validated against the transmitted message. By
default, four echo packets containing 64 bytes of data (a periodic uppercase sequence
of alphabetic characters) are transmitted.
You can use the ping utility to test both the computer name and the IP address of the
computer. If the IP address is verified but the computer name is not, you may have a
name resolution problem. In this case, be sure that the computer name you are
querying is in either the local HOSTS file or in the DNS database.
The Ping stands for Packet Internet Groper.

PARAMETERS
-t

Pings the specified computer until interrupted.


-a

Resolve addresses to computer names.


-n count

Sends the number of ECHO packets specified by count. The default is 4.


-l length

Sends ECHO packets containing the amount of data specified by length. The default
is 64 bytes; the maximum is 8192.
-f

Sends a Do not Fragment flag in the packet. The packet will not be fragmented by
gateways on the route.
-i ttl

Sets the Time To Live field to the value specified by TTL.


-v tos

Sets the Type Of Service field to the value specified by TOS.


-r count
Records the route of the outgoing packet and the returning packet in the Record Route
field. A minimum of 1 and a maximum of 9 computers may be specified by count.
-s count

Specifies the timestamp for the number of hops specified by count.


-j computer-list

Routes packets via the list of computers specified by computer-list. Consecutive


computers may be separated by intermediate gateways (loose source routed). The
maximum number allowed by IP is 9.
-k computer-list

Routes packets via the list of computers specified by computer-list. Consecutive


computers may not be separated by intermediate gateways (strict source routed). The
maximum number allowed by IP is 9.
-w timeout

Specifies a timeout interval in milliseconds.


destination-list

Specifies the remote computers to ping.

EXAMPLE 3.1
Y:\>ping sirsyed
Output as follows:
Pinging sirsyed [192.168.1.1] with 32 bytes of data:
Reply from 192.168.1.1: bytes=32 time<10ms TTL=255
Reply from 192.168.1.1: bytes=32 time<10ms TTL=255
Reply from 192.168.1.1: bytes=32 time<10ms TTL=255
Reply from 192.168.1.1: bytes=32 time<10ms TTL=255

EXAMPLE 3.2
Output as follows:
Y:\>ping aurangzeb
Pinging aurangzeb [192.168.1.5] with 32 bytes of data:
Reply from 192.168.1.5: bytes=32 time<10ms TTL=128
Reply from 192.168.1.5: bytes=32 time<10ms TTL=128
Reply from 192.168.1.5: bytes=32 time<10ms TTL=128
Reply from 192.168.1.5: bytes=32 time<10ms TTL=128

EXERCISE 3.3
On command prompt, type
Y:\>ping 192.168.2.145
Record the output:
EXERCISE 3.4
On command prompt, type
Y:\>ping 192.168.1.3

Record the output

IPCONFIG

THEORY
This diagnostic command displays all current TCP/IP network configuration values.
This command is of particular use on systems running DHCP, allowing users to
determine which TCP/IP configuration values have been configured by DHCP.
ipconfig [/all | /renew [adapter] | /release [adapter]]

PARAMETERS
all

Produces a full display. Without this switch, ipconfig displays only the IP address,
subnet mask, and default gateway values for each network card.
renew [adapter]

Renews DHCP configuration parameters. This option is available only on systems


running the DHCP Client service. To specify an adapter name, type the adapter name
that appears when you use ipconfig without parameters.

release [adapter]

Releases the current DHCP configuration. This option disables TCP/IP on the local
system and is available only on DHCP clients. To specify an adapter name, type the
adapter name that appears when you use ipconfig without parameters.

With no parameters, the ipconfig utility presents all of the current TCP/IP
configuration values to the user, including IP address and subnet mask. This utility is
especially useful on systems running DHCP, allowing users to determine which
values have been configured by DHCP.

EXAMPLE 3.5
Y:\> ipconfig
Output as follows:
Windows NT IP Configuration
Ethernet adapter Elnk31:
IP Address. ............... : 192.168.2.13
Subnet Mask .............. : 253.253.0.0
Default Gateway ........ : 192.168.1.8

EXAMPLE 3.6
Y:\> ipconfig /?
Output as follows:
Windows NT IP Configuration
Usage: ipconfig [/? | /all | /release [adapter] | /renew [adapter]]
/? Display this help message.
/all Display full configuration information.
/release Release the IP address for the specified adapter.
/renew Renew the IP address for the specified adapter.
The default is to display only the IP address, subnet mask and default gateway for
each adapter bound to TCP/IP.
For Release and Renew, if no adapter name is specified, then the IP address leases for
all adapters bound to TCP/IP will be released or renewed.

EXERCISE 3.7
On command prompt, type
Y:\> ipconfig /all
Record the output

EXERCISE 3.8
In this procedure, you use the Ipconfig utility to view an IP configuration and the
PING utility to test your workstation and connections to another TCP/IP host.

PROCEDURE:

 Use the Ipconfig utility to verify that your TCP/IP configuration has initialized.
At a command prompt, type:

Y:\>Ipconfig

If the configuration is correctly initialized the IP address, subnet mask, and default
gateway (if configured values display).

 Ping the loopback address to verify that TCP/IP is installed and loaded correctly.
At a command prompt, type:
Y:\>ping 127.0.0.1

 Ping the IP address of your computer to verify that you added it correctly. Type:
Y:\>ping 172.168.3.1
Ping the IP address of your second computer to verify that you can communicate
with a host on the local network. Type:

Y:\>ping 172.168.3.2

 If a remote host is available on your configuration, ping the IP address of the


remote host to verify that you can communicate through a router. Type:
Y:\>ping IP address of remote host

Write the output of each

NSLOOKUP
This diagnostic tool displays information from Domain Name System (DNS) name
servers. Before using this tool, you should be familiar with how DNS works.
Nslookup is available only if the TCP/IP protocol has been installed.

nslookup [-option ...] [computer-to-find | - [server]]

MODES
Nslookup has two modes: interactive and non-interactive.

If you only need to look up a single piece of data, use non-interactive mode. For the
first argument, type the name or IP address of the computer to be looked up. For the
second argument, type the name or IP address of a DNS name server. If you omit the
second argument, the default DNS name server will be used.

If you need to look up more than one piece of data, you can use interactive mode.
Type a hyphen (-) for the first argument and the name or IP address of a DNS name
server for the second argument. Or, omit both arguments (the default DNS name
server will be used).

Nslookup Commands

Nslookup: finger

Connects with the finger server on the current computer. The current computer is
defined when a previous lookup for a computer was successful and returned address
information (see the set querytype=A command).

finger [username] [> filename] | [>> filename]

Nslookup: ls
Lists information for a DNS domain. The default output contains computer names and
their IP addresses. (When output is directed to a file, hash marks are printed for every
50 records received from the server.)

ls [option] dnsdomain [> filename] | [>> filename]

NSLOOKUP Syntax
Nslookup [-option …] [computer-to-find | - [server]]

Object:

To use NSLOOKUP in command mode

 At a command prompt, modify the properties so that it has a screen buffer size of
50
Use the Layout property page to do this

 If the command prompt is not full-screen, press ALT+ENTER


 Type the following command

Nslookup hostx
Where hostx is a host in your domain. NSLOOPKP will return the IP address of the
computer hostx because the information is stored in the DNS database.

 Exit the command prompt


Hostname: - It returns the local computer host name.

Exercise 3.9
On command prompt, type
Y:\username>hostname
Record the output

Netstat
Displays protocol statistics and the current state of TCP/IP connections

Exercise 3.10
On command prompt, type
Y:\username>netstat
Record the output
NBTSTAT
Check the state of current NetBIOS over TCP/IP connections, updates the LMHOSTS cache,
or determines your registered name & scope ID

Exercise 3.11
On command prompt, type

Y:\username>nbtstat

Read the different options of nbtstat command.

Exercise 3.12
On command prompt, type
Y:\username>nbtstat -n
Record the output

Exercise 3.13
On command prompt, type
Y:\username>nbtstat -s

Record the output


Exercise 3.14
On command prompt, type

Y:\username>nbtstat –r

The screen look like this

Record the output

Tracert
Verifies the route used from the local host to a remote host.
Exercise 4s)
On command prompt, type
Y:\username>tracert –h 56
-h option maximum number of hops for a search to a target.
Record the output

Exercise 3.15
On command prompt, type
Y:\username>tracert –h 133
Record the output
Address Resolution Protocol (ARP)

Displays a cache of locally resolved IP addresses to Media Access Control Address.

 Ping the local Linux based host. Use the arp to check the MAC Address
What is the output?

Exercise 3.16
Ping the non-existent local host. Check ARP cache to see the MAC Address.

Exercise 3.17
Ping a remote host. Check ARP cache. What MAC Address has been entered into the cache

Ifconfig -- configure a network interface


SYNOPSIS
ifconfig [interface]

ifconfig interface [aftype] options | address ...

DESCRIPTION
Ifconfig is used to configure the kernel-resident network interfaces. It is used at boot time to
set up interfaces as necessary. After that, it is usually only needed when debugging or when
system tuning is needed. If no arguments are given, ifconfig displays the status of the
currently active interfaces. If a single interface argument is given, it displays the status of
the given interface only; if a single -a argument is given, it displays the status of all interfaces,
even those that are down. Otherwise, it configures an interface
down. Otherwise, it configures an interface.

OPTIONS
interface

The name of the interface. This is usually a driver name followed by a unit number, for
example eth0 for the first Ethernet interface up. This flag causes the interface to be activated.
It is implicitly specified if an address is assigned to the interface down This flag causes the
driver for this interface to be shut down.

Who - It shows who is logged on.

-m Same as `who am i'.


-q, --count

Print only the login names and the number of users logged on. Overrides all other options.

-s Ignored; for compatibility with other versions of who.

LAB TASK:

Q1: Prepare presentation on any three (3) diagnostic utilities of TCP/IP and also

Submit hard copy.

Q2: How can we assign IP to our system statically using Command Prompt?

Q3: Can we use two IPs of same subnet on a system?

Q4: Difference between Ping and PathPing command

Q5: Find all Active/ Used IP addresses on your network

Q6: What TCP /IP settings are used on your system?

Q7: How to verify connection with remote computer?


LAB # 4
THE CISCO IOS CLI ARCHITECTURE &
SIMULATING TOOL
OBJECTIVE
To operate and become familiar with the network simulator Packet Tracer

To show some basic commands to interact with the Cisco IOS CLI Software.

SIMULATION

Simulation is the imitation of some real thing, state of affairs, or process. The act of
simulating something generally entails representing certain key characteristics or
behaviours of a selected physical or abstract system.

Simulation is used in many contexts, including the modeling of natural systems or


human systems in order to gain insight into their functioning. Other contexts include
simulation of technology for performance optimization, safety engineering, testing,
training and education. Simulation can be used to show the eventual real effects of
alternative conditions and courses of action.

Key issues in simulation include acquisition of valid source information about the
relevent selection of key characteristics and behaviours, the use of simplifying
approximations and assumptions within the simulation, and fidelity and validity of the
simulation outcomes.

PACKET TRACER 6.0.1 OVERVIEW


Packet Tracer 5.0 provides a simulation-based environment for CCNA-level
networking training. It offers a unique combination of visualization tools, complex
assessment and activity authoring capabilities, and opportunities for multi-user
collaboration and competition.
Packet Tracer offers extensive learning benefits:
• Provides a versatile practice and visualization environment for the design,
configuration, and troubleshooting of network environments
– Offers an exploratory development environment that enables users to design, build,
and configure networks with drag-and-drop devices
– Allows users to observe virtual packets in real time by modeling network traffic and
packet behaviors
• Affords the opportunity and flexibility for practice outside of the classroom
– Runs on home computers or mobile laptops
– Supports the development of problem-solving and troubleshooting skills

CE-307L: Data Communication 33


– Enables users to create and configure complex topologies that extend beyond
the constraints of equipment availability
• Provides a rich learning environment to support the development of networking
technology skills
– Encourages students to explore new concepts and test their knowledge of various
protocols
– Provides valuable hands-on experience that can be applied on the job and in the
classroom

– Offers multi-user functionality for collaboration, competition, and engaging


learning opportunities.

KEY FEATURES
In the Simulation and Visualization Mode, we can see and control time intervals, the
inner workings of data transfer, and the propagation of data across a network. This
helps students understand the fundamental concepts behind network operations. A
solid understanding of network fundamentals can help accelerate learning about
related concepts.
The physical view of devices such as routers, switches, and hosts presents graphical
representations of modular equipment and expansion cards. The physical view also
provides geographic representations, including multiple cities, buildings, and wiring
closets.

DETAIL, PHYSICAL VIEW

Fig 4.1: Detail view

CE-307L: Data Communication 34


ADDITIONAL FEATURES

• Lab grading function


• Modular devices
• User-friendly CLI and integrated help feature
• Different device models for creating custom networks
• Tutorial
• International language support

COMPATIBLE PLATFORMS

Packet Tracer 5.0 is compatible with the following platforms: Windows (Widows XP,
Windows 2000); Vista (Vista Basic, Vista Premium); and Linux (Ubuntu, Fedora).

Interface:

Fig 4.2: Packet tracer interface

Main tool bar

Main tool bar contains different option e.g. new file, open, save, print, copy, paste, do
undo, zoom in, zoom out etc.

Fig 4.3: Main tool bar

CE-307L: Data Communication 35


Devices and Connections

A network topology can be built by selecting devices and the media. Several type of
devices and network connections can be used. For example: switches, routers, end
systems, wireless connections etc.

Fig 4.4: Device type selection area

Tools selection Area

Selection tool: To select any device

Hand tool: To move the selected area or device

Note tool: To type nay note or text or naming the device

Delete tool: To remove the device or connection

Inspection tool: To inspect the specific device e.g. MAC table


etc.

Polygon tool: To draw polygon or any shape

Resize tool: To resize the device or topology

PDUs: Simple PDUs (Protocol Data Units). E.g. ICMP, ARP, TCP etc.

Fig 4.5: Common Tool Box

Network Simulation

All the network setup is performed on real time mode. Simulation mode is used to
simulate the network to check its behavior in graphical way

CE-307L: Data Communication 36


Fig 4.6: Realtime and Simulation Mode

Network Scenarios

Multiple scenarios can be created and deleted by clicking on the New and Delete
button in the scenario panel. The scenarios can be toggled between without deleting.

Fig 4.7: Scenario Panel

LAB TASK:

Q1: Download latest version of Boson Netsim 4.0 Beta final with its crack.

Q2: Write the description of the following tabs of Packet Tracer 6.0.1

1. Menu Bar
2. Common Toolbar
3. Device-Type Selection Box
4. Device-Specific Selection Box
5. Logical Toolbar
6. Physical Toolbar
7. Power Cycle device
8. Simulation Mode

THEORY
This section presents the two user levels and various modes of the Cisco IOS software.

OVERVIEW OF USER LEVELS AND MODES:


As a security feature, Cisco IOS software separates. Sessions into two different access
levels. User EXEC level allows you to access only basic monitoring commands;
privileged EXEC level allows you to access all router commands. Privileged EXEC
level can be password protected to allow only authorized users the ability to configure
or manage the router. From privileged EXEC level, you can access all the command
modes. There are five command modes: global configuration mode, interfaces

CE-307L: Data Communication 37


configuration mode, sub interface configuration mode, router configuration mode, and
line configuration mode.

EXERCISE

STEP 1:
When you open a console session in a switch, you are automatically in user EXEC
command mode. The EXEC commands available at the user level are a subset of
those available at the privileged level. In general, the user EXEC commands allow
you to connect to remote devices, change terminal settings on a temporary basis,
perform basic tests, and list system information.

You will notice that the switch displays a switch> prompt. The right arrow (>) in the
prompt indicates that the switch is at the user EXEC level. The user EXEC level does
not contain any commands that might control (for example, reload or configure) the
operation of the switch. To list the commands available at

The operation of the router. To list the commands available at the user EXEC level,
type? at the switch> prompt.

STEP 2:

ENABLE?
Critical commands (for example, configuration and management) require that the user be
logged into privileged EXEC level. To change to the privileged EXEC level, type enable at
the switch> prompt. The switch prompt changes to switch#. The privileged EXEC mode
prompt consists of the host name of the device followed by the pound sign (#). Then use the
help system to display the commands available in privileged EXEC mode.

Privileged EXEC level can be password protected to allow only authorized users the ability to
configure or manage the switch.

STEP 3: CONFIGURE, <CR>


Global configuration commands apply to features that affect the system as a whole. Use the
configure privileged EXEC command to enter global configuration mode. When you enter
this command, the system EXEC prompts you for the source of the configuration commands:

Configuring from terminal, memory, or network [terminal]?

You can then specify either the terminal, nonvolatile memory (NVRAM), or a file stored on a
network server as the source of configuration commands. Configuring from the terminal is the
system default. You can specify the source of the commands when first entering the
command, by entering configure terminal, configure memory, or configure network. For now,
press Return to select the default, terminal configuration.

CE-307L: Data Communication 38


When the global configuration mode is entered, the switch prompt changes to
Switch(config)#. Then use the help system to display the commands available in global
configuration mode.

STEP 4: INTERFACE ETHERNET 0, ? , EXIT


From global configuration mode, you can access many other command modes, the following
being the most commonly accessed:

 Interface configuration mode


 Subinterface configuration mode
 Router configuration mode
 Line configuration mode

Interface configuration commands modify the operation. In order to configure a specific


interface, you need to enter interface configuration mode, from global configuration mode, by
entering the interface interface type port number command. Enter interface configuration
mode on the Ethernet 0 interface by entering interface Ethernet 0. The prompt Switch(config-
if)# indicates that you are in interface configuration mode. Then use the help system to
display the commands available in interface configuration mode.

To exit interface configuration mode and return to global configuration mode, enter the exit
command.

CLI EDITOR FEATURE:


The Cisco IOS CLI offers context-sensitive help, a useful tool if you are a new user because
at any time during an EXEC session, you can type a question mark (?) to get help. Two types
of context-sensitive help are available: word help and command syntax help.

Command syntax help can be used to obtain a list of command, keyword, or argument options
that are available based on the syntax you have already entered. To use command syntax help,
enter ? In the place of a keyword or argument.

STEP 1 ENABLE
Context-sensitive command syntax help can be used to obtain a list of commands, keywords,
or argument options that are available, based on the syntax you have already entered. To use
command syntax help to see a list of arguments that can be used with the configure command,
enter configure, with ? in the place of a keyword or argument. Include a space before the
question mark.

STEP 2: CONFIGURE
Context-sensitive command syntax help can be used to obtain a list of commands, keywords,
or argument options that are available, based on the syntax you have already entered. To use
command syntax help to see a list of arguments that can be used with the configure command,
enter configure, with ? in the place of a keyword or argument. Include a space before the
question mark.

CE-307L: Data Communication 39


STEP 3:CTRL-U, LI<TAB> , CTRL-U, I<TAB> IN<TAB>
Lets use another editing feature of the Cisco IOS software. While the characters "in," from the
previous lab step, are still being displayed at the prompt, press the Control key, and while
holding the Control key down, type a "u." The Control-U key combination, abbreviated "Ctrl-
U," erases whatever is displayed on the current, active prompt line in the Cisco IOS software.
Control key combinations, like Ctrl-U, are called "hot keys." Continuing with command
abbreviation, another way to find the minimum number of characters that uniquely identifies a
command is to use the tab-to-complete feature of the Cisco IOS software. For example, type li
at the prompt and then press the tab key. The tab-to-complete feature will expand the entry
"li" to line, because line is the only command that begins with "li." Use the Ctrl-U hot key to
delete the line command from the prompt line. Now try typing i at the prompt and then press
the tab key. The tab-to-complete feature will not expand this entry, because as we discovered
in the previous lab step, i is an ambiguous command. Now enter in at the prompt and then
press the tab key. The tab-to-complete feature will expand this entry to interface, because that
is the only command that begins with "in."

Step 6: Ctrl-R,Ctrl-A,<up-arrow>,<up-arrow>,Ctrl-W, ethernet 0,Ctrl-Z

You have already learned about the Ctrl-U hot key. The following table offers a
comprehensive list of the hot keys and some other keyboard editing functions.

Delete - Removes one character to the right of the cursor.

Backspace - Removes one character to the left of the cursor.

TAB - Finishes a partial command.

Ctrl-A - Moves the cursor to the beginning of the current line.

Ctrl-R - Redisplays a line.

Ctrl-U - Erases a line.

Ctrl-W - Erases a word.

Ctrl-Z - Ends configuration mode and returns to the EXEC mode.

Up Arrow - Allows user to scroll forward through former commands.

Down Arrow - Allows user to scroll backward through former commands.

Table 8.1
Use the Ctrl-R hot key to redisplay the current line in the IOS software. Then use the Ctrl-
A hot key to move the cursor to the beginning of the current line. Then use the up arrow key
on the keyboard to move backwards through the commands in the command buffer—that is,
the commands that have been used since entering privileged EXEC mode. Note that a few of
the commands you entered in privileged EXEC mode don't appear in the buffer. These are the
commands you deleted from the command line with the Ctrl-U hot key; the deletion also
removes those commands from the command buffer. You can use the down arrow key to

CE-307L: Data Communication 40


move forward through the buffer. After inspecting the contents of the buffer, use the arrow
keys to display "interface serial 11" at the prompt. This was a command with an intentionally
invalid parameter, used to demonstrate the command syntax check capability of the Cisco IOS
software. Use the Ctrl-W hot key twice, to delete the last two words in this command. Then
enter "ethernet 0" after the interface command and go into interface configuration mode for
the. Finally, use the Ctrl-Z hot key to return to privileged EXEC mode.

CE-307L: Data Communication 41


LAB # 5
BASIC SWITCH CONFIGURATIONS
OBJECTIVE
To apply basic startup settings on a Cisco switch.
Step 1: enable, configure terminal, hostname switch1

The default switch name is "Switch." Giving each switch a unique name aids in
network management by allowing you to uniquely identify each switch within the
network. The name of the switch is considered to be the host name and is displayed in
the system prompt. Let's change the host name from "Switch" to "Switch1." Notice
that the name in the system prompt changes immediately after the hostname command
is entered.

Task Command

1. From user EXEC mode, enter enable


privileged EXEC mode.
2. From privileged EXEC mode, enter configure terminal
global configuration mode.
3. From global configuration mode, hostname host_name
configure a new host name.
Table 5.1
Step 2: exit , clock set 11:56:50 11 March 1999, show clock

Set the Error! Hyperlink reference not valid. so that error messages will have accurate
Error! Hyperlink reference not valid.. The switch will use this information to timestamp
error messages. Use the following information for the time and date: 11:56:50 11
March 1995. Then use the show clock command to view the new clock setting.

Task Command

1. From global configuration mode, exit


return to privileged EXEC mode.
2. From privileged EXEC mode, set the clock set hh:mm:ss day month year
system clock.
3. From privileged EXEC mode, view the show clock
clock setting.
Table 5.2

CE-307L: Data Communication 42


Step 3: configure terminal, banner motd # Technology Department #, exit,
<CR>

The message-of-the-day banner is displayed at login and is useful for sending startup
messages to all connected terminals. By default, no message is displayed at logon.
Enter the banner motd command in global configuration mode. When using the
banner motd command, enter a few blank spaces and then type a delimiting character.
The information typed until the next delimiting character is recognized as the message
of the day. In this simulation, use the pound key (#) as the delimiting character.

Step 4: enable, configure terminal, interface ethernet 0, description


FirstEthernetInNetwork1, Ctrl-Z , show running-config

Now display the running configuration, to see the interface description you just
configured. To display the running configuration, use the show running-config
command in privileged EXEC mode.

In a configuration display, the exclamation marks function as line separators to make


reading easier. In this configuration, notice how commands entered at the interface
configuration level, such as the interface description command, appear indented
underneath the interface they were entered on. Global-level commands are not
indented, so you can easily identify which configuration parameters are set at the
global configuration level and which are set at the various configuration sublevels.

Notice the commands that you have configured so far in this Basic Configuration Lab:
hostname, service timestamps, banner motd, and interface description.

Task Command

1. From user EXEC mode, enter enable


privileged EXEC mode.
2. From privileged EXEC mode, enter configure terminal
global configuration mode.
3. From global configuration mode, enter interface type number
interface configuration mode.
4. From interface configuration mode, description interface_description
configure an interface description.
5. From interface configuration mode, <Ctrl-Z>
return to privileged EXEC mode.
6. From privileged EXEC mode, display show running-config
the running configuration.
Table 5.3

CE-307L: Data Communication 43


STEP 5: configure terminal, line console 0, password Cisco, Ctrl-Z, exit, <CR>,
cisco:

You can use the password command, in line configuration mode, to configure a
password to restrict access to a switch. Console passwords can be established on
individual lines. Remember that passwords are case-sensitive. Passwords can be
configured for console terminals or for incoming Telnet sessions. Configure the
password cisco for console line 0. Then exit the EXEC completely and log back into
the switch. You will be prompted for the console password you just configured before
you can enter user EXEC mode.

Task Command

1. From privileged EXEC mode, enter configure terminal


global configuration mode.
2. From global configuration mode, enter
line configuration mode for a console line console line_number
line.
3. From line configuration mode, password password
configure a console password.
4. From line configuration mode, return <Ctrl-Z>
to privileged EXEC mode.
5. From privileged EXEC mode, exit the exit
EXEC entirely.
6. Press Return when prompted. <CR>

7. Enter the console password at the password


prompt, to enter user EXEC mode.
Table 5.4
Step 6: enable, configure terminal, line vty 0 4, password cisco

To further restrict access to the switch, configure the password cisco for Error!
Hyperlink reference not valid. zero through four

Task Command

1. From user EXEC mode, enter enable


privileged EXEC mode.
2. From Privileged EXEC mode, enter configure terminal
global configuration mode.
3. From global configuration mode, enterline vty line_number
line configuration mode for a virtual[ending_line_number]
terminal.

CE-307L: Data Communication 44


4. From line configuration mode, password password
configure a virtual-terminal password.
Table 5.5

Step 7: exit, enable password Cisco, exit, disable, enable, Cisco

Use the enable password global configuration command to configure an enable


password to restrict access to privileged EXEC mode. Use Cisco as the password.
Then return to user EXEC mode and test the enable password by reentering privileged
EXEC mode.

Task Command

1. From line configuration mode, return exit


to global configuration mode.
2. From global configuration mode, enable password password
configure an enable password.
3. From global configuration mode, exit
return to privileged EXEC mode.
4. From privileged EXEC mode, return to disable
user EXEC mode.
5. From user EXEC mode, reenterenable
privileged EXEC mode, entering the
enable password when prompted. password

Table 5.6
Step 8: configure terminal, logging buffered

To copy logging messages, such as errors, to an internal buffer, use the logging
buffered command. The buffer is circular, so those newer messages overwrite older
ones after the buffer is filled. Having a log of these messages can be useful when
troubleshooting network problems. Now let's generate some logging messages.

Task Command

1. From privileged EXEC mode, return to configure terminal


global configuration mode.
2. From global configuration mode,
configure the system to log messageslogging buffered
to an internal buffer.
Table 5.7

CE-307L: Data Communication 45


Step 9: Ctrl-Z, show interface ethernet 0

To view information about a particular interface, you can use the show interface
command, which provides the following important information:

 Interface state (for example, UP, DOWN, LOOPED)


 Protocol addresses
 Error! Hyperlink reference not valid.
 Reliability and load
 Error! Hyperlink reference not valid. type
 Packet rates
 Error rates
 Signaling status (that is, Error! Hyperlink reference not valid.)
From privileged EXEC mode, display the interface information with the show
interface command.

Task Command

1. From interface configuration mode, <Ctrl-Z>


return to privileged EXEC mode.
2. From privileged EXEC mode, display Show interface interface_type
interface information for the interface. interface_number

Table 5.8

Step 10: show running-config

To display the startup configuration that is stored in NVRAM, use the show startup-
config command in privileged EXEC mode.

Task Command

1. From privileged EXEC mode, display


the startup configuration. show startup-config

Table 5.9

CE-307L: Data Communication 46


Step 11: show startup-config

Save the current running configuration by using the copy running-config startup-
config command to overwrite the startup configuration stored in Error! Hyperlink
reference not valid.. A Cisco IOS switch stores configurations in two locations—RAM
and NVRAM. Stored in Error! Hyperlink reference not valid., the Error! Hyperlink
reference not valid. is used by the switch during operation. Any configuration changes
to the switch are made to the running configuration and take effect immediately after
the command is entered. The Error! Hyperlink reference not valid. is saved in NVRAM
and is loaded as the running configuration when the switch boots up. If a switch loses
power or is reloaded, changes to the running configuration are lost unless they have
been saved to the startup configuration. Tip: When editing a configuration, save often.

Task Command

copy running-config startup-


1. From privileged EXEC mode, save the running
configuration. config

Table 5.10
Step 12: show version

Finally, you will use one more command that can be used to collect information about
the configuration and status of a switch. This information can be very helpful in
troubleshooting switch problems. The show version command provides much
information, including the following:

Software Version - IOS software version (stored in Flash)

Bootstrap Version - Bootstrap version (stored in boot ROM)

System up-time - Time since last reboot

- Method of restart (for example, power


System restart info
cycle, crash)

Software image name - IOS filename stored in Flash

Switch Type and Processor type - Model number and processor type

Memory type and allocation - Main processor RAM


(Shared/Main) - Shared packet I/O buffering

Software Features - Supported protocols / feature sets

Hardware Interfaces - Interfaces available on switch

CE-307L: Data Communication 47


- Bootup specifications, console speed
Configuration Register
setting, etc.

Table 5.11
From privileged EXEC mode, display the software version information with the show
version command.

Task Command

1. From privileged EXEC mode, display show version


version information.
Table 5.12

Lab Task:

Q1: Perform all the basic switch configurations those are mention in manual
& submit the hard copy.
Q2: Write description of any three commands of ‘User Mode”.
Q3: Write description of any three commands of ‘Privileged Mode”.
Q4: Run these commands:
(i) #show version
(ii) #show interfaces
(iii) #show startup-config
(iv) #show running-config
(v) #show interfaces
(vi) #show clock & find out IOS version, IOS file name, interfaces, RAM and
NVRAM.

CE-307L: Data Communication 48


LAB#06: Address Resolution Protocol (ARP)

LAB # 6
MAC ADDRESS & ADDRESS RESOLUTION PROTOCOL
(ARP)

OBJECTIVE
Switches learn MAC address by using ARP protocol.

THEORY

MAC ADDRESS

A MAC (media access control) address is a unique numeric code that is permanently
assigned to each unit of most types of networking hardware, such as network interface
cards (NICs), by the manufacturer at the factory.

An NIC, also referred to as a network adapter, is a circuit board that is plugged into a slot
on a motherboard (the main circuit board on a computer) to enable a computer to
physically connect to a network cable and thereby communicate over a network (i.e., to
one or more other computers). Some computers use network interface adapter circuitry
that is built directly into the motherboard instead of a separate card.

The purpose of MAC addresses is to provide a unique hardware address or physical


address for every node on a local area network (LAN) or other network. A node is a point
at which a computer or other device (e.g., a printer or router) is connected to the network.
The address is most commonly a 48-bit hexadecimal (i.e., base 16) number, which consists
of 12 characters. They are arranged in six pairs, each separated by a colon. A typical MAC
will look something like 00:10:B5:C4:99:6A. The first 24 bits (three bytes) identify the
manufacturer, and the remaining bits uniquely identify the type of device and provide a
specific serial number for the unit.

When a computer is connected to a network, a correspondence table relates the computer's


IP address to its physical address on the network. The MAC addresses of the sending
computers are contained in the header of each packet, thus allowing packets to arrive at
their intended destination.

Although MAC addresses are generally described as being permanent, it is possible for
users to change them.

Fig 6.1 MAC Address structure


CE-307L: Data Communication 49
LAB#06: Address Resolution Protocol (ARP)

ARP
Address Resolution Protocol, a network layer protocol used to find the MAC address
when an IP address is known, such as an Ethernet address. A host wishing to obtain a
physical address of a other machine it broadcasts an ARP request onto the TCP/IP
network. The host on the network that has the IP address in the request it replies with its
physical/hardware address.

There is also Reverse ARP (RARP) which can be used by a host to discover IP address
when MAC address is known. In this case, the host broadcasts its physical address and a
RARP server replies with the host's IP address.

NETWORK SETUP:
It shows that how to setup a network among 1 switch and their devices

Fig 6.1: Switch topology

EXERCISE 6.1

Step 1: IP Address Assignment


First of all we have to assign IP addresses for all computer in the given network setup.

 To assign IP address first we click on computer

CE-307L: Data Communication 50


LAB#06: Address Resolution Protocol (ARP)

 After this we will click the desktop button

 After this we click on IP Configuration to assign IP Address

CE-307L: Data Communication 51


LAB#06: Address Resolution Protocol (ARP)

Step 2: Ping All IP Address

After giving IP address to all computers, we can ping all the IP addresses with each other
 First we click on desktop button

 After this we click on Command Prompt and write the IP Address of the
destination with Ping command

CE-307L: Data Communication 52


LAB#06: Address Resolution Protocol (ARP)

Step 3: Learn MAC Address from Table


To learn the MAC address from the table we have to follow the given steps:

 First we have to click on the Switch given in network setup diagram

 Then we click on CLI mode and write the command for MAC addresses
#show mac-address-table

CE-307L: Data Communication 53


LAB#06: Address Resolution Protocol (ARP)

Step 4: Learn MAC Address in Form Of Packets


If we want to learn MAC address in packets form, then:
 First, we click on the Simulation Tab

 After this we click on Auto Capture/Play button and due to this we can see ARP
and many other packets flowing

CE-307L: Data Communication 54


LAB#06: Address Resolution Protocol (ARP)

 When we will click on green ARP button the layer wise description will be shown.

Address Resolution Protocol (ARP)


ARP is responsible for obtaining HW addresses of TCP/IP hosts on broadcast-based
networks. ARP uses a local broadcast of the destination IP address to acquire the hardware
address of the destination host or gateway.
Reverse address resolution is the process of mapping a host’s hardware address to its IP
address. Arp manipulates the kernel's ARP cache in various ways. The primary options are
clearing an address mapping entry and manually setting up one. For debugging purposes,
the arp program also allows a complete dump of the ARP cache.
CE-307L: Data Communication 55
LAB#06: Address Resolution Protocol (ARP)

Options:
-a [hostname], --display [hostname]
Shows the entries of the specified hosts. If the hostname parameter is not used, all entries
will be displayed.
-d hostname, --delete hostname
Remove any entry for the specified host. This can be used if the indicated host is brought
down.
-v, --verbose
Tell the user what is going on by being verbose.
-n, --umeric
shows numerical addresses instead of trying to determine symbolic host, port or user
names.
-H type, --hw-type type
When setting or reading the ARP cache, this optional parameter tells arp which class of
entries it should check for.

Why Address Translation?

 Upper levels use only protocol addresses


 “Virtual Network" addressing scheme

 Hides hardware details


 Translation occurs at data link layer.
 Upper layer hands down protocol address of destination.
 Data link layer translates into hardware address for use by hardware layer.
Resolving a local IP address to a hardware address

Procedure:
 When IP determines that the IP address is for the local network, the source host checks
its own ARP cache for the HW address of destination host.
 If its find no mapping, ARP builds a request with the question “Who is this IP address,
and what is your hardware address?” The ARP request is sent as a broadcast so that all
local hosts can receive and process it.
 Each host on the local network receives the broadcast and checks for a match to its
own IP address. If a host does not find a match, it ignores the request.
 The destination host determines that the IP address in the request matches its own IP
address and sends an ARP reply directly to the source host with its HP address. If then
updates its ARP cache with the IP address/HW address mapping to the source host.

ARP Operation –

Example 6.1

 The operation of ARP is straightforward. Let's say an IP-based station (station "A")
with IP address 192.0.2.1 wishes to send data over the Ethernet channel to another IP-
based station (station "B") with IP address 192.0.2.2. Station "A" sends a packet to the
broadcast address containing an ARP request. The ARP request basically says "Will

CE-307L: Data Communication 56


LAB#06: Address Resolution Protocol (ARP)

the station on this Ethernet channel that has the IP address of 192.0.2.2 please tell me
what the address of its Ethernet interface is?"
 Since the ARP request is sent in a broadcast frame, every Ethernet interface on the
network reads it in and hands the ARP request to the networking software running on
the station. Only station "B" with IP address 192.0.2.2 will respond, by sending a
packet containing the Ethernet address of station "B" back to the requesting station.
Now station "A" has an Ethernet address to which it can send data destined for station
"B," and the high-level protocol communication can precede.

Exercise 6.2
Ping the local NT based host. Use ARP to check the MAC Address.
What is the output?

Exercise 6.3
Ping the local Linux based host. Use the ARP to check the MAC Address
What is the output?

Exercise 6.4
Ping the nonexistent local host. Check ARP cache to see the MAC Address.

Exercise 6.5
Ping a remote host. Check ARP cache. What MAC Address has been entered into the
cache?

Exercise 6.6
Use ARP utility on Linux. Logging into liaquat .Read the manual page of ARP. For
reading the manual page type man ARP

Exercise 6.7
Compare ARP utility in Linux versus ARP utility in Windows NT .What capabilities are
available in each.

Exercise 6.8
To add a route entry
In this procedure, you will add a static routing table entry for the router
Type the following command where x is the IP address
Route add 1341.107.2.0 mask 255.255.0 131.107.x.1
View the entries in the route table, and verify that the route is listed before you continue
Ping the instructor computer (131.107.2.200)

CE-307L: Data Communication 57


LAB#06: Address Resolution Protocol (ARP)

Was the ping successful? If not, what was the response?


Ping a host on another’s student network
Was the ping successful? Why or why not?

Exercise 6.9)
To restore the default gateway address
In this procedure, you will restore the address for the default gateway. This will allow
packets to be sent to the default gateway when no route entry for the destination networks.
Access the Microsoft TCP/IP Properties dialog box
In the Default Gateway box, type your default gateway address
Click OK
Click OK

Exercise 6.10
To test communication. In this procedure, you will test the configured default gateway
address to verify that internetwork operations are successfully.
Switch to the command prompt and use the route print command to view the routing table.
Is the default gateway address listed under Gateway Address?
Ping hosts on each network to verify that communications can be established.

HOME ASSIGNMENT
Q1: What is the in-addr.arpa domain?
Q2: Perform all the above-mentioned steps and submit the hard copy.
Q3: Find out your system MAC address by using TCP/IP utility.
Q4: Analyze ARP packets and define different terms in its header.

CE-307L: Data Communication 58


LAB # 7
Open Ended Lab-I
1. OBJECTIVE: Apply basic networking commands and configuration settings with the
help of Network Simulator Packet Tracer on various network topologies, which
incorporate cables, PCs, switches, as well as showing diagnostic utilities of these
networks & familiarize with the different protocols associated with different devices.

2. Hardware/Software required

3. Diagram

4. Methodology

5. Observation

6. Result and Discussion

7. Conclusion

CE-307L: DATA COMMUNICATION 59


LAB # 8
CONFIGURE DOMAIN NAME SERVER (DNS)
&
DYNAMIC HOST CONFIGURATION PROTOCOL (DHCP)
SERVER
OBJECTIVE
To understand and configure Domain Name Server (DNS)

THEORY
The Domain Name System (DNS) provides translation between symbolic names and IP addresses.
The heart of Intranets and the Internet is the Domain Name System (DNS), the way in which
computers can contact each other and do things such as exchange electronic mail, or display Web
pages. The Internet Protocol (IP) uses Internet address information and the DNS to deliver mail and
other information from computer to Background Structure of DNS Names. Each name consists of a
sequence of alphanumeric components separated by periods.

Examples:
 www.eg.bucknell.edu
 www.netbook.cs.purdue.edu
 charcoal.eng.bucknell.edu
 aurangzeb.ssuet.edu.pk
 Names are hierarchical, with most-significant component on the right
 Left-most component is, generally, a computer name

STRUCTURE OF DNS NAMES


The rightmost portion of the domain section of the address identifies the largest domain and kind of
organization where the person has his or her address.
Common domains in the United States are com for commercial; edu for education; gov for
government; mil for military; net for network (companies and groups concerned with the
organization of the Internet); and org for organization.
Outside the United States, only two letters are used to identify the domains, such as au for Australia;
ca for Canada; uk for United Kingdom; and fr for France.

IMPLEMENTING DNS
 IP assigns 32-bit addresses to hosts (interfaces)
 Binary addresses easy for computers to manage
 All applications use IP addresses through the TCP/IP protocol software

CE-307L: Data Communication 60


 Difficult for humans to remember: % telnet 134.82.11.70

DNS NAME SERVERS


A name server is an Internet host running software capable of processing DNS requests. A popular
free software name server is BIND or named, for UN*X hosts. (Berkeley Internet Name Daemon).
Windows NT Server 4.0 provides and implementation of the DNS RFCs and a GUI management
tool

USING DNS SERVERS


DNS request is forwarded to root server, which points at next server to use. Eventually,
authoritative server is located and IP address is returned DNS server hierarchy traversal is called
iterative resolution. Applications use recursive iteration and ask DNS server to handle traversal

EXERCISE 9.1

Object:
To configure the DNS Server service search order
Log on as Administrator
At a command prompt, type ipconfig and then press ENTER
Record the IP address for your computer

Switch to the Microsoft TCP/IP Properties dialog box, and then click the DNS tab
In the Domain box, type Domain1 (on your domain name)
Under DNS Service Search Order, click Add
In the DNS Server box, type in the IP address for your dns server, and then click Add
Click OK
The Network dialog box appears
Click OK to close the Network dialog box

EXERCISE 9.2
Object:

To install the DNS Server service


Procedure
In Control Panel, double-click the Network icon, and then click Services
Click Add
The Select Network Service dialog box appears
In the Network Service list, click Microsoft DNS Server, and then click OK

CE-307L: Data Communication 61


Windows NT Setup displays a dialog box asking for the full path to the Windows NT distribution
files.
Type the path to the windows NT distribution files, and then click Continue
All necessary files, including the sample files, are copied to your hard disk.
In the Network dialog box, click close.
When prompted, click Yes to restart your computer.
NSLOOKUP
Examines entries in the DNS database that pertain to a particular host or domain
NSLOOKUP Syntax
Nslookup [-option …] [computer-to-find | - [server]]

EXERCISE 9.3

Object:
To use NSLOOKUP in command mode
At a command prompt, modify the properties so that it has a screen buffer size of 50
Use the Layout property page to do this
If the command prompt is not full-screen, press ALT+ENTER
Type the following command
Nslookup host x
where host x is a host in your domain
NSLOOPKP will return the IP address of the computer hostx because the information is stored in
the DNS database.
Exit the command prompt

EXERCISE 9.4

Object:
With the help of nslookup find the CNAME for sirsyed.ssuet.edu.pk
Type at the command prompt
C:\nslookup –query=cname
Then type sirsyed.ssuet.edu.pk
Write the Output

EXERCISE 9.5
Object:
Use nslookup to see the MX records for ssuet.edu.pk
Type at the command prompt
C:\nslookup –query=mx
Then type ssuet.edu.pk
Record the output

CE-307L: Data Communication 62


EXERCISE 9.6
Object:

Use nslookup to see the MX records for hotmail.com


Record the output

EXERCISE 9.7
Object:

Use nslookup to see the MX records for microsoft.com


Record the output

EXERCISE 9.8
Object:

Use nslookup to see the MX records for oracle.com


Record the output

EXERCISE 9.9

Object:
Use nslookup find what is the hostname of the machine with the IP address 192.168.1.13?
Type at the command prompt
C:\nslookup 192.168.1.13
Record the output

EXERCISE 9.10

Object:
Use nslookup find what is the hostname of the machine with the IP address 192.168.2.1?
Type at the command prompt
C:\nslookup 192.168.2.1
Record the output

EXERCISE 9.11

Object:
Use nslookup find what is the hostname of the machine with the IP address 205.227.44.44 ?
Type at the command prompt
C:\nslookup 205.227.44.44
Record the output

CE-307L: Data Communication 63


EXERCISE 9.12

Object:
What is the IP address of the machine www.redhat.com?
Record the output

EXERCISE 9.13

Object:
Using a web browser connect to the machine www.ssuet.edu.pk. Then connect to the machine
ssuet.edu.pk. Why does it connect to the same machine?

EXERCISE 9.14

Object:
Using a web browser connect to the machine www. Then connect to the machine
www.ssuet.edu.pk. Why does it connect to the same machine?

EXERCISE 9.15

Object:
Which computers are the authoritative name servers for the domain yahoo.com?
Record the output

EXERCISE 9.16

Object:
Which computers are the authoritative name servers for the domain oracle.com?
Record the output

EXERCISE 9.17

Object:
Which computers are the authoritative name servers for the domain microsoft.com?
Record the output

EXERCISE 9.18

Object:
What information can you find out from the DNS about the host www.sun.com?
Record the output

CE-307L: Data Communication 64


OBJECTIVE

To understand and configure Dynamic Host Configuration Protocol (DHCP) Server

THEORY
Computer networks can be of any form like a LAN, WAN etc. If you are connected to a local LAN
or an internet connection, the IP addresses form the basis of communication over computer
networks. An IP address is the identity of a host or a computer device while connected to any
network.

In most of the cases when you connect your computer to a LAN or internet, you’ll notice that the IP
address and other information like subnet mask etc. are assigned to your computer automatically. As
the name suggests, DHCP is used to control the network configuration of a host through a remote
server. DHCP functionality comes installed as a default feature in most of the contemporary
operating systems. DHCP is an excellent alternative to the time-consuming manual configuration of
network settings on a host or a network device.

DHCP works on a client-server model. Being a protocol, it has its own set of messages that are
exchanged between client and server.

Following are the messages use to assign IP to any network device

1. DHCPDISCOVER

It is a DHCP message that marks the beginning of a DHCP interaction between client and server.
This message is sent by a client (host or device connected to a network) that is connected to a local
subnet. It’s a broadcast message that uses 255.255.255.255 as destination IP address while the
source IP address is 0.0.0.0

2. DHCPOFFER

It is DHCP message that is sent in response to DHCPDISCOVER by a DHCP server to DHCP


client. This message contains the network configuration settings for the client that sent the
DHCPDISCOVER message.

3. DHCPREQUEST

This DHCP message is sent in response to DHCPOFFER indicating that the client has accepted the
network configuration sent in DHCPOFFER message from the server.

4. DHCPACK
This message is sent by the DHCP server in response to DHCPREQUEST received from the client.
This message marks the end of the process that started with DHCPDISCOVER. The DHCPACK
message is nothing but an acknowledgement by the DHCP server that authorizes the DHCP client to
start using the network configuration it received from the DHCP server earlier.

CE-307L: Data Communication 65


THE CONCEPT OF LEASE

With all the necessary information on how DHCP works, one should also know that the IP address
assigned by DHCP server to DHCP client is on a lease. After the lease expires the DHCP server is
free to assign the same IP address to any other host or device requesting for the same. For example,
keeping lease time 8-10 hours is helpful in case of PC’s that are shut down at the end of the day.
So, lease has to be renewed from time to time. The DHCP client tries to renew the lease after half of
the lease time has expired. This is done by the exchange of DHCPREQUEST and DHCPACK
messages. While doing all this, the client enters the renewing stage.

 Assign static IP to server

 Configure DHCP service on DHCP Server

CE-307L: Data Communication 66


 DHCP from IP configuration of PC to assign IP

CE-307L: Data Communication 67


HOME ASSIGNMENT

Q1: Discuss the types of record to store DNS database


Q2: Discuss the functionality of DHCP
Q3: Make a topology of 5 PCs and a switch, assign IP to each device using DHCP
Server.

CE-307L: Data Communication 68


LAB # 9

REMOTE ACCESSING OF SWITCH USING TELNET &


SECURE SHELL (SSH)

OBJECTIVE

To configure Telnet for remote access of switch

THEORY

Telnet is a TCP/IP protocol, triggered by user command that allows you to access a remote
computer. While obtaining files from a remote computer via FTP is common, Telnet actually
goes one step further and allows you to log on as a regular user of the computer, with access to
all data and programs that may be installed on that computer. Telnet is usually used for technical
support purposes.
Telnet uses software, installed on your computer, to create a connection with the remote host.
The Telnet client (software), at your command, will send a request to the Telnet server (remote
host). The server will reply asking for a user name and password. If accepted, the Telnet client
will establish a connection to the host, thus making your computer a virtual terminal and
allowing you complete access to the host's computer.
Telnet requires the use of a user name and password, which means you need to have previously
set up an account on the remote computer. In some cases, however, computers with Telnet will
allow guests to log on with restricted access.
Type these commands for configuration

The line Vty 0-15 command selects the whole 0-15 VTY line range.
Switch(config)#line vty 0 15
Switch(config-line)#password cisco
Switch(config-line)#login
Switch(config-line)#enable secret $suet

Apply commands these command by following above

Switch(config)#interface vlan 1
Switch(config-if)#ip address 10.0.0.1 255.0.0.0
Switch(config-if)#no shutdown
Switch(config-if)#exit

Telnet Cisco device, go to command prompt of computer and type

C:\>telnet 10.0.0.1

CE-307L: Data Communication 69


Connecting To 10.0.0.1
User Access Verification
Password:
Switch>
SECURE SHELL (SSH)
To configure Secure Shell for remote access of switch

THEORY
Secure Shell (SSH) is set of programs which employ public/private key technology for authenticating and
encrypting sessions between user accounts on distributed hosts on the Internet.

SSH works by the exchange and verification of information, using public and private keys, to identify
hosts and users. It then provides encryption of subsequent communication, also by the use of
public/private key cryptography.

As a system administrator, you generate a public and private key pair for the system itself. By use of this
information contained within the system itself, the possibility of someone spoofing the system's identity
by faking IP addresses or mugging up DNS records that associate IP addresses and domain names is
removed. You would have to break into the system and steal its private key in order to successfully
pretend to be that system. This is a big improvement in security.

Create a local user name

Switch(config)#username ssuet password ccn


Assign a domain name

Switch(config)#ip domain-name ssuet.com


Following Command takes few a min to generate key

SSH uses encryption keys to encrypt the data exchanged in an SSH session.

ccn(config)#crypto key generate rsa


How many bits in the modulus [512]: 768
ccn(config)#enable password cisco

Configure vty ports for using SSH

ccn(config-line)#line vty 0 15
ccn(config-line)#login local
ccn(config-line)#transport input ssh

OR
ccn(config)# line vty 0 15
ccn(config-line)# login local
ccn(config-line)# transport input ssh telnet

CE-307L: Data Communication 70


Apply these commands

ccn(config)# interface vlan 1


ccn(config-if)# ip address 10.0.0.1 255.0.0.0
ccn(config-if)# no shutdown
ccn(config-if)# exit
Creating SSH session with Cisco device, , go to command prompt and type

C:\>SSH -L ssuet 10.0.0.1


Open

Enter the password configured in step 1

Password:
ccn>

Verification of SSH

ccn# show cr ypto key my pubkey r sa


ccn(config)#do show line
Tty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise Overruns Int
0 CTY - - - - - 0 0 0/0 -
129 AUX 9600/9600 - - - - - 0 0 0/0 -
* 130 VTY - - - - - 67 0 0/0 -
131 VTY - - - - - 0 0 0/0 -

132 VTY - - - - - 0 0 0/0 -


133 VTY - - - - - 0 0 0/0 -
134 VTY - - - - - 0 0 0/0 -
135 VTY - - - - - 0 0 0/0 -
136 VTY - - - - - 0 0 0/0 -
137 VTY - - - - - 0 0 0/0 -
138 VTY - - - - - 0 0 0/0 -
139 VTY - - - - - 0 0 0/0 -
140 VTY - - - - - 0 0 0/0 -
141 VTY - - - - - 0 0 0/0 -
142 VTY - - - - - 0 0 0/0 -
143 VTY - - - - - 0 0 0/0 -
144 VTY - - - - - 0 0 0/0 -
145 VTY - - - - - 0 0 0/0 -
‘*’ shows the active telnet Session

ccn# show users


Line User Host(s) Idle Location
0 con 0 idle 00:00:00
* 67 vty 0 ssuet idle 00:00:45
To close telent or SSH connection

ccn#clear line vty 0

CE-307L: Data Communication 71


EXERCISE QUESTIONS
1. You need to set up a password that will prevent unauthorized users from accessing into your
Switch remotely using Telnet. What series of commands would you use?
2. Write difference between Telnet and SSH
3. Name the encryption techniques use for key encryption.
4. What are the ports numbers for Telnet and SSH?
5. Why do we use ‘login’ command after setting password on VTY lines?

CE-307L: Data Communication 72


LAB # 10: Virtual Lan

LAB # 10
VIRTUAL LAN
OBJECTIVE
Construct Virtual Lan (VLAN)

THEORY

VIRTUAL LAN (VLAN)


A virtual LAN, commonly known as a VLAN, is a group of hosts with a common set of
requirements that communicate as if they were attached to the Broadcast domain, regardless of
their physical location. A VLAN has the same attributes as a physical LAN, but it allows for end
stations to be grouped together even if they are not located on the same network switch. Network
reconfiguration can be done through software instead of physically relocating devices.

Fig 11.1 Virtual LAN

NETWORK SETUP:
It shows that how to setup a network among 2 switches and their devices

CE-307L: Data Communication 73


LAB # 10: Virtual Lan

Fig 11.2 Switch Connectivity

EXERCISE 11.1

Step 1: enable, #show vlan

Enable the switch to take commands from User. Show vlan command displays the whole
information about vlan through which user could be able to assign ports to its new LAN.

VLAN Name Status Ports

1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4


Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
-
1 enet 100001 1500 - - - - - 0 0
1002 enet 101002 1500 - - - - - 0 0

CE-307L: Data Communication 74


LAB # 10: Virtual Lan

1003 enet 101003 1500 - - - - - 0 0


1004 enet 101004 1500 - - - - - 0 0
1005 enet 101005 1500 - - - - - 0 0

STEP 2: CONFIGURE, TERMINAL, VLAN 2


Configure the terminal to get in global mode and then start performing work on virtual lan 2 or
the new lan which is design by User.

STEP 3: NAME <INPUT YOUR DESIRED LAN NAME>


Place the name of LAN so that it could be easy to understand at the time of assigning the ports
that which LAN carry how many ports.

STEP 4: INT <INPUT PORT NAME>


Interface or int command places the interface mode and assigns the port to its desired LAN
number.

STEP 5: SWITCHPORT MODE ACCESS


Through switch mode access the User could be able to give access to the devices that device is
connected to User defined ports.

STEP 6: SWITCHPORT ACCESS VLAN 2


Through switch mode access the User could be able to give access to the devices that ports are
connected to User defined LAN.

STEP 7: INT <INPUT SWITCH PORT NAME>


Interface or int command places the interface mode and assigns the port to its desired LAN
number and name so that User could be able to assign the wire to trunk the cross cable.

STEP 8: SWITCHPORT MODE TRUNK


Trunk links are required to pass VLAN information between switches. A port on a Cisco switch
is either an access port or a trunk port. Access ports belong to a single VLAN and do not provide
any identifying marks on the frames that are passed between switches. Access ports also carry
traffic that comes from only the VLAN assigned to the port. A trunk port is by default a member
of all the VLANs that exist on the switch and carry traffic for all those VLANs between the
switches. To distinguish between the traffic flows, a trunk port must mark the frames with special
tags as they pass between the switches. Trunking is a function that must be enabled on both sides
of a link. If two switches are connected together, for example, both switch ports must be
configured for trunking, and they must both be configured with the same tagging mechanism

CE-307L: Data Communication 75


LAB # 10: Virtual Lan

Fig 11.3 Switch Connectivity

STEP 9: EXIT, #SHOW VLAN


Now in privilege mode User could view its VLAN information by writing the command and can
view the ports number that is assigned to its VLAN.

HOME ASSIGNMENTS
Q1: Perform all the basic switch configurations those are mentioned in manual
& Submit the hard copy.

CE-307L: Data Communication 76


LAB # 11: Port Security

LAB # 11
PORT SECURITY
OBJECTIVE
To secure campus network from unhealthy systems by implementing port security on switches.

THEORY

PORT SECURITY
Port security can be used with dynamically learned and static MAC addresses to restrict a port's
ingress traffic by limiting the MAC addresses that are allowed to send traffic into the port. When
you assign secure MAC addresses to a secure port, the port does not forward ingress traffic that
has source addresses outside the group of defined addresses. If you limit the number of secure
MAC addresses to one and assign a single secure MAC address, the device attached to that port
has the full bandwidth of the port.

A security violation occurs in either of these situations:

 When the maximum number of secure MAC addresses is reached on a secure port and
the source MAC address of the ingress traffic is different from any of the identified
secure MAC addresses, port security applies the configured violation mode.
 If traffic with a secure MAC address that is configured or learned on one secure port
attempts to access another secure port in the same VLAN, applies the configured
violation mode.

Fig 12.1 Port security restricts port access by MAC address

CE-307L: Data Communication 77


LAB # 11: Port Security

NETWORK SETUP

Fig 12.2 Network setup for applying port security

EXERCISE 12.1

Verify MAC table and ports


Checking the MAC Address table first, DYNAMIC means that no MAC address has been
configured on ports. Use the privileged EXEC mode to view the MAC Address table

Switch# show mac-address-table


Mac Address Table

Vlan Mac Address Type Ports

1 0001.4267.74a9 DYNAMIC Fa0/6


1 0002.4a20.a5ed DYNAMIC Fa0/1
1 0003.e4b2.29a0 DYNAMIC Fa0/10
1 0004.9a54.2174 DYNAMIC Fa0/9
1 0004.9ab2.c6c8 DYNAMIC Fa0/7
1 000b.be7c.7c4b DYNAMIC Fa0/3
1 00d0.5830.a010 DYNAMIC Fa0/5
1 00d0.58de.4a21 DYNAMIC Fa0/8
1 00e0.b0d2.49c7 DYNAMIC Fa0/4

It is good practice to check that all ports are up

CE-307L: Data Communication 78


LAB # 11: Port Security

Switch#sh ip interface brief

Interface IP-Address OK? Method Status Protocol

FastEthernet0/1 unassigned YES manual up up

FastEthernet0/2 unassigned YES manual up up

FastEthernet0/3 unassigned YES manual up up

FastEthernet0/4 unassigned YES manual up up

FastEthernet0/5 unassigned YES manual up up

FastEthernet0/6 unassigned YES manual up up

FastEthernet0/7 unassigned YES manual up up

FastEthernet0/8 unassigned YES manual up up

FastEthernet0/9 unassigned YES manual up up

FastEthernet0/10 unassigned YES manual up up

--More--

EXERCISE 12.2

STEP 1: SELECT RANGE TO APPLY PORT SECURITY


Interface configuration commands modify the operation. In order to configure a specific interface
range, you need to enter interface configuration mode, from global configuration mode, by
entering the interface interface range command. The prompt Switch (config-if)# indicates that
you are in interface configuration mode.

Switch(config)# interface range fastEthernet 0/1 - 10

STEP 2: ACCESS MODE


By default, the port security is turned off on all interfaces. In order to turn it on, a port must be in
an access mode. Otherwise the command will be rejected. Check out the below attempt of
enabling it when the port is in a 'dynamic desirable' rather than an access mode.

Switch(config-if-range)# switchport mode access

CE-307L: Data Communication 79


LAB # 11: Port Security

STEP 3: APPLYING MAC-ADDRESS-STICKY


Port security with sticky MAC addresses provides many of the same benefits as port security with
static MAC addresses, but sticky MAC addresses can be learned dynamically. Port security with
sticky MAC addresses retains dynamically learned MAC addresses during a link-down condition.

Switch(config-if-range)# switchport port-security mac-address sticky

STEP 4: SET MAXIMUM ADDRESS TO LEARN


How many MAC addresses can be considered secure on a given port (platform dependent). The
default is: 1.

Switch(config-if-range)# switchport port-security maximum 1

STEP 5: VIOLATION CONDITION TO SHUTDOWN


When configuring port security violation modes, note the following information:

 Protect—Drops packets with unknown source addresses until you remove a sufficient
number of secure MAC addresses to drop below the maximum value.
 Restrict—Drops packets with unknown source addresses until you remove a sufficient
number of secure MAC addresses to drop below the maximum value and causes the
SecurityViolation counter to increment.
 Shutdown—Puts the interface into the error-disabled state immediately and sends an
SNMP trap notification

Switch(config-if-range)# switchport port-security violation shutdown

STEP 6: APPLYING PORT SECURITY


If this command is not performed than port security will not be applied
Switch(config-if-range)# switchport port-security

STEP 7: CHECKING PORT SECURITY

Switch# show port-security interface fastEthernet 0/5

Port Security : Enabled


Port Status : Secure-up
Violation Mode : Shutdown
Aging Time : 0 mins
Aging Type : Absolute
SecureStatic Address Aging : Disabled
Maximum MAC Addresses 1
Total MAC Addresses 1
Configured MAC Addresses 0
Sticky MAC Addresses 1
Last Source Address:Vlan : 00d0.5830.a010

CE-307L: Data Communication 80


LAB # 11: Port Security

Security Violation Count :0

EXERCISE 12.3

CHANGE THE PC ON PORT FASTETHERNET 0/5 AND VERIFY PORT


SECURITY

Switch# show port-security interface fastEthernet 0/5

Port Security : Enabled


Port Status : Secure-shutdown
Violation Mode : Shutdown
Aging Time : 0 mins
Aging Type : Absolute
SecureStatic Address Aging : Disabled
Maximum MAC Addresses 1
Total MAC Addresses 1
Configured MAC Addresses 0
Sticky MAC Addresses 1
Last Source Address:Vlan : 0001.C971.1829:1
Security Violation Count 1

CHECK THAT LAST SOURCE MAC ADDRESS AND COMPARE IT WITH


MAC ADDRESS IN LAST EXERCISE

Switch# show ip interface brief

Interface IP-Address OK? Method Status Protocol

FastEthernet0/1 unassigned YES manual up up

FastEthernet0/2 unassigned YES manual up up

FastEthernet0/3 unassigned YES manual up up

FastEthernet0/4 unassigned YES manual up up

FastEthernet0/5 unassigned YES manual down down

FastEthernet0/6 unassigned YES manual up up

FastEthernet0/7 unassigned YES manual up up

Switch# show interfaces fastEthernet 0/5

CE-307L: Data Communication 81


LAB # 11: Port Security

FastEthernet0/5 is down, line protocol is down (err-disabled)


Hardware is Lance, address is 0030.a354.e505 (bia 0030.a354.e505)
BW 100000 Kbit, DLY 1000 usec,
reliability 255/255, txload 1/255, rxload 1/255

<OUTPUT OMITTED>

HOME ASSIGNMENTS

Q1: Perform other violation modes on other ports.

CE-307L: Data Communication 82


LAB # 12: Spanning Tree Protocol

LAB # 12
SPANNING TREE PROTOCOL
OBJECTIVE
To understand that how to avoid looping by using STP protocol.

THEORY

SPANNING TREE PROTOCOL (STP)


The Spanning Tree Protocol (STP) is a link layer network protocol that ensures a loop-free
topology for any bridged LAN. It is based on an algorithm invented by Radia-Perlman while
working for Digital Equipment Corporation. In the OSI model for computer networking, STP
falls under the OSI layer-2. Spanning tree allows a network design to include spare (redundant)
links to provide automatic backup paths if an active link fails, without the danger of bridge loops,
or the need for manual enabling/disabling of these backup links. Bridge loops must be avoided
because they result in flooding the network.

Fig 13.1 Spanning Tree Protocol

NETWORK SETUP
It shows that how to setup a network among 2 switches and their devices. Which transform a
bridge in which devices were entertain through there priority level and their MAC-address.
Bridge ID = Priority + MAC address.

CE-307L: Data Communication 83


LAB # 12: Spanning Tree Protocol

Fig 13.2 Network among 2 Switches and Devices

EXERCISE 13.1

STEP 1: ENABLE, CONFIGURE, TERMINAL


Critical commands require that the user be logged into privileged EXEC level. To change to the
privileged EXEC level, type enable at the switch> prompt. The switch prompts changes in to
switch#. So that user could be able to interact with all the facility that are provided in switches.

Global configuration commands apply to features that affect the system as a whole. Use
the configure privileged EXEC command to enter global configuration mode. When you enter
this command, the system EXEC prompts you for the source of the configuration commands:
Configuring from terminal, memory, or network [terminal]?

STEP 2: INT <INPUT PORT NAME>


Interface configuration commands modify the operation. In order to configure a specific interface,
you need to enter interface configuration mode, from global configuration mode, by entering the
interface interface_type port_number command. The prompt Switch (config-if)# indicates that
you are in interface configuration mode.

STEP 3: #SHUTDOWN
Shut down command is used to create substitute path in routers or switches because if there are
two paths for accessing the same devices system will get confused for data transmission through
the whole procedure (data sending and receiving) that which is the best path to transmit the data
and if those devices are slower then the whole transmission will slow down. Through Shut down
command one path will remain closed until the other get slow transmission level or traffic on it.

CE-307L: Data Communication 84


LAB # 12: Spanning Tree Protocol

STEP 4: EXIT, SPANNING-TREE VLAN 1 PRIORITY 4096

To exit interface configuration mode and return to global configuration mode, enter the exit
command.

Spanning tree protocol has its priority levels up to 4096 levels. Through this command they are
set to different switches

STEP 5: EXIT, #SHOW SPANNING-TREE

After returning to global configuration mode, #show spanning-tree command helps the user to see
the whole information about the spanning tree in the device.
For example

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 4097
Address 0009.7C0E.B42D
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 4097 (priority 4096 sys-id-ext 1)


Address 0009.7C0E.B42D
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type

Fa0/1 Desg FWD 19 128.1 P2p


Fa0/2 Desg FWD 19 128.2 P2p
Fa0/4 Desg FWD 19 128.4 P2p

CE-307L: Data Communication 85


LAB # 12: Spanning Tree Protocol

HOME ASSIGNMENTS

Q1: Perform all the basic switch configurations those are mentioned in manual & submit the hard
copy.

CE-307L: Data Communication 86


LAB#13: Wireshark

LAB # 13
WIRESHARK

OBJECTIVE
How to sniff ARP, DHCP and DNS packets.

THEORY
Network traffic analyzer Ethereal is a network traffic analyzer, or "sniffer", for Unix
and Unix-like operating systems. A sniffer is a tool used to capture packets off the wire.
Ethereal decodes numerous protocols.

Step 1: Interfaces
Shows a dialog box with all currently known interfaces and displaying the current
network traffic amount. Capture sessions can be started from here. Beware: keeping
this box open results in high system load!

Fig 14.1 Wireshark Interface

CE-307L: Data Communication 87


LAB#13: Wireshark

Step 2: Options
Initiate a live packet capture (see Capture Options dialog below). If no filename is
specified, a temporary file will be created to hold the capture. The location of the file
can be chosen by setting your TMPDIR environment variable before starting Ethereal.
Otherwise, the default TMPDIR location is system-dependent, but is likely either
/var/tmp or /tmp.

Fig 14.2 Wireshark Option menu

CE-307L: Data Communication 88


LAB#13: Wireshark

Step 3: Start
Start a live packet capture with the previously seleted options. This won't open the
options dialog box, and can be convenient for repeatingly capturing with the same
options.

Fig 14.3 Wireshark Capture Options

Step 4: Stop
Stop a running live capture.

Fig 14.4 Protocol Statistics

CE-307L: Data Communication 89


LAB#13: Wireshark

Step 5: Packet List Pane


The top pane contains the list of network packets that you can scroll through and select.
By default, the packet number, packet timestamp, source and destination addresses,
protocol, and description are displayed for each packet; the Columns page in the dialog
box popped up by Edit:Preferences lets you change this (although, unfortunately, you
currently have to save the preferences, and exit and restart Ethereal, for those changes
to take effect).
If you click on the heading for a column, the display will be sorted by that column;
clicking on the heading again will reverse the sort order for that column.
An effort is made to display information as high up the protocol stack as possible, e.g.
IP addresses are displayed for IP packets, but the MAC layer address is displayed for
unknown packet types.
The right mouse button can be used to pop up a menu of operations.
The middle mouse button can be used to mark a packet.

Fig 14.5 Packet List Pane


Step 6: Packet Details Pane
The middle pane contains a display of the details of the currently selected packet. The
display shows each field and its value in each protocol header in the stack. The right
mouse button can be used to pop up a menu of operations.

CE-307L: Data Communication 90


LAB#13: Wireshark

Fig 14.6 Packet details Pane

Step 7: Packet Bytes Pane

The lowest pane contains a hex and ASCII dump of the actual packet data. Selecting a
field in the packet details highlights the corresponding bytes in this section.
The right mouse button can be used to pop up a menu of operations.

CE-307L: Data Communication 91


LAB#13: Wireshark

Fig 14.7 Packet Byte Pane

HOME ASSIGNMENT

Q1: Perform all the above-mentioned steps and sniff the ARP and DHCP and DNS
packets.

CE-307L: Data Communication 92


LAB # 14: Open Ended Lab SSUET/QR/114

LAB # 14
Open Ended Lab-II
1. OBJECTIVE: Apply networking commands and configuration settings on a network,
which consist of four departments. Each department has multiple nodes and network
addresses assigned dynamically and fully secured. Each network switch has remote access,
and capable of multi-link support. In addition, network has support of DNS and web servers.

2. Hardware/Software required

3. Diagram

4. Methodology

5. Observation

6. Result and Discussion

7. Conclusion

CE-307L: DATA COMMUNICATION 93

You might also like