0% found this document useful (0 votes)
13 views88 pages

Understanding Static Routing Basics

This document provides an overview of static routing concepts and configuration. It defines the role of routers in networks and examines directly connected networks in the routing table. It describes how to configure static routes, default routes, and examine packet forwarding using static routes. The document also covers managing and troubleshooting static routes.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views88 pages

Understanding Static Routing Basics

This document provides an overview of static routing concepts and configuration. It defines the role of routers in networks and examines directly connected networks in the routing table. It describes how to configure static routes, default routes, and examine packet forwarding using static routes. The document also covers managing and troubleshooting static routes.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Chapter 2 - Static Routing

CCNA Exploration 4.0

Please purchase a personal license.

Objectives

Define the general role a router plays in networks. Describe the directly connected networks, different router interfaces Examine directly connected networks in the routing table and use the CDP protocol Describe static routes with exit interfaces Describe summary and default route Examine how packets get forwarded when using static routes Identify how to manage and troubleshoot static routes

H c vi n m ng Bach Khoa - Website: [Link]

Labs

H c vi n m ng Bach Khoa - Website: [Link]

Routers and Network

H c vi n m ng Bach Khoa - Website: [Link]

Role of the Router



The router is a special-purpose computer that plays a key role in the operation of any data network. Routers are primarily responsible for interconnecting networks by: 1. Determining the best path to send packets 2. Forwarding packets toward their destination

H c vi n m ng Bach Khoa - Website: [Link]

Introducing the topology

Topology Lab

H c vi n m ng Bach Khoa - Website: [Link]

Introducing the topology

Topology Lab

H c vi n m ng Bach Khoa - Website: [Link]

Reference: Cisco router 1841s Component

Product CISCO1841 CAB-ACE S184IPB-12406T WIC-2T CAB-SS-V35FC CAB-SS-V35MT MEM1800-32CF ROUTER-SDM-CD CON-OSPCISCO1841

Description Modular Router w/2xFE, 2 WAN slots, 32 FL/128 DR Power Cord Europe Cisco 1841 IOS IP BASE W/O CRYPTO 2-Port Serial WAN Interface Card V.35 Cable, DCE Female to Smart Serial, 10 Feet V.35 Cable, DTE Male to Smart Serial, 10 Feet 32MB Cisco 1800 Compact Flash CD for SDM software ONSITE 24X7X4 Modular Router w/2xF

Quantity 1 1 1 1 2 2 1 1 1

H c vi n m ng Bach Khoa - Website: [Link]

Cable Standards

H c vi n m ng Bach Khoa - Website: [Link]

Cable Standards

H c vi n m ng Bach Khoa - Website: [Link]

10

Cable for LAN/WAN interfaces

H c vi n m ng Bach Khoa - Website: [Link]

11

Examining the Connections of the Router

Serial Connectors
DB-60 port and Smart port: five-in-one serial port: EIA/TIA-232, EIA/TIA-449, V.35, X.21, and EIA/TIA-530 standards
H c vi n m ng Bach Khoa - Website: [Link] 12

Examining the Connections of the Router

Ethernet Connectors 2 types of connectors can be used: Straight through and Cross-over Straight through used to connect: Switch-to-Router, Switch-to-PC, Router-to-Server, Hub-to-PC, Hub-to-Server Cross-over used to connect: Switch-to-Switch, PC-to-PC, Switch-to-Hub, Hub-to-Hub, Router-to-Router
H c vi n m ng Bach Khoa - Website: [Link] 13

Router Configuration Review

H c vi n m ng Bach Khoa - Website: [Link]

14

Examining Router Interfaces


Examining Router Interfaces
show ip route command used to view routing table show interfaces command used to show status of an interface show ip interface brief command used to show a portion of the interface information show running-config command used to show configuration file in RAM

H c vi n m ng Bach Khoa - Website: [Link]

15

Configuring an Ethernet Interface


Configuring an Ethernet interface
By default all serial and Ethernet interfaces are down To enable an interface use the no shutdown command

H c vi n m ng Bach Khoa - Website: [Link]

16

Configuring an Ethernet Interface


Verifying Ethernet interface
Show interfaces for fastEthernet 0/0 command used to show status of fast Ethernet port show ip interface brief show running-config Ethernet interfaces participate in ARP

H c vi n m ng Bach Khoa - Website: [Link]

17

Configuring an Ethernet Interface

The IOS will return the following error message if you attempt to configure the second interface with the same IP subnet as the first interface: R1(config-if)#int fa0/1 R1(config-if)#ip address [Link] [Link] [Link] overlaps with FastEthernet0/0 R1(config-if)#

H c vi n m ng Bach Khoa - Website: [Link]

18

Extra: Testing using the OSI Model

H c vi n m ng Bach Khoa - Website: [Link]

19

Logging Synchronous Command

In order to keep the unsolicited output separate from your input, enter line configuration mode for the consoled port and add the logging synchronous command.

H c vi n m ng Bach Khoa - Website: [Link]

20

Configuring a Serial Interfaces


Configuring a Serial interface
Enter interface configuration mode Enter in the ip address and subnet mask Enter in the no shut down command Example: R1(config)#interface serial 0/0 R1(config-if)#ip address [Link] [Link] R1(config-if)#no shutdown

H c vi n m ng Bach Khoa - Website: [Link]

21

Examining Router Interfaces



Activity [Link] Examining Router Interfaces Physically connecting a WAN Interface. A WAN Physical Layer connection has sides: Data Circuit-terminating Equipment (DCE) This is the service provider. CSU/DSU is a DCE device. Data Terminal Equipment (DTE) Typically the router is the DTE device.

H c vi n m ng Bach Khoa - Website: [Link]

22

Examining Router Interfaces

Configuring serial links in a lab environment


One side of a serial connection must be considered a DCE This requires placing a clocking signal use the clock rate command. Example: R1(config)#interface serial 0/0 R1(config-if)#clockrate 64000 Serial Interfaces require a clock signal to control the timing of the communications.

Note: WIC-2a/s support maximum clock rate is 128000 bps


H c vi n m ng Bach Khoa - Website: [Link] 23

Extra: Clock Rate

RouterB(config)#inter serial 1 RouterB(config-if)#clock rate ? Speed (bits per second) 1200 2400 4800 9600 <text omitted> 2000000 4000000 <300-4000000> Choose clockrate from list above

RouterB(config-if)#clock rate 64000 RouterB(config-if)#


H c vi n m ng Bach Khoa - Website: [Link] 24

Examining Router Interfaces

Verifying the Serial Interface Configuration


show interfaces show ip interface brief show running-config ping show ip route

H c vi n m ng Bach Khoa - Website: [Link]

25

Verifying Changes to the Routing Table

The routing table consists of a list of "known" network addresses - that is, those addresses that are directly connected, configured statically, and learned dynamically.

H c vi n m ng Bach Khoa - Website: [Link]

26

Verifying Changes to the Routing Table

Observing Routes as They are Added to the Routing Table debug ip routing command will let us see any changes that the router performs when adding or removing routes.

H c vi n m ng Bach Khoa - Website: [Link]

27

Devices on Directly Connected Networks

When a router only has its interfaces configured, and the routing table contains the directly connected networks but no other routes, only devices on those directly connected networks are reachable.

H c vi n m ng Bach Khoa - Website: [Link]

28

Devices on Directly Connected Networks

H c vi n m ng Bach Khoa - Website: [Link]

29

Extra: Directly Connected Networks and the IP Routing Table

RTA# debug ip routing RTA(config)#inter e 0 RTA(config-if)#shutdown 00:34:38: RT: interface Ethernet0 removed from routing table 00:34:38: RT: del [Link] via [Link], connected metric [0/0] 00:34:38: RT: delete network route to [Link] RTA#show ip route Codes: C - connected,.. <Other codes and gateway information omitted>

RTA# undebug all

Viewing the Routing Table Process Directly connected routes will also be removed if the link goes down. Directly connected routes will only be in the routing table if, it is not administratively down, the line is up and protocol is up For serial interfaces, dont forget the clock rate command on the router with the DCE cable neither interface will be up and up until both ends are configured correctly.
H c vi n m ng Bach Khoa - Website: [Link] 30

Extra: Directly Connected Networks and the IP Routing Table


[Link]/24 e0 .1 RTA s0 .1 [Link]/16 s0 .2 RTB s1 .1 [Link]/24 s1 .2 RTC [Link]/8 e0 .1

RTA#show ip route Codes: C - connected,.. <Other codes and gateway information omitted> C [Link]/16 is directly connected, Serial0 C [Link]/24 is directly connected, Ethernet0 RTB#show ip route Codes: C - connected,.. <Other codes and gateway information omitted> C [Link]/16 is directly connected, Serial0 C [Link]/24 is directly connected, Serial1 RTC#show ip route Codes: C - connected,.. <Other codes and gateway information omitted> C [Link]/8 is directly connected, Ethernet0 C [Link]/24 is directly connected, Serial1

The Routing Tables Notice that the routers only know about their own directly connected networks. They are not sharing routing information because we have not configured any static routes or dynamic routing protocols. n m ng Bach Khoa - Website: [Link] H c vi

31

Extra: Directly Connected Networks and the IP Routing Table


[Link]/24 e0 .1 RTA s0 .1 [Link]/16 s0 .2 RTB s1 .1 [Link]/24 s1 .2 RTC [Link]/16 e0 .1

RTA#show ip route C [Link]/16 is directly connected, Serial0 C [Link]/24 is directly connected, Ethernet0 RTA#ping [Link] !!!!! RTA#ping [Link] !!!!! RTA#ping [Link] ..... RTA#ping [Link] ..... RTA#ping [Link] .....

Routers can only reach networks known about in its own routing table.
H c vi n m ng Bach Khoa - Website: [Link] 32

Extra: Extended Ping Command


[Link]/24 e0 .1 RTA s0 .1 [Link]/16 s0 .2 RTB s1 .1 [Link]/24 s1 .2 RTC [Link]/16 e0 .1

RTA#show ip route C [Link]/16 is directly connected, Serial0 C [Link]/24 is directly connected, Ethernet0 RTB#show ip route Codes: C - connected,.. <Other codes and gateway information omitted> C [Link]/16 is directly connected, Serial0 C [Link]/24 is directly connected, Serial1 RTA#ping Protocol [ip]: Target IP address: [Link] Extended commands [n]: y Source address or interface: [Link] Sending 5, 100-byte ICMP Echos to [Link], timeout is 2 seconds: ..... RTA#ping [Link] source [Link]

H c vi n m ng Bach Khoa - Website: [Link]

33

Extra: Lists the possible output characters from the Ping facility

H c vi n m ng Bach Khoa - Website: [Link]

34

Extra: IP Traceroute Text Characters

H c vi n m ng Bach Khoa - Website: [Link]

35

Cisco Discovery Protocol (CDP)


Network discovery with CDP CDP is an information-gathering tool used by network administrators to get information about directly connected Cisco devices. CDP is a proprietary tool that enables you to access a summary of protocol and address information about Cisco devices that are directly connected. These advertisements contain information such as the types of devices that are connected, the router interfaces they are connected to, the interfaces used to make the connections, and the model numbers of the devices. Concept of neighbors 2 types of neighbors Layer 3 neighbors Layer 2 neighbors
H c vi n m ng Bach Khoa - Website: [Link] 36

Cisco Discovery Protocol (CDP)


CDP Operation CDP runs at the Data Link layer connecting the physical media to the

upper-layer protocols (ULPs). Cisco network devices, such as routers that support different Network layer protocols (for example, IP and Novell IPX), can learn about each other CDP provides the following information about each CDP neighbor device: Device identifiers Address list Port identifier Capabilities list Platform

H c vi n m ng Bach Khoa - Website: [Link]

37

Default Setting

Feature CDP global state CDP interface state CDP holdtime (packet holdtime in seconds) CDP timer (packets sent every x seconds)

Default Setting Enabled Enabled 180 60

H c vi n m ng Bach Khoa - Website: [Link]

38

Using CDP for Network Discovery

The information gathered by the CDP protocol can be examined with the show cdp neighbors command.

H c vi n m ng Bach Khoa - Website: [Link]

39

Using CDP for Network Discovery


Field Device ID Definition The name of the neighbor device and either the MAC address or the serial number of this device. The protocol being used by the connectivity media. The remaining amount of time (in seconds) the current device will hold the CDP advertisement from a sending router before discarding it.

Local Intrfce Holdtme

H c vi n m ng Bach Khoa - Website: [Link]

40

Using CDP for Network Discovery


Capability (Capability Codes) Capability (type of routing device) of the listed neighboring device. The capability types that can be discovered are: RRouter TTransparent bridge BSource-routing bridge SSwitch HHost I device is using IGMP rRepeater The product number of the device. The protocol and port number of the device.
H c vi n m ng Bach Khoa - Website: [Link] 41

Platform Port ID

Using CDP for Network Discovery

H c vi n m ng Bach Khoa - Website: [Link]

42

CDP Commands

H c vi n m ng Bach Khoa - Website: [Link]

43

CDP Commands

H c vi n m ng Bach Khoa - Website: [Link]

44

CDP Commands

H c vi n m ng Bach Khoa - Website: [Link]

45

CDP Commands

H c vi n m ng Bach Khoa - Website: [Link]

46

Static Routes with Next Hop Addresses

H c vi n m ng Bach Khoa - Website: [Link]

47

Purpose and Command Syntax of ip route

Static routes are commonly used when routing from a network to a stub network. A stub network is a network accessed by a single route.

H c vi n m ng Bach Khoa - Website: [Link]

48

Purpose and Command Syntax of ip route

H c vi n m ng Bach Khoa - Website: [Link]

49

Configuring Static Routes

Installing a Static Route in the Routing Table

H c vi n m ng Bach Khoa - Website: [Link]

50

Verifying Static Route Commands


Configuring Routes to Two More Remote Networks

H c vi n m ng Bach Khoa - Website: [Link]

51

Routing Table Principles and Static Routes

H c vi n m ng Bach Khoa - Website: [Link]

52

Routing Table Principles and Static Routes

Applying the Principles

H c vi n m ng Bach Khoa - Website: [Link]

53

Resolving to an Exit Interface

H c vi n m ng Bach Khoa - Website: [Link]

54

Resolving to an Exit Interface

Exit Interface is down

H c vi n m ng Bach Khoa - Website: [Link]

55

Extra: Static Routing Recursive Lookups


[Link]/24 e0 .1 RTA s0 .1 [Link]/16 s0 .2 RTB s1 .1 [Link]/24 s1 .2 RTC [Link]/16 e0 .1

RTA(config)#ip route [Link] [Link] [Link] RTA#show ip route Codes: C - connected, S - static, C [Link]/16 is directly connected, Serial0 S [Link]/24 [1/0] via [Link] C [Link]/24 is directly connected, Ethernet0

2 1

H c vi n m ng Bach Khoa - Website: [Link]

56

Extra: Static Routing Recursive Lookups


[Link]/24 e0 .1 RTA s0 .1 [Link]/16 s0 .2 RTB s1 .1 [Link]/24 s1 .2 RTC [Link]/16 e0 .1

RTA(config)#ip route [Link] [Link] [Link] RTA#show ip route Codes: C - connected, S - static, C [Link]/16 is directly connected, Serial0 S [Link]/24 [1/0] via [Link] S [Link]/16 [1/0] via [Link] C [Link]/24 is directly connected, Ethernet0

3 2 1

H c vi n m ng Bach Khoa - Website: [Link]

57

Extra: Static Routing Endless Recursion

Route1: ip route [Link] [Link] [Link] Route2: ip route [Link] [Link] [Link] Route3: ip route [Link] [Link] [Link]

H c vi n m ng Bach Khoa - Website: [Link]

58

Static Routes with Exit Interface

H c vi n m ng Bach Khoa - Website: [Link]

59

Configuring a Static Route with an Exit Interface

Static routes can be configured with an exit interface, which allows the routing table to resolve the exit interface in a single search instead of two searches.

H c vi n m ng Bach Khoa - Website: [Link]

60

Configuring a Static Route with an Exit Interface

Static Route and an Exit Interface

H c vi n m ng Bach Khoa - Website: [Link]

61

Modifying Static Routes


There are times when a previously configured static route needs to be
modified: The destination network no longer exists, and therefore the static route should be deleted. There is a change in the topology, and either the intermediate address or the exit interface has to be changed.

H c vi n m ng Bach Khoa - Website: [Link]

62

Verifying the Static Route Configuration


Use the following commands
Step 1: show running-config Step 2 verify static route has been entered correctly Step 3: show ip route Step 4 verify route was configured in routing table Step 5 issue ping command to verify packets can reach destination and that Return path is working

H c vi n m ng Bach Khoa - Website: [Link]

63

Static Routes with Ethernet Interfaces


Ethernet interfaces and ARP.
If a static route is configured on an Ethernet link, if the packet is sent to the next-hop router then the destination MAC address will be the address of the next hops Ethernet interface This is found by the router consulting the ARP table If an entry isnt found then an ARP request will be sent out

H c vi n m ng Bach Khoa - Website: [Link]

64

Static Routes with Ethernet Interfaces


Static routes and Ethernet exit interfaces With Ethernet networks, may be many different devices sharing the same multi-access network so the router does not know the next-hop IP address and it cannot determine the destination MAC address for the Ethernet frame.

H c vi n m ng Bach Khoa - Website: [Link]

65

Extra: Static Routing Ethernet interfaces


[Link]/24 e0 .1 RTA [Link]/16 [Link]/24 RTB s1 .1 s1 .2 RTC [Link]/16 e0 .1

e1 s0
.1

e0 s0
.2

RTA(config)#ip route [Link] [Link] eth1 [Link] RTA#show ip route Codes: C - connected, S - static, C [Link]/16 is directly connected, Ethernet1 S [Link]/24 [1/0] via [Link] Ethernet1 C [Link]/24 is directly connected, Ethernet0

Static routes via point-to-point links


It is best to configure static routes with only the exit interface.

Static routes via broadcast networks such as Ethernet


It is best to configure static routes with both the next-hop address and the exit-interface.
H c vi n m ng Bach Khoa - Website: [Link] 66

H c vi n m ng Bach Khoa - Website: [Link]

67

Summary and Default Static Routes

H c vi n m ng Bach Khoa - Website: [Link]

68

Summary Static Routes


Summarizing Routes to Reduce the Size of the Routing Table Route Summarization: Multiple static routes can be summarized into a
single static route if: The destination networks can be summarized into a single network address, and The multiple static routes all use the same exit-interface or nexthop IP address

H c vi n m ng Bach Khoa - Website: [Link]

69

Summary Static Routes

Configuring a Summary Route:


Step 1: Delete the current static route Step 2: Configure the summary static route Step 3: Verify the new static route

H c vi n m ng Bach Khoa - Website: [Link]

70

Extra: Summarizing static routes

Host 1

[Link]/24
Hub .1 E0

[Link]/22
[Link]/24

SanJose1 .2 S0 S1 .2

[Link]/24

.1 S0 SanJose2 E0 .1 S0

.1 Baypointe .1 E0

[Link]/24
Hub

[Link]/24
Hub

Host 2

Host 3

Baypointe(config)# ip route [Link] [Link] [Link] Baypointe(config)# ip route [Link] [Link] [Link] Baypointe(config)# ip route [Link] [Link] [Link] Summarized route: Baypointe(config)#ip route [Link] [Link] [Link]
H c vi n m ng Bach Khoa - Website: [Link] 71

Default Static Route


A default static route is a route that will match all packets. Default static
routes are used: When no other routes in the routing table match the packet's destination IP address. In other words, when a more specific match does not exist. A common use is when connecting a company's edge router to the ISP network. When a router has only one other router to which it is connected. This condition is known as a stub router.

H c vi n m ng Bach Khoa - Website: [Link]

72

Default Static Route

Verifying a Default Static Route

H c vi n m ng Bach Khoa - Website: [Link]

73

Extra: Common uses for Static Routes


Default
ISP
ip route [Link] [Link] [Link] [Link]/24 [Link]/24

ip route [Link] [Link] [Link]


RTB#show ip route Gateway of last resort is [Link] to network [Link] C [Link]/16 is directly connected, Ethernet0 [Link]/24 is subnetted, 1 subnets C [Link] is directly connected, Serial1 S* [Link]/0 [1/0] via [Link]

[Link]/16

H c vi n m ng Bach Khoa - Website: [Link]

74

Managing and Troubleshooting Static Route

H c vi n m ng Bach Khoa - Website: [Link]

75

Static Routes and Packet Forwarding

Static Routes and Packet Forwarding

H c vi n m ng Bach Khoa - Website: [Link]

76

Static Routes and Packet Forwarding

H c vi n m ng Bach Khoa - Website: [Link]

77

Static Routes and Packet Forwarding

H c vi n m ng Bach Khoa - Website: [Link]

78

Static Routes and Packet Forwarding

H c vi n m ng Bach Khoa - Website: [Link]

79

Static Routes and Packet Forwarding

H c vi n m ng Bach Khoa - Website: [Link]

80

Static Routes and Packet Forwarding

H c vi n m ng Bach Khoa - Website: [Link]

81

Static Routes and Packet Forwarding

H c vi n m ng Bach Khoa - Website: [Link]

82

Troubleshooting a Missing Route

Tools that can be used to isolate routing problems include: ping tests end to end connectivity traceroute used to discover all of the hops (routers) along the path between 2 points show IP route used to display routing table & ascertain forwarding process show ip interface brief - used to show status of router interfaces show cdp neighbors detail used to gather configuration information about directly connected neighbors

H c vi n m ng Bach Khoa - Website: [Link]

83

Solving the Missing Route


Finding a missing or miss-configured route requires methodically using
the correct tools Start with ping. If ping fails then use traceroute to determine where packets are failing to arrive Issue: show ip route to examine routing table. If there is a problem with a miss-configured static route remove the static route then reconfigure the new static route

Solving: R2(config)#no ip route [Link] [Link] serial0/0/1 R2(config)#ip route [Link] [Link] serial 0/0/0
H c vi n m ng Bach Khoa - Website: [Link] 84

Basic Static Route Configuration Lab

H c vi n m ng Bach Khoa - Website: [Link]

85

Challenge Static Route Configuration Lab

H c vi n m ng Bach Khoa - Website: [Link]

86

Summary

H c vi n m ng Bach Khoa - Website: [Link]

87

H c vi n m ng Bach Khoa - Website: [Link]

88

You might also like