分类:
2012-06-19 13:41:44
Default routes injected into a normal area can be originated by any OSPF router. The OSPF router does not, by default, generate a default route into the OSPF domain. In order for OSPF to generate a default route, you must use the default-information originate command.
有两张方法向OSPF区域注入一条
(1) The first is to advertise 0.0.0.0 into the OSPF domain, provided the advertising router already has a default route.
(2)The second is to advertise 0.0.0.0 regardless of whether the
advertising router already has a default route. The second method can be
accomplished by adding the keyword always to the default-information originate command.
Router 1.1.1.1 |
---|
Current configuration: hostname r1.1.1.1 interface Loopback0 ip address 1.1.1.1 255.0.0.0 interface Serial2/1/0 ip address 5.0.0.1 255.0.0.0 router ospf 2 network 5.0.0.0 0.255.255.255 area 1 end |
Router 2.2.2.2 |
---|
Current configuration: hostname r2.2.2.2 interface Loopback0 ip address 2.2.2.2 255.0.0.0 interface Serial0/1/0 ip address 5.0.0.2 255.0.0.0 interface ATM1/0.20 ip address 6.0.0.2 255.0.0.0 router ospf 2 network 5.0.0.0 0.255.255.255 area 1 network 6.0.0.0 0.255.255.255 area 0 default-information originate ip route 0.0.0.0 0.0.0.0 6.0.0.3 end |