Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
by
Alexander Marhold
CCIE #3324, CCSI #20642, CCNP, CCDP
route-map map-tag [permit | deny] [sequence-number] FOR POLICY ROUTING
match ip address {access-list-number | name} [...access-list-number | name]
The CISCO Routing Process
match length min max including POLICY Routing
Policy Routing
on incoming interface
set ip next-hop ip-address [...ip-address] DATA Packets
set interface type number [...type number]
selected by: Output Access-list
Input Access-list
NAT / PAT Queueing
NAT ip policy route-map map-tag Accounting
DATA no match
or deny or Recursive Lookup
set default interface type number [... type number] OUTGOING to same protocol
set ip default next-hop ip-address [...ip-address]
S ... Static
C ... Connected
x .... dynamic routing
offset-list {access-list-number | name} in offset [type number] Route-TAGs
distance weight [address mask [access-list-number | name]] Route-TAGs
distribute-list {access-list-number | name} in [type number] OUTGOING coming from other protocol
passive-interface type number (only for Link State and EIGRP)
ip access-group {access-list-number | name} in
( for selected protocol)
distribute-list {access-list-number | name} out
Metric [routing-process |autonomous-system-number]
Incoming Outgoing
ROUTE Information Routes
Route Processing Route Processing
Routing Updates
Other Network
Information sources
Static Routes
OSPF
Ethernet
Connected Interfaces
DATA Packets
Output Access-list
Input Access-list
NAT / PAT Queueing
NAT
Accounting
DATA
Recursive Lookup
Routing Table
S ... Static
C ... Connected
x .... dynamic routing
Process CLASSFUL and CLASSLESS are behaviors for What is "Gateway of last Resort",
using the default route when information about a default -network, ip route 0.0.0.0 0.0.0.0 ?
Packets are forwarded downstream a path specific subnet is not in the routing table, but
from the sender to the receiver. other subnets of that mayor network are found IP Default - Network xxx.xxx.xxx.xxx - This
Route information (information about the in the routing table. is the command that will cause a router to treat
reachability of a network) is forwarded xxx.xxx.xxx.xxx as a gateway of last resort. A
UPSTREAM from router to router. Example: router can have multiple ip default-networks
entered.
This is important to consider when using blocking # show ip route (edited output)
of routing information in order to prevent access … Gateway of last resort - This is the term that
to certain networks. network 172.16.0.0/16 is subnetted is applied to a routing entry in the Cisco routing
2 subnets, 2 masks table that the router will use to forward packets
R 172.16.12.0/24 [120/2] 192.168.1.1 eth0
The packet forwarding is done by an R 172.16.16.0/20 [120/4] 10.0.0.1 ser0 to when it lacks a more specific route. This can
independent decision of each router on the path, … be learned from a route provided by another
using the destination address of the packet and *S 0.0.0.0/0 [0/0] 11.1.1.1 ser1 router that is tagged as a default by the
the Routing Table as basis for finding a next-hop. advertising router. The ip default-network
The router now receives a packet on eth1 with command is one way of having a router tag a
the destination address 172.16.10.234 route as a gateway of last resort.
The router will consult the routing table (or a
special forwarding table, based on the content of
This address belonging to a specific subnet of IP Default - Gateway - This command is used
the routing table), comparing the destination
172.16.0.0/16 is NOT in the routing table. in routers when IP routing disabled in order to
address with the network information in the
give them an address to forward packets that are
routing table and will use the most specific
- With IP CLASSLESS the router will take not in their address space. Routers in boot mode
network information for a decision about the
the default route and forward the packet are a good example of this situation.
outgoing path.
out on Serial 1. This is done independent of
The lookup process can be recursive, that
any other subnet information for that IP ROUTE 0.0.0.0 0.0.0.0 establishes a default
means, that more than one lookup may be
mayor network 172.16.0.0/16. route (catch-all) if no specific route is found
needed in order to find the real next-hop-address
for forwarding the packet.
If such a next-hop or an outgoing interface is - When CLASSFUL routing with the !!! CAVEAT !!!
Policy Routing
on incoming interface
set ip next-hop ip-address [...ip-address] DATA Packets
set interface type number [...type number]
selected by: Output Access-list
Input Access-list
NAT / PAT Queueing
NAT ip policy route-map map-tag
Accounting
DATA no match
or deny or Recursive Lookup
set default interface type number [... type number]
set ip default next-hop ip-address [...ip-address]
Routing Table
S ... Static
C ... Connected
x .... dynamic routing
Internet Rem.OFF.
OUT-to-PIX
Routing Table
S ... Static
C ... Connected
x .... dynamic routing
Route-TAGs
Route-TAGs
Metric
ROUTE Information
Incoming Outgoing Routes
Route Processing Route Processing
A lot of problems and confusion arises from the fact §4 Route REDISTRIBUTION is only used for §8 Routing processes are relying on a
that some basic principles in the Routing information outgoing routing updates. consistent metric, in order that every router
process are not correctly understood. find the best path in a way, that all routes are
In Principle: Route redistribution means that routes of leading in the same direction.
Therefore in this chapter I will give some fundamental one routing protocol in the routing table will be sent
laws and principles and describe their consequences: out, converted to another routing protocol on As the base of metrics is different for different routing
interfaces configured for routing updates of that protocols, a direct conversion of metrics from one
§1 The mechanism of processing incoming second routing protocol. routing protocol to another is generally not possible.
routing updates is COMPLETELY separated from When having more than one routing process default
the mechanism of creating outgoing routing §5 Static Routes defined with a next-hop- metric information has to be used. This default hides
updates. address are considered one hop away and have the correct information about the best path and this
a default Administrative Distance of 1 inconsistency will lead to not optimal routing and also
often to ROUTING LOOPS in MUTUAL
The fact that a route is found in the routing table of a
If the next -hop-address specified in the static route is REDISTRIBUTION (i.e. more than one redistribution
router is a prerequisite but NOT necessarily sufficient
not a REAL next -hop-address (i.e. not an address in a points).
criteria for an outgoing routing update.
directly connected network) the router will do
recursive lookups to find this REAL next -hop-address. §9 Routing is a STATEFUL process. Depending
§2 The original routes of every configured
on the current information in the Routing Table
routing process of a router will be considered,
§6 Static Routes defined with an outgoing different actions can happen, even when the
when decisions about which will enter the
interface are treated like connected networks ( same routing information is received.
routing table will be made.
i.e. networks that are 0 hops away) and thus
having a default Administrative Distance of 0. ? There are examples, where a routing was correct,
This means that route REDISTRIBUTION is never used
but after the shutdown and restart of an interface the
in the incoming route processing.
Therefore static routes defining an outgoing interface correct state was never reached again.[See page 15]?
§3 If more than one information of a route is should be used only when the destination is on that
found, the incoming route process will use first connected network.
the ADMINISTRATIVE DISTANCE and then the USAGE: When the connected network is address
METRIC for deciding which route will be translated, you need a static route for the outside
established in the routing table. network pointing to that inside hidden network.
Cisco IOS has a predefined Administrative Distance for §7 Static Routes where the outgoing interface
each Routing Protocol which allows to prefer more is down or the next-hop-address is not
trusted information sources over less trusted one. reachable are removed from the routing table
unless the parameter PERMANENT is specified.
Metric
Incoming
ROUTE Information
Route Processing
Administrative Distance
INCOMING from LOCAL
0 Connected
1 Static Route
5 EIGRP Summary
ip route prefix mask {address | 20 External BGP
interface} [distance] [tag tag] 90 Internal EIGRP
[permanent] 100 IGRP
and from connected interfaces 110 OSPF
115 IS-IS
120 RIP
170 External EIGRP
200 Internal BGP
255 <don´t use>
S ... Static
C ... Connected
x .... dynamic routing
Route-TAGs
OUTGOING coming from other protocol
Outgoing
Routes
Route Processing
Metric
OUTGOING to another protocol
redistribute protocol [process-id] {level-1 | level-1-2 | level-2} [metric
metric-value] [metric-type type-value] [match {internal | external 1 |
external 2}] [tag tag-value] [route-map map-tag] [weight weight] [subnets]
default-information redistribution:
default-information originate [always] [metric metric-value] [metric-type type-
value] {level-1 | level-1-2 | level-2} [route-map map-name]
(RIP/OSPF)
default-information {in | out} {access-list-number | name}
(IGRP/EIGRP)
before
shutdown 3 hops
3
RIP
R5 R3
? 1999, PRO IN Consulting GmbH Page 15 of 18
of 1
1 hop after shutdown of
route-map map-tag [permit | deny] [sequence-number] FOR POLICY ROUTING
match ip address {access-list-number | name} [...access-list-number | name]
The CISCO Routing Process
match length min max including POLICY Routing
Policy Routing
on incoming interface
set ip next-hop ip-address [...ip-address] DATA Packets
set interface type number [...type number]
selected by: Output Access-list
Input Access-list
NAT / PAT Queueing
NAT ip policy route-map map-tag Accounting
DATA no match
or deny or Recursive Lookup
set default interface type number [... type number] OUTGOING to same protocol
set ip default next-hop ip-address [...ip-address]
S ... Static
C ... Connected
x .... dynamic routing
offset-list {access-list-number | name} inoffset [type number] Route-TAGs
distance weight [address mask [access-list-number | name]] Route-TAGs
distribute-list {access-list-number | name} in [type number] OUTGOING coming from other protocol
passive-interface type number (only for Link State and EIGRP)
ip access-group {access-list-number | name} in
( for selected protocol)
distribute-list {access-list-number | name} out
Metric [routing-process |autonomous-system-number]
Incoming Outgoing
ROUTE Information Routes
Route Processing Route Processing