Documente Academic
Documente Profesional
Documente Cultură
Lab 1
Lab Contents:
i. Interface Overview
ii. Creating a First Network
2
i. Interface Overview
When you open Packet Tracer, by default you will be presented with the following interface:
This initial interface contains ten components. If you are unsure of what a particular interface item does, move your
mouse over the item and a help balloon will explain the item.
3 Common Tools Bar This bar provides access to these commonly used workspace tools: Select,
Move Layout, Place Note, Delete, Inspect, Resize Shape, Add Simple PDU,
and Add Complex PDU. See "Workspace Basics" for more information.
4 Logical/Physical You can toggle between the Physical Workspace and the Logical Workspace
Workspace and with the tabs on this bar. In Logical Workspace, this bar also allows you to go
Navigation Bar back to a previous level in a cluster, create a New Cluster, Move Object, Set
Tiled Background, and Viewport. In Physical Workspace, this bar allows you
to navigate through physical locations, create a New City, create a New
Building, create a New Closet, Move Object, apply a Grid to the background,
Set Background, and go to the Working Closet.
5 Workspace This area is where you will create your network, watch simulations, and view
many kinds of information and statistics.
6 Realtime/Simulation You can toggle between Realtime Mode and Simulation Mode with the tabs
Bar on this bar. This bar also provides buttons to Power Cycle Devices as well as
the Play Control buttons and the Event List toggle button in Simulation
Mode. Also, it contains a clock that displays the relative Time in Realtime
Mode and Simulation Mode.
7 Network This box is where you choose devices and connections to put into the
Component Box workspace. It contains the Device-Type Selection Box and the Device-Specific
Selection Box.
8 Device-Type This box contains the type of devices and connections available in Packet
Selection Box Tracer. The Device-Specific Selection Box will change depending on which
type of device you choose.
9 Device-Specific This box is where you choose specifically which devices you want to put in
Selection Box your network and which connections to make.
10 User Created Packet This window manages the packets you put in the network during simulation
Window* scenarios. See the "Simulation Mode" section for more details.
4
1. Start creating a network by first selecting the End Devices. Add a Generic PC and a Generic Server to
the workspace.
2. Under Connections, select the Copper Straight-through cable (solid black line) and connect the
devices with it. The red lights on the link indicate that the connection is not working. Now, use the
Delete tool to remove the Copper Straight-through cable, and use a Copper Cross-over cable
(dashed line) instead. The lights should turn green at this point. If the mouse pointer is held over
either devices, the link status will be shown as “Up.” The network should look similar to this:
3. Click on the PC. While paying attention to the link lights, turn the power on, off, and on again.
Follow the same steps for the server. The link lights turn red when the device is off. This means that
the link is down or is not working. The link lights turn green when the device is turned back on.
5
4. Try all three ways to learn about the devices. First, mouse over the devices to see basic
configuration information about them. Second, click on each device with the Select tool to show
the device configuration window, which provides several ways to configure the device. Third, use
the Inspect tool to view the tables the network device will build as it learns about the network
around it. In this example, open the ARP table. Since the devices have not been configured yet, the
ARP tables are empty. Always remember to close the windows after viewing them or they will
clutter the workspace.
5. Open the PC configuration window and change the settings using the Config tab. Change the display
name to Client and set the DNS server to 192.168.0.105. Under Interface, click FastEthernet and set
the IP address as 192.168.0.110. Packet Tracer automatically calculates other parameters. Make
sure that the Port Status box is checked. For future reference, note that other Ethernet interface
settings, such as bandwidth, duplex, MAC address, and subnet mask can be modified using this
window.
6. Go to the Desktop Tab and click on IP Configuration. Notice that the IP address, subnet mask and
DNS server can be changed here as well.
7. Open the Server configuration window and go to the Config tab. Change the display name to Web
Server. Click FastEthernet and set the IP address as 192.168.0.105. Make sure that the Port Status is
also on. Click DNS and set the domain name as www.firstlab.com. Set the IP address as
192.168.0.105 and click Add. Finally, check to make sure that the service for DNS is on.
8. Reposition the network devices by dragging them to a new location. Add a network description by
using the “i” button on the upper right corner. Then add some text labels within the Logical
Workspace by using the Place Note tool.
9. Load a background grid using the Set Tiled Background button.
10. Save your work using the File > Save As option and create a meaningful filename.
Lab Contents:
1. PC configurations:
7. Several scenarios can be saved with a single network. Alternate between Scenario 0 and 1.
8. Now, remove Scenario 0 using the Delete button.
9. Scenario 1 is now visible. Go to the last column in the User Created Packet Window and double-click (delete)
to remove a PDU.
10. Delete the whole scenario. Notice that the scenario list went back to the default Scenario 0.
Congratulations on being able to send and organize simple test messages in Real-time Mode.
4
ii. Establishing a Web Server Connection Using the PC’s Web Browser
Lab Contents:
1. Continuing from the last activity, click Reset Simulation. This clears the entries in the event list except for the
original packet.
2. Select the packet envelope on the workspace to show the PDU Information window like the one shown in
the screenshot below. This window contains the OSI Model tab, which shows how the packet is processed at
each layer of the OSI model by the current device. Close this window, noting that this packet is indicated in
the event list by the eye icon. The whole row in the event list is also highlighted. Clicking on the color square
in the Info column is equivalent to clicking directly on the packet envelope (try it!).
3. Use the Next Layer and Previous Layer buttons to see details of the packet processing at the relevant OSI
layers. Note that only the Out Layers can be viewed in the case of this original echo request message.
4. Click on the Outbound PDU Details tab. This tab shows exactly what makes up the PDU headers. It is
organized into header type and the individual fields in each header.
5. Close the PDU Information window. Click on Capture/Forward button once.
6. Click on the packet in the workspace again to open the PDU Information window. Notice that this time,
information regarding both the In Layers and Out Layers can be viewed.
7. Click on the Inbound PDU Details tab. This shows the details of the inbound echo request packet from the PC
to the Server. The Outbound PDU Details tab, shows similar information, but for the echo reply packet from
the Server to the PC.
8. Click on Reset Simulation again. Now click on Auto Capture/Play. The echo request and echo reply are
automatically captured. Click on the Back Button to rewind the animation one step at a time. Now click on
the Capture/Forward button to forward the packet through the animation. Note the change in the event list
and the workspace. Remember that at any time, a PDU Information Window can be opened by clicking
directly on the envelope on the workspace, or by clicking the Info column in the Event List.
9. Click on the Back Button twice to rewind the animation. Now click Auto Capture/Play and the packet
animation will automatically occur.
4
1. Open the ARP Tables for both devices by clicking them with the Inspect tool. The ARP tables always appear
on the same spot. Reposition them to make them both visible. You can also resize the tables for better
viewing.
2. In Realtime Mode, send a simple PDU from the PC to the Server. Notice that the ARP tables are filled in
automatically, as shown here:
3. Delete the PDU using the method covered in the previous sections. Notice that the entries in the ARP tables
are NOT cleared. ARP entries for both devices have already been learned. Deleting the user created PDUs
does not reset events what has already occurred in the network.
4. Click Power Cycle Devices. ARP tables are cleared because the Power Cycle Devices button turns the devices
off and back on again therefore, losing temporary information like the ARP table entries.
5. Go to Simulation Mode. In the event list filters, make sure that ICMP and ARP are checked so that you can
view ICMP and ARP packets in the animation.
6. Create a new simple PDU from the Server to the PC.
7. Notice that since the devices were power cycled earlier, the ARP tables are empty. ARP request packets need
to be issued before the ICMP ping packets, so that the devices in the network can learn about each other.
Click on Auto Capture/Play to watch the animation.
8. Click Reset Simulation. Notice that even though the event list is cleared (except for the user created PDU),
the ARP tables remain full. Click Auto Capture/Play. This time, since the ARP tables are full, there are no new
ARP packets issued.
9. Click Power Cycle Devices. Doing so will empty the tables. Notice that new ARP request packets appear
automatically in the event list.
5
• Single-clicking on the Delete button removes the entire scenario including all the PDUs associated with it.
• Double-clicking on (delete) in the far right column in the PDU List window deletes individual PDUs.
• The Reset Simulation button clears all entries in the Event List, except for User Created PDUs, and allows the
animation to restart. This, however, does not reset the device tables.
• The Power Cycle Devices button turns all of the devices in the network off and on so the tables that the devices
built are lost along with configurations and other information not saved.
• Saving work periodically prevents lost configurations and state changes in the network.
Congratulations on being ready to build and analyze many different networks! Be aware that there are many
other features that were not covered in this lab. Have Fun!
Computer Networks
Lab 4
Lab Contents:
i. Routers
ii. Configuring a Switch Using Terminal
1
i- Router
1) Router
2) Functions of a Router
• The two main functions of a router are to select the best path for packets and to route
packets to the proper interface.
• Routers build routing tables and exchange network information with other routers.
• Routers segment local area networks
2
1- RAM
• Stores routing tables
• Holds ARP cache
• Holds fast-switching cache
• Performs packet buffering (shared RAM)
• Maintains packet-hold queues
• Provides temporary memory for the configuration file of the router while the
router is powered on
• Loses content when router is powered down or restarted
2- NVRAM
• Provides storage for the startup configuration file
• Retains content when router is powered down or restarted
3- Flash memory
• Holds the operating system image (IOS)
• Allows software to be updated without removing and replacing chips on the
processor
• Retains content when router is powered down or restarted
• Can store multiple versions of IOS software
• Is a type of electronically erasable, programmable ROM (EEPROM)
5- Interfaces
• Connect router to network for frame entry and exit
• Can be on the motherboard or on a separate module
3
4) A Router Starts Up
1- Hardware check
2- Bootstrap loader in ROM executes
3- Operating system loads (copying from Flash to RAM)
4- The configuration file is loaded if one is found in NVRAM
5- No configuration is in NVRAM, it looks for TFTP server, then SETUP from console
5) Router Interfaces
• LAN interfaces allow routers to connect to the LAN media. This is usually some form of
Ethernet.
• WANs provide connections through a service provider to a distant site or to the Internet.
• Console
– Used for initial configuration
– Troubleshooting
– Debugging
– Monitoring the system
– Displays startup and error messages by default (console only)
– Do not depend on network connections
– Actually asynchronous serial ports
• Auxiliary (AUX)
– Auxiliary for dial-in access
4
7) CLI Access from the Console
5
10) CLI Access Modes
Each Cisco device supports several access modes. For CLI interaction, four modes are supported:
• User EXEC
Provides basic access to the IOS with limited command availability (basically simple
monitoring and troubleshooting commands)
• Privilege EXEC
Provides high-level management access to the IOS, including all commands available at User
EXEC mode
• Configuration
Allows configuration changes to be made to the device
• ROMMON
Loads a bootstrap program that allows for low-level diagnostic testing of the IOS device,
performing the password recovery procedure, and performing an emergency upgrade
6
ii- Configuring a Switch Using Terminal
Cisco Switches unlike any other, when you get a switch from Cisco and you connect
the computer to it you will notice that these computers will not deal with each other,
even if you set all the settings for the network. The reason for this is that these switches
ports come closed by default (Interface is shutdown) and therefore the ports do not
work and here comes the role of network engineer to do the programming process of
the switches. Cisco switches do not work unless they are programmed. These switches
are programmed through the Console port on the back of switch. Switches are
reprogrammed on the way, where they are connected to the computer via cable called
Rollover which has one of the ends as a link to the computer COM reach and the second
party is a socket RJ-45 connects to a port of the Console and then simply we can
program this Switch through the Hyper Terminal.
Practical steps:
To undertake this task, do the following:
2) Select the type of processing which is the switch (Switch 2950 – 24)
3) Add two PCs, go to End Devices and select the type PC-PT whose name is Generic. As in
the picture.
7
5) You must program this switch through the Console port. Go to Connections (connectors)
cable, and then choose Console whose color is blue and the shape of a backslash.
6) Now we must connect the cable between the computer and switch "Do not forget that
the ends of this cable is a link COM - RS232, which connects to the computer to perform
the COM, and the other party is an RG-45 connector connects to the Console port of the
switch". Press on the computer, you have two options, one RS232 and the other is Fast
Ethernet and of course you know that you will choose the RS232 port because the cable
connects to the Console computer, via the port COM - RS232.
7) And now you have to connect it to a switch. Just by clicking on the switch.
8) Since we do connect to the Console port, you’ll choose Console from the list.
9) And so we have connected the switch with the pc via a console link so that we can
program it.
10) click on the computer that is connected with the switch, Now go to Desktop tab at the
top of the window:
a. IP Configuration: used to set the IP for this device.
b. Dial - UP: used to connect via modem 3-Terminal: It is a Hyper Terminal
program.
c. Terminal: It is a Hyper Terminal program.
d. Command Prompt: It is an MS-DOS command prompt.
e. Web browser: a perfect example of the use of Web sites in the network.
f. PC Wireless: to set the computer to pick up radio signals in the network.
11) Now go to the Terminal icon and click on it to show a window as in the figure:
8
12) It’s enough to know that this is a window on the establishment of a real connection via
the Hyper Terminal window and in front of you is a connection setting you are creating.
The field Bits Per Second transfer speed of any bits per second must be 9600 because the
cable Rollover transfer speed is 9600 and now, click on OK button
13) You will have the switch programming screen, Press enter to enter the programming
commands.
14) You'll notice now that the reference switch> is shown. This shows you are now inside
the Switch which its name is ‘switch’ and you are now capable of programming.
15) We will now write some commands if you cannot understand it, do not worry, we will
look for them later. All you need now is to hold the command.... There is something
important you should know:
a. Work in switch programming is carried out through three modes of work:
i. User Mode: you can access the settings only.
ii. Privilege Mode: switch control is based on that you are responsible and of
course, not everything.
iii. Configure Mode: You can control the full switch.
16) Write enable to enter Privilege Mode, then write Configure Terminal to enter
Configuration Mode
20) Write Exit to go back to configuration mode then repeat the same steps for
FastEthernet 0/2
21) Now close this window, connect first PC to switch (FastEthernet 0/1) using Copper
Straight – Through and second PC to Fastethernet 0/2
22) Wait a while until light becomes green, now do the last step by configuring IP like this:
i. PC 1------ 10.0.0.1
ii. PC2------ 10.0.0.2
23) Now check your connection using Ping from any PC to other one.
9
Computer Networks
Lab 5
Lab Contents:
i. MCQ
Computer Networks
Lab 5
Choose the best answer to each of the following statements:
2) … is the actual measure of how much information can at a specific time of day, using
specific internet routes, while downloading a specific file.
a. Bandwidth
b. Throughput
c. Topology
d. Data rate
4) Internet is …
a. a local computer network.
b. a worldwide network of computers.
c. an interconnected network of computers .
d. a worldwide interconnected network of computers which use a common
protocol to communicate with one another.
5) Internet requires …
a. an international agreement to connect computers.
b. a local area network.
c. a commonly agreed set of rules to communicate between computers.
d. a World Wide Web.
2
Computer Networks
Lab 5
7) IP address is currently …
a. 4 bytes long.
b. available in plenty.
c. 6 bytes long.
d. not assigned as it is all used up.
8) Internet uses …
a. Packet switching.
b. Circuit switching.
c. Telephone switching.
d. Telex switching.
10) Which of the following network topologies among the list below is incorrect?
a. Star.
b. Internet.
c. Ring.
d. Bus.
11) … layer is responsible for the delivery of packets end to end and implements a logical
addressing.
a. Physical
b. Data link
c. Network
d. Transport
3
Computer Networks
Lab 5
16) A block of data consisting of 2048 bits is transmitted between two computers
interconnected by 450 m of twisted-pair wire. If the transmission rate is 34 kbps
determine, the ratio of propagation delay to transmission delay. (Assume a velocity
of propagation of 2 x 108 ms-1)
a. 37.6 x 10-6
b. 376 x 10-6
c. 3.76 x 10-6
d. 3.76 x 10-3
4
Computer Networks
Lab 5
19) … is not part of the TCP/IP model.
a. Network access
b. Internet
c. Presentation
d. Application
21) In the TCP/IP model what protocol is popular in the internet layer?
a. TCP
b. UDP
c. IP
d. FTP
22) The ... topology of a network refers to how communication media physically
connected and arranged.
a. Logical
b. Physical
c. Geographical
d. Regional
23) The … topology is the method used to pass the information between workstations.
a. Logical
b. Physical
c. Geographical
d. Regional
27) In mesh topology, if we have N stations then the number of I/O ports in each station
is …
a. N^2.
b. 2N.
c. N-1.
d. N.
29) In … topology, each station is attached to its adjacent station by point-to-point links.
a. Mesh topology
b. Ring topology
c. Bus topology
d. Tree topology
6
Computer Networks
Lab 5
32) If one connection between two stations in a mesh network fails, …
a. The whole network will be down.
b. Has no effect on the network.
c. Has no effect on the network except the one station.
d. The two stations will be disconnected from the network.
7
Computer Networks
Lab 5
39) The maximum speed of a UTP connection is …
a. 10bps.
b. 10Mbps.
c. 100Mbps.
d. 1000Mbps.
40) The maximum speed of an STP connection is …
a. 10bps.
b. 10Mbps.
c. 100Mbps.
d. None of the above.
41) The maximum length of fiber optic cable is …. and its maximum speed is ….
a. 25km, 2Mbps.
b. 25m, 2Gbps.
c. 25km, 2Gbps.
d. None of the above.
45) Routers …
a. Forward the packet as it is without looking inside it.
b. Can identify the Mac addresses of the source and destination only.
c. Can identify the IP addresses of the source and destination.
d. None of the above.
8
Computer Networks
Lab 5
46) Switches …
a. Forward the packet as it is without looking inside it.
b. Can identify the Mac addresses of the source and destination.
c. Can identify the IP addresses of the source and destination.
d. None of the above.
47) Hubs …
a. Forward the packet as it is without looking inside it.
b. Can identify the Mac addresses of the source and destination only.
c. Can identify the IP addresses of the source and destination.
d. None of the above.
50) … has a speed of 10Mbps, baseband transmission and can have a length up to 500m.
a. 10Base5
b. 10Base2
c. 10BaseT
d. 10Base-FL
51) … has a speed of 10Mbps, baseband transmission and can have a length up to 200m.
a. 10Base5
b. 10Base2
c. 10BaseT
d. 10Base-FL
52) … has a speed of 10Mbps, baseband transmission and uses twisted pair.
a. 10Base5
b. 10Base2
c. 10BaseT
d. 10Base-FL
9
Computer Networks
Lab 5
53) … has a speed of 10Mbps, baseband transmission and can have a length up to 2Km.
a. 10Base5
b. 10Base2
c. 10BaseT
d. 10Base-FL
54) The maximum number of stations allowed on a segment of 10Base5 is …
a. 2.
b. 100.
c. 30.
d. 50.
10
Computer Networks
Lab 6
Lab Contents:
i. MCQ (Part 2)
Computer Networks
Lab 6
Choose the best answer to each of the following statements:
1) At the … layer of the OSI model, end devices must be connected by media (cables).
a. Physical
b. Data Link
c. Network
d. Transport
2) Use a … cable to connect two workstations to each other through their NIC’s
Ethernet port.
a. console
b. straight-through
c. crossover
d. serial
3) Use a … cable to connect the router’s Ethernet port to a switch port or a workstation
to a switch port.
a. console
b. straight-through
c. crossover
d. serial
5) What could prevent a ping from being sent between two workstations when they
are directly connected?
a. Both workstations have the same IP address
b. The correct type of cable is not used between the workstations
c. Both workstations have no IP addresses
d. All of the above
2
Computer Networks
Lab 6
c. pairings of IP Addresses and Ethernet MAC addresses of workstations that
have previous communication with the host workstation
d. none of the above
7) Which OSI model layer is responsible for regulating the flow of information from
source to destination, reliably and accurately?
a. Application
b. Presentation
c. Session
d. Transport
e. Network
11) … is used for routing table and it holds the running configuration in routers.
a. NVRAM
b. RAM
c. FLASH
d. ROM
3
Computer Networks
Lab 6
13) … is used for storage of full Cisco IOS software images.
a. NVRAM
b. RAM
c. FLASH
d. ROM
(Q) Write down the CLI commands to change a switch name to TEST and open port no.1
18) With TCP/IP data encapsulation, which range of port numbers identifies all well-
known applications?
a. 0 to 255
b. 256 to 1022
c. 0 to 1023
d. 1024 to 2047
e. 49153 to 65535
4
Computer Networks
Lab 6
19) Why are port numbers included in the TCP header of a segment?
a. to indicate the correct router interface that should be used to forward a
segment
b. to identify which switch ports should receive or forward the segment
c. to determine which Layer 3 protocol should be used to encapsulate the data
d. to enable a receiving host to forward the data to the appropriate application
e. to allow the receiving host to assemble the packet in the proper order
21) During a TCP communication session, if the packets arrive to the destination out of
order, what will happen to the original message?
a. The packets will not be delivered.
b. The packets will be retransmitted from the source.
c. The packets will be delivered and reassembled at the destination.
d. The packets will be delivered and not reassembled at the destination.
5
Computer Networks
Lab 6
• TCP Source port number belongs to the TCP session host that opened a connection.
The value is normally a random value above 1023.
• Destination port number is used to identify the upper layer protocol or application
on the remote site. The values in the range 0–1023 represent the so called “well
known ports” and are associated with popular services and applications (as
described in RFC 1700, such as telnet, File Transfer Protocol (FTP), Hyper Text
Transfer Protocol (HTTP), etc). The quadruple field combination (Source IP Address,
Source Port, Destination IP Address, Destination Port) uniquely identifies the session
to both sender and receiver.
• Sequence number specifies the number of the last octet in a segment.
• Acknowledgment number specifies the next octet expected by the receiver.
• Code Bits have a special meaning in session management and in the treatment of
segments. Among interesting values are:
i. ACK (Acknowledgement of a segment receipt),
ii. SYN (Synchronize, only set when a new TCP session is negotiated
during the TCP three-way handshake).
iii. FIN (Finish, request to close the TCP session).
• Window size is the value of the sliding window - how many octets can be sent before
waiting for an acknowledgement.
• Urgent pointer is only used with an URG (Urgent) flag - when the sender needs to
send urgent data to the receiver.
• Options: The only option currently defined is the maximum TCP segment size
(optional value).
6
Computer Networks
Lab 7
Lab Contents:
Objective: Become familiar with the command-line interface (CLI), user and privileged mode, and
basic help and show commands.
2. The interface is now in user mode. At the user mode prompt, type the command that is
used to view all the commands available in user mode.
Router>?
4. Type the command that will allow you to view the available commands in privileged
mode.
Router#?
5. Type the command that will allow you to see all of the show commands.
Router#show ?
6. Type the command that will allow you to see the active, or running, confi guration.
Router#show running-confi g
7. At the MORE prompt, press the SPACEBAR key to view the next page of information.
SPACEBAR
8. Finally, type one of the commands that will log you out of the router.
Router#exit
OR
Router#disable
2
Computer Networks
Lab 7
3. Display the active configuration in memory. The currently active configuration script
running on the router is referred to as the running-config in the router’s CLI. Note that
privileged mode is required in order to access the running configuration. 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 (discussed in a later lab).
Router#show running-config
4. Display fl ash memory. Flash memory is a special kind of memory that contains the
operating system image file(s) on the router. Unlike regular router memory, flash memory
continues to maintain the file image even after power is lost.
Router#show flash
5. By default, the router’s CLI maintains in memory the last 10 commands entered. The
show history command displays simultaneously all of the past commands still in router
memory.
Router#show history
6. Press the CTRL+P key combination to retrieve the previous command you typed.
7. Press the DOWN ARROW key or press the CTRL+N key combination to see the next
command in the history buffer.
8. Use the show protocols command to view the status of the current Layer 3 routed
protocols running on your router.
Router#show protocols
9. The show version command is used to obtain 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 version
3
Computer Networks
Lab 7
10. Use the show clock command to view the router’s clock.
Router#show clock
11. The show hosts command displays a cached list of hosts and all of their interfaces’ IP
addresses.
Router#show hosts
12. Use the show users command to view a list of all users who are connected to the router.
Router#show users
13. The show interfaces command displays detailed information about each interface.
Router#show interfaces
14. The show protocols command displays the global and interface-specific status of any
Layer 3 protocols.
Router#show protocols
2. Enter the command that is used to view all the commands available in user mode.
Router>?
3. Enter privileged mode. This is the mode that gives you complete control of the router.
Router>enable
Router#
4
Computer Networks
Lab 7
6. The router’s host name is used for local identification. When you log on to the router, you
see its host name in front of the prompt (either the > or the # prompt). The host name can
be used to identify the location or function of the router. Set the router’s host name to R1.
Router(config)#hostname R1
R1(config)#
7. The enable password controls access to privileged mode. This is a very important
password because when it is configured, only those who know the password can make
configuration changes in privileged mode. Set the enable password to network.
R1(config)#enable password network
8. Test the password. Exit the router, and try to enter privileged mode. Notice that you have
to provide the password in order to enter privileged mode. Now, type the conf term
command and proceed with the instructions in the next step.
R1(config)#exit
R1#exit
R2>enable
Password:
R2#config term
R2(config)#
9. The only problem with the enable password is that it appears in plain text in the router’s
configuration fi le. If you need to obtain assistance in troubleshooting a problem, you may
inadvertently compromise the security of your system by revealing the password.
Set the enable secret password to cisco.
R1(config)#enable secret cisco
10. Now, test this password by logging out of the router and then typing enable at the user
mode prompt. The enable secret password overrides the enable password. If you have set
both passwords, you must use the enable secret password to enter privileged mode. The
enable password is still configured but is now deactivated.
R1(config)#exit
R1exit
R1>enable
Password:
R1#
5
Computer Networks
Lab 7
IV. Introduction to IP
Objective: Configure Routers 1, 2, and 4 with Internet Protocol (IP) addresses, and ping
between them to test connectivity.
3. Type the command that will set the IP address on the Ethernet 0 interface to 10.1.1.1
255.255.255.0, and enable the interface.
Router1(config-if)#ip address 10.1.1.1 255.255.255.0
Router1(config-if)#no shutdown
4. Set the IP address on the other interface of Router1 to 172.16.10.1 255.255.255.0, and
enable the interface.
Router1(config)#interface fastethernet 0/1
Router1(config-if)#ip address 172.16.10.1 255.255.255.0
Router1(config-if)#no shut
6
Computer Networks
Lab 7
5. Connect to Router 2, and assign it a host name of Router2.
Router>enable
Router#conf t
Router(config)#hostname Router2
Router2(config)#
6. Set the IP address for the Ethernet 0 interface to 10.1.1.2 255.255.255.0, and enable the
interface.
Router2(config)#interface fastethernet 0/0
Router2(config-if)#ip address 10.1.1.2 255.255.255.0
Router2(config-if)#no shutdown
11. Verify that the lines and protocols are up for all of Router1’s interfaces.
Router1#show ip interface brief
12. Display Router1’s running configuration, and verify that the IP addresses appear.
Router1#show running-config
7
Computer Networks
Lab 8
Lab Contents:
I. ARP
II. Creating a Host Table
III. Static Routes
IV. RIP
Computer Networks
Lab 8
i) ARP
Objective: Configure Routers 1 and 2 with IP addresses, and ping between them to test
connectivity. Then view the entries stored in the Address Resolution Protocol (ARP) table.
1) Connect to Router 1, and type the command to view the ARP table.
Router>enable
Router#show arp
Router#conf terminal
Router(config)# interface fastethernet 0/0
Router(config-if)#ip address 10.1.1.1 255.255.255.0
Router(config-if)# no shutdown
Router(config-if)#exit
Router(config)#exit
Router#show arp
Router#conf terminal
Router(config)# interface fastethernet 0/0
Router(config-if)#ip address 10.1.1.2 255.255.255.0
Router(config-if)# no shutdown
Router(config-if)#exit
5) A connection should now exist between the Router 1 and Router 2 Ethernet
interfaces. To ensure that the connection is functional, ping the IP address of
Router 1, IP address from Router 2.
Router(config)#exit
Router#ping 10.1.1.1
Router#show arp
2
Computer Networks
Lab 8
Objective: Become familiar with the router’s host table. Host tables can be used to set
names for commonly used IP addresses, which help with troubleshooting.
Router>enable
Router#config t
Router(config)#hostname Mansoura
Mansoura(config)#
Router>enable
Router#config t
Router(config)#hostname Cairo
Cairo(config)#
3) Exit interface mode. You do not want to have to type Mansoura IP address
every time you try to ping it from Cairo, so set a host table entry for Mansoura
using the IP address 10.1.1.1
4) Now you should be able to ping California’s Ethernet 0 IP address from Cairo
just by typing ping Mansoura.
Cairo#ping Mansoura
5) Use the show hosts command to verify that the entry is stored in the router’s
host table.
Cairo#show hosts
3
Computer Networks
Lab 8
Objective: Configure Routers 1, 2, and 4 with IP addresses, and then add static routes for
all routers.
12.5.10.1 /24
12.5.10.1 /24
Goals:
• Configure static routes for the topology.
• Verify that you can ping all routers.
2) On each router, verify that you can ping the directly connected neighbors.
Router1#ping 10.1.1.2
Router1#ping 12.5.10.2
Router2#ping 10.1.1.1
Router4#ping 12.5.10.1
3) Now you need to establish static routes on each router to any location that is
not directly connected. Router1 is directly connected to both Router2 and
Router4, so it will not need any static routes. On Router4, enter global
configuration mode, and think about what the static route command should
be. You know that you currently cannot reach Router2 because it is not
directly connected. Off of Router4’s serial interface is network 12.5.10.0,
which is connected to Router1. Router1 is also connected to network 10.1.1.0,
which you would also like to access. In this case, you will need a static route
for network 10.1.1.0. On Router4, what command should you use to establish
a static route to network 10.1.1.0?
Router4#conf term
Router4(confi g)#ip route 10.1.1.0 255.255.255.0 12.5.10.1
You established a route to network 10.1.1.0. Now, whenever a packet of information leaves
Router4 destined for network 10.1.1.0, it will first be sent to IP address 12.5.10.1 on Router1.
4
Computer Networks
Lab 8
4) Now, try to ping Router1’s interfaces and Router2’s interface.
Router4#ping 12.5.10.1
Router4#ping 10.1.1.1
Router4#ping 10.1.1.2
Consider why the ping to 10.1.1.2 was unsuccessful. A packet leaves Router4’s interface
destined for 10.1.1.2. Because the destination address is on the 10.1.1.0 network and the
static route on Router4 stipulates that traffic destined for that network should first be sent to
12.5.10.1, the packet will travel to12.5.10.1. When the packet reaches Router1, the router
sends the packet out the interface that is directly connected to the 10.1.1.0 network. Router2
picks up that packet on its interface and attempts to send a response packet to confirm
receipt. Router2 examines the source IP address of the received packet, which is 12.5.10.2.
Router2 does not have a route to network 12.5.10.0, so it drops the packet. This is why the
ping was not successful.
5) Just to make sure the static route on Router4 worked, view the routing table to
see if the static route has been added there.
Router4#show ip route
Router2#config term
Router2(config)#ip route 12.5.10.0 255.255.255.0 10.1.1.1
Router2(config)#exit
7) Connect to Router4 again, and make sure you can ping Router1’s interfaces
and Router2’s interface.
Router4#ping 12.5.10.1
Router4#ping 10.1.1.1
Router4#ping 10.1.1.2
Router2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
U - per-user static route
Gateway of last resort is not set
C 10.1.1.0/24 is directly connected, 10.1.1.2
S 12.5.10.0/24 [1/0] via 10.1.1.1
5
Computer Networks
Lab 8
In the S 12.5.10.0/24 [1/0] via 10.1.1.1 line of output, the S denotes the static route. Next,
the destination network and its subnet information (12.5.10.0/24) are displayed. The [1/0]
represents the administrative distance, which is 1 by default, and the metric (hop count in
this case), which is 0. The word via signals the next hop address the packet should be sent
to, which in this case is 10.1.1.1.
iv) RIP
Objective: Configure Routers 1, 2, and 4 with IP addresses and the Routing Information
Protocol (RIP).
Lab Equipment: see figure
Goals:
• Set the host name and bring up the interfaces.
• Configure RIP.
• Select the directly connected networks.
• Display the routing table.
• Display the RIP protocol information.
1) Configure Routers
6
Computer Networks
Lab 8
2) On each router, verify that you can ping the directly connected neighbors.
Router0#ping 10.1.1.2
Router0#ping 11.1.1.2
Router2#ping 10.1.1.1
Router3#ping 11.1.1.1
Labs
3) Add RIP to Router0.
Router0#
Router0#configure terminal
Router0(config)#router rip
Router0(config-router)#
Router0(config-router)#network 10.0.0.0
Router0(config-router)#network 11.0.0.0
Router2#
Router2#confi g terminal
Router2(confi g)# router rip
Router2(confi g-router)#
Router2(config-router)#network 10.0.0.0
Router2(confi g-router)#network 14.0.0.0
Router4#
Router4#confi g terminal
Router4(confi g)#router rip
Router4(confi g-router)#
9) Now, RIP should be running on all three routers. See if you can ping between
routers that are not directly connected. For instance, from Router2 you should
now be able to ping Router4’s interface.
Router2#ping 11.1.1.2
7
Computer Networks
Lab 8
Router4#ping 10.1.1.2
If you can ping both devices, then you have correctly configured routing. If the pings
were not successful, trace back through the steps.
11) Now, issue the command to display the routing table on Router4.
Router4#show ip route
Router4#show ip protocol
Device PC 1 PC 2 Server
IP Address 14.1.1.2 15.1.1.2 15.1.1.3
14) Finally, Ping from PC1 to PC2 and add www.yahoo.com to Server DNS and
try to open yahoo html page from pc1
8
Computer Networks
Lab 9
Lab Contents:
I. IP Subnets
II. Packet Analyzing
Computer Networks
Lab 9
i) IP Subnets
Examples:
Figure 1 Figure 2
IP 172.16.31.99
2
Computer Networks
Lab 9
ARP Header
3
Computer Networks
Lab 10
Lab Contents:
I. Routing Protocols
II. VLSM
Computer Networks
Lab 10
Types:
A) According to path:
• Distance-Vector
It determines the best path according to distance (minimum number
of hops--routers) directed to destination, examples: RIP, IGRP, EIGRP
• Link-State
It determines the best path according to link speed and efficiency
directed to destination, examples: OSPF
B) According to classes:
• Classful
• can’t send subnet information in updates
• RipV1, IGRP, EGP, BGP3
• Classless
• Sends CIDR “Classless inter-domain routing”
• RipV2 (RFC 1058), EIGRP, OSPF, IS-IS, BGP4
RIP:
2
Computer Networks
Lab 10
EIGRP:
Configuration
Example of setting up EIGRP on a Cisco IOS router using classful IP addressing:
Router> enable
Router# config terminal
Router(config)# router eigrp 1
Router(config-router)# network 192.168.0.0
Example of setting up EIGRP on a Cisco IOS router using classless IP addressing. The
0.0.15.255 in this example indicates a subnetwork with a maximum of 4094 hosts—it is the
bitwise complement of the subnet mask 255.255.240.0.
Router> enable
Router# config terminal
Router(config)# router eigrp 1
Router(config-router)# network 10.201.96.0 0.0.15.255
Testing
There are a few commands you will want to use to verify EIGRP is running correctly:
• show ip interface brief - Used to verify your interface status.
• show ip route - It is useful to see the results of EIGRP in your actual routing table.
• show ip route eigrp - This lets you view the routes that EIGRP is handling.
• show ip eigrp neighbors - Verify that all of your neighbors are coming up and being
seen. If your neighbors aren't here, don't bother troubleshooting the routes you are
supposed to be transmitting because you aren't at that stage yet.
• show ip eigrp traffic - This is useful to see that EIGRP traffic is behing passed back
and forth between neighbors. Often with EIGRP, the problems that occur are
related to other things besides EIGRP.
3
Computer Networks
Lab 10
ii) VLSM
Example 1
Objective
Create an addressing scheme using variable length subnet masking (VLSM).
Scenario
The assignment is the Class C address 192.168.10.0 and it must support the network
shown in the diagram. The use of IP unnumbered or NAT is not permitted on this
network. Create an addressing scheme that meets the requirements shown in the
diagram.
4
Computer Networks
Lab 10
Example 2:
Objective
Scenario
The assignment is the Class C address 192.168.10.0 and it must support the network
shown in the diagram. Create an addressing scheme that meets the requirements shown in
the diagram. First, attempt an IP addressing scheme using traditional subnetting. If that
proves to be impossible, use VLSM.