Routing and Switching Week 11-14 PDF
Document Details
Uploaded by LivelyApostrophe2082
Khwaja Fareed University of Engineering & Information Technology
Dr. Saleem ullah
Tags
Summary
This document contains lecture notes on routing and switching, covering topics such as static and dynamic routing, and distance vector vs link state routing, from Khwaja Fareed University of Engineering & Information Technology.
Full Transcript
Routing and Switching Instructor: Dr. Saleem ullah Department of Computer Science KFUEIT – Rahim Yar Khan Khwaja Fareed...
Routing and Switching Instructor: Dr. Saleem ullah Department of Computer Science KFUEIT – Rahim Yar Khan Khwaja Fareed University of Engineering & Information Technology, Abu Dhabi Road, Rahim Yar Khan. Tel: +92 68 5882400, +92 68 5882432, Fax: +92 68 5882405, www.kfueit.edu.pk Contents Routing Protocols and basic configuration Distance Vector Routing Protocols (DVRP) DVRP Configuration Link State Routing Protocols (LSRP) LSRP Configuration Khwaja Fareed University of Engineering & Information Technology, Abu Dhabi Road, Rahim Yar Khan. Tel: +92 68 5882400, +92 68 5882432, Fax: +92 68 5882405, www.kfueit.edu.pk Routing is a process that is performed by layer 3 (or network layer) devices in order to deliver the packet by Routing Protocols choosing an optimal path from one network to another. Types of Routing i. Static Routing ii. Default Routing iii. Dynamic Routing Static Routing Static routing is a process in which we have to manually add routes to the routing table. Advantages No routing overhead for the router CPU which means a cheaper router can be used to do routing. It adds security because only an only administrator can allow routing to particular networks only. No bandwidth usage between routers. Disadvantage For a large network, it is a hectic task for administrators to manually add each route for the network in the routing table on each router. The administrator should have good knowledge of the topology. If a new administrator comes, then he has to manually add each route so he should have very good knowledge of the routes of the topology. Static Routing-Configuration R1 having IP address 172.16.10.6/30 on s0/0/1, 192.168.20.1/24 on fa0/0. R2 having IP address 172.16.10.2/30 on s0/0/0, 192.168.10.1/24 on fa0/0. R3 having IP address 172.16.10.5/30 on s0/1, 172.16.10.1/30 on s0/0, 10.10.10.1/24 on fa0/0. Now because only static routes for router R3: R3(config)#ip route 192.168.10.0 255.255.255.0 172.16.10.2 R3(config)#ip route 192.168.20.0 255.255.255.0 172.16.10.6 Here, provided the route for the 192.168.10.0 network where 192.168.10.0 is its network I’d and 172.16.10.2 and 172.16.10.6 are the next-hop address. Now, configuring for R2: R2(config)#ip route 192.168.10.0 255.255.255.0 172.16.10.1 R2(config)#ip route 10.10.10.0 255.255.255.0 172.16.10.1 R2(config)#ip route 172.16.10.0 255.255.255.0 172.16.10.1 Similarly for R1: R1(config)#ip route 192.168.20.0 255.255.255.0 172.16.10.5 R1(config)#ip route 10.10.10.0 255.255.255.0 172.16.10.5 R1(config)#ip route 172.16.10.0 255.255.255.0 172.16.10.5 Default Routing This is the method where the router is configured to send all packets toward a single router (next hop). It doesn’t matter to which network the packet belongs, it is forwarded out to the router which is configured for default routing. It is generally used with stub routers. A stub router is a router that has only one route to reach all other networks. Configuration: Using the same topology which we have used for static routing before. In this topology, R1 and R2 are stub routers so we can configure default routing for both these routers. Configuring default routing for R1: R1(config)#ip route 0.0.0.0 0.0.0.0 172.16.10.5 Now configuring default routing for R2: R2(config)#ip route 0.0.0.0 0.0.0.0 172.16.10.1 Dynamic Routing Dynamic routing makes automatic adjustments of the routes according to the current state of the route in the routing table. Dynamic routing uses protocols to discover network destinations and the routes to reach them. RIP and OSPF are the best examples of dynamic routing protocols. Automatic adjustments will be made to reach the network destination if one route goes down. A dynamic protocol has the following features: The routers should have the same dynamic protocol running in order to exchange routes. When a router finds a change in the topology then the router advertises it to all other routers. Advantages Easy to configure. More effective at selecting the best route to a destination remote network and also for discovering remote networks. Disadvantage Consumes more bandwidth for communicating with other neighbors. Less secure than static routing. Distance Vector Routing Vs Link State Routing ▪ Routing Table (Complete, Partial) ▪ Update (Periodic, Trigger) ▪ Convergence Time (Slow, Fast) ▪ Number of Tables (1,3) ▪ Resources (Less, High) ▪ Algorithm (Bellman Ford, Dijkstra) ▪ Protocols (RIP,IGRP, OSPF, ISIS, EIGRP) Distance RIP is a distance vector routing protocol and the simplest routing protocol to start with. We’ll start by paying attention to the distance vector class. What does the name distance vector mean? Vector Routing Distance: How far away? In the routing world, we use metrics. Vector: Which direction? In the routing world, we care about which interface and the IP address of the next router to send it to. Take a look at R1, and you will see that it has learned about the 192.168.23.0 /24 and 3.3.3.0 /24 networks from R2. You see that it has added these two items: Distance Interface (Fa1/0. This is the vector part, we know in what direction we have to go. Metric (hop count). This is the distance part, we know how far away the network is. Vector Routing 192.168.23.0 /24 is one hop away, and 3.3.3.0 /24 is two hops away. Awesome! You also see that R2 and R3 have filled their routing tables. Every 30 seconds our routers will send a full copy of their routing table to their neighbors who can update their own routing table. R1(config)#router rip R1(config-router)# network 1.1.1.0 Distance R1(config-router)# network 192.168.12.0 R2(config)#router rip Vector Routing R2(config-router)# network 192.168.23.0 R2(config-router)# network 192.168.12.0 R3(config)#router rip R3(config-router)# network 192.168.23.0 R3(config-router)# network 3.3.3.0 router rip timers basic Static VS Dynamic