配置单区域OSPF(Enabling OSPF)
版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://loveme23.blog.51cto.com/7891/30302 |
实验来源:工大瑞普Cisco网络技术论坛 ![]() 1.按照拓扑图配置好每台路由器的接口IP地址; 2.配置单区域OSPF: R1(config)#router ospf 10 //启用OSPF路由协议,进程ID为10 R1(config-router)#network 10.1.1.0 0.0.0.255 area 0 //指明直连网段10.1.1.0,注意后面跟的是子网掩码的反码 R1(config-router)#network 10.2.2.0 0.0.0.31 area 0 R1(config-router)#network 10.3.3.0 0.0.0.255 area 0 R1(config-router)#exit R2(config)#router ospf 20 R2(config-router)#network 10.3.3.0 0.0.0.255 area 0 R2(config-router)#network 172.16.3.0 0.0.0.255 area 0 R2(config-router)#exit R3(config)#router ospf 30 R3(config-router)#network 172.16.3.0 0.0.0.255 area 0 R3(config-router)#network 172.16.1.0 0.0.0.255 area R3(config-router)#network 172.16.1.0 0.0.0.255 area 0 R3(config-router)#network 172.16.2.0 0.0.0.31 area 0 R3(config-router)#exit 注:子网掩码的反码:就是用255.255.255.255减去子网掩码所得到的数,例如:255.255.255.224的掩码反码为:255.255.255.255-255.255.255.224=0.0.0.31,就和上面的10.2.2.0/27和172.16.2.0/27网段计算出来的一样。 R1#show 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 not set 172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks O 172.16.1.1/32 [110/129] via 10.3.3.2, 00:00:02, Serial1/1 O 172.16.3.0/24 [110/128] via 10.3.3.2, 00:00:02, Serial1/1 O 172.16.2.1/32 [110/129] via 10.3.3.2, 00:00:02, Serial1/1 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks C 10.3.3.0/24 is directly connected, Serial1/1 C 10.2.2.0/27 is directly connected, Loopback1 C 10.1.1.0/24 is directly connected, Loopback0 R1#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 172.16.3.2 0 FULL/ - 00:00:36 10.3.3.2 Serial1/1 R1#show ip ospf database OSPF Router with ID (10.2.2.1) (Process ID 10) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 10.2.2.1 10.2.2.1 37 0x80000004 0x003032 4 172.16.2.1 172.16.2.1 27 0x80000002 0x00330E 4 172.16.3.2 172.16.3.2 28 0x80000003 0x001EEF 4 本文出自 “★Beckham~23” 博客,请务必保留此出处http://loveme23.blog.51cto.com/7891/30302 本文出自 51CTO.COM技术博客 |




loveme23
博客统计信息
热门文章
最新评论
友情链接