THE ROUTEWhile a route can have many more attributes, the most fundamental three attributes of all IP routes in a Cisco are:
(2) The length of the route (specified by the netmask). (3) The destination IP or Interface of the route. Basically, a route says "for packets destined to IP addresses in the range specified, send them to this interface or IP address."
BASIC IP ROUTINGFor every packet that comes in, the router looks at the destination IP address and tries to find the most specific route that matches it. The router then sends the packet out the interface specified in that most specific route. The most specific route is the one that covers the least number of IP addresses. For example, a host route covers only one IP address and is an example of the most specific IP route possible. A less specific IP route is a Class C-sized route of 256 IP addresses. The least specific (most general) route is the 0.0.0.0 default route, which covers any route not specifically covered by a more specific route. This describes the average host on the average network on the Internet: any packet destined to itself will pick off with the host route; any packet destined to the local LAN will be sent out the LAN because of the Class C-sized route; and any packet destined to the Internet is not covered by either of those routes, so it is sent out to the router using the default route. The "most specific route wins" rule is one of the most fundamental rules of IP routing. Routing based on destination IP address is not the only way to route (see policy routing in the Cisco documentation for methods of routing based on source-interface or source-IP rather than on destination IP), but it is fairly fundamental to Internet routing.
INTERFACESEach router has multiple interfaces. The most common interfaces you'll deal with are Ethernet and serial interfaces, though before long you'll want to know how to configure the Console and Aux normal (asynchronous) serial interfaces, and you may want to send routes to the Null0 or Loopback virtual interfaces. High-end routers (which we'll cover eventually) have HSSI (for T-3s); ATM; Fast Ethernet; and other, more exotic, interfaces. Each interface usually has one or more IP addresses. Serial interfaces on a Cisco router are actually synchronous interfaces generally used to run leased-line CSU/DSUs. Normally, you'll run them with external clocking (unless you're connecting two routers together). In this mode, the router has no preset idea of how fast each port will be - as long as it's not a low-speed serial port, every Cisco synchronous serial port should run speeds up to T-1 or E-1.
INTERFACE NAMES
On fixed-configuration Ciscos such as the 2500 series, each interface is numbered simply
On larger Ciscos (except for the AGS, which is an older "large" Cisco), to specify an interface you need to
know the slot number of the Interface card. For example, Ethernet0/0 and Ethernet0/1 are the first and
second Ethernet interfaces on the Ethernet interface board in Slot 0. Serial4/0, Serial4/1, Serial4/2,
Serial4/3, Serial4/4, Serial4/5, Serial4/6, and Serial4/7 are the 8 serial interfaces on the serial board in slot
4. Routers such as the 7206, 7000, 7010, 7505, 7507, and 7509 use this nomenclature.
When referring to interfaces, you can abbreviate as much as is possible without causing ambiguity - for
example, e0, s0, and s1 instead of Ethernet0, Serial0, and Serial1.
Ciscos can have many different routing tables in RAM - especially if you're using active internal and
external routing protocols - but the goal of the routing protocols is to actually populate the one actual IP
routing table on which all packet-routing decisions are based. The technical term for this table in a Cisco is
"the RIB" (routing information base), but it's commonly referred to as just "the IP routing table."
There are various ways to modify how competing routes get inserted into the RIB, but if unmodified, the
order of preference is:
"Competing routes" are routes of equal specificity that are present in multiple routing tables (from multiple
sources).
It may seem simple and obvious, but not all routers implement a very critical function. Ciscos will delete
routes from the RIB if the interface associated with the route is down. This allows the Cisco to have backup
routes quite easily. When you get fairly into routing, you'll understand why this is a critical feature.
What this means is that if you unplug the Ethernet and serial interfaces from a simply configured 2501, a
"sho ip route" will show no routes, since there are no interfaces "up" to attach routes.
The most fundamental routes on the router are those associated with the interfaces themselves. If e0 (aka
Ethernet0) has an IP address of 10.20. 20.1 and the netmask is 255.255.255.0 (the size of a Class C - also
called a /24), the route "10.20 .20.0/24" gets installed as a connected route, pointed out 10.20.20.1 (e0).
Any packets destined for 10.20.20.2 through 10.20.20.254 will be sent out e0 (if there are no more specific
routes inside of 10.20.20.0/24).
The next most fundamental type of route is that static route. These are routes that you insert with the "ip
route" command. The "default route" is generally inserted as a static route, for example:
Most smaller networks will be entirely "static routed" - the only routes on the routers will be connected or
static routes.
Another quick note on static routes: adding a metric at the end of the ip route statement can change the
preference of the route. The most common use of this is to insert a backup route. For example:
will cause the route pointing to Serial0 to stay unused, but to be inserted quickly if the preferred Serial1
route goes away (because it was deleted by hand or because the Serial1 interface went away).
Dynamic routing protocols cause one router to advertise routes to another router. The routes being
advertised always start out as static or connected routes somewhere, though. Eventually, we'll talk about
OSPF, RIPv2, and IS-IS, which are interior gateway protocols (IGPs). You need to use an IGP if:
We've talked about BGP in earlier issues. BGP is a protocol used to dynamically advertise your routes to
other networks, and to take dynamic route advertisements from them.
This month, we'll end with a walk-through of the Cisco initial setup dialog - what you get if you turn on a
new, unconfigured Cisco.
For our example, we'll use a typical, small ISP configuring its first router, which has:
The only thing that can't be done in the initial configuration dialog is the default-route installation; we'll go
over that below.
Also, we'll use:
If you are asked any other yes/no questions, answer no. Then you are shown an initial configuration based
on the dialog above.
Building configuration... [yes/no]:
Then the router will write and load that configuration. It will be done and ready to use in a few minutes.
When it's done, enter:
To finish the configuration.
Once that's done, plug in the Ethernet port and see if you can ping it. If you can, then Telnet into it and
start looking at the interfaces (type "sho int Serial0").
If Serial0 is up and the line protocol on Serial0 is up, see if you can ping to the outside world (say, to
198.7.0.2, as an example).
If you can, you're done - and if not, call your ISP and ask them to walk you through things. And make
sure they've turned up and configured their end of the circuit.
|
Copyright 1998 Mecklermedia Corporation.
All Rights Reserved. Legal Notices.
About Mecklermedia Corp.
Colorado Offices
13949 W Colfax Ave Suite 250, Golden, CO 80401
Voice: 303-235-9510; Fax: 303-235-9502