中级会员 
 精华: 1
 积分: 376
 帖子: 40  威望: 132 点 金钱: 87 币 贡献: 65 点 经验: 02级
 阅读权限: 30
 注册: 2007-8-17
 状态:
|
1#
大 中
小 发表于 2007-11-12 12:53 只看该作者
ip default-information originate 通告默认路由
ip default-information originate 通告默认路由[文档]
默认路由系列文档5/5
在OSPF/ISIS中,ip default-network无效。我们用ip default-information originate来通告默认路由,在高版本的IOS中RIP也可以使用这条命令,但EIGRP不可以。以OSPF为例:
-------------------------------------------------------------------------------------------------------
R1#show run
Building configuration...
Current configuration : 975 bytes
!
version 12.3
!
hostname R1
!
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface Serial1/0
ip address 12.1.1.1 255.255.255.0
!
router ospf 10
network 12.1.1.0 0.0.0.255 area 0
!
end
-------------------------------------------------------------------------------------------------------
R2#show run
Building configuration...
Current configuration : 1057 bytes
!
version 12.3
!
hostname R2
!
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface Serial1/0
ip address 12.1.1.2 255.255.255.0
!
interface Serial1/1
ip address 23.1.1.2 255.255.255.0
!
router ospf 10
network 12.1.1.0 0.0.0.255 area 0
default-information originate always
//发布默认路由,加上参数 [always]
!
//作用是 当静态默认路由失效时,仍然//通告默认路由
ip route 0.0.0.0 0.0.0.0 23.1.1.3
!
end
-------------------------------------------------------------------------------------------------------
R3#show run
Building configuration...
Current configuration : 934 bytes
!
version 12.3
!
hostname R3
!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface Serial1/0
ip address 23.1.1.3 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 23.1.1.2
!
end
-------------------------------------------------------------------------------------------------------
R1# show ip ro
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 12.1.1.2 to network 0.0.0.0
1.0.0.0/24 is subnetted, 1 subnets
C
1.1.1.0 is directly connected, Loopback0
12.0.0.0/24 is subnetted, 1 subnets
C
12.1.1.0 is directly connected, Serial1/0
O*E2 0.0.0.0/0 [110/1] via 12.1.1.2, 00:17:47, Serial1/0
R1#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/114/164 ms
稍后附上默认路由系列文档总结
|