Objectives Cisco Discovery Protocol (CDP) CDP show commands

Objectives
ƒ Examine the CDP protocol and how it is used
by an administrator
ƒ Describe directly connected networks
Static Routing
ƒ Describe static routes with exit interfaces and
‘next-hop’ IPs
ƒ Describe summary routes
Routing Protocols and
Concepts – Chapter 2
ITE PC v4.0
Chapter 1
ƒ Describe a default route
2
© 2007 Cisco Systems, Inc. All rights reserved.
Cisco Public
1
Cisco Discovery Protocol (CDP)
CDP show commands
ƒ show cdp neighbors command
ƒ CDP is a Cisco proprietary tool used to gather
information about other directly connected Cisco
devices
Displays the following information:
ƒNeighbor device ID
ƒ It runs on all Cisco devices by default
ƒLocal interface
ƒ CDP advertisements sent periodically
ƒHoldtime value, in seconds
ƒ CDP operates at Layer 2 only
ƒNeighbor device capability code
ƒ A Cisco device will maintain a table of CDP
information about its Cisco directly connected
neighbors, which can be queried by the
Administrator by entering show cdp commands
ƒNeighbor hardware platform
ƒNeighbor remote port ID
ƒ show cdp neighbors detail command
3
CDP show commands
Useful in determining if an IP address
configuration error
4
Remote Discovery of Network Topology
R2#show cdp neighbor
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID
Local Intrfce
Holdtme
Capability
Platform
Port ID
R1
Ser 0/0
146
R
C2600
Ser 0/0
Switch
Fas 0/0
173
S
2950
Fas 0/1
R3
Ser 0/1
173
R
C2600
Ser 0/1
ƒ Using Telnet and CDP show commands, an
admin (or hacker) can remotely discover the
topology, devices, IP addresses, etc. of a Cisco
network
R2#show cdp neighbor detail
ƒ Some admins will disable CDP for security
reasons
Device ID: R1
Entry address(es):
IP address : 172.16.2.1
Platform: cisco C2600, Capabilities: Router
Interface: Serial0/0, Port ID (outgoing port): Serial0/0
Holdtime: 156
ƒ To disable CDP on a device use the following
command
Router(config)# no cdp run
<OUTPUT OMITTED>
ƒ See PT Lab 2.3.4 -Using CDP for network
discovery
5
Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
Presentation_ID.scr
6
1
A static route is a route manually configured
on a router by the admin
IP route command
7
8
Static Route to R2’s LAN
Routing table entries for R1
R1(config)# ip route 172.16.1.0 255.255.255.0 172.16.2.2
R1(config)# ip route 172.16.1.0 255.255.255.0 172.16.2.2
R1# show ip route
ƒ Dissecting static route syntax:
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
ip route - Static route command
172.16.1.0 – Destination network address
255.255.255.0 - Subnet mask of destination
network
Gateway of last resort is not set
172.16.2.2 - Serial 0/0/0 interface IP address on
R2, which is the "next-hop" to this network
S
C
C
R1#
172.16.0.0/24
172.16.1.0
172.16.2.0
172.16.3.0
is subnetted, 3 subnets
[1/0] via 172.16.2.2
is directly connected, Serial0/0
is directly connected, FastEthernet0/0
9
10
Summary Route
Static Routes with Exit Interfaces
ƒ Route summarization is the process of combining
a number of static routes into a single static route.
ƒ Static routes configured with an exit interface
are more efficient because the routing table can
resolve the exit interface in a single search
instead of 2 searches
ƒ Summarizing routes reduces the size of the
routing table.
172.16.1.0
172.16.2.0
172.16.3.0
ƒ Example
10101100.00010000.00000001.00000000
10101100.00010000.00000010.00000000
10101100.00010000.00000011.00000000
ƒ Summarized route is 172.16.0.0/22
R1(config)# ip route 172.16.1.0 255.255.255.0 s0/0
ƒ Replace the 3 static routes with this one:
ip route 172.16.0.0 255.255.252.0 s0/0
11
Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
Presentation_ID.scr
12
2
Summary Route
Default Static Route (Quad-zero 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.
R3#show ip route
Gateway of last resort is not set
S
S
S
C
C
R3#
172.16.0.0/24 is subnetted, 3 subnets
172.16.1.0 is directly connected, Serial0/1
172.16.2.0 is directly connected, Serial0/1
172.16.3.0 is directly connected, Serial0/1
192.168.1.0/24 is directly connected, Serial0/1
192.168.2.0/24 is directly connected, FastEthernet0/0
ƒ Like route summarization, this will help reduce the
size of the routing table
ƒ Configuring a default static route
R3#show ip route
ƒSimilar to configuring a static route, except that
destination IP address and subnet mask are all
zeros
Gateway of last resort is not set
S
C
C
R3#
172.16.0.0/22 is subnetted, 1 subnets
172.16.0.0 [1/0] via 192.168.1.2
192.168.1.0/24 is directly connected, Serial0/1
192.168.2.0/24 is directly connected, FastEthernet0/0
ƒ ip route 0.0.0.0 0.0.0.0 [exit-interface | ip-address ]
13
14
Default Static Route (Quad-zero route)
Default Static Route (Quad-zero route)
ƒ The routing table lookup process will use the
most specific match when comparing
destination IP address and subnet mask
ƒ R1(config)# ip route 0.0.0.0 0.0.0.0 172.16.2.2
ƒ 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.
Hence, no packets will be dropped by the
router; all will be forwarded
R1#show ip route
Gateway of last resort is 172.16.2.2 to network 0.0.0.0
C
C
S*
ƒ Example of configuring a default route:
172.16.0.0/24 is subnetted, 2 subnets
172.16.2.0 is directly connected, Serial0/0
172.16.3.0 is directly connected, FastEthernet0/0
0.0.0.0/0 [1/0] via 172.16.2.2
ƒ R1(config)# ip route 0.0.0.0 0.0.0.0 172.16.2.2
15
Troubleshooting a Missing Route
Summary of types of routes
ƒ Tools that can be used to isolate routing
problems include:
ƒ Directly connected routes
A network connected to the router’s interface.
ƒ 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.
-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
16
17
Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
Presentation_ID.scr
18
3