1 NET323 D: NETWORKS PROTOCOLS Networks and Communication Systems Department TA. Anfal AlHazzaa Lab # 6 : Dynamic Route (OSPF Single area)
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.
Lab Content 3 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)
Building a routing table 4 There are two basic methods of building a routing table: 1. Static Routing 2. Dynamic Routing
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.
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
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
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 Bandwidth) ) 10- Suitable for large networks (uses the concept of areas to implement hierarchal routing)
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
10 How to configure OSPF (single area)on the router? Cont. Command Router ospf 1 Network [network address] Wildcard mask Area id Exit description Puts you in router OSPF configuration mode 1 is process id and can be any number Tell the routing protocol what network to advertise (followed by the network address) in dotted-decimal notation Inverted of subnet mask (in dotted-decimal notation) Can be any number ( if you use OSPF single area, it must be 0 ) To exit from the router OSPF configuration mode.
11 [Example] Configuring OSPF (single area) on a router (Router 1) Example : 10.0.0.0 /8 192.168.1.0 /24 Router 1 Router 2 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
12 [Example] Configuring OSPF (single area) on on a router (Router 2) Example : 10.0.0.0 /8 192.168.1.0 /24 Router 1 Router 2 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
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.
Step 1 (Create the first network) 14 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?? 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
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
Step 1 (Create the first network) cont. 16 Then perform a ping between PCs to test the connection in real time mode.
Step 2 (Create 2 nd network) 17 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?? 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
Step 2 (Create the 2 nd 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
Step 2 (Create the 2 nd network) cont. 19 Then perform a ping between devices (PC and laptops) to test the connection in realtime mode.
Step 3 (Create the 3 rd 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 1 st network(using interface f0/0 in the router) 3. Using Copper Straight-through cable, connect second Router to the switch in the 2 nd network(using interface f0/0 in the router) 4. Using Copper Cross-over cable, connect the first Router with the second Router (using interface f1/0 in both routers)
Step 4 ( Assigning IPs to router interfaces) 21 Assign the following IPs to the router interfaces: Router 1 : 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 Router 2 : 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
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
Router 1 Configuration ( interface f0/0) 23
Router 1 Configuration ( interface f1/0) 24
Router 2 Configuration ( interface f0/0) 25
Router 2 Configuration ( interface f1/0) 26
Step 5 ( Adding Gateway) 27 Network # 1 For each PC, change the gateway to 10.1.1.1 which is the gateway of the first network The gateway of first network
Step 5 ( Adding Gateway) cont. 28 1 2 3 Adding gateway Desktop tab IP configuration enter gateway *Repeat the same steps for PC B and PC C
Step 5 ( Adding Gateway) cont. 29 Network # 2 For each PC, change the gateway to 192.168.1.1which is the gateway of the second network The gateway of second network
Step 5 ( Adding Gateway) cont. 30 1 2 3 Adding gateway Desktop tab IP configuration enter gateway *Repeat the same steps for laptop E and laptop G
Step 6 ( OSPF single area Configuration) 31 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.. List all directly connected networks exit
OSPF single area configuration on Router 1 32 Router 1
OSPF single area configuration on Router 2 33 Router 2
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
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
Routing table (Router 1) 36 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. Identifies the Administrative Distance and the metric of this route. **The 1st number is administrative distance and the 2nd number is the metric
Routing table (Router 2) 37 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. Identifies the Administrative Distance and the metric of this route **The 1st number is administrative distance and the 2nd number is the metric
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
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-andmetric/#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