Networking Test Friday Online
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
ITE PC v4.0
Chapter 1 1
Static Routing
Routing Protocols and Concepts – Chapter 2
ITE PC v4.0
Chapter 1 2 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Topics
Role of the router in networks
Directly connected networks and interfaces
CDP protocol
Static routes with exit interfaces
Summary and default routes
Forwarding with static routes
Managing and troubleshooting static routes
ITE PC v4.0
Chapter 1 3 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
WAN Serial connections
Smart serial
connector to router
V35 DTE connection to
ISP CSD/DSU device
Larger DB-60
for older routers
Four other standards possible –
choose the right cable.
ITE PC v4.0
Chapter 1 4 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
A WAN Physical Layer connection has sides:
Data Circuit-terminating Equipment (DCE) – This is the service provider. CSU/DSU is a DCE device.
The CSU/DSU (DCE device) is used to convert the data from the router (DTE device) into a form acceptable to the WAN service provider.
a DCE device such as a CSU/DSU will provide the clock.
Data Terminal Equipment (DTE) – Typically the router is the DTE device.
Up-to-date technology
Cisco 1-Port T1/Fractional T1 DSU/CSU
WAN Interface Card (WIC-1DSU-T1-V2=)
WAN Serial connections
ITE PC v4.0
Chapter 1 5 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
LAN Ethernet connections
Connections of a Router for WAN
-A router has a DB-60 port that can support 5 different cabling standards
–Newer routers support the smart serial interface that allows for more data to be forwarded across fewer cable pins.
Connections of a Router for Ethernet
-2 types of connectors can be used: Straight through and Cross-over
Straight through used to connect:
-Switch-to-Router, Switch-to-PC, Hub- to-PC, Hub-to-Server
Cross-over used to connect (pin 1 connected to pin 3, and pin 2 connected to pin 6):
-Switch-to-Switch, PC-to-PC, Switch-to- Hub, Hub-to-Hub, Router-to-Router, PC-Router
ITE PC v4.0
Chapter 1 6 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Default Condition
By default, interfaces have no IP addresses and are administratively shut down.
They need to be configured.
ITE PC v4.0
Chapter 1 7 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Configure interface
R1(config)#interface fastethernet 0/0
R1(config-if)#ip address 172.16.3.1 255.255.255.0
R1(config-if)#no shutdown
*Mar 1 01:16:08.212: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 01:16:09.214: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
ITE PC v4.0
Chapter 1 8 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Check interfaces
R1#show interfaces fastethernet 0/0
FastEthernet0/0 is up, line protocol is up
Hardware is AmdFE, address is 000c.3010.9260
Internet address is 172.16.3.1/24 etc.
Note MAC address of Ethernet interface
Interface takes part in ARP with its network and keeps an ARP table
ITE PC v4.0
Chapter 1 9 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Check interfaces
R1#show run
interface FastEthernet0/0
ip address 172.16.3.1 255.255.255.0
(Does not say no shutdown)
ITE PC v4.0
Chapter 1 10 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Interface not up?
If the interface does not come up – check the cable, check link lights, check the configuration at the other end.
If the protocol does not come up – for Ethernet check that you have the right cable (straight-through or crossover) – for serial check that the clock rate is on the right end of the cable, check that the same Layer 2 protocol is used.
ITE PC v4.0
Chapter 1 11 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Directly connected
Configure IP address on interface
It appears in routing table
Note subnetting information
ITE PC v4.0
Chapter 1 12 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Serial interface
R2(config)#interface serial 0/0
R2(config-if)#ip address 172.16.2.2 255.255.255.0
R2(config-if)#no shutdown
This is DTE end
DCE end needs an additional command
R3(config-if)#clock rate 64000
ITE PC v4.0
Chapter 1 13 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Usual show commands
Check that interface and protocol are up
show interfaces
show ip interface brief
show running-config
Check that network is in routing table
show ip route
ITE PC v4.0
Chapter 1 14 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Show controllers
R1#show controllers serial 0/0
Interface Serial0/0
Hardware is PowerQUICC MPC860
DCE V.35, no clock etc.
Shows if a cable is connected
Shows the type of cable
Shows if clock rate set
ITE PC v4.0
Chapter 1 15 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
debug ip routing
R2#debug ip routing
If you give this command before configuring the interfaces then you see a report of the networks being added to the routing table.
R2#no debug ip routing or R2#no debug all
Switch off debugging as soon as possible after use – it takes up resources.
ITE PC v4.0
Chapter 1 16 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Cisco Discovery Protocol
Works at layer 2
Directly connected devices only
Cisco devices only
Devices send CDP advertisements to neighbors at regular intervals
Use it to find out about networking devices
ITE PC v4.0
Chapter 1 17 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Show cdp neighbors
Does not show IP address
You need show cdp neighbors detail for that.
ITE PC v4.0
Chapter 1 18 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Going further
CDP only shows immediate neighbors, but it does tell you their IP addresses.
Telnet to the neighbor and then use CDP to find out about its neighbors and so on.
ITE PC v4.0
Chapter 1 19 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Disable CDP
Disable CDP for the entire device:
Router(config)#no cdp run
Stop CDP advertisements on one interface:
Router(config-if)#no cdp enable
Do this for security.
ITE PC v4.0
Chapter 1 20 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Static routes
Use for stub networks: only one entry.
Stub network
networks
Static route
Default route
ITE PC v4.0
Chapter 1 21 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Configure a static route
R1(config)#ip route 172.16.1.0 255.255.255.0 172.16.2.2
Give the next hop address
R1(config)#ip route 172.16.1.0 255.255.255.0 Serial 0/0
Or give the exit interface
ITE PC v4.0
Chapter 1 22 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Show ip route
Routing table now includes:
S 172.16.1.0 /24 [1/0] via 172.16.2.2
Or S 172.16.1.0 /24 is directly connected, serial 0/0
Administrative distance 1
Metric 0
ITE PC v4.0
Chapter 1 23 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Return route
If you use static routing, you need to configure static routes in both directions.
A route in one direction does not ensure that there is a route in the other direction.
ITE PC v4.0
Chapter 1 24 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Find a route to 172.16.1.0/24
Recursive lookup
There it is, via
172.16.2.2
How do you get to
172.16.2.2?
There it is via serial 0/0.
ITE PC v4.0
Chapter 1 25 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Static route giving interface
R1(config)#ip route 192.168.2.0 255.255.255.0 serial 0/0
ITE PC v4.0
Chapter 1 26 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Interface down
If the interface used by a static route goes down, then the static route is removed from the routing table.
The static route remains in the configuration.
If the interface comes up again then the static route goes back in the routing table.
ITE PC v4.0
Chapter 1 27 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Delete a static route
R1(config)#no ip route 192.168.2.0 255.255.255.0 serial 0/0
Give the same command again with no in front.
Most commands can be reversed like this.
ITE PC v4.0
Chapter 1 28 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Next hop or exit interface?
For a point to point serial link, configure the static route with the exit interface.
Only one look-up, less processing.
For an Ethernet link, configure the static route with the next hop address (or with both).
This identifies the device that should receive the packet next. The MAC address can be found and used in the frame header.
ITE PC v4.0
Chapter 1 29 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Summarizing static routes
ITE PC v4.0
Chapter 1 30 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Default route
All packets from the stub network need to go on the same route to the right hand router.
Configure a static default route.
Stub network
networks
Static route
Default route
ITE PC v4.0
Chapter 1 31 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Configure a default route
Router(config)#ip route 0.0.0.0 0.0.0.0 serial 0/0 Using exit interface.
Router(config)#ip route 0.0.0.0 0.0.0.0 172.16.2.2 Using next hop address
0.0.0.0 network address and subnet mask is called quad zero. It matches anything.
ITE PC v4.0
Chapter 1 32 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Routing table
S* 0.0.0.0/0 is directly connected, Serial0/0
The default route is shown with a *
ITE PC v4.0
Chapter 1 33 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Troubleshooting tools
ping
traceroute
show ip route
show ip interface brief
show cdp neighbors
show running-config
ITE PC v4.0
Chapter 1 34 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
ITE PC v4.0
Chapter 1 35 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
General Role of the Router
ITE PC v4.0
Chapter 1 36 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
General Role of the Router
Connections of a Router for WAN
-A router has a DB-60 port that can support 5 different cabling standards
Connections of a Router for Ethernet
-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
Functions of a Router
Best Path Selections
Forwarding packets to destination
ITE PC v4.0
Chapter 1 37 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Interfaces
Examining Router Interfaces
-Show IP router 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
Configuring an Ethernet interface
-By default all serial and Ethernet interfaces are down
-To enable an interface use the No Shutdown command
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
ITE PC v4.0
Chapter 1 38 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
ITE PC v4.0
Chapter 1 39 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Configuring a Serial interface
-Enter interface configuration mode
-Enter in the ip address and subnet mask
-Enter in the no shutdown 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
Interfaces
ITE PC v4.0
Chapter 1 40 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
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 DTE device.
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.
ITE PC v4.0
Chapter 1 41 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Routing Table and CDP Protocol
Purpose of the debug ip routing command
Allows viewing changes that the router performs when adding or removing routes
Example:
-R2#debug ip routing
-IP routing debugging is on
To configure an Ethernet interface
Example:
-R2(config)#interface fastethernet 0/0
-R2(config-if)#ip address 172.16.1.1 255.255.255.0
-R2(config-if)#no shutdown
ITE PC v4.0
Chapter 1 42 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Routing Table and CDP Protocol
When a router only has its interfaces configured & no other routing protocols are configured then:
-The routing table contains only the directly connected networks
-Only devices on the directly connected networks are reachable
ITE PC v4.0
Chapter 1 43 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
ITE PC v4.0
Chapter 1 44 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
ITE PC v4.0
Chapter 1 45 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Checking each route in turn
The ping command is used to check end to end connectivity
ITE PC v4.0
Chapter 1 46 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Routing Table and CDP Protocol
Purpose of CDP
A layer 2 cisco proprietary tool used to gather information about other directly connected Cisco devices.
Concept of neighbors
-2 types of neighbors
Layer 3 neighbors
Layer 2 neighbors
ITE PC v4.0
Chapter 1 47 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Routing Table and CDP Protocol
CDP show commands
Show cdp neighbors command
-Displays the following information:
Neighbor device ID
Local interface
Holdtime value, in seconds
Neighbor device capability code
Neighbor hardware platform
Neighbor remote port ID
Show cdp neighbors detail command
-Useful in determining if an IP address configuration error
Disabling CDP
To disable CDP globally use the following command
Router(config)#no cdp run
ITE PC v4.0
Chapter 1 48 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Static Routes with Exit Interfaces
Purpose of a static route
A manually configured route used when routing from a net to a stub net
IP route command
To configure a static route use the following command: ip route
ITE PC v4.0
Chapter 1 49 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Static Routes with Exit Interfaces
ITE PC v4.0
Chapter 1 50 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Dissecting static route syntax
ip route - Static route command
172.16.1.0 – Destination network address
255.255.255.0 - Subnet mask of destination network
172.16.2.2 - Serial 0/0/0 interface IP address on R2, which is the "next- hop" to this network
Static Routes with Exit Interfaces
Configuring routes to 2 or more remote networks
Use the following commands for R1
-R1(config)#ip route 192.168.1.0 255.255.255.0 172.16.2.2
-R1(config)#ip route 192.168.2.0 255.255.255.0 172.16.2.2
ITE PC v4.0
Chapter 1 51 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Static Routes with Exit Interfaces
ITE PC v4.0
Chapter 1 52 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Static Routes with Exit Interfaces
Zinin’s 3 routing principles
Principle 1: "Every router makes its decision alone, based on the information it has in its own routing table.“
Principle 2: "The fact that one router has certain information in its routing table does not mean that other routers have the same information.“
Principle 3: "Routing information about a path from one network to another does not provide routing information about the reverse, or return path."
ITE PC v4.0
Chapter 1 53 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Static Routes with Exit Interfaces
Using Zinin’s 3 routing principles, how would you answer the following?
-Would packets from PC1 reach their destination?
Yes, packets destined for 172.16.1.0/24 and 192.168.1.0/24 networks would reach their destination.
-Does this mean that any packets from these networks destined for 172.16.3.0/24 network will reach their destination?
No, because neither R2 nor R3 router has a route to the 172.16.3.0/24 network.
ITE PC v4.0
Chapter 1 54 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Static Routes with Exit Interfaces
Resolving to an Exit Interface
-Recursive route lookup - Occurs when the router has to perform multiple lookups in the routing table before forwarding a packet. A static route that forwards all packets to the next-hop IP address goes through the following process (reclusive route lookup)
The router first must match static route’s destination IP address with the Next hop address
The next hop address is then matched to an exit interface
ITE PC v4.0
Chapter 1 55 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Configuring a Static route with an Exit Interface
-Static routes configured with an exit interface are more efficient because the routing
–The routing table can resolve the exit interface in a single search instead of 2 searches
-Example of syntax require to configure a static route with an exit interface
Static Routes with Exit Interfaces
ITE PC v4.0
Chapter 1 56 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Modifying Static routes
Existing static routes cannot be modified. The old static route must be deleted by placing no in front of the ip route
Example:
-no ip route 192.168.2.0 255.255.255.0 172.16.2.2
A new static route must be rewritten in the configuration
Static Routes with Exit Interfaces
ITE PC v4.0
Chapter 1 57 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
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
Static Routes with Exit Interfaces
ITE PC v4.0
Chapter 1 58 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
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 hop’s Ethernet interface
This is found by the router consulting the ARP table.
If an entry isn’t found then an ARP request will be sent out
Static Routes with Exit Interfaces
ITE PC v4.0
Chapter 1 59 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Summary and Default Route
Summarizing routes reduces the size of the routing table.
Route summarization is the process of combining a number of static routes into a single static route.
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
ITE PC v4.0
Chapter 1 60 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Summary and Default Route
ITE PC v4.0
Chapter 1 61 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Summary and Default Route Default Static Route
This is a route that will match all packets. Stub routers that have a number of static routes all exiting the same interface are good candidates for a default route.
-Like route summarization this will help reduce the size of routing table
Configuring a default static route
Similar to configuring a static route. Except that destination IP address and subnet mask are all zeros
Example:
-Router(config)#ip route 0.0.0.0 0.0.0.0 [exit-interface | ip-address ]
Static routes and subnet masks
The routing table lookup process will use the most specific match when comparing destination IP address and subnet mask
Default static routes and subnet masks
Since the subnet mask used on a default static route is 0.0.0.0 all packets will match.
ITE PC v4.0
Chapter 1 62 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Static Routes and Packet Forwarding
Packet forwarding with static routes. (recall Zinin’s 3 routing principles)
Router 1
Packet arrives on R1’s Fastethernet 0/0 interface
R1 does not have a route to the destination network, 192.168.2.0/24
R1 uses the default
static route.
ITE PC v4.0
Chapter 1 63 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Packet forwarding with static routes. (Zinin’s 3 routing principles)
Router 2
The packet arrives on the Serial 0/0/0 interface on R2.
R2 has a static route to 192.168.2.0/24 out Serial0/0/1.
Static Routes and Packet Forwarding
ITE PC v4.0
Chapter 1 64 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Packet forwarding with static routes. (Zinin’s 3 routing principles)
Router 3
The packet arrives on the Serial0/0/1 interface on R3.
R3 has a connected route to 192.168.2.0/24 out Fastethernet 0/1.
Static Routes and Packet Forwarding
ITE PC v4.0
Chapter 1 65 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
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
Static Routes and Packet Forwarding
ITE PC v4.0
Chapter 1 66 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Solving a Missing Route
Finding a missing or mis-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 mis-configured static route remove the static route then reconfigure the new static route
Static Routes and Packet Forwarding
ITE PC v4.0
Chapter 1 67 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Solving a Missing Route
Static Routes and Packet Forwarding
ITE PC v4.0
Chapter 1 68 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Static Routes and Packet Forwarding Solving a Missing Route
ITE PC v4.0
Chapter 1 69 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Summary Routers
-Operate at layer 3
-Functions include best path selection & forwarding packets
Connecting Networks
WANs
Serial cables are connected to router serial ports.
In the lab environment clock rates must be configured for DCE
LANs
Straight through cables or cross over cables are used to connect to fastethernet port. (The type of cable used depends on what devices are being connected)
Cisco Discovery Protocol
A layer 2 proprietary protocol
Used to discover information about directly connected Cisco devices
ITE PC v4.0
Chapter 1 70 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Summary Static Routes
-This is a manually configured path that specifies how the router will get to a certain point using a certain path.
Summary static routes
-This is several static routes that have been condensed into a single static route.
Default route
-It is the route packets use if there is no other possible match for their destination in the routing table.
Forwarding of packets when static route is used
-Zinin’s 3 routing principles describe how packets are forwarded
Troubleshooting static routes may require some of the following commands
-Ping
-Traceroute
-Show IP route
-Show ip interface brief
-Show cdp neighbors detail
ITE PC v4.0
Chapter 1 71 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public