[ Pobierz całość w formacie PDF ]
replaced by a default route of 0.0.0.0. The cost of the route happened to
be 65 (64 for a T1 line + 1 advertised by RTC).
We will now configure area 2 to be totally stubby, and change the default
cost of 0.0.0.0 to 10.
RTC#
interface Ethernet 0
ip address 203.250.14.1 255.255.255.0
interface Serial1
ip address 203.250.15.1 255.255.255.252
router ospf 10
network 203.250.15.0 0.0.0.255 area 2
network 203.250.14.0 0.0.0.255 area 0
area 2 stub no-summary
RTE#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
OSPF DESIGN GUIDE-NSA group
April 25, 1996
33
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, * - candidate
default
Gateway of last resort is not set
203.250.15.0 255.255.255.252 is subnetted, 1 subnets
C
203.250.15.0 is directly connected, Serial0
131.108.0.0 255.255.255.240 is subnetted, 1 subnets
O
131.108.79.208 [110/74] via 203.250.15.1, 00:31:27, Serial0
O*IA 0.0.0.0 0.0.0.0 [110/74] via 203.250.15.1, 00:00:00, Serial0
Note that the only routes that show up are the intra-area routes (O) and
the default-route 0.0.0.0. The external and inter-area routes have been
blocked. The cost of the default route is now 74 (64 for a T1 line + 10
advertised by RTC). No configuration is needed on RTE in this case. The
area is already stub, and the no-summary command does not affect the
Hello packet at all as the stub command does.
14.0 Redistributing routes into OSPF
Redistributing routes into OSPF from other routing protocols or from
static will cause these routes to become OSPF external routes. To redis-
tribute routes into OSPF, use the following command in router configura-
tion mode:
redistribute protocol [process-id] [metric value] [metric-type value]
[route-map map-tag] [subnets]
The protocol and process-id are the protocol that we are injecting into
OSPF and its process-id if it exits. The metric is the cost we are
assigning to the external route. If no metric is specified, OSPF puts a
default value of 20 when redistributing routes from all protocols except
BGP routes, which get a metric of 1. The metric-type is discussed in the
next paragraph.
The route-map is a method used to control the redistribution of routes
between routing domains. The format of a route map is:
route-map map-tag [[permit | deny] | [sequence-number]]
When redistributing routes into OSPF, only routes that are not subnetted
are redistributed if the subnets keyword is not specified.
14.1 E1 vs. E2 external routes
External routes fall under two categories, external type 1 and external
type 2. The difference between the two is in the way the cost (metric) of
the route is being calculated. The cost of a type 2 route is always the
external cost, irrespective of the interior cost to reach that route. A
type 1 cost is the addition of the external cost and the internal cost
used to reach that route. A type 2 route is always preferred over a type
OSPF DESIGN GUIDE-NSA group
April 25, 1996
34
1 route for the same destination. This is illustrated in the following
diagram:
Area 1
c=y
c=x
N1 (E1)
Area 0
RTC
RTB
c=z
RTA
c=x
N2 (E2)
N1 (E1) c=x+y
N2 (E2) c=x
N1 (E1) c=x+y+z
N2 (E2) c=x
As the above diagram shows, RTA is redistributing two external routes
into OSPF. N1 and N2 both have an external cost of x. The only difference
is that N1 is redistributed into OSPF with a metric-type 1 and N2 is
redistributed with a metric-type 2. If we follow the routes as they flow
from Area 1 to Area 0, the cost to reach N2 as seen from RTB or RTC will
always be x. The internal cost along the way is not considered. On the
other hand, the cost to reach N1 is incremented by the internal cost. The
cost is x+y as seen from RTB and x+y+z as seen from RTC. Type 1 routes
are preferred over type 2 routes in case two same cost routes exist to
the destination. The default is type 2.
Example:
16.16.16.0/24
203.250.
14.2
E0
RTC
S1
15.1
15.2
RTE
S0
128.213.0.0/16
Suppose we added two static routes pointing to E0 on RTC: 16.16.16.0
255.255.255.0 (the /24 notation indicates a 24 bit mask starting from the
far left) and 128.213.0.0 255.255.0.0. The following shows the different
OSPF DESIGN GUIDE-NSA group
April 25, 1996
35
behaviors when different parameters are used in the redistribute command
on RTC:
RTC#
interface Ethernet0
ip address 203.250.14.2 255.255.255.0
[ Pobierz całość w formacie PDF ]
zanotowane.pldoc.pisz.plpdf.pisz.plspartaparszowice.keep.pl