Note:
All routers
will generate Router (Type 1) LSAs. For example, Router A
will generate a
Type 1 LSA that contains the status of links FastEthernet 0/0
and
FastEthernet 0/1. This LSA will be flooded to all other routers in Area 1.
11,
Designated Routers
will generate Network (Type 2) LSAs. For example, if
Router C was elected
the DR for the multi-access network in Area 1, it
would generate a
Type 2 LSA containing a list of all routers attached to it.
Area Border Routers
(ABRs) will generate Network Summary (Type 3)
LSAs. For example,
Router C is an ABR between Area 0 and Area 1. It will
thus send Type 3
LSAs into both areas. Type 3 LSAs sent into Area 0 will
contain a list of
networks within Area 1, including costs to reach those
networks. Type 3
LSAs sent into Area 1 will contain a list of networks
within Area 0, and
all other areas connected to Area 0. This allows Area 1 to
reach any other
area, and all other areas to reach Area 1.
12,
The OSPF Metric
OSPF
determines the best (or shortest) path to a destination network using a
cost
metric, which is based on the bandwidth of interfaces. The total cost of
a route is
the sum of all outgoing interface costs. Lowest cost is preferred.
Cisco
applies default costs to specific interface types:
Type Cost
Serial
(56K) 1785
Serial
(64K) 1562
T1
(1.544Mbps) 64
Token Ring
(4Mbps) 25
Ethernet
(10 Mbps) 10
Token Ring
(16 Mbps) 6
Fast
Ethernet 1
13,
The first command, router ospf 1, enables the OSPF
process. The “1”
indicates the OSPF process ID, and can be unique on
each router. The
process ID allows multiple OSPF processes to run on
the same router. The
router-id command assigns a unique OSPF ID of 1.1.1.1
for this router.
Note the use of a wildcard mask instead of a subnet
mask in the network
statement. With OSPF, we’re not telling the router
what networks to
advertise; we’re telling the router to place certain
interfaces into specific
areas, so those routers can form neighbor
relationships. The wildcard mask
0.0.255.255 tells us that the last two octets can
match any number.
The first network statement places interface E0 on
Router A into Area 1.
Likewise, the second network statement places
interface S0 on Router A into
Area 0. The network statement could have been written
more specifically:
RouterA(config)# router ospf 1
RouterA(config-router)# network 172.16.1.2 0.0.0.0
area 1
RouterA(config-router)# network 172.17.1.1 0.0.0.0
area 0
In order for Router B to form a neighbor relationship
with Router A, its
connecting interface must be put in the same Area as
Router A:
RouterB(config)# router ospf 1
RouterA(config-router)# router-id 2.2.2.2
RouterB(config-router)# network 172.17.1.2 0.0.0.0
area 0
RouterB(config-router)# network 172.18.1.1 0.0.0.0
area 2
If Router B’s S0 interface was placed in a different
area than Router A’s S0
interface, the two routers would never form a neighbor
relationship, and
never share routing updates.
14,
15,
However,
please note that the passive-interface command works differently
with
OSPF than with RIP or IGRP. OSPF will no longer form neighbor
relationships
out of a “passive” interface, thus this command prevents
updates
from being sent or received out of this interface:
RouterC(config)#
router ospf 1
RouterC(config-router)#
network 10.4.0.0 0.0.255.255 area 0
RouterC(config-router)#
network 10.2.0.0 0.0.255.255 area 0
RouterC(config-router)#
passive-interface s0
16,
Router C will not form a neighbor adjacency with
Router B.
It is possible to configure all interfaces to be
passive using the passiveinterface
default command, and then individually use the no
passiveinterface
command on the interfaces that neighbors should be
formed on:
RouterC(config)# router ospf 1
RouterC(config-router)# network 10.4.0.0 0.0.255.255
area 0
RouterC(config-router)# network 10.2.0.0 0.0.255.255
area 0
RouterC(config-router)# passive-interface default
RouterC(config-router)# no passive-interface e0
Always
remember, that the passive-interface command will prevent OSPF
(and EIGRP)
from forming neighbor relationships out of that interface. No
routing updates
are passed in either direction.



Comments
Post a Comment