Sunteți pe pagina 1din 45

DATA COMMUNICATION AND COMPUTER NETWORKS

Laboratory Manual
Data Communication & Computer Networks
Spring Semester 2016

Electronic Engineering Department

Sir Syed University of Engineering & Technology

University Road, Karachi 75300


http:// www.ssuet.edu.pk

Sir Syed University of Engineering & Technology Page 1


DATA COMMUNICATION AND COMPUTER NETWORKS

TABLE OF CONTENTS Page No

SECTION-I

NETWORK FUNDAMENTALS

LAB-1 NETWORK OVERVIEW 4

LAB-2 Diagnostic Utilities 11

SECTION-II

CISCO ROUTER CONFIGURATION

LAB-3 Introduction To Packet Tracer 13

LAB-4 IP addressing 17

SECTION-III

ROUTING

LAB-5 Static Route 19

LAB-6 RIP (Routing Information Protocol) & EIGRP 21

(Enhanced Interior Gateway Routing Protocol)

LAB-7 OSPF (Open Shortest Path First) 24

SECTION-IV

SECURITY & SWITCHING

LAB-8 Access Control List 27

LAB-9 Basic Commands on Switch 30

Sir Syed University of Engineering & Technology Page 2


DATA COMMUNICATION AND COMPUTER NETWORKS

LAB-10 NAT 33

LAB-11 VLAN Routing 36

SECTION-V

PROTOCOL ANALYZER

LAB-12 Wireshark TCP 39

LAB-13 Wireshark UDP 44

Sir Syed University of Engineering & Technology Page 3


DATA COMMUNICATION AND COMPUTER NETWORKS

LAB # 01

OVERVIEW OF COMPUTER NETWORK


Object

To understand the basic concepts of Computer Network and its types, Also describe brief
overview of OSI layers.

Theory

Computer Networking

A Computer Network, often simply referred to as a network, is a collection of hardware


components and computers interconnected by communication channels that allow sharing of
resources and information.

Networks may be classified according to a wide variety of characteristics such as the medium
used to transport the data, communications protocol used, scale, topology, and organizational
scope.

Network Types

Computer Network mainly consists of three types:

▪ LAN (Local Area Network)

A local area network (LAN) supplies networking capability to a group of computers in close
proximity to each other such as in an office building, a school, or a home. A LAN is useful for
sharing resources like files, printers, games or other applications.

Examples:

The most common type of local area network is an Ethernet LAN. The smallest home LAN can
have exactly two computers; a large LAN can accommodate many thousands of computers.

▪ WAN (Wide Area Network)

A WAN spans a large geographic area, such as a state, province or country. WANs often connect
multiple smaller networks, such as local area networks (LANs) or metro area networks (MANs).

Sir Syed University of Engineering & Technology Page 4


DATA COMMUNICATION AND COMPUTER NETWORKS

Examples:

The world's most popular WAN is the Internet. Some segments of the Internet, like VPN-based
extranets, are also WANs in themselves. Finally, many WANs are corporate or research
networks that utilize leased lines.

WANs generally utilize different and much more expensive networking equipment than do
LANs.

Key Technologies

Key technologies often found in WANs include SONET, Frame Relay, and ATM.

▪ MAN (Metropolitan Area Network)

A metropolitan area network (MAN) is a network that interconnects users with computer
resources in a geographic area or region larger than that covered by even a large local area
network (LAN) but smaller than the area covered by a wide area network (WAN).

Examples:

Examples of metropolitan area networks of various sizes can be found in the metropolitan areas
of London, England; Lodz, Poland; and Geneva, Switzerland. Large universities also sometimes
use the term to describe their networks. A recent trend is the installation of wireless MANs.

OVERVIEW OF OSI MODEL

The OSI, or Open System Interconnection, model defines a networking framework for
implementing protocols in seven layers. Control is passed from one layer to the next, starting at
the application layer in one station, and proceeding to the bottom layer, over the channel to the
next station and back up the hierarchy.

Application (Layer 7)

This layer supports application and end-user processes. Communication partners are identified,
quality of service is identified, user authentication and privacy are considered, and any
constraints on data syntax are identified. Everything at this layer is application-specific. This
layer provides application services for file transfers, e-mail, and other network software
services. Telnet and FTP are applications that exist entirely in the application level. Tiered
application architectures are part of this layer.

Sir Syed University of Engineering & Technology Page 5


DATA COMMUNICATION AND COMPUTER NETWORKS

Presentation (Layer 6)

This layer provides independence from differences in data representation (e.g., encryption) by
translating from application to network format, and vice versa. The presentation layer works to
transform data into the form that the application layer can accept. This layer formats and
encrypts data to be sent across a network, providing freedom from compatibility problems. It is
sometimes called the syntax layer.

Session (Layer 5)

This layer establishes, manages and terminates connections between applications. The session
layer sets up, coordinates, and terminates conversations, exchanges, and dialogues between the
applications at each end. It deals with session and connection coordination.

Transport (Layer 4)

This layer provides transparent transfer of data between end systems, or hosts, and is responsible
for end-to-end error recovery and flow control. It ensures complete data transfer.

Network (Layer 3)

This layer provides switching and routing technologies, creating logical paths, known as virtual
circuits, for transmitting data from node to node. Routing and forwarding are functions of this
layer, as well as addressing, internetworking, error handling, congestion control and packet
sequencing.

Data Link (Layer 2)

At this layer, data packets are encoded and decoded into bits. It furnishes transmission protocol
knowledge and management and handles errors in the physical layer, flow control and frame
synchronization. The data link layer is divided into two sub layers: The Media Access Control
(MAC) layer and the Logical Link Control (LLC) layer. The MAC sub layer controls how a
computer on the network gains access to the data and permission to transmit it. The LLC layer
controls frame synchronization, flow control and error checking.

Physical (Layer 1)

This layer conveys the bit stream - electrical impulse, light or radio signal -- through the network
at the electrical and mechanical level. It provides the hardware means of sending and receiving
Sir Syed University of Engineering & Technology Page 6
DATA COMMUNICATION AND COMPUTER NETWORKS

data on a carrier, including defining cables, cards and physical aspects. Fast Ethernet, RS232,
and ATM are protocols with physical layer components.

Network Cabling

The vast majority of networks today are connected by some sort of wiring or cabling that acts as
a network transmission medium that carries signals between computers. Many cable types are
available to meet the varying needs and sizes of networks, from small to large.

Types Of Cables

Three major groups of cabling connect the majority of networks:

• Coaxial cable
• Twisted-pair (unshielded and shielded) cable
• Fiber-optic cable

Coaxial Cable

At one time, coaxial cable was the most widely used network cabling. There were a couple of
reasons for coaxial cable's wide usage: it was relatively inexpensive, and it was light, flexible,
and easy to work with.

In its simplest form, coaxial cable consists of a core of copper wire surrounded by insulation, a
braided metal shielding, and an outer cover. Figure shows the various components that make up
a coaxial cable.

Figure Coaxial cable showing various layers

Sir Syed University of Engineering & Technology Page 7


DATA COMMUNICATION AND COMPUTER NETWORKS

Twisted-Pair Cable

In its simplest form, twisted-pair cable consists of two insulated strands of copper wire twisted
around each other. Figure shows the two types of twisted-pair cable: unshielded twisted-pair
(UTP) and shielded twisted-pair (STP) cable.

Figure Unshielded twisted-pair and shielded twisted-pair cables

Unshielded Twisted-Pair (UTP) Cable

UTP is the most popular type of twisted-pair cable and is fast becoming the most popular LAN
cabling. The maximum cable length segment is 100 meters, about 328 feet.

Traditional UTP cable, as shown in Figure, consists of two insulated copper wires. UTP
specifications govern how many twists are permitted per foot of cable; the number of twists
allowed depends on the purpose to which the cable will be put. In North America, UTP cable is
the most commonly used cable for existing telephone systems and is already installed in many
office buildings.

Figure UTP cable

Categories Of UTP

• Category 1 This refers to traditional UTP telephone cable that can carry voice but not
data transmissions. Most telephone cable prior to 1983 was Category 1 cable.
• Category 2 This category certifies UTP cable for data transmissions up to 4 megabits per
second (Mbps). It consists of four twisted pairs of copper wire.
• Category 3 This category certifies UTP cable for data transmissions up to 16 Mbps. It
consists of four twisted pairs of copper wire with three twists per foot.
• Category 4 This category certifies UTP cable for data transmissions up to 20 Mbps. It
consists of four twisted pairs of copper wire.

Sir Syed University of Engineering & Technology Page 8


DATA COMMUNICATION AND COMPUTER NETWORKS

• Category 5 This category certifies UTP cable for data transmissions up to 100 Mbps. It
consists of four twisted pairs of copper wire.

Shielded Twisted-Pair (STP) Cable

STP cable uses a woven copper-braid jacket that is more protective and of a higher quality than
the jacket used by UTP. Figure shows a two-twisted-pair STP cable. STP also uses a foil wrap
around each of the wire pairs. This gives STP excellent shielding to protect the transmitted data
from outside interference, which in turn allows it to support higher transmission rates over longer
distances than UTP.

Figure 2.15 STP cable

Fiber-Optic Cable

In fiber-optic cable, optical fibers carry digital data signals in the form of modulated pulses of
light. This is a relatively safe way to send data because, unlike copper-based cables that carry
data in the form of electronic signals, no electrical impulses are carried over the fiber-optic cable.
This means that fiberoptic cable cannot be tapped, and its data cannot be stolen.

Fiber-optic cable is good for very high-speed, high-capacity data transmission because of the
purity of the signal and lack of signal attenuation.

Fiber-Optic Cable Composition

An optical fiber consists of an extremely thin cylinder of glass, called the core, surrounded by a
concentric layer of glass, known as the cladding. The fibers are sometimes made of plastic.
Plastic is easier to install, but cannot carry the light pulses for as long a distance as glass.

Sir Syed University of Engineering & Technology Page 9


DATA COMMUNICATION AND COMPUTER NETWORKS

Figure Fiber-optic cable

Fiber-Optic Cabling Considerations

▪ Use fiber-optic cable if you:

• Need to transmit data at very high speeds over long distances in very secure media.

▪ Do not use fiber-optic cable if you:

• Are under a tight budget.


• Do not have the expertise available to properly install it and connect devices to it.

LAB ASSIGNMENT

▪ Briefly describe the purpose of RJ-45 and BNC connectors. Also give some examples where
each of the connector is used.

Sir Syed University of Engineering & Technology Page 10


DATA COMMUNICATION AND COMPUTER NETWORKS

LAB 02

DIAGNOSTIC UTILITIES

Object

To Study the Basic Diagnostic Utilities on command prompt and viewing their outputs.

Diagnostic Commands

1. Ipconfig

▪ It gives you the ip address,default gateway server and subnet mask respectively.

2. Hostname

▪ It tells you the name of the current device.

3. Tracert

▪ It let you know about the different routing information to reach any destination. It has different
parameters like maximum hops,host list etc

4. Arp

▪ Displays and modifies IP to physical address translation tables used by address resolution
protocol. It have different parameters.

5. Netstat

▪ Displays the active connections,protocols link status local and foreign address.

6. Ns lookup

▪ It let you know about the default server and its ip address.

Sir Syed University of Engineering & Technology Page 11


DATA COMMUNICATION AND COMPUTER NETWORKS

LAB ASSIGNMENT

▪ Apply the following commands and attach the result in the form of screen shot in lab file, and
also give necessary explanation.

1. Ipconfig and its sub commands


2. Hostname
3. Ping and its sub commands
4. Tracert and its sub commands
5. Arp and its sub commands
6. Netstat and its sub commands
7. Nslookup and its sub commands

Sir Syed University of Engineering & Technology Page 12


DATA COMMUNICATION AND COMPUTER NETWORKS

LAB 03

INTRODUCTION TO PACKET TRACER

Object

To learned the basics about the Packet Tracer software. Also run basic SHOW commands which
are defined below and give required explanation of the results.

Introduction

Packet Tracer is a protocol simulator developed by Dennis Frezzo and his team at Cisco
Systems. Packet Tracer (PT) is a powerful and dynamic tool that displays the various protocols
used in networking, in either Real Time or Simulation mode. This includes layer 2 protocols
such as Ethernet and PPP, layer 3 protocols such as IP, ICMP, and ARP, and layer 4 protocols
such as TCP and UDP. Routing protocols can also be traced.

The screenshot for the packet tracer is shown below

Figure1 : Snap Shot Of Packet Tracer

Sir Syed University of Engineering & Technology Page 13


DATA COMMUNICATION AND COMPUTER NETWORKS

Modes Used In Packet Tracer

There are three types of modes:

User mode

Router>

▪ Where user can access different commands and login to the main device.

Router> en

Configuration mode/Privilege mode

Router#

▪ Where the user can make changes and configure the device manually.

Router# config terminal

Global Configuration mode

Router(config)#

▪ Where the user can make changes and to access the interfaces and assigning ip addresses
respectively.

Basic Show Commands

Router#show running-config

Show the active configuration in memory. The currently active configuration script running on
the router is referred to as the running-config on the routers command-line interface. Note that
privileged mode is required. The running configuration script is not automatically saved on a
Cisco router, and will be lost in the event of power failure. The running configuration must be
manually saved with the 'copy' command

Router#show flash

Flash memory is a special kind of memory on the router that contains the operating system image
file(s). Unlike regular router memory, Flash memory continues to maintain the file image even
after power is lost.

Sir Syed University of Engineering & Technology Page 14


DATA COMMUNICATION AND COMPUTER NETWORKS

Router#show history

The routers Command Line Interface (CLI) maintains by default the last 10 commands you have
entered in memory. It shows the history of last 10 used commands.
To retrieve the previous command you typed:
Press the up arrow
To retrieve the next command you typed:
Press the down arrow

Router#show protocols

Use this command to view the status of the current layer 3 routed protocols running on your
router

Router#show version

Show detailed information about Cisco IOS Software and its specifications. This command will
give you critical information, such as: router platform type, operating system revision, operating
system last boot time and file location, amount of memory, number of interfaces, and
configuration register

Router#show clock

Will show you default Router clock

Router#show hosts

Will display a cached list of hosts and all of their interfaces IP addresses.

Router#show users

Will show a list of all users who are connected to the router.

Router#show interfaces

Will give you detailed information about each and all kinds of interfaces used by the router. And
also tell which interface UP, Down and Administratively down.

Router#show ip interface brief

This command will show brief descriptions about interface. This command mostly used in
troubleshooting. There may be three possible conditions of status
UP :- interface is up and operational
DOWN :- physical link is detected but there are some problem in configurations.
Administratively down :- port is disable by shutdown command ( Default mode of any port on
router.)

Sir Syed University of Engineering & Technology Page 15


DATA COMMUNICATION AND COMPUTER NETWORKS

Router#show ip route

This command will give a detail about known route. Router will not forward packet if route is
not shown here for that packet. Router’s routing decision is made by this routing table. And also
tell which IP is directly connected to the interface and which IP is indirectly connected to the
interface in the route.

Router#show ip protocols

It shows the detailed of the routing protocol which is used by the router.

LAB ASSIGNMENT

▪ Apply the following commands and attach the results in the form of screen shot in lab file and
also define the functions of the following commands and give required explanation of the results.

1. Clock Set and then Show Clock


2. Banner setting
3. Enable password

Sir Syed University of Engineering & Technology Page 16


DATA COMMUNICATION AND COMPUTER NETWORKS

LAB 04

IP ADDRESSING

Objective

▪ To Assign the IP Address on the fastethernet interface.

▪ To Assign the IP Address on the serial interface.

▪ Verify the connectivity by using PING command.

PART A

Network Topology:

Methodology:

1. Check the interfaces summary of the router.


2. Assign IP address on the fast Ethernet interface of the router.
3. Display the interface information of the fast Ethernet interface of the router.
4. Verify the connectivity of the router with the Host.

PART B

Network Topology:

Methodology:

1. Check the interfaces summary of the router 1 and router 2.


2. Check for the DCE & DTE interfaces of the router 1 and router 2.

Sir Syed University of Engineering & Technology Page 17


DATA COMMUNICATION AND COMPUTER NETWORKS

3. Assign the IP address on the serial interfaces of the router 1 and router 2 .
4. Display the interface information of the serial interfaces of the router 1 and router 2.
5. Verify the connectivity of the router 1 and 2 respectively.

Lab Assignment

 Configure the defined network by assigning the IP addresses at the interfaces of routers
and check the connectivity between all the routers.
 Also check the interfaces summary of the routers.
 Display the interface information of the interfaces of the routers.
 Also implement the following show commands at each router.
1. Show protocols
2. Show ip route
3. Show flash

All the results should be attach in printed form.

Sir Syed University of Engineering & Technology Page 18


DATA COMMUNICATION AND COMPUTER NETWORKS

LAB 05

STATIC ROUTING

Object

To understand the operation of Static Routing.

Network Topology:

Methodology:

1. Configuring & Assigning IP addresses on both routers and hosts.


2. Check the routing table on both the routers by using inspect icon from side menu bar.
3. Check the direct connectivity between the devices.
4. Administratively define the static routes on both routers so that hosts on the both routers
can communicate with each other.
5. Check the routing tables on both the routers after defining the static routes on the both
sides by using inspect icon from side menu bar.
6. Verify the connection of both hosts.

Lab Assignment

By using the defined network perform the following tasks.

1. Configuring & Assigning IP addresses on all routers and hosts.

Sir Syed University of Engineering & Technology Page 19


DATA COMMUNICATION AND COMPUTER NETWORKS

2. Check the routing table on all the routers by using inspect icon from side menu bar.
3. Check the direct connectivity between the devices.
4. Administratively define the static routes on all routers so that hosts on the all routers can
communicate with each other.
5. Check the routing tables on all the routers after defining the static routes on the all sides
by using inspect icon from side menu bar.
6. Verify the connection of all hosts.
7. Run these commands on all routers.
• Show ip int brief
• Show ip route

Sir Syed University of Engineering & Technology Page 20


DATA COMMUNICATION AND COMPUTER NETWORKS

LAB 06

ROUTING PROTOCOL

Object

To understand the operation of Dynamic routing protocol by using the Routing Information
Protocol (RIP)

Network Topology:

Methodology:

1. Configuring & Assigning IP addresses on both routers and hosts.


2. Check the routing table on both the routers by using inspect icon from side menu bar.
3. Check the direct connectivity between the devices.
4. Apply the RIP protocol on both routers so that hosts on the both routers can communicate
with each other.
5. Check the routing tables on both the routers after applying the dynamic routes by using
RIP routing protocol on the both sides by using inspect icon from side menu bar.
6. Verifying the connection of both hosts.
7. Run these commands on both routers.
• Show ip int brief
• Show ip route
• Show ip protocol

Sir Syed University of Engineering & Technology Page 21


DATA COMMUNICATION AND COMPUTER NETWORKS

Lab Assignment

(a) To understand the operation of Dynamic routing protocol by using the Enhanced Interior
Gateway Routing Protocol (EIGRP).

Network Topology:

Methodology:

1. Configuring & Assigning IP addresses on both routers and hosts.


2. Check the routing table on both the routers by using inspect icon from side menu bar.
3. Check the direct connectivity between the devices.
4. Apply the EIGRP protocol on both routers so that hosts on the both routers can
communicate with each other.
5. Check the routing tables on both the routers after applying the dynamic routes by using
EIGRP routing protocol on the both sides by using inspect icon from side menu bar.
6. Verifying the connection of both hosts.
7. Run these commands on both routers.
• Show ip int brief
• Show ip route
• Show ip protocol

(b) By using the defined network and apply RIP and EIGRP protocols perform the following
tasks.

Sir Syed University of Engineering & Technology Page 22


DATA COMMUNICATION AND COMPUTER NETWORKS

Methodology:

1. Configuring & Assigning IP addresses on all routers and hosts.


2. Check the routing table on all the routers by using inspect icon from side menu bar.
3. Check the direct connectivity between the devices.
4. Apply the RIP & EIGRP protocol on all routers so that hosts on the all routers can
communicate with each other.
8. Check the routing tables on all the routers after applying the dynamic routes by using RIP
& EIGRP routing protocol on the all sides by using inspect icon from side menu bar.
5. Verify the connection of all hosts.
6. Run these commands on all routers.
• Show ip int brief
• Show ip route
• Show ip protocol

Sir Syed University of Engineering & Technology Page 23


DATA COMMUNICATION AND COMPUTER NETWORKS

LAB 07

OSPF

Object

To understand the operation of Dynamic routing protocol by using the Open Shortest Path First
(OSPF).

Network Topology:

Methodology:

1. Configuring & Assigning IP addresses on both routers and hosts.


2. Check the routing table on both the routers by using inspect icon from side menu bar.
3. Check the direct connectivity between the devices.
4. Apply the OSPF protocol on both routers so that hosts on the both routers can
communicate with each other.
5. Check the routing tables on both the routers after applying the dynamic routes by using
OSPF routing protocol on the both sides by using inspect icon from side menu bar.
6. Verifying the connection of both hosts.
7. Run these commands on both routers.
• Show ip int brief
• Show ip route
• Show ip protocol

Sir Syed University of Engineering & Technology Page 24


DATA COMMUNICATION AND COMPUTER NETWORKS

Lab Assignment

(a)To understand the operation of Dynamic routing protocol by using the Open Shortest Path
First (OSPF).

Network Topology:

Methodology:

1. Configuring & Assigning IP addresses on both routers and hosts.


2. Check the routing table on both the routers by using inspect icon from side menu bar.
3. Check the direct connectivity between the devices.
4. Apply the OSPF protocol on both routers so that hosts on the both routers can
communicate with each other.
5. Check the routing tables on both the routers after applying the dynamic routes by using
OSPF routing protocol on the both sides by using inspect icon from side menu bar.
6. Verifying the connection of both hosts.
7. Run these commands on both routers.
• Show ip int brief
• Show ip route
• Show ip protocol
(b)To understand the operation of Dynamic routing protocol by using the Open Shortest Path
First (OSPF) with implementation of multiple areas.

Sir Syed University of Engineering & Technology Page 25


DATA COMMUNICATION AND COMPUTER NETWORKS

Network Topology:

Methodology:

8. Configuring & Assigning IP addresses on all routers and hosts.


9. Check the routing table on all the routers by using inspect icon from side menu bar.
10. Check the direct connectivity between the devices.
11. Apply the OSPF protocol on all routers so that hosts on the allrouters can communicate
with each other.
12. Check the routing tables on all the routers after applying the dynamic routes by using
OSPF routing protocol on the both sides by using inspect icon from side menu bar.
13. Verifying the connection of all hosts.
14. Run these commands on all routers.
• Show ip int brief
• Show ip route
• Show ip protocol

Sir Syed University of Engineering & Technology Page 26


DATA COMMUNICATION AND COMPUTER NETWORKS

LAB 08

ACCESS CONTROL LIST

Object

To understand the operation of Access Control List with the help of given topology, by applying
RIP routing protocol.

Network Topology:

Methodology:

1. Configuring & Assigning IP addresses on routers, hosts and servers.


2. Check the routing table on both the routers by using inspect icon from side menu bar.
3. Check the direct connectivity between the devices.
4. Apply the RIP protocol on both routers so that hosts and servers on the both routers can
communicate with each other.
5. Check the routing tables on both the routers after applying the dynamic routes by using
RIP routing protocol on the both sides by using inspect icon from side menu bar.
6. Verifying the connection of both hosts.

7. Make the Standard ACL on router 1 such that Host ‘A’ cannot be accessing the Web and
FTP servers respectively.

8. Apply the Standard ACL on router R1’s Serial interface.

9. Check by using Ping command Host A should not be accessing the Web and FTP servers,
but Host B should be accessing both the servers respectively.

Sir Syed University of Engineering & Technology Page 27


DATA COMMUNICATION AND COMPUTER NETWORKS

Verifying Commands

R1# show access-lists

R1# show ip interface serial 0

Lab Assignment

To understand the operation of Access Control List with the help of given topology, by applying
RIP routing protocol.

Network Topology:

Methodology:

1. Configuring & Assigning IP addresses on routers, hosts and servers.


2. Check the routing table on both the routers by using inspect icon from side menu bar.
3. Check the direct connectivity between the devices.
4. Apply the RIP protocol on both routers so that hosts and servers on the both routers can
communicate with each other.
5. Check the routing tables on both the routers after applying the dynamic routes by using
RIP routing protocol on the both sides by using inspect icon from side menu bar.
6. Verifying the connection of both hosts.

7. Make the Standard ACL on router 0 &2 such that Host ‘PC0’ &’PC2’ cannot be
accessing the Web and FTP servers respectively.

8. Apply the Standard ACL on router R0’s Serial interface, R2’s Serial interface.

9. Check by using Ping command Host PC0 &PC2 should not be accessing the Web and
FTP servers, but Host PC1 & PC3 should be accessing both the servers respectively.

Sir Syed University of Engineering & Technology Page 28


DATA COMMUNICATION AND COMPUTER NETWORKS

Verifying Commands

R1# show access-lists

R1# show ip interface serial 0

Sir Syed University of Engineering & Technology Page 29


DATA COMMUNICATION AND COMPUTER NETWORKS

LAB 09

BASIC COMMANDS ON SWITCH

Object

To Study some basic show commands of switch and apply them in given network topology.

Network Topology:

Modes Used In Packet Tracer

There are three types of modes:

User mode

Switch>

▪ Where user can access different commands and login to the main device.

Switch> en

Configuration mode/Privilege mode

Switch#

▪ Where the user can make changes and configure the device manually.

Switch# config terminal

Global Configuration mode

Switch(config)#

▪ Where the user can make changes and to access the interfaces and assigning ip addresses
respectively.

Sir Syed University of Engineering & Technology Page 30


DATA COMMUNICATION AND COMPUTER NETWORKS

Sub-Interface Configure mode

Switch(config-if)#

 Where the user can assign ip addresses and protocols to the interfaces respectively.

Basic Show Commands

Switch#show running-config

Show the active configuration in memory. The currently active configuration script running on
the Switch is referred to as the running-config on the Switchs command-line interface. Note that
privileged mode is required. The running configuration script is not automatically saved on a
Cisco Switch, and will be lost in the event of power failure. The running configuration must be
manually saved with the 'copy' command

To change the Hostname of Switch

Switch(config)# Hostname switch 2950

Switch#show flash

Flash memory is a special kind of memory on the Switch that contains the operating system
image file(s). Unlike regular Switch memory, Flash memory continues to maintain the file image
even after power is lost.

Switch#show history

The Switchs Command Line Interface (CLI) maintains by default the last 10 commands you
have entered in memory. It shows the history of last 10 used commands.
To retrieve the previous command you typed:
Press the up arrow
To retrieve the next command you typed:
Press the down arrow

Switch#show version

Show detailed information about Cisco IOS Software and its specifications. This command will
give you critical information, such as: Switch platform type, operating system revision, operating
system last boot time and file location, amount of memory, number of interfaces, and
configuration register

Switch#show clock

Sir Syed University of Engineering & Technology Page 31


DATA COMMUNICATION AND COMPUTER NETWORKS

Will show you default Switch clock

Switch#show hosts

Will display a cached list of hosts and all of their interfaces IP addresses.

Switch#show users

Will show a list of all users who are connected to the Switch.

Switch#show interfaces

Will give you detailed information about each and all kinds of interfaces used by the Switch.
And also tell which interface UP, Down and Administratively down.

Switch#show ip interface brief

This command will show brief descriptions about interface. This command mostly used in
troubleshooting. There may be three possible conditions of status
UP :- interface is up and operational
DOWN :- physical link is detected but there are some problem in configurations.
Administratively down :- port is disable by shutdown command ( Default mode of any port on
Switch.)

Display the MAC address table information

Switch#show mac-address-table

This command will show the information about the MAC addresses

LAB ASSIGNMENT

▪ Apply the following commands and attach the results in the form of screen shot in lab file and
also define the functions of the following commands and give required explanation of the results.

4. Clock Set and then Show Clock


5. Banner setting
6. Enable password
7. Show start up-config

Sir Syed University of Engineering & Technology Page 32


DATA COMMUNICATION AND COMPUTER NETWORKS

LAB 10

NETWORK ADDRESS TRANSLATION(NAT)

Object

To understand the operation of Static NAT with the help of given topology. For routing apply
RIP protocol.

Network Topology:

Methodology:

1. Configuring & Assigning IP addresses on routers, hosts and servers.


2. Apply the RIP protocol on both routers so that hosts and servers on the both routers can
communicate with each other.
3. Check the routing tables on both the routers after applying the dynamic routes by using
RIP routing protocol on the both sides by using inspect icon from side menu bar.
4. Verifying the connectivity.

5. Make the Standard ACL on router 0 &2 such that Host ‘PC2’ &’PC5’ cannot be
accessing the Web and FTP servers respectively.

6. Apply the Standard ACL on router R0’s Serial interface, R2’s Serial interface.

Sir Syed University of Engineering & Technology Page 33


DATA COMMUNICATION AND COMPUTER NETWORKS

7. Check by using Ping command Host PC2 &PC5 should not be accessing the Web and
FTP servers, but Host PC0, PC1, PC3 & PC4 should be accessing both the servers
respectively.

8. Establishes Static NAT Translation between an inside local address and an outside global
address. (create NAT translation table at R1)

9. Mark the interface as connected to the inside network (internal network) and translate
inside network.

10. Mark the interface as connected to the outside network (external network) and translate
outside network.

Verifying Command

R1# show ip nat translation

By using this command verify IP translation.

Lab Assignment

Apply static NAT on PC0, PC1, PC3 and PC4 in a given topology. Create ACL at R0 and R2
and deny PC2 and PC 5 to access the network.

Network Topology:

Methodology:

1. Configuring & Assigning IP addresses on routers, hosts and servers.

Sir Syed University of Engineering & Technology Page 34


DATA COMMUNICATION AND COMPUTER NETWORKS

2. Apply the RIP protocol on both routers so that hosts and servers on the both routers can
communicate with each other.
3. Check the routing tables on both the routers after applying the dynamic routes by using
RIP routing protocol on the both sides by using inspect icon from side menu bar.
4. Verifying the connectivity.

5. Establishes Static NAT Translation between an inside local address and an outside global
address. (create NAT translation table at R1)

6. Mark the interface as connected to the inside network (internal network) and translate
inside network.

7. Mark the interface as connected to the outside network (external network) and translate
outside network.

Verifying Command

R1# show access-lists

R2# show access-lists

R1# show ip nat translation

By using this command verify ACL and IP translation.

Sir Syed University of Engineering & Technology Page 35


DATA COMMUNICATION AND COMPUTER NETWORKS

LAB 11

VIRTUAL LAN’s( VLAN’s)

Object

To understand the operation of VLAN with the help of given topology.

Network Topology:

Methodology:

1. Creating vlan, vlan 2 (vlan1 is a default vlan so start with vlan2)

2. Assign the name to the vlan

3. Assigning Port 1of slot 0 of fast Ethernet interface to Vlan 2

4. Verify that port 1 assigned from vlan1 to vlan2 by place the cursor on the switch.

5. Assigning the IP address to switch and PC0

6. Check the connectivity by using Ping command.

Verifying your Vlan

Switch#show vlan

By using this command verify the vlan.

Other Commands we can use:-

1. Deleting a vlan

2. Assigning the Range of Ports(Port# 4- Port# 6) in one vlan

Sir Syed University of Engineering & Technology Page 36


DATA COMMUNICATION AND COMPUTER NETWORKS

Lab Assignment

(a) Create two vlans for two users on the same switch and assign two ports on the two
different vlans to two users.

Network Topology:

Methodology:

1. Creating two vlans, vlan 2 and vlan3 (vlan1 is a default vlan so start with vlan2)

2. Assign the name to both the vlans

3. Assigning Port 1 and 2 of slot 0 of fast Ethernet interface to Vlan 2 &3

4. Verify that port 1 and 2 assigned from vlan1 to vlan2 and vlan3 by place the cursor on the
switch.

5. Assigning the IP address to switch and PC1 and PC2

6. Check the connectivity by using Ping command.

Verifying your Vlan

Switch#show vlan

By using this command verify the vlans.

(b) Create one vlans for two users on the switch and assign two ports on the same vlan to two
users.

Sir Syed University of Engineering & Technology Page 37


DATA COMMUNICATION AND COMPUTER NETWORKS

Network Topology:

Methodology:

1. Creating vlan, vlan 2 (vlan1 is a default vlan so start with vlan2)

2. Assign the name to the vlan

3. Assigning Port 1 and 2 of slot 0 of fast Ethernet interface to Vlan 2 by using the range of
ports.

4. Verify that port 1 and 2 assigned from vlan1 to vlan2 by place the cursor on the switch.

5. Assigning the IP address to switch and PC1 and PC2

6. Check the connectivity by using Ping command.

Verifying your Vlan

Switch#show vlan

By using this command verify the vlan.

Sir Syed University of Engineering & Technology Page 38


DATA COMMUNICATION AND COMPUTER NETWORKS

LAB # 12

WIRESHARK LAB

TCP
Object:

To understand the basic concepts of Wireshark using TCP protocol.

Theory:

Do the following:
• Start up your web browser. Go the http://gaia.cs.umass.edu/wiresharklabs/alice.txt and retrieve
an ASCII copy of Alice in Wonderland. Store this file somewhere on your computer.
• Next go to http://gaia.cs.umass.edu/wireshark-labs/TCP-wireshark-file1.html.
• You should see a screen that looks like:

• Use the Browse button in this form to enter the name of the file (full path name) on your
computer containing Alice in Wonderland (or do so manually). Don’t yet press the “Upload
alice.txt file” button.
• Now start up Wireshark and begin packet capture (Capture->Options) and then press OK on
the Wireshark Packet Capture Options screen (we’ll not need to select any options here).
• Returning to your browser, press the “Upload alice.txt file” button to upload the file to the
gaia.cs.umass.edu server. Once the file has been uploaded, a short congratulations message will
be displayed in your browser window.

Sir Syed University of Engineering & Technology Page 39


DATA COMMUNICATION AND COMPUTER NETWORKS

• Stop Wireshark packet capture. Your Wireshark window should look similar to the window
shown below.

If you are unable to run Wireshark on a live network connection, you can download a packet
trace file that was captured while following the steps above on one of the author’s computers.
You may well find it valuable to download this trace even if you’ve captured your own trace and
use it, as well as your own trace, when you explore the questions below.

Sir Syed University of Engineering & Technology Page 40


DATA COMMUNICATION AND COMPUTER NETWORKS

A first look at the captured trace

Before analyzing the behavior of the TCP connection in detail, let’s take a high level view of the
trace.
• First, filter the packets displayed in the Wireshark window by entering “tcp” (lowercase, no
quotes, and don’t forget to press return after entering!) into the display filter specification
window towards the top of the Wireshark window.
What you should see is series of TCP and HTTP messages between your computer and
gaia.cs.umass.edu. You should see the initial three-way handshake containing a SYN message.
You should see an HTTP POST message and a series of “HTTP Continuation” messages being
sent from your computer to gaia.cs.umass.edu. Recall from our discussion in the earlier HTTP
Wireshark lab, that is no such thing as an HTTP Continuation message – this is Wireshark’s way
of indicating that there are multiple TCP segments being used to carry a single HTTP message.
You should also see TCP ACK segments being returned from gaia.cs.umass.edu to your
computer.

Answer the following questions, by opening the Wireshark captured packet file tcpethereal-
trace-1 in http://gaia.cs.umass.edu/wireshark-labs/wireshark-traces.zip (that is download the
trace and open that trace in Wireshark; see footnote 2). Whenever possible, when answering a
question you should hand in a printout of the packet(s) within the trace that you used to answer
the question asked. Annotate the printout to explain your answer. To print a packet, use File-
>Print, choose Selected packet only, choose Packet summary line, and select the minimum
amount of packet detail that you need to answer the question.

1. What is the IP address and TCP port number used by the client computer (source) that is
ransferring the file to gaia.cs.umass.edu? To answer this question, it’s probably easiest to
select an HTTP message and explore the details of the TCP packet used to carry this
HTTP message, using the “details of the selected packet header window” (refer to Figure
2 in the “Getting Started with Wireshark” Lab if you’re uncertain about the Wireshark
windows).
2. What is the IP address of gaia.cs.umass.edu? On what port number is it sending and
receiving TCP segments for this connection?
If you have been able to create your own trace, answer the following question:
3. What is the IP address and TCP port number used by your client computer
(source) to transfer the file to gaia.cs.umass.edu?

Since this lab is about TCP rather than HTTP, let’s change Wireshark’s “listing of captured
packets” window so that it shows information about the TCP segments containing the HTTP
messages, rather than about the HTTP messages. To have Wireshark do this, select Analyze-
>Enabled Protocols. Then uncheck the HTTP box and select OK. You should now see an
Wireshark window that looks like:

Sir Syed University of Engineering & Technology Page 41


DATA COMMUNICATION AND COMPUTER NETWORKS

This is what we’re looking for - a series of TCP segments sent between your computer and
gaia.cs.umass.edu. We will use the packet trace that you have captured (and/or the packet trace
tcp-ethereal-trace-1 in http://gaia.cs.umass.edu/wireshark-labs/wiresharktraces.zip; see footnote
to study TCP behavior in the rest of this lab.

TCP Basics

Answer the following questions for the TCP segments:

4. What is the sequence number of the TCP SYN segment that is used to initiate the TCP
connection between the client computer and gaia.cs.umass.edu? What is it in the segment that
identifies the segment as a SYN segment?

Sir Syed University of Engineering & Technology Page 42


DATA COMMUNICATION AND COMPUTER NETWORKS

5. What is the sequence number of the SYNACK segment sent by gaia.cs.umass.edu to the client
computer in reply to the SYN? What is the value of the ACKnowledgement field in the
SYNACK segment? How did gaia.cs.umass.edu determine that value? What is it in the segment
that identifies the segment as a SYNACK segment?

6. What is the sequence number of the TCP segment containing the HTTP POST command?
Note that in order to find the POST command, you’ll need to dig into the packet content field at
the bottom of the Wireshark window, looking for a segment with a “POST” within its DATA
field.

7. Consider the TCP segment containing the HTTP POST as the first segment in the TCP
connection. What are the sequence numbers of the first six segments in the TCP connection
(including the segment containing the HTTP POST)? At what time was each segment sent?
When was the ACK for each segment received?

Given the difference between when each TCP segment was sent, and when its acknowledgement
was received, what is the RTT value for each of the six segments? What is the EstimatedRTT
value (see page 249 in text) after the receipt of each ACK? Assume that the value of the
EstimatedRTT is equal to the measured RTT for the first segment, and then is computed
using the EstimatedRTT equation on page 249 for all subsequent segments.

Note: Wireshark has a nice feature that allows you to plot the RTT for each of the TCP segments
sent. Select a TCP segment in the “listing of captured packets” window that is being sent from
the client to the gaia.cs.umass.edu server. Then select: Statistics->TCP Stream Graph-
>Round Trip Time Graph.

8. What is the length of each of the first six TCP segments?


9. What is the minimum amount of available buffer space advertised at the received for the entire
trace? Does the lack of receiver buffer space ever throttle the sender?

10. Are there any retransmitted segments in the trace file? What did you check for (in the trace)
in order to answer this question?

11. How much data does the receiver typically acknowledge in an ACK? Can you identify cases
where the receiver is ACKing every other received segment.

12. What is the throughput (bytes transferred per unit time) for the TCP connection? Explain
how you calculated this value.

Sir Syed University of Engineering & Technology Page 43


DATA COMMUNICATION AND COMPUTER NETWORKS

LAB # 13

WIRESHARK LAB

UDP
Object:

To understand the basic concepts of Wireshark using UDP protocol.

Theory:

In this lab, we’ll take a quick look at the UDP transport protocol. UDP is a streamlined, non-
thrills protocol. Because UDP is simple and sweet, we’ll be able to cover it pretty quickly in this
lab. So if you’ve another appointment to run off to in 30 minutes, no need to worry, as you
should be able to finish this lab with ample time to spare.

At this stage, you should be a Wireshark expert. Thus, we are not going to spell out the
steps as explicitly as in earlier labs. In particular, we are not going to provide example
screenshots for all the steps.

The Assignment
Start capturing packets in Wireshark and then do something that will cause your host to send and
receive several UDP packets. After stopping packet capture, set your packet filter so that
Wireshark only displays the UDP packets sent and received at your host. Pick one of these UDP
packets and expand the UDP fields in the details window.

Whenever possible, when answering a question you should hand in a printout of the packet(s)
within the trace that you used to answer the question asked. Annotate the printout to explain your
answer. To print a packet, use File->Print, choose Selected packet only, choose Packet summary
line, and select the minimum amount of packet detail that you need to answer the question.

1. Select one packet. From this packet, determine how many fields there are in the UDP
header. (Do not look in the textbook! Answer these questions directly from what you
observe in the packet trace.) Name these fields.
2. From the packet content field, determine the length (in bytes) of each of the UDP header
fields.
3. The value in the Length field is the length of what? Verify your claim with your captured
UDP packet.
4. What is the maximum number of bytes that can be included in a UDP payload.
5. What is the largest possible source port number?
6. What is the protocol number for UDP? Give your answer in both hexadecimal and
decimal notation. (To answer this question, you’ll need to look into the IP header.)

Sir Syed University of Engineering & Technology Page 44


DATA COMMUNICATION AND COMPUTER NETWORKS

7. Search “UDP” in Google and determine the fields over which the UDP checksum is
calculated.
8. Examine a pair of UDP packets in which the first packet is sent by your host and the
second packet is a reply to the first packet. Describe the relationship between the port
numbers in the two packets.

Sir Syed University of Engineering & Technology Page 45

S-ar putea să vă placă și