Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lab 2 Handout

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

University of Engineering & Technology (UET)

Taxila
Computer Networks LAB

Instructor: Engr. Awais Khan


EXPERIMENT # 02: Setting up a small Network

Name of Student: …………………………………..

Roll No.: ……………………………………………

Date of Experiment: ………………………………..

Report submitted on: ………………………………..

Marks obtained: ……………………………………

Remarks: ……………………………………………

Instructor’s Signature: ……………………………...


Computer Networks Lab Page 1
Setting up a small Network
1. Objective
This lab exercise is designed to demonstrate and help in learning & understanding of the
procedure of setting up a small network (that can be used in homes too).

2. Resources Required
• Straight & Cross Cat5 UTP cables – (made in last lab)
• Computers
• A Switch/Hub (if network size is to be increased)
• A Router (if communication is to be done with WAN/Internet)

3. Introduction
This lab introduces NIC (Network Interface Controller/Card), Switch/Hub & Router. Before
going to the procedure, firstly a small introduction of the devices is given.

3.1 NIC (Network Interface Card)


A network interface controller is a computer hardware component that connects a computer to a
computer network. The controller may also be referred to as a network adapter, or a LAN
adapter. Also known as a network interface card, network card or LAN card.
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.

Computer Networks Lab Page 2


3.1 Hub
An Ethernet hub, active hub, network hub, repeater hub or hub is a device for connecting
multiple twisted pair or fiber optic Ethernet devices together and making them act as a single
network segment. Hub works at the physical layer (layer 1) of the OSI model. The device is a
form of multiport repeater. Repeater hubs also participate in collision detection, forwarding a
jam signal to all ports if it detects a collision.
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 regenerated and broadcast
out on all other ports.

3.3 Switch (LAN Switch)


Switches are devices capable of creating temporary connections between two or more devices
linked to the switch. It acts just like hub but has advanced features for network optimization &
better security. Switch works at the Data Link layer (layer 2) of the OSI model. The work a
switch does is called switching.
Switches that additionally process data at the network layer (layer 3 and above) are often referred
to as Layer 3 switches or multilayer switches.
The main purpose of both Switch & Hub is to extend the size of network.

3.4 Router
A router is a device in computer networking that forwards data packets to their destinations,
based on their addresses. The work a router does is called routing, which is somewhat like
switching, but a router is different from a switch. The latter is simply a device to connect
machines to form a LAN.
Routers work at the Network layer (layer 3) of the OSI model. Their main purpose is to
allow communication between different network.

Computer Networks Lab Page 3


4. Network Commands (Testing)
The widely used commands for testing network connectivity are PING, TRACERT & TELNET.
(Just remember these commands are not case sensitive so PING is same as ping or PinG)

4.1 PING
Ping is a computer network administration utility used to test the reachability of a host on an
Internet Protocol (IP) network and to measure the round-trip time for messages sent from the
originating host to a destination computer.

ping target_name/target_IP

4.2 TRACERT
Tracert determines the path taken to a destination by sending Internet Control Message Protocol
(ICMP) Echo Request messages to the destination with incrementally increasing Time to Live
(TTL) field values. The path displayed is the list of near-side router interfaces of the routers in
the path between a source host and a destination. The near-side interface is the interface of the
router that is closest to the sending host in the path.
This utilty is available as traceroute in some operating systems.

tracert target_name/target_IP

4.3 TELNET
Telnet is a network protocol used on the Internet or local area networks to provide a bidirectional
interactive text-oriented communications facility using a virtual terminal connection.
Historically, Telnet provided access to a command-line interface (usually, of an operating
system) on a remote host. Most network equipment and operating systems with a TCP/IP stack
support a Telnet service for remote configuration (including systems based on Windows NT).
Because of security issues with Telnet, its use for this purpose has waned in favor of SSH
(Secure SHell).

telnet target_name/target_IP

MS DOS command window showing use of ping


Computer Networks Lab Page 4
5. Procedure to setup Network
(For this lab only - consider the switch & router automatically configured)

1. Connect devices to each other with the correct UTP (straight/cross) cables and
power them ON.
2. Use the Control Panel/Network Connections (or Properties in Context Menu of
My Network Places) to display Network Connections Window. Then use
Properties in Context Menu of Local Area Connection to display Local Area
Connection Properties Window. Select the TCP/IP protocol from the
Configuration Tab and click on properties. Check the IP Address and Subnet
mask for both workstations on the IP Address Tab.

Computer Networks Lab Page 5


3. Set IP address of PC0 to 192.168.1.2, PC1 to 192.168.1.3 & PC2 to 192.168.3.2 .
4. Set default gateway of PC0 & PC1 to 192.168.1.1 and PC2 to 192.168.3.1 .
These are actually the addresses of the router interfaces.
5. For PC4 & PC5 set any IP address and ignore the default gateway as they are
not connected to any router.
6. Test the connectivity by using the commands mentioned in section 4.
7. If everything is ok then play the multiplayer games installed on the PC.

Computer Networks Lab Page 6


University of Engineering & Technology (UET), Taxila
Computer Networks Lab
LAB WORKSHEET (Lab # 2)
Q.1 What is the purpose of Switch in a network?
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Q.2 Identify the differences between Switch and Hub.


________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Q.3 Which OSI layer device is the following?


Router, Hub, Switch
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Q.4 What are the differences between tracert & ping?


________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

Computer Networks Lab Page 7

You might also like