Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3186349
  • 博文数量: 39
  • 博客积分: 10067
  • 博客等级: 上将
  • 技术积分: 4018
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-03 15:39
文章分类

全部博文(39)

文章存档

2011年(2)

2009年(3)

2008年(34)

分类: 系统运维

2008-04-10 16:31:44

 
无论是单独使用当作一个命令使用,还是做为其它命令的参数都是产生External LSA(type5/7)。
特例是are area-id nssa no-summary default-information-originate这个复合命令,default-information-originate在此命令中以参数形式出现。但no-summary与default-information-originate两参数功能是一样的,在此area中的基础参数no-summary优先生效,进而使用type-3的LSA产生一个默认路由到区域内。
 


实例1>
r2#sh run | begin router
router ospf 100
 router-id 10.0.0.2
 log-adjacency-changes
 area 1 nssa default-information-originate
 area 1 default-cost 100
 network 172.16.2.0 0.0.0.255 area 1
 network 172.16.3.0 0.0.0.255 area 1
 network 192.168.0.0 0.0.0.255 area 0
 network 192.168.1.0 0.0.0.255 area 1
-------------------------------------------------
r1#sh run | begin router
router ospf 100
 router-id 10.0.0.1
 log-adjacency-changes
 area 1 nssa
 redistribute connected subnets
 network 172.16.0.0 0.0.0.255 area 1
 network 172.16.1.0 0.0.0.255 area 1
 network 192.168.1.0 0.0.0.255 area 1
-------------------------------------------------
r1#sh ip route
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 192.168.1.2 to network 0.0.0.0
     1.0.0.0/24 is subnetted, 4 subnets
C       1.1.0.0 is directly connected, Loopback6
C       1.1.1.0 is directly connected, Loopback5
C       1.1.2.0 is directly connected, Loopback7
C       1.1.3.0 is directly connected, Loopback8
     2.0.0.0/24 is subnetted, 1 subnets
O IA    2.2.2.0 [110/65] via 192.168.1.2, 00:07:47, Serial1/0
     172.16.0.0/24 is subnetted, 4 subnets
C       172.16.0.0 is directly connected, Loopback0
C       172.16.1.0 is directly connected, Loopback1
O       172.16.2.0 [110/65] via 192.168.1.2, 00:09:32, Serial1/0
O       172.16.3.0 [110/65] via 192.168.1.2, 00:09:32, Serial1/0
O IA 192.168.0.0/24 [110/128] via 192.168.1.2, 00:07:47, Serial1/0
C    192.168.1.0/24 is directly connected, Serial1/0
O*N2 0.0.0.0/0 [110/100] via 192.168.1.2, 00:07:30, Serial1/0
-------------------------------------------------

 
实例2>
r2#sh run | begin router
router ospf 100
 router-id 10.0.0.2
 log-adjacency-changes
 network 172.16.2.0 0.0.0.255 area 1
 network 172.16.3.0 0.0.0.255 area 1
 network 192.168.0.0 0.0.0.255 area 0
 network 192.168.1.0 0.0.0.255 area 1
 default-information originate always
------------------------------------------------
r1#sh run | begin router
router ospf 100
 router-id 10.0.0.1
 log-adjacency-changes
 redistribute connected subnets
 network 172.16.0.0 0.0.0.255 area 1
 network 172.16.1.0 0.0.0.255 area 1
 network 192.168.1.0 0.0.0.255 area 1
------------------------------------------------
r1#sh ip route
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 192.168.1.2 to network 0.0.0.0
     2.0.0.0/24 is subnetted, 1 subnets
O IA    2.2.2.0 [110/65] via 192.168.1.2, 00:01:47, Serial1/0
     172.1.0.0/24 is subnetted, 4 subnets
O E2    172.1.1.0 [110/20] via 192.168.1.2, 00:01:47, Serial1/0
O E2    172.1.0.0 [110/20] via 192.168.1.2, 00:01:47, Serial1/0
O E2    172.1.3.0 [110/20] via 192.168.1.2, 00:01:47, Serial1/0
O E2    172.1.2.0 [110/20] via 192.168.1.2, 00:01:47, Serial1/0
     172.16.0.0/24 is subnetted, 4 subnets
C       172.16.0.0 is directly connected, Loopback0
C       172.16.1.0 is directly connected, Loopback1
O       172.16.2.0 [110/65] via 192.168.1.2, 00:01:48, Serial1/0
O       172.16.3.0 [110/65] via 192.168.1.2, 00:01:48, Serial1/0
O IA 192.168.0.0/24 [110/128] via 192.168.1.2, 00:01:48, Serial1/0
C    192.168.1.0/24 is directly connected, Serial1/0
O*E2 0.0.0.0/0 [110/1] via 192.168.1.2, 00:01:34, Serial1/0
------------------------------------------
r3#sh ip route
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 192.168.0.1 to network 0.0.0.0
     1.0.0.0/24 is subnetted, 4 subnets
O E2    1.1.0.0 [110/20] via 192.168.0.1, 00:12:46, Serial1/0
O E2    1.1.1.0 [110/20] via 192.168.0.1, 00:12:46, Serial1/0
O E2    1.1.2.0 [110/20] via 192.168.0.1, 00:12:46, Serial1/0
O E2    1.1.3.0 [110/20] via 192.168.0.1, 00:12:46, Serial1/0
     2.0.0.0/24 is subnetted, 1 subnets
O       2.2.2.0 [110/65] via 192.168.0.1, 00:12:46, Serial1/0
     172.1.0.0/24 is subnetted, 4 subnets
C       172.1.1.0 is directly connected, Loopback0
C       172.1.0.0 is directly connected, Loopback1
C       172.1.3.0 is directly connected, Loopback3
C       172.1.2.0 is directly connected, Loopback2
C    192.168.0.0/24 is directly connected, Serial1/0
O IA 192.168.1.0/24 [110/128] via 192.168.0.1, 00:12:47, Serial1/0
O*E2 0.0.0.0/0 [110/1] via 192.168.0.1, 00:12:33, Serial1/0
--------------------------------------------------
 
++++++++++++++++++++++++++++++++++++++++++++++
此处default-information-oraginate命令单独使用,因其不特定于一个area,所以area0/1的路由器全收到些默认路由。
++++++++++++++++++++++++++++++++++++++++++++++
 
 
 
 
 
 
特例:
r2#sh run | begin router
router ospf 100
 router-id 10.0.0.2
 log-adjacency-changes
 area 1 nssa no-summary default-information-originate 
 network 2.2.2.0 0.0.0.255 area 0
 network 172.16.2.0 0.0.0.255 area 1
 network 172.16.3.0 0.0.0.255 area 1
 network 192.168.0.0 0.0.0.255 area 0
 network 192.168.1.0 0.0.0.255 area 1
-----------------------------------------------------------
r1#sh run | begin router
router ospf 100
 router-id 10.0.0.1
 log-adjacency-changes
 area 1 nssa
 redistribute connected subnets
 network 172.16.0.0 0.0.0.255 area 1
 network 172.16.1.0 0.0.0.255 area 1
 network 192.168.1.0 0.0.0.255 area 1
-------------------------------------------------
r1#sh ip route
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 192.168.1.2 to network 0.0.0.0
     1.0.0.0/24 is subnetted, 4 subnets
C       1.1.0.0 is directly connected, Loopback6
C       1.1.1.0 is directly connected, Loopback5
C       1.1.2.0 is directly connected, Loopback7
C       1.1.3.0 is directly connected, Loopback8
     172.16.0.0/24 is subnetted, 4 subnets
C       172.16.0.0 is directly connected, Loopback0
C       172.16.1.0 is directly connected, Loopback1
O       172.16.2.0 [110/65] via 192.168.1.2, 00:11:20, Serial1/0
O       172.16.3.0 [110/65] via 192.168.1.2, 00:11:20, Serial1/0
C    192.168.1.0/24 is directly connected, Serial1/0
O*IA 0.0.0.0/0 [110/164] via 192.168.1.2, 00:01:01, Serial1/0
---------------------------------------------------
阅读(4973) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~