Lecture Notes 7 - Basic Routing PDF
Document Details
Uploaded by RoomyAlien
Sultan Kudarat State University Isulan Campus
Tags
Summary
These lecture notes cover the fundamentals of routing, including static and dynamic routing methods. It explains the key routing protocols, such as RIP, OSPF, EIGRP, and BGP. The document also provides examples of configuring static routes.
Full Transcript
LECTURE NOTE 7: BASIC ROUTING 1. Introduction to Routing ✓ Routing is the process by which data packets are forwarded from one network to another. Routers are devices that direct this traffic by determining the best path for the data to travel. The primary function of routing is to enab...
LECTURE NOTE 7: BASIC ROUTING 1. Introduction to Routing ✓ Routing is the process by which data packets are forwarded from one network to another. Routers are devices that direct this traffic by determining the best path for the data to travel. The primary function of routing is to enable communication between different networks, ensuring that data is sent from the source to the correct destination. ✓ Router: A networking device that forwards data packets between computer networks. ✓ Routing Table: A data table stored in a router or networked computer that lists the routes to particular network destinations. 2. Static vs. Dynamic Routing Static Routing: ✓ In static routing, routes are manually configured by the network administrator. ✓ The router uses a predefined path for forwarding packets. This route does not change unless manually modified. Advantages: ✓ Simple to implement in small networks. ✓ Provides full control over the path that packets take. Disadvantages: ✓ Manual configuration can be time-consuming, especially in large networks. ✓ Lack of adaptability: If a link fails, static routes do not automatically adjust. Example Command: Router(config)# ip route Dynamic Routing: ✓ In dynamic routing, routers automatically learn and adjust to changes in the network by using routing protocols. ✓ These protocols help routers exchange information and determine the best path based on the network's current state. Advantages: ✓ Automatically adjusts to changes in the network (e.g., if a link fails, the router finds an alternative route). ✓ Scalable, making it suitable for large networks. Disadvantages: ✓ More complex than static routing. ✓ Requires more processing and network resources. 3. Overview of Routing Protocols There are several common dynamic routing protocols used in networking. These protocols enable routers to communicate and exchange routing information to determine the best path for data. RIP (Routing Information Protocol): ✓ Type: Distance-vector protocol. ✓ Metric: Hop count (maximum of 15 hops). ✓ Features: Simple and easy to configure, but less efficient for large networks due to its 15-hop limit. ✓ Version: RIP v1 (classful) and RIP v2 (classless, supports subnet masks). Key Characteristics: ✓ Updates routing tables every 30 seconds. ✓ Not suitable for larger networks due to slow convergence and limited hop count. OSPF (Open Shortest Path First): ✓ Type: Link-state protocol. ✓ Metric: Cost, which is based on bandwidth. ✓ Features: Efficient for larger networks and provides fast convergence. ✓ Operation: Each router has a complete map (topology) of the network and uses the shortest path algorithm to determine the best path. ✓ Scalability: Works well in complex networks, supports variable-length subnet masks (VLSM) and is classless. Key Characteristics: ✓ Hierarchical design using areas to reduce overhead. ✓ Faster convergence compared to distance-vector protocols. EIGRP (Enhanced Interior Gateway Routing Protocol): ✓ Type: Hybrid protocol (combines characteristics of distance-vector and link-state protocols). ✓ Metric: Bandwidth, delay, load, and reliability. ✓ Features: Cisco proprietary, very efficient and fast convergence. ✓ Scalability: Supports large networks and is classless, making it highly scalable. Key Characteristics: ✓ Uses the DUAL algorithm to ensure loop-free and optimal paths. ✓ Supports unequal-cost load balancing, allowing traffic to be spread across multiple links of different capacities. BGP (Border Gateway Protocol): ✓ Type: Path-vector protocol. ✓ Metric: Based on attributes like AS path and next-hop. ✓ Features: Used to route between autonomous systems (AS) on the internet. ✓ Operation: It is used primarily for internet routing and is responsible for exchanging routing information between ISPs and large organizations. Key Characteristics: ✓ BGP is the backbone protocol of the internet. ✓ It’s highly configurable and uses policies to determine the best path, not just simple metrics like other protocols. 4. Configuring Static Routes ✓ Configure static routes between two routers to enable communication between two networks. Scenario: ✓ Router 1 is connected to Network A (192.168.1.0/24). ✓ Router 2 is connected to Network B (192.168.2.0/24). ✓ The two routers are connected to each other via a point-to-point connection with the network 10.0.0.0/30. ✓ We will configure static routes so that hosts in Network A can communicate with hosts in Network B, and vice versa. 1. Topology Setup: Devices: ✓ Two routers: Router 1 and Router 2 ✓ Two PCs: PC A (in Network A) and PC B (in Network B) Connections: ✓ Router 1 is connected to PC A via the FastEthernet 0/0 interface. ✓ Router 2 is connected to PC B via the FastEthernet 0/0 interface. ✓ Router 1 and Router 2 are connected via the Serial 0/0/0 interface. 2. IP Addressing: Device / Interface IP Address Subnet Mask Router 1 (FastEthernet 0/0) 192.168.1.1 255.255.255.0 Router 1 (Serial 0/0/0) 10.0.0.1 255.255.255.252 Router 2 (Serial 0/0/0) 10.0.0.2 255. 255.255.252 Router 2 (FastEthernet 0/0) 192.168.2.1 255.255.255.0 PC A 192.168.1.2 255.255.255.0 PC B 192.168.2.2 255.255.255.0 3. Step-by-Step Configuration: Step 1: Configuring IP Addresses ON ROUTER 1: ✓ Enter privileged EXEC mode: Router1> enable ✓ Enter global configuration mode: Router1# configure terminal ✓ Configure the FastEthernet 0/0 interface (connected to PC A): Router1(config)# interface fastEthernet 0/0 Router1(config-if)# ip address 192.168.1.1 255.255.255.0 Router1(config-if)# no shutdown ✓ Configure the Serial 0/0/0 interface (connected to Router 2): Router1(config)# interface serial 0/0/0 Router1(config-if)# ip address 10.0.0.1 255.255.255.252 Router1(config-if)# clock rate 64000 Router1(config-if)# no shutdown ✓ Exit configuration mode: Router1(config-if)# exit Router1(config)# exit ON ROUTER 2: ✓ Enter privileged EXEC mode: Router2> enable ✓ Enter global configuration mode: Router2# configure terminal ✓ Configure the FastEthernet 0/0 interface (connected to PC B): Router2(config)# interface fastEthernet 0/0 Router2(config-if)# ip address 192.168.2.1 255.255.255.0 Router2(config-if)# no shutdown ✓ Configure the Serial 0/0/0 interface (connected to Router 1): Router2(config)# interface serial 0/0/0 Router2(config-if)# ip address 10.0.0.2 255.255.255.252 Router2(config-if)# no shutdown ✓ Exit configuration mode: Router2(config-if)# exit Router2(config)# exit Step 2: Configuring Static Routes ✓ Configure static routes on each router so that they know how to reach the remote network. ON ROUTER 1: ✓ Enter global configuration mode: Router1# configure terminal ✓ Configure the static route to reach Network B (192.168.2.0/24): ✓ The next hop to reach this network is Router 2’s Serial 0/0/0 IP address (10.0.0.2). Router1(config)# ip route 192.168.2.0 255.255.255.0 10.0.0.2 ✓ Exit configuration mode: Router1(config)# exit ON ROUTER 2: ✓ Enter global configuration mode: ✓ Router2# configure terminal ✓ Configure the static route to reach Network A (192.168.1.0/24): ✓ The next hop to reach this network is Router 1’s Serial 0/0/0 IP address (10.0.0.1). Router2(config)# ip route 192.168.1.0 255.255.255.0 10.0.0.1 ✓ Exit configuration mode: Router2(config)# exit Step 3: Verifying the Configuration ✓ After configuring the static routes, you can use the following commands to verify the routing table and test the network connectivity: ✓ Check the routing table: ✓ On both routers, use the following command to check the static routes: Router# show ip route ✓ You should see the static route entries for the remote networks (192.168.1.0 and 192.168.2.0). ✓ Ping test from PC A to PC B: Summary of Static Route Commands: ON ROUTER 1: Router1> enable Router1# configure terminal Router1(config)# ip route 192.168.2.0 255.255.255.0 10.0.0.2 Router1(config)# exit ON ROUTER 2: Router2> enable Router2# configure terminal Router2(config)# ip route 192.168.1.0 255.255.255.0 10.0.0.1 Router2(config)# exit