Computer Networks
Lab No.: 3
Network Devices and Basic Configuration
Objectives:
❖ To be familiar with Network Simulation Tool: Packet Tracer
❖ To be familiar with network devices: Hub, Bridge & Switch
❖ To be familiar with router, and its components
❖ To be familiar with commands for basic configuration of a router
❖ To be familiar with default gateway and its need in a network
Requirements:
❖ Network simulation tool: Packet Tracer
Packet Tracer:
Packet Tracer is a cross-platform visual simulation tool designed by Cisco Systems that
allows users to create network topologies and imitate modern computer networks. The
software allows users to simulate the configuration of Cisco routers and switches using a
simulated command line interface. Packet Tracer makes use of a drag and drop user interface,
allowing users to add and remove simulated network devices as they see fit. The software is
mainly focused towards Certified Cisco Network Associate Academy students as an
educational tool for helping them learn fundamental CCNA concepts. However, it allows
anyone to design, test and verify complex and large networks, which is often not feasible
with physical hardware, due to cost and unavailability of resources.
Router:
A router is a networking device that forwards data packets between computer networks. A
packet is typically forwarded from one router to another router through the networks that
constitute an internetwork (e.g. the Internet) until it reaches its destination node.
A router is connected to two or more data lines from different IP networks. When a data
packet comes in on one of the lines, the router reads the network address information in the
packet header to determine the ultimate destination. Then, using information in its routing
table or routing policy, it directs the packet to the next network on its journey.
Figure: Router Rare View
Router components
❖ CPU
❖ Memory: RAM, NVRAM, ROM, Flash
❖ Buses
❖ Interfaces
❖ Power supply
Router external connections
❖ Three basic types of connections on a router are:
➢ LAN interfaces
➢ WAN interfaces and
➢ Management ports
❖ LAN and WAN interfaces provide LAN and WAN connectivity respectively. These
interfaces are the networking interfaces. They connect routers to a network for data
packet entry and exit.
❖ Router Management Ports are Console and auxiliary (AUX) ports. They provide
physical access for initial configuration of the router. They are asynchronous serial
ports. They provide a text-based connection for the configuration and troubleshooting
of a router. One of them (preferably the console port) is used for initial configuration
of router
Connecting console port
❖ The cable used between a terminal and a console port is a rollover cable
❖ To connect the console port with PC, a rollover cable and a RJ-45 to DB-9 adapter are
used
❖ Terminal emulation software such as HyperTerminal is usually used in PC [Here the
PC is acting as a “dumb terminal”]
❖ Configure terminal emulation software on the PC as (to connect PC to console port of
a router) with appropriate com port
➢ 9600 baud
➢ 8 data bits
➢ No parity
➢ 1 stop bit
➢ No flow control
Figure: Console port connection requirements
Basic Configuration of a Router
Router user interface modes
Router> User EXEC
Router> enable
Password:
Router# Privileged EXEC
Router# disable
Router> User EXEC
Router Modes
Router> User EXEC mode
Router# Privileged EXEC mode
Router(config)# Global configuration mode
Router(config-...)# Specific configuration mode, for example:
Router(config-if)# Interface configuration mode
Router(config-subif)# Subinterface configuration mode
Router(config-line)# Line configuration mode
Configuring router name
It is better to give a unique name for a router
Router#
Router# configure terminal
Router(config)#
Router(config)# hostname Lab_A
Lab_A(config)#
Configuring router passwords
❖ Password on console line
Router(config)# line console 0
Router(config-line)# password cisco
Router(config-line)# login
❖ Password for privileged EXEC mode
Router(config)# enable password class
❖ Password for virtual terminal
Router(config)# line vty 0 4
Router(config-line)# password cisco
Router(config-line)# login
❖ Password encryption
Router(config)# service password-encryption
Show commands
❖ show version: Displays version information
❖ show running-config: Displays current configuration (RAM)
❖ show startup-config: Displays startup configuration (NVRAM)
❖ show flash: Shows IOS file and flash space
❖ show interfaces: View the status of interfaces
➢ show interfaces e0: for Ethernet 0
❖ show arp: Displays ARP table of router
❖ show ip route: Displays IP routing table
❖ show protocols: Displays the interface specific status of any configured protocols
Configuring an interface
Steps to configure an Ethernet/Serial interface:
❖ Enter into interface configuration mode as:
User EXEC mode ⇒ Privileged EXEC ⇒ Global configuration mode ⇒ Interface
configuration mode
❖ Enter IP address and subnet mask
❖ Set clock rate if interface is serial and is connected as DCE, else skip this step
❖ Turn on the interface
Configuring Ethernet Interface
Router> enable
Router# configure terminal
Router(config)# interface ethernet 0
Router(config-if)# ip address 192.5.5.1 255.255.255.0
Router(config-if)# no shutdown
Configuring Serial interface as DTE
Router> enable
Router# configure terminal
Router(config)# interface serial 1
Router(config-if)# ip address 201.100.11.2 255.255.255.0
Router(config-if)# no shutdown
Configuring Serial interface as DCE
Router> enable
Router# configure terminal
Router(config)# interface serial 0
Router(config-if)# ip address 201.100.11.1 255.255.255.0
Router(config-if)# clock rate 56000
Router(config-if)# no shutdown
Note: Clock rate is necessary when it is connected as DCE
Connectivity tests
❖ ping: It is a basic test mechanism which uses the ICMP protocol to verify the hardware
connection and the IP address. The ping command sends a packet to the destination host
and then waits for a reply packet from that host command using Internet Control Message
Protocol (ICMP)
❖ traceroute: It uses time to live (TTL) to generate messages from each router on the
path, locates failure in a path from a source to a destination
Establishing a Telnet connection
To initiate a Telnet session any of the following alternatives can be used
Lab_A> telnet 199.6.13.2
Lab_A> 199.6.13.2
Telnet connection is terminated after ten minutes of inactivity by default or when the exit
command is entered
IP address and Default gateway:
● Any computer must be configured with appropriate IP address & subnet mask to
communicate with another computer in the same network
● The default gateway need to be configured in a Computer if any data packet need to
be forwarded to another network from that computer
● The IP address, default gateway and other configurations can be performed in a
Computer by using either of following techniques:
○ Dynamic: By using DHCP
○ Static: By administrator
Activities:
A. Create a network topology as shown in the figure below
1. Set the IP address of all computers as shown in figure above and the subnet mask as
255.255.255.0 for all.
2. Test the connectivity from one computer to another using the ping command and
note down the result.
3. Observe by initiating the ping command from PC0 to PC2 and from PC2 to PC0 at
once in simulation mode. Note down the result.
4. Replace Hub2 by a bridge as shown below:
5. Now test the connectivity from one computer to another using the ping command
and note down the result.
6. Observe by initiating the ping command from PC0 to PC2 and from PC2 to PC0 at
once in simulation mode. What are the differences you have observed as compared
with activity 3 above. Note down the result.
7. Replace both hubs Hub0 and Hub1 with switches as shown below:
8. Now test the connectivity from one computer to another using the ping command
and note down the result.
9. Observe by initiating the ping command from PC0 to PC2 and from PC2 to PC0 at
once in simulation mode. What differences have you observed as compared with
activity 6 above. Note down the result.
10. Now change the IP addresses of PC2 and PC3 as shown in the figure below:
11. Now again test the connectivity from one computer to another using the ping
command and note down the result. Note that in some cases there is a successful
connection but from some PC to another there may not be a successful connection,
why? State with reason.
12. How could the connections be made successful?
B. Modify the above network to replace the bridge by a router as shown in figure below:
1. Use the ping command to test the connectivity from PC0 to PC1, PC2 and PC3.
Observe the result and note it down.
2. Similarly use the ping command to test the connectivity from PC2 to PC0, PC1 and
PC3. Observe the result and note it down.
3. Now, Configure the Router0 to change the hostname of the router as your “First
Name”
4. Configure the console password as your “Surname”.
5. Configure the enable password as “cisco”.
6. Configure the telnet password as “class”.
7. Configure the IP address of 200.10.8.1 with a subnet mask of 255.255.255.0 in the
given interface of the router (refer the figure above).
8. Run the command prompt in PC0 and connect to the router using telnet.
9. Configure the IP address of 200.10.9.1 with a subnet mask of 255.255.255.0 in the
other interface of the router (refer the figure above).
10. Use ping command to test the connectivity from PC0 to PC1, PC2, PC3 and both IP
addresses of Router. Observe the result and note it down.
11. Use ping command to test the connectivity from PC3 to PC0, PC1, PC2 and both IP
addresses of Router. Observe the result and note it down.
12. Use ping command to test the connectivity from Router to PC0, PC1, PC2 and PC3.
Observe the result and note it down.
13. Set the default gateway of PC0 as 200.10.8.1 and the default gateway of PC2 as
200.10.9.1.
14. Repeat steps 10 & 11 and note down the result. Also comment on your observations.
Also observe in simulation mode to see how the packet is forwarded in the network.
15. Now set the default gateway of PC1 as 200.10.8.1. Similarly set the default gateway
of PC3 as 200.10.9.1.
16. Test the connectivity from each PC to all other PCs as well as the router. Note down
the observations.
17. Test the connectivity from the router to each PCs. Note down the observations.
18. You can use simulation mode to be even more clear on above mentioned activities
(if necessary).
Exercises:
1. How do Hub, Bridge and Switch work in a network? Explain on the basis of your
observations.
2. What is a router? Explain its role in computer networks. Explain on the basis of your
observations in this lab activity.
3. List out the basic configuration commands of the router (that you have used in this
lab) with their syntax and functions.
4. Note down the observation of each steps with necessary commands specified in
activity C mentioned above and comment on it
***