Upload
duongminh
View
213
Download
0
Embed Size (px)
Citation preview
NET323 D:
NETWORKS PROTOCOLS
Lab # 4 : Static Route Networks and Communication
Systems Department
TA. Anfal AlHazzaa
1
Lab Objectives 2
To connect two small LANs using two Routers.
To Configure static route on the routers.
To send ICMP message between devices in
different networks.
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Lab Content
Static Route
How to configure static route on the router
Scenario (Connecting two LANs using two routers)
What is the Administrative Distance “AD”?
What is the Metric?
Why the route has the AD and metric?
3
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Building a routing table
4
There are two basic methods of building a routing
table:
1. Static Routing
2. Dynamic Routing
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Static Route
5
A static routing table is created, maintained, and
updated by a network administrator, manually.
A static route to every network must be configured
on every router for full connectivity.
When a table is created, it cannot update
automatically when there is a change in the Internet.
It can be used in a small networks that does not
change very much.
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
How to configure a static route on the router?
6
In Static Route:
You have to configure only the remote networks (which are not directly connected to the Router) by using ip route command (in the global configuration mode).
When using the ip route command, you can identify where packets should be routed to in two ways:
The exit interface
The next-hop address
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
How to configure a static route on the router? Cont.
7
Using exit interface :
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
iP route [network address] [netmask] [exit interface]
[networkaddress] Replace it with the network address of remote network
[Exit interface] the interface that used to route the packet to the remote
network “destination”
[netmask] replace it with the mask of the network (in decimal notation)
How to configure a static route on the router? cont.
8
Example :
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Router 1 (in the example we have only one remote network to router 1 which is
network # 2):
iP route 192.168.1.0 255.255.255.0 f1/0 Router 2 (in the example we have only one remote network to router 2 which is
network # 1):
iP route 10.0.0.0 255.0.0.0 f1/0
Router 1 Router 2
10.0.0.0 /8 192.168.1.0 /24
How to configure a static route on the router? Cont.
9
Using next hub:
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
iP route [network address] [netmask] [next hub]
[network address] Replace it with the network address of remote network
[next hop] the IP (in decimal notation) of the next hop that used to route the
packet to the remote network “destination”
[netmask] replace it with the mask of the network (in decimal notation)
How to configure a static route on the router? Cont.
10
Example :
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Router 1 (in the example we have only one remote network to router 1 which
is network # 2):
iP route 192.168.1.0 255.255.255.0 50.2.2.2 Router 2(in the example we have only one remote network to router 2 which
is network # 1):
iP route 10.0.0.0 255.0.0.0 50.1.1.1
Router 1 Router 2
10.0.0.0 /8 192.168.1.0 /24
Scenario # 1 11
1. Create two simple LANs (each LAN contains three devices)
2. Connect the two LANs using two routers to create the third network (as shown in the following figure)
3. Configure two routers using Static Route (exit interface)
4. Perform a ping between PC “A” and PC “D” in realtime mode
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
1. Open The Packet tracer
2. Add three PCs to the workspace ( by select the Generic PC under End Devices and drag it onto the workspace)
3. Rename them and set their IPs as the following:
Note: the network address will be 10.0.0.0 why??
Step 1 (Create the first network) 12
PC name IP Mask
A 10.1.1.1 255.0.0.0
B 10.2.2.2 255.0.0.0
C 10.3.3.3 255.0.0.0
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Step 1 (Create the first network) cont.
13
4. Drag Switch-PT to the workspace
5. Using Copper Straight-through cable connect the
three PCs to the switch as the following:
PC name Switch ports
A Fast Ethernet 1/1
B Fast Ethernet 2/1
C Fast Ethernet 3/1
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Step 1 (Create the first network) cont.
14
Then perform a ping between PCs to test the connection in real
time mode.
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
1. Add one PCs and one laptop to the workspace ( by
select the Generic PC and Generic laptop under End
Devices and drag them onto the workspace)
2. Rename them and set their IPs as the following:
Note: the network address will be 192.168.1.0 why??
Step 2 (Create 2nd network) 15
End device
type
name IP Mask
PC D 192.168.1.1 255.255.255.0
laptop E 192.168.1.2 255.255.255.0
laptop G 192.168.1.3 255.255.255.0
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Step 2 (Create the 2nd network) cont.
16
3. Drag Switch-PT to the workspace
4. Using Copper Straight-through cable connect the
devices to the switch as the following:
Device name Switch ports
D Fast Ethernet 1/1
E Fast Ethernet 2/1
G Fast Ethernet 3/1
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Step 2 (Create the 2nd network) cont.
17
Then perform a ping between devices (PC and laptops) to test the
connection in realtime mode.
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Step 3 (Create the 3rd network)
18
1. Drag two Generic Router-PT to the workspace
2. Using Copper Straight-through cable, connect the first
Router to the switch in the 1st network(using interface f0/0 in
the router)
3. Using Copper Straight-through cable, connect the second
Router to the switch in the 2nd network(using interface f0/0 in
the router)
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
4. Using Copper Cross-over cable, connect the first Router
to the second Router (using interface f1/0 in both routers)
Assign the following IPs to the router interfaces using CLI:
Router 1 :
Router 2 :
Step 4 ( Assigning IPs to router interfaces)
19
Connection IP Mask
Fast Ethernet 0/0 10.1.1.1 255.0.0.0
Fast Ethernet 1/0 50.1.1.1 255.0.0.0
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Connection IP Mask
Fast Ethernet 0/0 192.168.1.1 255.255.255.0
Fast Ethernet 1/0 50.2.2.2 255.0.0.0
Step 4 ( Assigning IPs to router interfaces) cont.
20
You have to enter to the CLI of the router by
clicking on it and then choose CLI tab
1
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Router 1 Configuration ( interface f0/0)
21
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Router 1 Configuration ( interface f1/0)
22
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Router 2 Configuration ( interface f0/0)
23
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Router 2 Configuration ( interface f1/0)
24
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Network # 1
For each PC, change the gateway to 10.1.1.1 which is the
gateway of the first network
Step 5 ( Adding Gateway)
25
The gateway of first network
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Step 5 ( Adding Gateway) cont. 26
1
3
Adding gateway
Desktop tab IP configuration enter gateway
*Repeat the same steps for PC “B” and PC “C”
2
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Network # 2
For each PC, change the gateway to 192.168.1.1which is
the gateway of the second network
Step 5 ( Adding Gateway) cont.
27
The gateway of second network
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Step 5 ( Adding Gateway) cont. 28
1
3
Adding gateway
Desktop tab IP configuration enter gateway
*Repeat the same steps for laptop “E” and laptop “G”
2
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
In Staitc Route:
You have to configure only the remote networks (which are not directly connected to the Router)
By using the following command in global configuration mode:
ip route [network address] [netmask] [exit interface]
OR
ip route [network address] [netmask] [next hop]
Use only one way in your topology.
Step 6 ( Static Route Configuration)
29
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Static route Configuration in the two routers
[exit interface] 30
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Router 1 (in the example we have only one remote network to
router 1 which is network # 2):
Router 2 (in the example we have only one remote network to
router 2 which is network # 1):
Static route Configuration in the two routers
[next hop] 31
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Router 1 (in the example we have only one remote network to
router 1 which is network # 2):
Router 2 (in the example we have only one remote network to
router 2 which is network # 1):
Step 7 (Performing a Ping in Realtime mode)
32
Click on PC”A” “Desktop”
tap Command Prompt
Write the following command Ping 192.168.1.2
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Step 8 (Showing Routing table for the first Router)
33
Use the following command to show the routing table at
privilege mode
Show ip route
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Routing table explanation
34
C Identifies that the network connected directly with the router
S Identifies that the route was manually created by an administrator to
reach a specific network. This is known as a static route.
Network address of the connected network
Interface that used to route the packet to the network
Note: when you use the next hop way the IP address of the next hop will
be shown instead of the interface.
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
What is the Administrative Distance (AD)?
35
Each Routing protocol has Administrative Distance
as the following:
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
What is the Metric ?
36
A routing metric is a unit calculated by a routing algorithm for selecting or rejecting a routing path for transferring data/traffic.
Some of the parameters used for calculating a routing metric are as follows:
Hop count
Path reliability
Path speed
Load
Bandwidth
Latency
Maximum transmission unit
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Why the route has the AD and metric?
37
If the Router is configured for one or more routing protocols, the Router can learn about different routes to the same destination.
In which case, the Router will prefer routes from the routing protocol with the lowest administrative distance.
If a single routing protocol provides multiple routes to the same destination, the router will then look at the metric of each of those routes, and select the one with the lowest metric.
Lowest administrative distance first, then lowest metric.
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
References
38
Cisco Packet Tracer Help
Balchunas, A. (2007). Static vs. Dynamic Routing. Retrieved 2015, from
http://www.routeralley.com/guides/static_dynamic_routing.pdf
Cisco Networking Academy's Introduction to Routing Dynamically. (2015, September
3). Retrieved 2015, from
http://www.ciscopress.com/articles/article.asp?p=2180210&seqNum=12
Jabbar, G. (2012, January 3). Cisco ASA – Administrative Distance and Metric. Retrieved 2015,
from http://www.gomjabbar.com/2012/01/03/cisco-asa-administrative-distance-and-
metric/#sthash.cbKhlDvF.dpbs
Cisco Networking Academy's Introduction to Routing Dynamically. (2014, March 24). Retrieved 2015, from http://www.ciscopress.com/articles/article.asp?p=2180210&seqNum=12
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa