Lab Network
Lab Network
2
Experiment 1:Network Mediums
Aim: Study of different types of Network cables and Practically implement the cross-
wired cable and straight through cable using clamping tool.
Description:
Types of Cables
• Coaxial Cable
• Fiber optics
• Twisted pair
– STP (Shielded)
– UTP (Unshielded)
Coaxial Cable
3
Fiber Optics
4
– PC , Hub
– PC , Switch
– Router , Switch
• Crossover
– PC , PC
– Router , Router similar devices
– Switch , Switch
– Hub , Switch
– PC , Router
• Rollover
consists of RJ-45 on one end & DB-9 on the other end.
5
Procedures: To do these practical following steps should be done:
1.Start by stripping off about 2 inches of the plastic jacket off the end of the cable.
Be very careful at this point, as to not nick or cut into the wires, which are inside. Doing so
could alter the characteristics of your cable, or even worse render is useless. Check the
wires, one more time for nicks or cuts. If there are any, just whack the whole end off, and
start over.
2. Spread the wires apart, but be sure to hold onto the base of the jacket with your other
hand. You do not want the wires to become untwisted down inside the jacket. Category 5
cable must only have 1/2 of an inch of 'untwisted' wire at the end; otherwise it will be 'out of
spec'. At this point, you obviously have ALOT more than 1/2 of an inch of un-twisted wire.
3.You have 2 end jacks, which must be installed on your cable. If you are using a pre-made
cable, with one of the ends whacked off, you only have one end to install - the crossed over
end. Below are two diagrams, which show how you need to arrange the cables for each type
of cable end. Decide at this point which end you are making and examine the associated
picture below.
6
Experiment 2:Network Devices
8
Experiment 3:IPv4 Addressing
Aim:
1. Study of Class full IP Addressing
2. To learn Classes, Blocks and Masking
3. IP configuration on PC
w.x.y.z. Each part has 8 binary bits and the values in decimal can range
from 0 to 255.
2. IP addresses are divided into different classes. These classes
determine the maximum number of hosts per network ID. Only three
classes are actually used for network connectivity. The following table
lists all of the address class.
9
b) Class A: first bit in w is 0 and others
i. 192.0.0.0 to 223.255.255.255
ii. First 24 bits for network part and last 8 bits for host part.
e) Class D: first, second, third bits in w are 1 and fourth bit is 0;
used for multicast. i. 224.0.0.0 to 247.255.255.255
f) Class E: future use or experimental purposes.
4. Default Subnet mask it is used to identify the network part from the host part.
Put binary one for the parts that represent network part and zero for the part
that represent host part.
a) Class A:
255.0.0.0
b) Class B:
255.255.0.0
c) Class C: 255.255.255.0
d) We can’t have mix of 1s and 0s in subnet mask. Only consecutive 1s is
followed by consecutive 0s.
10
Subnet Mask
Default Gateway
Is used to connect the subnet with the other networks. It is usually the IP of the
router
Example: we have the following configuration for
subnet 1
• Subnet IP : 192.168.10.0
• Subnet mask : 255.255.255.0
• Default gateway : 192.168.10.1
11
Check my IP on Computer
IP Configuration on PC
• Assign IP Address to the Host => (GUI)
– Static (manually)
– Dynamic (automatically)
o DHCP = Dynamic Host Configuration Protocol
• Check IP
– GUI (windows)
– CLI (cmd)
GUI
12
13
Check IP Address
14
IPs Types
• Private (LAN )
• Public (WAN)
– Google.com
– Yahoo.com
– Youtube.com
– Facebook.com
– Uobaghdad.edu.iq
– Host communicate direct with Internet : Server ,Router.
• Private (LAN )
15
Experiment 4:Network Checking Tools
Ping
16
17
1.
18
ICMP Common Message Types
1. Request timeout
Means the ICMP packet reached from one host to the other host but the
reply could not reach the requesting host. There may be more packet loss or
some physical issue.
2. Network Unreachable
This error message means that no route for the destination network could be
found in the routing table on the reporting router, and is commonly seen when a
user tries to connect to a private address that is non-routable across the Internet.
It tells us the problem lies with the host, and the network route up to the remote
host is working fine.
Trace Route
19
NSLOOKUP
20
Display DNS-Server
Netstat
is jack-of-all-trades network tool
Can display connections, interfaces, routing tables and traffic
statistics
Active connection display
Statistics display
Interfaces
Routing
Netstat Parameters
netstat [-a] [-b] [-e] [-n] [-o] [-p <Protocol>] [-r] [-s] [<interval>]
Procedures:
With a crossover cable in hand, connect both the PCs. Once done, follow the
steps below.
1. Go to “Control Panel -> Network and Internet -> Network and Sharing
Center -> Change Adapter Settings.”
22
2.Click on “Change Adapter Settings.” This will reveal different connections.
Select the appropriate connection for your LAN. Usually, but not necessarily,
the connection will be called Ethernet.
In the Properties menu, set the IP address and subnet masks of the first
computer to:
IP – 192.168.0.1
Subnet Mask – 225.225.225.0
Repeat all the above steps for the second computer and set the IP address and
subnet Mask as follows:
23
IP – 192.168.0.2
Subnet Mask – 225.225.225.0
5. After assigning the IP addresses, you need to head back to Network and
Sharing Center and click on the “Change advanced sharing settings” option.
6. In the advanced sharing settings menu, you need to enable the “Turn on
network discovery” and “Turn on automatic setup of network-connected
devices” options.
24
You can also tick the File and printer sharing option. This would allow the other
Windows 10 PC to access the files and printers shared on the network.
7. Right-click on “This PC” and choose “Properties.” Click on “Change settings
-> Change.” This reveals a window with the name of the workgroup. The value
for the workgroup name should be the same for both PCs. By default, the
workgroup name will be WORKGROUP, but you can change it to any name
you like.
25
8. Right-click on the drive you want to share. Scroll to the “Give access to”
option and click “Advanced Sharing.” Under the sharing tab, click the
“Advanced Sharing” button.
This reveals the advanced sharing window. Check the “Share this folder”
checkbox and click “Apply -> OK.”
At this stage, you will have successfully connected the two Windows 10 PCs to
share your drives between them.
Transferring Files
You can now transfer specific folders or files between the two connected
Windows 10 PCs. To share specific folders or files from Computer A (ADMIN-
HP) with Computer B, follow the steps below:
26
1. Right-click the desired folder or file in Computer A. Scroll to the “Give
access to” option and click “Specific People.”
2. In the newly opened Network Access windows, select “Everyone” from the
drop-down menu. Next, click “Add” and click “Share.”
27
4. If you wish to copy files from Computer B to Computer A, you have to
perform the same steps, but this time the steps previously performed on
Computer A needs to be performed on Computer B and vice versa.
29
30
31
2. Creating Devices
a. Choose a device type from the Device- Type Selection box
b. Click on the desired device model from the Device-Specific Selection box.
c. Click on a location in the workspace to put your device in that location.
d. If you want to cancel your selection, press the Cancel icon for that device.
e. Alternatively, you can click and drag a device from the Device-Specific
Selection box onto the workspace.
f. You can also click and drag a device directly from the Device-Type
Selection box and a default device model will be chosen.
3-Adding Modules
a. Click on a device to bring up its configuration window.
b. By default, you will be in the Physical Device View subpanel of the device.
c. You can browse (by clicking) through the list of modules and read their
description in the information box at the bottom.
d. When you have found the module you want to add, simply drag it from the
list into a compatible bay on the device picture.
e. You can remove a module by dragging it from the device back into the
list.
32
4-Making Connections
a. To make a connection between two devices, first click the Connections icon
from the Device-Type Selection box to bring up the list of available
connections.
b. Then click the appropriate cable type.
c. The mouse pointer will change into a "connection" cursor.
d. Click on the first device and choose an appropriate interface to which to
connect.
e. Then click on the second device and do the same.
f. A connection cable will appear between the two devices, along with link
lights showing the link status on each end (for interfaces that have link
lights).
33
5. Creating Networks
a. Start creating a network by first selecting the End Devices. Add a Generic PC
and a Generic Server to the workspace.
b. 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, and if the mouse pointer is held over
either the PC or the Server, the link status will be shown as “Up.” The network
should look similar to the picture below.
c. 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.
d. 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 tables
the network device will build as it learns about the network around it. In this
example, only the ARP tables will appear. Since the devices have not been
34
configured yet, the ARP tables are empty. Always remember to close windows
after viewing them or they will clutter the workspace.
e. 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.
f. 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.
g. 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.
h. 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.
i. Load a background grid using the Set Tiled Background button.
j. Save your work using the File > Save As option and create a meaningful
filename.
35
Now Follow these steps to connect two PCs
Step 1: From the bottom toolbar, click on ‘End Devices’ and select ‘PC’ and
then click on the screen (for two PC’s do this step twice).
Step 2: Now to connect the PC’s, we require a wire; we use cross-over wire to
connect similar devices.
Select Connections from the bottom toolbar, and select cross-over wire (that is
the fourth wire).
Step 3: After selecting the wire click on the computer on the screen(here
PC0) and select FastEthernet0.
Then, drag the wire to the other pc (here PC1) and do the same.
36
Step 4: Now, we will assign the IP address to both the PCs (PC0 & PC1).
Click on PC0. A dialog box will appear on the screen, select Desktop and
then select IP configuration :
37
After clicking on IP configuration this is what will appear.
38
Now if in Real time box- PDU list window it shows successful, that means
all the connections are correct and the data transfer is successful
39
Experiment 7:Hubs And Switches
• Aim: Ideal for studying differences in operation between hubs and
switches.
• Procedures:
Open Packet Tracer. On the lower left corner, there are all the components
required for creating our network. There are routers, switches, End
Click on “Hubs”. To the right, you should see types of hubs displayed. Click
on the first type ‘Generic’, and drag your mouse to the workspace above and
click on the point you want to place your hub as shown below.
40
Click on the hub we just placed in our workspace. You are shown the physical
view of the hub and it is a physical view literally. You can even see the Power
button of the hub
Click on the “Config” tab just beside the “Physical” tab. You are shown the
global settings of the hub. You can change the display name of the hub.
Change it from “Hub0” to “Hub”. Then close it.
Now we are going to place five computers around the hub to form Hub and
Spoke topology. From the components on the lower left corner click on “End
devices”. From the options displayed, click on the first choice called
“Generic” hold “CTRL” key and click on the workspace at five points
around the hub where you want to place your computers. This is a shortcut to
place many devices
41
Click on any “PC” we just placed. You should see something similar to
“CPU”. This is the
physical view of the PC. We can even see the Power button.
42
Different types of cabling are displayed. Here’s where Packet tracer assists in
our learning abilities. If you are not sure what type of wiring to use, click on
the first choice ‘automatic’
Make a static IP Address for all computers as shown
PC 0 192.168.10.10
PC 1 192.168.10.11
PC 2 192.168.10.12
PC 3 192.168.10.13
PC 4 192.168.10.14
Server 192.168.10.15
PC
Make the subnet mask 255.255.255.0 for all computers and server.
Now let’s see the functioning of the hub. Click on “Simulation” beside “Real-
time” as shown below
43
The Event List window will open. Click on “Edit Filters”. We will see various
protocols
Deselect “Show All/ None” option. All options are deselected. Then Select
ICMP option.
44
What we are doing is trying to ping the machine.
Click on “Add Simple PDU” as shown below. When we move the mouse
on the workspace we can see a white envelope moving along with the
mouse.
45
First click on the sending device( Click on “PC0” ). Then select the
receiving device (Click on the “Server” ). It should be clear to you that we
are pinging the server from PC0. Our screen would look like below.
Now let us see how packets travel from PC0 to the Server we are trying to
ping. Click on “Capture/ Forward” as shown below. Click on
“Capture/ Forward” again. The ping travels from PC0 to the hub
46
Click on “Capture/ Forward” again. The hub forwards the frame on all the
ports, except the port through which the frame came in. All hosts except
Server discard the frame since it is not addressed to them.
As already seen Hubs forward a frame they receive on all the outbound ports
except the port through which it received the frame. When connected using
hubs, the host devices share same bandwidth of the medium. Since they
share the same bandwidth, hosts can send frames at the same time on the
47
medium which can result in collisions.
In order to prevent frame collisions, Ethernet uses “Carrier Sense Multiple
Access/ Collision detect (CSMA/CD)”. Of course this prevents collisions but
it still consumes a lot of bandwidth. The only solution is to this problem is to
make the collision domain as small as possible. Let’s see how. Click on
“Delete” as shown below.
Exercise 1:
1. Design a topology using 4 PC and a Switch with following IP address:
2. Observe the flow of data from host to host by creating network traffic.
3. Type command "Switch#show mac address-table" and see the result.
4. What is the main difference of switches against hubs
Exercise 2:
1-Make the topology above and complete the connections and cabling and
what is the type of cables
2-Put a static Ip address for each device with the same network
4- Why switch can make different collision domains but hub cannot.
48
Experiment 8:Switch Management
Aim: To configure basic settings such as hostname, motd banner,
encrypted passwords, and terminal options on a Cisco Catalyst 2960 switch
By default this is where we begin the session with our Cisco IOS devices
(unless a specific privilege level has been granted to our user account).
The characteristics of user EXEC mode are:
Indicated by a right angle bracket sign (“>”) next to the device hostname.
Contains commands that we can use to test device/network configuration
such as ping and traceroute.
A limited set of commands that are not changing the device configuration
such as the show and clear command are available.
We can connect to other device from user EXEC mode by using telnet or
ssh
To protect user EXEC mode we can create username and password
combination on the device.
Issuing exit command here will disconnect the session.
49
Privileged EXEC mode
This is where the real configurations are done. We can enter global
configuration mode from privileged EXEC mode by using command configure
terminal. From here we can do changes on the global device configuration such
as hostname, domain-name, creating user accounts, etc; or we can enter more
specific configuration within global configuration mode and make changes such
as IP address interface, access-list, DHCP, policy, etc.
Some characteristics of global configuration mode are:
50
Indicated by device hostname prompt, followed by a word “config”
inside a bracket and then hash sign (“#”).
All commands from EXEC mode can be used here by adding a word do
before the command that we want to execute, for example if we want to
use show running-config in global configuration mode we have to type it
as do show running-config.
Despite that we can change configuration within global configuration
mode, if we want to save the configuration we have to do it by exiting
back to privileged EXEC mode and issue command write memory or
copy running-config startup-startup config from there (however, these
two commands can also be used from within global configuration mode
by adding a do prefix to the command, as explained in the previous
point).
Global configuration mode can be protected by assigning a custom
privilege level to the user account then set allowed commands and block
the rest, thus limiting the configuration capability.
Issuing exit here will bring us back to the privileged EXEC mode.
Procedures:
1.Use the local laptop connect to the switch console and configure the
laptop with the right parameters for console access to the Cisco 2960
Catalyst switch
51
1-Configure Switch hostname as LOCAL-SWITCH
Switch(config)#hostname LOCAL-SWITCH
Try to access the switch via console again it will request password
LOCAL-SWITCH>enable
After type enable command password will appear again this password is cisco
Now try to access the switch by Telnet you need to put an ip address to your
53
laptop with the same subnet of switch ip address 192.168.1.2 with subnet mask
255.255.255.0 you can use any IP from the range of 192.168.1.3-
192.168.1.254
54
Type password of telnet which is "ciscotelnet"
Experiment 9:VLAN
Aim: Understanding the VLAN work and make an idea about truck and access
55
ports
Description:
Let's Consider that a company has two buildings as shown below
Each one of buildings has two departments sales and finance .Now the Network
is shared between all departments so that Sales department can see the data of
finance and vice versa. The company ask you to make the network isolated for
each department for security purposes.
The first solution is to buy another switches and cables to build a new network
for the second department as shown below.
As you see this solution is very costly because you should buy a new switches
and install a new cable between two buildings and the costs increase while the
distance increase between two buildings and may be a fiber-optic cable is
.needed Also, the time and effort spent must be taken into account
From here the Virtual LAN introduced to solve the issue by making only
56
Some command to each switch to make a separate network for each department
. with the same devices and cables (i.e. with the same network)
Now make ping between the four PCs you can ping them successfully because
No VLAN configured yet
57
2-Switch 1 configuration
SW1#sh run
!
hostname SW1
interface FastEthernet0/1
switchport trunk allowed vlan 10,20
switchport mode trunk
!
interface FastEthernet0/2
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/3
switchport access vlan 20
switchport mode access
!
interface Vlan1
no ip address
shutdown
!
interface Vlan10
no ip address
!
interface Vlan20
no ip address
end
3-Switch 2 configuration
SW2#sh running-config
hostname SW2
!
interface FastEthernet0/1
switchport trunk allowed vlan 10,20
switchport mode trunk
!
interface FastEthernet0/2
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/3
switchport access vlan 10
switchport mode access
interface Vlan10
no ip address
interface Vlan20
no ip address
end
58
And PC3 - PC 4 because VLAN can separate the broadcast domain and make
the switch act as two separated switches
59
We can observe that after configuring the VLAN between switches there are
Successful ping between only sales PCs and finance PCs and there is no ping
between sales-finance PCs .that means we divided all the network devices and
cable logically by configuration not physically (this means buy new equipments
and its costly)
60
Exercise:
For the Network shown above consider the company ask you to configure a
separated DHCP-server for the employs of company and another DHCP-Server
for guest WiFi clients as they visit the company to make more security for the
company network between two buildings of company. Do your configuration
without adding any extra devices and cables by using VLAN configurations.
61
Experiment 10:Wireless Network
Procedures:
Now, let’s summarize what will we do for Packet Tracer WLAN
Configuration :
Place Wireless Interface Card to Laptops
IP Check on WLAN Devices
DHCP Server Configuration
IP Check on WLAN Devices again
Wireless router configuration
63
DHCP Server Configuration
In this step, we will configure our DHCP Server in the WLAN. This server will
give IP addresses to our devices who are connected to the Access Point.
Dynamic Host Configuration Protocol (DHCP) is a network management
protocol used to automate the process of configuring devices on IP networks,
thus allowing them to use network services such as DNS, NTP, and any
communication protocol based on UDP or TCP. A DHCP server dynamically
assigns an IP address and other network configuration parameters to each
device on a network so they can communicate with other IP networks.
In the Services tab of Server, we will go through the DHCP at the left hand. In
here, we will define our IP Pool. For this configuration example our DHCP
Pool’s name is “IPCisco Pool”. Beside, we will configure the Default
Gateway, DNS Server IP addresses. After that we will configure the starting
IP and Subnet Mask. DHCP server will start IP assignations with this IP. And
for this example, we have created 254 IP for our IP Pool. We also assign this
value on this screen.
After this configuration, we should not forget to “on” our DHCP Service at the
top and then, we add our DHCP Pool to the configuration with “add” button.
64
After DHCP Services configuration on DHCP Server, we will configure one
more thing on this DHCP Server. This is the IP address and subnet mask of the
Server. Here, our Server IP address will be 172.16.0.1 and the mask will be
255.255.255.0
65
As you can see the laptop have received IP address from the DHCP-Server
through the access point so the AP is considered to be only a bridge between
physical interface and WLAN
66
From any Laptop go to Ip configuration and check what ip you receive
So from your labtop> desktop go to the web Browser and hit the gate-way ip
192.168.0.1
67
After this page has open enter username: admin and passwred:admin
68
Now you can notice that the wan port of router is configured automatic
configuration-DHCP which means its obtain Ip address from DHCP-Server but
the lan of router is another different DHCP-Server.there is deferent internet
connection types as shown below
Also you can notice that home router has Wireless AP mode which is exactly
like Access point operation
Step 1: Configure the WR SSID.
a. Navigate to the WR GUI interface at 192.168.0.1 in a web browser on
Admin.
b. b. Navigate to Wireless > Basic Wireless Settings.
c. c. Change Network Name (SSID) to aCompany for only 2.4 GHz.
Notice that SSIDs are case-sensitive.
d. d. Change the Standard Channel to 6 – 2.437GHz.
e. e. For this activity, disable both 5 GHz frequencies. Leave the rest of the
settings unchanged.
69
Step 2: Configure wireless security settings.
In this step, you configure the wireless security settings using WPA2 security
mode with encryption and passphrase.
a. Navigate to Wireless > Wireless Security.
b. Under the 2.4 GHz heading, select WPA2 Personal for the Security Mode.
c. For the Encryption field, keep the default AES setting.
d. In the Passphrase field, enter Cisco123! as the passphrase.
70
e. Click Save Settings.
f. Verify that the settings in the Basic Wireless Settings and Wireless Security
pages are correct and saved.
Now reconnect the devices For laptop you go PC Wireless
71
And select the acompany ssid and enter the password
For smartphone you should go to config>wireless0
After the end of this experiment now you can distingush between wireless Ap
and Wireless home router.
72
Experiment 11:Router Secure Administrative Access
Procedures:
1. Configure the laptop terminal software
The terminal software in not correctly configured on the laptop. You have to
change the settings to 9600 / 8 / None / 1 to connect to the router's console.
Put IP address into your laptop with the same network of router IP 192.168.10.2
for example put 192.168.10.5 with subnet mask 255.255.255.0
74
Try to ping router IP from the laptop
7-configuring Telnet access to the router
gateway(config)#line vty 0 15
gateway(config-line)#password cisco
gateway(config-line)#exec-timeout 8 25
gateway(config-line)#login
8- Now its your duty to Telnet access the router from your laptop
75
Default static route
A default route defines where packets will be sent if no specific route for the
destination network is listed in the routing table. If no default route is set, the
router will discard all packets with destination addresses not found its routing
table.
Router>enable
Router#configure terminal
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.10.1 255.255.255.0
Router(config-if)#no shutdown
76
The link is up now
This means that router now has learned two network because they are direct
connected to router Fast Ethernet ports and when any host from one network
want to talk with host from second network router will lead him to that network
because its direct connected to port and router know about it.
3-Put an ip address to PC0 with the same network address of router interface
fa0/0
77
We put gate-way because we want to talk with other network so we need
someone to lead as there and know how to get there which in this case is the
Router itself.
4-Put an ip address to PC3 with the same network of interface fa0/1
78
Experiment 13:Static Routing
Aim: To focus on static routing
As shown in fig. above there are three networks with different colors
Router R1 has two direct connected networks on fa0/0
Network:10.10.10.0/24 and on fa0/1 network 20.20.20.0/30
But R1 now Know nothing about network:30.30.30.0/24
By using static routing we can tell router to know about indirect connected
network using ip route command.
Procedures:
1-Configure R1 interface fa0/0
Router>enable
Router#configure terminal
Router(config)#hostname R1
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 10.10.10.1 255.255.255.0
R1(config-if)#no shutdown
79
R1(config-if)#ip address 20.20.20.1 255.255.255.252
R1(config-if)#no shutdown
Router>enable
Router#configure terminal
Router(config)#hostname R2
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 20.20.20.2 255.255.255.252
R2(config-if)#no shutdown
The ip route command is used to tell router about networks that is no direct
connected to the interfaces of router and its simplified as follows
For R1
R1(config)#ip route 30.30.30.0 255.255.255.0 20.20.20.2
This command tell R1 that any host is going to talk with destination
30.30.30.0/24 network
to be forwarded to the neighbor address 20.20.20.2 which is the ip of neighbor
router .
For R2
R2(config)#ip route 10.10.10.0 255.255.255.0 20.20.20.1
This tells R2 that any host want to get 10.10.10.0/24 network to be forwarded to
next neighbor address 20.20.20.1 which is address of neighbor router.
80
6-Put ip address to PC1 and PC2 with same network address of connected
routers interfaces
Making a ping and trace-route between two routers and observe the results.
81
Exercise:
1. Configure PC0 and PC1 with following IP address and Subnet Mask.
82
Experiment 14:Dynamic Routing RIP
Aim: To understand RIP operation and advantage of dynamic routing
Before I proceed to the configuration proper for this lab, Let’s look at a few
things about RIP worth committing to memory.
RIP is a distance vector routing protocol
It has a default administrative distance of 120
RIP can go a maximum hop of 15
It uses hop counts to determine the shortest part to a remote network
Network Topology:
Procedures:
1-configure Router 0
Router0
Router>en
Router#configure terminal
Router(config)#hostname Router0
Router0(config)#interface serial0/3/0
Router0(config-if)#ip address 192.168.3.1 255.255.255.252
Router0(config-if)#no shutdown
Router0(config-if)#interface f0/0
Router0(config-if)#ip add 192.168.0.1 255.255.255.0
Router0(config-if)#no shutdwon
Router0(config-if)#exit
Router0(config)#router RIP
83
Router0(config-router)#network 192.168.0.0
Router0(config-router)#network 192.168.3.0
Router0(config-router)#exit
Router0(config)#exit
Router0#copy run start
2-Configure Router 1
Router1
Router>enable
Router#configure terminal
Router(config)#hostname Router1
Router1(config)#interface serial0/3/0
Router1(config-if)#clock rate 64000
Router1(config-if)#ip add 192.168.3.2 255.255.255.252
Router1(config-if)#no shutdown
Router1(config-if)#interface serial0/2/0
Router1(config-if)#clock rate 64000
Router1(config-if)#ip add 192.168.4.1 255.255.255.252
Router1(config-if)#no shutdown
Router1(config-if)#interface f0/0
Router1(config-if)#ip add 192.168.1.1 255.255.255.0
Router1(config-if)#no shutdown
Router1(config-if)#exit
Router1(config)#router RIP
Router1(config-router)#network 192.168.1.0
Router1(config-router)#network 192.168.3.0
Router1(config-router)#network 192.168.4.0
Router1(config-router)#exit
Router1(config)#exit
Router1#copy run start
3-Configure router 2
Router2
Router>enable
Router#configure terminal
Router(config)#hostname Router0
Router2(config)#interface serial0/3/0
Router2(config-if)#ip add 192.168.4.2 255.255.255.252
Router2(config-if)#no shutdown
84
Router2(config-if)#interface f0/0
Router2(config-if)#ip add 192.168.2.1 255.255.255.0
Router2(config-if)#no shutdown
Router2(config-if)#exit
Router2(config)#router RIP
Router2(config-router)#network 192.168.4.0
Router2(config-router)#network 192.168.2.0
Router2(config-router)#exit
Router2(config)#exit
Router2#copy run start
Verification:
To verify the working of the lab, we need to confirm that we are learning all routes via RIP.
To do this, we need to use #show ip route command
85
Aim: learn DHCP-Server setup on router
Procedures:
86
1-Configure Router interface Fa0/0 of Router with ip address
Router>enable
Router#configure terminal
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 192.168.10.1 255.255.255.0
Router(config-if)#no shutdown
a- Create a new DHCP pool with the ip dhcp pool NAME command
b- Define a subnet that will be used to assign IP addresses to hosts with the
network SUBNET SUBNET_MASK command.
Router(dhcp-config)#default-router 192.168.10.1
Router(dhcp-config)#dns-server 8.8.8.8
3-Go to PC and laptop to change the ip address for obtain ip address from
dhcp pool
87
Now each device on different switches have obtained an ip address from the
same DHCP-Pool so all devices are in the same network and can communicate
with each other
Note: the DHCP protocol is used when the number of devices on the network is
large so its difficult to assign each device a static ip address.
88
Experiment 16:Network Troubleshooting
Aim: To give you a starting point and structure for efficiently resolving network
.issues as they arise as well as proactively prevent them
:Topology
For the topology above PC0 cannot communicate with PC1. Try to fix the
.problem
:Procedures
89
networking issues. There’s no point in going through the process of
troubleshooting network issues if all you need to do is plug a cord in.
Make sure all switches are in the correct positions and haven’t been
bumped accidentally.
Next, turn the hardware off and back on again. This is the mainstay of IT
troubleshooting, and while it might sound simplistic, often it really does
solve the problem. Power cycling your modem, router, and PC can solve
simple issues—just be sure to leave each device off for at least 60
seconds before you turn it back on.
After check all devices we notice that switch 2 is powered off so back
it on
Use ipconfig. Open the command prompt and type “ipconfig” (without the .2
quotes) into the terminal. The Default Gateway (listed last) is your router’s IP.
Your computer’s IP address is the number next to “IP Address.” If your
90
computer’s IP address starts with 169, the computer is not receiving a valid IP
address. If it starts with anything other than 169, your computer is being
.allocated a valid IP address from your router
Try typing in “ipconfig /release” followed by “ipconfig /renew” to get rid of
your current IP address and request a new one. This will in some cases solve the
problem. If you still can’t get a valid IP from your router, try plugging your
computer straight into the modem using an Ethernet cable. If it works, the
.problem lies with the router
From this command we notice that PC1 has a gate-way but PC0 don’t have so
we must add gate-way manually to PC0
91
Use ping and trace route commands. If your router is working fine, and you.3
have an IP address starting with something other than 169, the problem’s most
likely located between your router and the internet. At this point, it’s time to use
the ping tool. Try sending a ping to a well-known, large server, such as Google,
to see if it can connect with your router. You can ping Google DNS servers by
opening the command prompt and typing “ping 8.8.8.8”; you can also add “-t”
to the end (ping 8.8.8.8 -t) to get it to keep pinging the servers while you
troubleshoot. If the pings fail to send, the command prompt will return basic
.information about the issue
You can use the tracert command to do the same thing, by typing “tracert
8.8.8.8”; this will show you each step, or “hop,” between your router and the
Google DNS servers. You can see where along the pathway the error is arising.
If the error comes up early along the pathway, the issue is more likely
.somewhere in your local network
92
After checking the results of this command we can determine where is the
problem take place .PC1 can go across three hops which are 192.168.20.1 ,
12.12.12.1 and 11.11.11.1
That means PC1 massage reaches to Router 0 and stop there while PC0 massage
stop at Router 0
So we know that the problem now at Router 0 but we need to specified it with
more details
We don’t need to put DNS to PC0 and PC1 because we only test connectivity
between them and no one of these PCs going to the internet so we don’t need
DNS specified. But if the PCs are configured to browse the internet DNS must
. be filled
Go to each router and type show running- configure this command is used to
.show all the configuration of the device
93
Router 0
R0#show running-config
Building configuration...
interface FastEthernet0/0
ip address 192.168.10.1 255.255.255.0
duplex auto
speed auto
shutdown ……………………Here is the issue interface Fa0/0 is
shutdown
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
interface Serial0/3/0
ip address 11.11.11.1 255.255.255.252
interface Vlan1
no ip address
shutdown
!
ip classless
ip route 192.168.20.0 255.255.255.0 11.11.11.2
!
ip flow-export version 9
line con 0
!
line aux 0
!
line vty 0 4
login
94
end
Router 1
R1#
R1#show run
Building configuration...
Router 2
R2#show running-config
Building configuration...
96
speed auto
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Serial0/2/0
ip address 12.12.12.2 255.255.255.252
clock rate 2000000
!
interface Vlan1
no ip address
shutdown
!
ip classless
ip route 192.168.10.0 255.255.255.0 12.12.12.1
!
ip flow-export version 9
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
end
We Know from configuration of each router that router 0 has interface Fa0/0 is
shutting down therefore we must access router 0 and type no shutdown
command as shown below
97
LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%
.This is notification from router telling as that interface change its state to up
98
THE END
99