Command not related with IP route protocol
Use “debug ip policy” command to open the tracefunction of
strategic route. Use “no debug ip
policy”
to close the tracking function of strategic route.
debug ip policy
no debug ip policy
Parameter:
none
Default:
Strategic route tracking
function is not open.
Command mode:
Supervisor
mode
Explanation:
none
Example:
none
Relevant command:
Use “distance” to define a administrative distance. Use “no distance” to delete the
definition of a adminitrativedistance.
distance weight [address mask
[access-list-name]]
no distance weight [address
mask [access-list-name]]
Parameter:
weight |
Administrative
distance ranges from 1 to 255. The suggested distance ranges from 10-255 (0-9
reserved). If this parameter is used separately, it will tell the router that
system software will use it as default administrative distance when
there is no relevant regulation about information source of a route. The
route with administrative distance of 255 will not be installed in the
routing table. |
address |
(Alternative) IP address (in the form
of aa.bb.cc.dd) |
mask |
(Alternative) IP address mask (in the
form of aa.bb.cc.dd). If a certain bit is 0, the software
will neglect the of relevant bit in the address. |
access-list-name
|
(Alternative) Update the name of
standard access list for incoming route. |
Default:
Default Administrative distance is listed below:
Route source |
Default distance |
Connected |
0 |
Static |
1 |
External BGP |
20 |
BIGP |
90 |
OSPF |
110 |
120 |
|
Internal BGP |
200 |
Command mode:
Route configuration mode
Explanation:
Administrative distance
is a whole number ranging from 0 to 255. Under general situation, the higher
the value of number, the lower the reliability. Administrative distance of 255
means is unreliable at all and should be ignored.
If in RIP or BEIGRP, address/mask
means the IP address of a neighbor; while in OSPF, address/mask is a
router ID which declares related LSA.
If “access-list-name” (access list with alternative
parameter) is used in the command, this access list will be used when a network
route is inserted into a routing table. In this way, some networks can be
filtered by route address providing routing information. For example, it can be
used to filter wrong routing information got from the route that is not under
your management and control.
Note:
the sequence of administrative distance you inputted may has unexpected
effect on the allocated administrative distance (please refer to the
explanation in the following example for the details).
The
value of parameter “weight” is completely subjective, there is no quantitative
means to select this value.
Example:
In
the following example, RIP route is set in global command “router rip”. Router configuration command
“network” designates RIP route reaching network 192.31.7.0 and 128.88.0.0. The first router configuration command “distance”
set the default administrative distance as 255. It informs the router:
if a certain router is not evidently set a administrative distance, all route
update from that router will be ignored.
router rip
network 192.168.7.0
network 133.8.0.0
distance 255
distance 90 192.168.7.0 0.0.0.255
distance 120 133.8.1.3 0.0.0.0
Use
router configuration command “filter” to filter the network received during
route update. Use “no filter” to change or disable the filter.
filter * in access-list {access-list-name}
filter * in gateway {access-list-name}
filter * in prefix { prefix-list-name}
filter type number in access-list
{access-list-name}
filter type number in gateway
{access-list-name}
filter type number in prefix {prefix-list-name}
no filter * in
no filter type number in
Parameter:
access-list-name
|
Name of standard access list. The list defines which networks
to be received and which networks to be suppressed during route update. |
prefix-list-name |
Name
of standard IP prefix list. The
list defines which networks to be received and which networks to be
suppressed during route update. |
In |
Apply access list to incoming route update. |
type |
(Alternative)
Interface type |
number |
(Alternative) In
which interface the access list will be applied to incoming route update. If no
interface is designated, access list will be applied to all incoming update. |
Default:
invalid state
Command mode:
Route configuration mode
Explanation:
to filter the network receiving update
Example:
In the following example, RIP route process receives only two
networks---0.0.0.0 and 131.108.0.0:
access-list 1 permit 0.0.0.0
access-list 1 permit 131.108.0.0
access-list 1 deny 0.0.0.0 255.255.255.255
router rip
network 131.108.0.0
filter * in 1
Relevant command:
Use
router configuration command “filter out” suppress some networks to prevent
them from advertising in the update. Use “no filter out” to disable this
function.
filter * out access-list {access-list-name}
filter * out gateway {access-list-name}
filter * out prefix { prefix-list-name}
filter type number out access-list
{access-list-name}
filter type number out gateway
{access-list-name}
filter type number out prefix
{prefix-list-name}
no filter * out
no filter type number out
Parameter:
access-list-name
|
Number or name of standard IP access list. This list defines
which networks to be received and which networks to be suppressed during
route update. |
prefix-list-name |
Name
of standard IP prefix list. The
list defines which networks to be received and which networks to be
suppressed during route update. |
Out |
Apply access list to outgoing route update. |
Interface-name
|
(Alternative)
Name of an interface |
Default:
Invalid state
Command mode:
Route configuration mode
Explanation:
When
you redistribute the network, name of routing process can be designated as an
alternative suffix parameter of the command “filter”. In this way, the access list will
only be applied to the routes acquired from designated routing process. After
the access list relevant to process is applied, any access list designated in “filter” without process name parameter
will be applied. Address that is not designated in “filter” will not be advertised in the
outgoing route update.
Note: Use command “filter in” to filter the networks
receiving update.
Example:
The
following example makes a network 131.108.0.0
can be advertised by RIP routing process:
access-list 1 permit 131.108.0.0
access-list 1 deny 0.0.0.0 255.255.255.255
router rip
network 131.108.0.0
filter * out 1
Relevant command:
Use
command “ip local policy” to switch on policypolicyrouting function of
local packets. Use “no ip local policy” to switch
off local policy routing function.
ip local policy route-map <name>
no ip local policy route-map <name>
Parameter:
<name> Name
of route-map used by policy routing.
Default:
The
policy routing function of local packet is switched off.
Command mode:
Global
configuration mode
Explanation:
Policy
routing can be applied to packets sent of redistributed locally. Policy routing
applied to packets sent locally is called local policy routing. By configuring
the command “ip local policy route-map <name>” under global configuration
mode and configuring proper route-map, policy routing to packets sent locally
will be realized.
Policy routing checks whether a packet is
broadcasting packet and searches relevant policy routing for broadcasting
packet. Policy routing result will return olny output interface or a nexthop
Route-map used for policy routing can
match packets with access-list or packet length and process policy routing by
setting nexthop or output interface. Using access-list can meet various policy
needed, such as routing by source address, routing by application, etc.
Policy routing can set nexthop, tos,
precedence and output interface of a packet. The sequence to select policy
routing is as the following: nexthop, default nexthop, interface and default
interface. When all of them are not available, use normal routing.
Nexthop available means that routing can
be found for the nexthop in the routing table. Interface available means that
the interface is “IpprotocolUP” and has licit IP address (or negotiation
address, Null interface).
Example:
The
following configuration will process policypolicy routing for packet sent
locally and send the packet of network with address 100.0.0.0/8 to a0/0
interface:
ip local
policy route-map Policy
!
route-map Policy
match ip address Policy-ACL
set interface s1/0
!
ip
access-list extended
permit ip any 100.0.0.0 255.0.0.0
!
Relevant command:
Use “ip policy” command to
switch on the policy routing function on the interface.
ip local policy route-map <name>
no ip policy route-map <name>
Parameter:
<name> Name
of route-map used by policy routing.
Default:
Policy routing function of the
interface is switched off.
Command mode:
Interface
configuration mode
Explanation:
Policy
routing can be applied to packets sent locally of redistributed. By configuring
command “ip policy route-map <name>” on packet input interface and
configuring proper route-map, policy routing of packet received from the
interface will be realized.
Policy routing checks whether the packet
is a broadcasting packet and checks relevant policy packet for broadcasting
packet. Policy routing result will return only to an output interface or a
nexthop with routing to several interfaces.
Route-map used for policy routing can
match packets with access-list or packet length and process policy routing by
setting nexthop or output interface. Using access-list can meet various policy
need, such as routing by source address, routing by application, etc.
Policy routing can set nexthop, tos,
precedence and output interface of a packet. The sequence to select policy
routing is as the following: set ip nexthop, set interface, non-default normal
route, set ip default nexthop, set default interface, normal route, or default
route. Policy routing can set tos and precedence for the normal routing
separately.
Nexthop available means that routing can
be found for the nexthop in the routing table. Interface available means that
the interface is “IpprotocolUP”
and has licit IP address (or negotiation address, Null interface).
Example:
The
following configuration will process policy routing for packet received by
interface s1/1 and send packet of network with address 100.0.0.0/8 to s1/1
interface:
interface
s1/1
ip policy route-map Policy
!
route-map Policy
match ip address Policy-ACL
set interface s1/0
!
ip
access-list extended
permit ip any 100.0.0.0 255.0.0.0
!
Relevant command:
Use “ip route”
global configuration command to establish static routing. Use “no ip route” to delete static routing.
ip route prefix mask {address | interface} [distance]
no ip route prefix mask [{address | interface}] [distance]
Parameter:
Prefix |
prefix of destination address IP route |
mask |
prefix mask of destination address IP route |
address |
nexthop IP address to reach the network |
interface |
network interface to be used |
distance |
(Alternative) administrative
distance |
Default:
no static routing established
Command mode:
Global configuration mode
Explanation:
Use key word “default” to replace “prefix”
and “mask” to configure default route.
If router cannot dynamically create
routing for a certain destination, it will be more proper to use static
routing.
If you have designated administrative
distanceadministrative distance, the static routing will be identified that
dynamic routing cannot substitute it. For example, default administrative
distance of the route obtained from RIP is 100. If you want to create a static
routing that can be substitutedby RIP dynamic routing, you can designate the administrative
distance “distance” as any value larger than 100. Default administrative
distance of static routing is 1.
No matter whether the command “redistribute static” is applied to RIP or other static routing protocol, the static routing aiming to interface will advertise through these protocols. The reason is that static routing aiming to interface is regarded as directly connected in routing table and having lost static character. However, if you define a static routing for the interface and the interface is not in the network defined by the command “network”, the static routing will not be advertised by dynamic routing protocol (unless use command “redistribute static” for these dynamic routes).
Now,the number of static route
you can configure is no more than 2048.
Example:
The following example selects 110 as
the administrative distance. Under this circumstance, if there is no dynamic
routing information reaching network 10.0.0.0
and with administrative distance less than 110, the group sent to the network
will pass through router 131.108.3.4.
ip route 10.0.0.0 255.0.0.0 131.108.3.4 110
In the following example, the group heading for network 131.108.0.0
is sent to router 131.108.6.6:
ip route 131.108.0.0 255.255.0.0 131.108.6.6
Use
router configuration command “redistribute” to redistribute the route
from one routing area to another routing area. Use “no redistribute” to
disable the redistribution.
redistribute protocol [process-id]
[route-map map-name]
no redistribute protocol [process-id]
[route-map map-name]
Parameter:
protocol |
Source protocol to redistribute the route. It can be one of
the following keywords: bgp, ospf, static [ip], connected,
and rip. The
keyword “static [ip]” is used to redistribute IP
static route. When the route is redistributed into the IS-IS, use this alternative IP keyword. Keyword “connected” refers to the routes created
automatically after IP on interface being enabled. For
routing protocol like OSPF
and IS-IS, these routes are redistributed
as exterior routes of autonomous system. |
process-id |
(Alternative) For bgp or bigp,
the parameter refers to autonomous system number of 16 digits. For
OSPF, it is the relevant OSPF process ID by which the routing key is
redistributed. It identifies the routing process. It is decimal number excluding
0. For “rip”, process identifier “process-id” is not needed. |
route-map |
(Alternative)
This parameterprovide routemapp to filter the routes redisitributed from
source protocol to current routing protocol. If the parameter is not given,
all routes will be redistributed. If the keyword is given without listing
routing mark, no route will be introduced. |
Default:
The redistribution of the route is
inuse.
protocol--- no routing
protocol is defined
process-id--- no
process ID is defined
route-map map-tag--- If parameter “route-map” is not given, all routes will
be redistributed. If “map-tag” is not entered, no route will be
introduced.
Command mode:
route configuration mode
Explanation:
Changing
or invalidating any keyword will not affect the state of other keyword.
When the router receives a linking state protocol group with
interior Metric, it will take the sum of the value from itself to the
redistributed router and the value of the advertised destination as the value
of the route. For the exterior route value, only the value of the destination
announced in the advertisement will be taken into account.
The redistributed routing information will be filtered by router
configuration command “filter out”.
In this way, it will be ensured that only the route designated by the
administrator can enter the accepted routing protocol.
No matter when you use router configuration command “redistribute”
or “default-information”
to redistribute the route into OSPF routing area, the router will become the
autonomous system border router (ASBR).
But under default state, ASBR will not generate a default route into OSPF
routing area.
When
the route is redistributed among OSPF processes, OSPF Metric will be used.
When route is redistributed to OSPF,
OSPF uses 20 as the default Metric (uses route value 1 for BGR) for rotes of
all other protocols (excluding BGR) if Metric is not designated by using
keyword “meric”. Furthermore, when route is redistributed between 2 OSPF
processes of a router, route value within a routing process will be introduced
into the process of redistributing if no default Metric is designated.
When route is redistributed into OSPF,
only the new routes without sub-network can be redistributed if the keyword “subnets”
is not given.
The connected routes effected by command “redistribute” are those routes not designated by
using command “network”. Command “default-metric” cannot be used to effect
advertising connected Metric.
Note: Suppress to use Metric designated by “default-metric” as the Metric designated by “redistribute”.
Unless
command “default-information originate” is given, it is not allowed to
redistribute routes from IGP or EGP to BGP.
Example:
The following example makes the OSPF
route can be redistributed into BGP routing area:
router bgp 109
redistribute ospf...
The following example makes the RIP
route be redistributed into OSPF area:
router ospf 109
redistribute rip
In the following example, network 20.0.0.0 in
OSPF 1 presents as exterior linking state advertising
interface ethernet 0
ip address 20.0.0.1 255.0.0.0
ip ospf cost 100
interface ethernet 1
ip address 10.0.0.1 255.0.0.0
!
router ospf 1
network 10.0.0.0 0.255.255.255 area 0
redistribute ospf 2
router ospf 2
network 20.0.0.0 0.255.255.255 area 0
Command “show ip local policy”
is used to show configuration state of local policy route.
show ip policy
Parameter:
none
Default:
none
Command mode:
Supervisor
mode
Explanation:
none
Example:
none
Relevant command:
Command “show ip policy” is used to show configuration
state of interface policy route.
show ip policy
Parameter:
none
Default:
none
Command mode:
Supervisor
mode
Explanation:
none
Example:
none
Relevant command:
Use command “show ip route” to show current state
of routing table.
show ip route [protocol]
Parameter:
protocol |
(Alternative) routing protocol name
or keyword: connected, static, ospf or rip. |
Command mode:
Supervisor mode
Explanation:
show ip route IP
address command output shows the generating of IP routes in IS-IS network.
Example:
The following is an example output using “show ip route” command without
address:
Router# show ip route
Codes: C - connected, S - static, R - RIP, B - BGP
D - BIGP, DE - external BIGP, O - OSPF, 0IA - OSPF
inter area
ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA
external type 2
OE1 - OSPF external type 1, OE2 - OSPF external
type 2
C 2.0.0.0/24 is directly connected, Serial1/1
C 133.133.0.0/16 is directly connected, Serial1/2
C 133.133.0.81/32 is directly connected, Serial1/2
S 192.167.0.0/16 [6,0] via 133.133.0.81
C 192.168.20.0/24 is directly connected,
FastEthernet0/0
O E2 150.150.0.0 [160/5] via 131.119.254.6
O E2 192.68.132.0 [160/5] via 131.119.254.6,
0:00:59, Ethernet2
O E2 130.130.0.0 [160/5] via 131.119.254.6,
0:00:59, Ethernet2
The meaning of each area will be
explained in the following table.
area |
description |
O |
Means
protocols obtained route. Possible group includes the following values: R---Route obtained from RIP O---Route obtained from OSPF. C---Connected routes S--- Static routes B---Route obtained from BGP. |
E2 |
Routing
type. Possible group includes the following values: E1--- OSPF exterior type 1 route E2--- OSPF exterior type 2 route |
150.150.0.0 |
Means remote network address. |
[160/5] |
First
number in the bracket is administrative distance of information
source. Second number is the Metric.
|
via 131.119.254.6 |
Next route value designated to remote network. |
Ethernet2 |
Designate the interface through which the designated network
is reachable. |