net323 d: networks protocols · ospf properties 7 1- based on link state 2-each router has three...

39
NET323 D: NETWORKS PROTOCOLS Lab # 6 : Dynamic Route (OSPF – Single area) Networks and Communication Systems Department TA. Anfal AlHazzaa 1

Upload: others

Post on 20-Jan-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

NET323 D:

NETWORKS PROTOCOLS

Lab # 6 : Dynamic Route (OSPF – Single area) Networks and Communication

Systems Department

TA. Anfal AlHazzaa

1

Page 2: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Lab Objectives 2

To connect small LANs using routers.

To configure dynamic route on the routers using

OSPF (Open Shortest Path First)

To send ICMP message between devices in

different networks.

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Page 3: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Lab Content

Dynamic Route

OSPF (Open Shortest Path First)

OSPF properties

How to configure OSPF “single area” on the router

Scenario (Configuring OSPF ”single area” on the

routers)

3

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Page 4: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

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

Page 5: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Dynamic Route

5

A dynamic routing table is created, maintained, and updated by a routing protocol running on the router.

Examples of routing protocols include

RIP (Routing Information Protocol)

OSPF (Open Shortest Path First)

EIGRP (Enhanced Interior Gateway Routing Protocol)

Dynamic routing table is updated periodically using one of the dynamic routing protocols such as RIP, OSPF, or EIGRP.

Whenever there is a change in the Internet, such as the shutdown of a router or breaking of a link, the dynamic routing protocols update all of the tables in the routers.

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Page 6: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

OSPF(Open shortest Path First) 6

OSPF is a link-State routing protocol, designed to scale

efficiently to support large network

Use COST as its metric, which is computed based on

bandwidth of the link

Uses the concept of areas to implement hierarchal routing

Unlike the RIP which the entire routing table is sent, only

the part that has changed.

Using multicasts the updated information only when

change has taken place

OSPF can be Single area or Multi area

Networks and Communication Systems Department – Prepared By: TA. May AlKhamis

Page 7: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

OSPF properties 7

1- Based on Link State

2- Each router has three tables (neighbors table, topology table (Link state

database) and Routing table.

3- Multicast the routing table to only routers that used OSPF as routing protocol

(multicast addresses are 224.0.0.5 and 224.0.0.6) less overload

4- Sending only triggered updates ( if there is change on the topology) less

overload

5- Unlike the RIP which the entire routing table is sent, only the part that has

changed

6- Can support classless as well as classful addresses

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Page 8: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

OSPF properties cont. 8

7- Letter that used to represent OSPF on the routing table is O

8- the Administrative distance value of OSPF is 110 ( more reliable than RIP)

9- OSPF uses COST as its metric, which is computed based on bandwidth of the

link using this formula (Cost = 100 000 000

𝐵𝑎𝑛𝑑𝑤𝑖𝑑𝑡ℎ) )

10- Suitable for large networks (uses the concept of areas to implement

hierarchal routing)

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Page 9: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

How to configure OSPF (single area) on the router?

9

OSPF configuration

For each router, you have to configure only its directly connected networks by using the following command ( in the global configuration mode):

router ospf 1

network [network address] [Wildcard mask] area 0

.

.

exit

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Page 10: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

How to configure OSPF (single area)on the

router? Cont. 10

Command description

Router ospf 1 Puts you in router OSPF configuration mode

1 is process id and can be any number

Network [network address] Tell the routing protocol what network to

advertise (followed by the network address)

in dotted-decimal notation

Wildcard mask Inverted of subnet mask (in dotted-decimal

notation)

Area id Can be any number ( if you use OSPF single

area, it must be 0 )

Exit To exit from the router OSPF configuration

mode.

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Page 11: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

[Example] Configuring OSPF (single area) on

a router (Router 1) 11

Example :

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Router 1: router ospf 1 network 10.0.0.0 0.255.255.255 area 0 network 50.0.0.0 0.255.255.255 area 0 exit

Router 1 Router 2

10.0.0.0 /8 192.168.1.0 /24

Page 12: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

[Example] Configuring OSPF (single area) on

on a router (Router 2) 12

Example :

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Router 1 Router 2

10.0.0.0 /8 192.168.1.0 /24

Router 2: router ospf 1 network 192.168.1.0 0.0.0.255 area 0 network 50.0.0.0 0.255.255.255 area 0 exit

Page 13: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Scenario # 1 13

1. Create two simple LANs (each LAN contains three devices)

2. Connect the two LANs using two router to create the third network (as shown in the following figure)

3. Configure OSPF (single area) on the routers

4. Perform a ping between PC “A” and PC “D” in realtime mode.

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Page 14: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

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) 14

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

Page 15: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Step 1 (Create the first network) cont.

15

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

Page 16: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Step 1 (Create the first network) cont.

16

Then perform a ping between PCs to test the connection in real

time mode.

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Page 17: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

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) 17

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

Page 18: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Step 2 (Create the 2nd network) cont.

18

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

Page 19: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Step 2 (Create the 2nd network) cont.

19

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

Page 20: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Step 3 (Create the 3rd network)

20

1. Drag two Generic Router-PT to the workspace

2. Using Copper Straight-through cable, connect first Router

to the switch in the 1st network(using interface f0/0 in the

router)

3. Using Copper Straight-through cable, connect 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

with the second Router (using interface f1/0 in both

routers)

Page 21: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Assign the following IPs to the router interfaces:

Router 1 :

Router 2 :

Step 4 ( Assigning IPs to router interfaces)

21

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.1.1.1 255.0.0.0

Page 22: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Step 4 ( Assigning IPs to router interfaces) cont.

22

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

Page 23: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Router 1 Configuration ( interface f0/0)

23

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Page 24: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Router 1 Configuration ( interface f1/0)

24

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Page 25: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Router 2 Configuration ( interface f0/0)

25

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Page 26: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Router 2 Configuration ( interface f1/0)

26

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Page 27: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

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)

27

The gateway of first network

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Page 28: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Step 5 ( Adding Gateway) cont. 28

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

Page 29: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

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.

29

The gateway of second network

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Page 30: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Step 5 ( Adding Gateway) cont. 30

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

Page 31: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

In OSPF configuration:

For each router, you have to configure only its directly connected networks (that you want to advertise to another routers)

By using the following command in global configuration mode:

router ospf 1

network [ network address] [wildcard mask] area 0

.

.

exit

Step 6 ( OSPF “single area” Configuration)

31

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

List all directly connected networks

Page 32: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

OSPF “single area” configuration on Router 1

32

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Router 1

Page 33: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

33

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Router 2

OSPF “single area” configuration on Router 2

Page 34: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Step 7 (Performing a ping in realtime mode)

34

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

Page 35: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Step 8 (Showing Routing table for the two Routers)

35

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

Page 36: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Routing table (Router 1)

36

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Identifies the Administrative Distance and the metric of this route.

**The 1st number is administrative distance and the 2nd number is the metric

C Identifies that the network connected directly with the router,

O Identifies that the route was dynamically created by OSPF.

Identifies the network address of the connected network.

Identifies the interface that used to route the packet to the network.

Identifies the next hop address that used to route the packet to the network.

Page 37: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Routing table (Router 2)

37

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Identifies the Administrative Distance and the metric of this route

**The 1st number is administrative distance and the 2nd number is the metric

C Identifies that the network connected directly with the router.

O Identifies that the route was dynamically created by OSPF.

Identifies the network address of the connected network.

Identifies the interface that used to route the packet to the network.

Identifies the next hop address that used to route the packet to the network.

Page 38: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

Note

38

You can use the following command to show the neighbor table

at privilege mode

Show ip ospf neighbor

You can use the following command to show the topology table

(link state database) at privilege mode

Show ip ospf database

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa

Page 39: NET323 D: NETWORKS PROTOCOLS · OSPF properties 7 1- Based on Link State 2-Each router has three tables (neighbors table, topology table (Link state database) and Routing table. 3-

References

39

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

Basic Cisco IOS Commands and Descriptions Cisco Forum FAQ | DSLReports, ISP Information. (2015, August 19). Retrieved 2015, from http://www.dslreports.com/faq/8979

Distance Vector and Link State Protocols. (2012, August 7). Retrieved 2015, from https://www.youtube.com/watch?v=ygxBBMztT4U

Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa