CA Ex S2M02 Static Routing

Download as pdf or txt
Download as pdf or txt
You are on page 1of 88

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: www.bkacad.com

Labs

H c vi n m ng Bach Khoa - Website: www.bkacad.com

Routers and Network

H c vi n m ng Bach Khoa - Website: www.bkacad.com

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: www.bkacad.com

Introducing the topology

Topology Lab

H c vi n m ng Bach Khoa - Website: www.bkacad.com

Introducing the topology

Topology Lab

H c vi n m ng Bach Khoa - Website: www.bkacad.com

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: www.bkacad.com

Cable Standards

H c vi n m ng Bach Khoa - Website: www.bkacad.com

Cable Standards

H c vi n m ng Bach Khoa - Website: www.bkacad.com

10

Cable for LAN/WAN interfaces

H c vi n m ng Bach Khoa - Website: www.bkacad.com

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: www.bkacad.com 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: www.bkacad.com 13

Router Configuration Review

H c vi n m ng Bach Khoa - Website: www.bkacad.com

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: www.bkacad.com

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: www.bkacad.com

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: www.bkacad.com

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 172.16.3.2 255.255.255.0 172.16.3.0 overlaps with FastEthernet0/0 R1(config-if)#

H c vi n m ng Bach Khoa - Website: www.bkacad.com

18

Extra: Testing using the OSI Model

H c vi n m ng Bach Khoa - Website: www.bkacad.com

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: www.bkacad.com

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 172.16.2.1 255.255.255.0 R1(config-if)#no shutdown

H c vi n m ng Bach Khoa - Website: www.bkacad.com

21

Examining Router Interfaces



Activity 2.2.5.1 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: www.bkacad.com

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: www.bkacad.com 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: www.bkacad.com 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: www.bkacad.com

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: www.bkacad.com

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: www.bkacad.com

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: www.bkacad.com

28

Devices on Directly Connected Networks

H c vi n m ng Bach Khoa - Website: www.bkacad.com

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 192.168.2.0 via 0.0.0.0, connected metric [0/0] 00:34:38: RT: delete network route to 192.168.2.0 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: www.bkacad.com 30

Extra: Directly Connected Networks and the IP Routing Table


192.168.2.0/24 e0 .1 RTA s0 .1 172.16.0.0/16 s0 .2 RTB s1 .1 192.168.1.0/24 s1 .2 RTC 10.0.0.0/8 e0 .1

RTA#show ip route Codes: C - connected,.. <Other codes and gateway information omitted> C 172.16.0.0/16 is directly connected, Serial0 C 192.168.2.0/24 is directly connected, Ethernet0 RTB#show ip route Codes: C - connected,.. <Other codes and gateway information omitted> C 172.16.0.0/16 is directly connected, Serial0 C 192.168.1.0/24 is directly connected, Serial1 RTC#show ip route Codes: C - connected,.. <Other codes and gateway information omitted> C 10.0.0.0/8 is directly connected, Ethernet0 C 192.168.1.0/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: www.bkacad.com H c vi

31

Extra: Directly Connected Networks and the IP Routing Table


192.168.2.0/24 e0 .1 RTA s0 .1 172.16.0.0/16 s0 .2 RTB s1 .1 192.168.1.0/24 s1 .2 RTC 10.1.0.0/16 e0 .1

RTA#show ip route C 172.16.0.0/16 is directly connected, Serial0 C 192.168.2.0/24 is directly connected, Ethernet0 RTA#ping 172.16.0.1 !!!!! RTA#ping 172.16.0.2 !!!!! RTA#ping 192.168.1.1 ..... RTA#ping 192.168.1.2 ..... RTA#ping 10.1.0.1 .....

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

Extra: Extended Ping Command


192.168.2.0/24 e0 .1 RTA s0 .1 172.16.0.0/16 s0 .2 RTB s1 .1 192.168.1.0/24 s1 .2 RTC 10.1.0.0/16 e0 .1

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

H c vi n m ng Bach Khoa - Website: www.bkacad.com

33

Extra: Lists the possible output characters from the Ping facility

H c vi n m ng Bach Khoa - Website: www.bkacad.com

34

Extra: IP Traceroute Text Characters

H c vi n m ng Bach Khoa - Website: www.bkacad.com

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: www.bkacad.com 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: www.bkacad.com

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: www.bkacad.com

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: www.bkacad.com

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: www.bkacad.com

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: www.bkacad.com 41

Platform Port ID

Using CDP for Network Discovery

H c vi n m ng Bach Khoa - Website: www.bkacad.com

42

CDP Commands

H c vi n m ng Bach Khoa - Website: www.bkacad.com

43

CDP Commands

H c vi n m ng Bach Khoa - Website: www.bkacad.com

44

CDP Commands

H c vi n m ng Bach Khoa - Website: www.bkacad.com

45

CDP Commands

H c vi n m ng Bach Khoa - Website: www.bkacad.com

46

Static Routes with Next Hop Addresses

H c vi n m ng Bach Khoa - Website: www.bkacad.com

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: www.bkacad.com

48

Purpose and Command Syntax of ip route

H c vi n m ng Bach Khoa - Website: www.bkacad.com

49

Configuring Static Routes

Installing a Static Route in the Routing Table

H c vi n m ng Bach Khoa - Website: www.bkacad.com

50

Verifying Static Route Commands


Configuring Routes to Two More Remote Networks

H c vi n m ng Bach Khoa - Website: www.bkacad.com

51

Routing Table Principles and Static Routes

H c vi n m ng Bach Khoa - Website: www.bkacad.com

52

Routing Table Principles and Static Routes

Applying the Principles

H c vi n m ng Bach Khoa - Website: www.bkacad.com

53

Resolving to an Exit Interface

H c vi n m ng Bach Khoa - Website: www.bkacad.com

54

Resolving to an Exit Interface

Exit Interface is down

H c vi n m ng Bach Khoa - Website: www.bkacad.com

55

Extra: Static Routing Recursive Lookups


192.168.2.0/24 e0 .1 RTA s0 .1 172.16.0.0/16 s0 .2 RTB s1 .1 192.168.1.0/24 s1 .2 RTC 10.1.0.0/16 e0 .1

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

2 1

H c vi n m ng Bach Khoa - Website: www.bkacad.com

56

Extra: Static Routing Recursive Lookups


192.168.2.0/24 e0 .1 RTA s0 .1 172.16.0.0/16 s0 .2 RTB s1 .1 192.168.1.0/24 s1 .2 RTC 10.1.0.0/16 e0 .1

RTA(config)#ip route 10.1.0.0 255.255.0.0 192.168.1.2 RTA#show ip route Codes: C - connected, S - static, C 172.16.0.0/16 is directly connected, Serial0 S 192.168.1.0/24 [1/0] via 172.16.0.2 S 10.1.0.0/16 [1/0] via 192.168.1.2 C 192.168.2.0/24 is directly connected, Ethernet0

3 2 1

H c vi n m ng Bach Khoa - Website: www.bkacad.com

57

Extra: Static Routing Endless Recursion

Route1: ip route 10.1.0.0 255.255.0.0 20.1.1.1 Route2: ip route 20.1.0.0 255.255.0.0 30.1.1.1 Route3: ip route 30.1.0.0 255.255.0.0 10.1.1.1

H c vi n m ng Bach Khoa - Website: www.bkacad.com

58

Static Routes with Exit Interface

H c vi n m ng Bach Khoa - Website: www.bkacad.com

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: www.bkacad.com

60

Configuring a Static Route with an Exit Interface

Static Route and an Exit Interface

H c vi n m ng Bach Khoa - Website: www.bkacad.com

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: www.bkacad.com

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: www.bkacad.com

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: www.bkacad.com

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: www.bkacad.com

65

Extra: Static Routing Ethernet interfaces


192.168.2.0/24 e0 .1 RTA 172.16.0.0/16 192.168.1.0/24 RTB s1 .1 s1 .2 RTC 10.1.0.0/16 e0 .1

e1 s0
.1

e0 s0
.2

RTA(config)#ip route 192.168.1.0 255.255.255.0 eth1 172.16.0.2 RTA#show ip route Codes: C - connected, S - static, C 172.16.0.0/16 is directly connected, Ethernet1 S 192.168.1.0/24 [1/0] via 172.16.0.2 Ethernet1 C 192.168.2.0/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: www.bkacad.com 66

H c vi n m ng Bach Khoa - Website: www.bkacad.com

67

Summary and Default Static Routes

H c vi n m ng Bach Khoa - Website: www.bkacad.com

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: www.bkacad.com

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: www.bkacad.com

70

Extra: Summarizing static routes

Host 1

172.16.1.0/24
Hub .1 E0

172.16.0.0/22
172.16.2.0/24

SanJose1 .2 S0 S1 .2

192.168.1.0/24

.1 S0 SanJose2 E0 .1 S0

.1 Baypointe .1 E0

172.16.3.0/24
Hub

192.168.2.0/24
Hub

Host 2

Host 3

Baypointe(config)# ip route 172.16.1.0 255.255.255.0 192.168.1.2 Baypointe(config)# ip route 172.16.2.0 255.255.255.0 192.168.1.2 Baypointe(config)# ip route 172.16.3.0 255.255.255.0 192.168.1.2 Summarized route: Baypointe(config)#ip route 172.16.0.0 255.255.252.0 192.168.1.2
H c vi n m ng Bach Khoa - Website: www.bkacad.com 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: www.bkacad.com

72

Default Static Route

Verifying a Default Static Route

H c vi n m ng Bach Khoa - Website: www.bkacad.com

73

Extra: Common uses for Static Routes


Default
ISP
ip route 172.16.0.0 255.255.0.0 10.1.1.2 10.1.1.2/24 10.1.1.1/24

ip route 0.0.0.0 0.0.0.0 10.1.1.1


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

172.16.0.0/16

H c vi n m ng Bach Khoa - Website: www.bkacad.com

74

Managing and Troubleshooting Static Route

H c vi n m ng Bach Khoa - Website: www.bkacad.com

75

Static Routes and Packet Forwarding

Static Routes and Packet Forwarding

H c vi n m ng Bach Khoa - Website: www.bkacad.com

76

Static Routes and Packet Forwarding

H c vi n m ng Bach Khoa - Website: www.bkacad.com

77

Static Routes and Packet Forwarding

H c vi n m ng Bach Khoa - Website: www.bkacad.com

78

Static Routes and Packet Forwarding

H c vi n m ng Bach Khoa - Website: www.bkacad.com

79

Static Routes and Packet Forwarding

H c vi n m ng Bach Khoa - Website: www.bkacad.com

80

Static Routes and Packet Forwarding

H c vi n m ng Bach Khoa - Website: www.bkacad.com

81

Static Routes and Packet Forwarding

H c vi n m ng Bach Khoa - Website: www.bkacad.com

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: www.bkacad.com

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 172.16.3.0 255.255.255.0 serial0/0/1 R2(config)#ip route 172.16.3.0 255.255.255.0 serial 0/0/0
H c vi n m ng Bach Khoa - Website: www.bkacad.com 84

Basic Static Route Configuration Lab

H c vi n m ng Bach Khoa - Website: www.bkacad.com

85

Challenge Static Route Configuration Lab

H c vi n m ng Bach Khoa - Website: www.bkacad.com

86

Summary

H c vi n m ng Bach Khoa - Website: www.bkacad.com

87

H c vi n m ng Bach Khoa - Website: www.bkacad.com

88

You might also like