1、单区域的OSPF配置,OSPF协议概述 1,OSPF是一种链路状态路由选择协议。 所谓链路状态是指路由器接口的状态,如UP,DOWN,IP及网络类型等。 链路状态信息通过链路状态公告(LSA)发布到网上的每台路由器。 每台路由器通过LSA信息建立一个关于网络的拓扑数据库。,OSPF协议概述 2,区域(Area) 在OSPF中使用区域来为自治系统分段,OSPF是一种层次化的路由选择协议,区域0是一个OSPF网络中必须具有的区域,也称为主干区域,其他所有区域要求通过区域0互连到一起。,OSPF协议的优点,OSPF是基于国际标准的协议,具有开放性强的特点,被众多网络设备厂商所支持。支持VLSM;使用
2、触发的路由更新,快速反应网络变化,减小协议本身对网络流量的占用。支持大型网络,并能进行优化路由更新。,河南济源农联社改造建设,青岛市地税局应用案例, 2000, Cisco Systems, Inc.,,4-7,Configuring OSPF in a Single Area,Configuring OSPF on Internal Routers,Can Assign Network or Interface Address.,Broadcast Network,Point-to-Point Network,E0 10.64.0.1,10.64.0.2 E0,S0 10.2.1.2,10.
3、 2.1.1 S1,A,B,C, interface Ethernet0ip address 10.64.0.1 255.255.255.0 !router ospf 1network 10.0.0.0 0.255.255.255 area 0, interface Ethernet0ip address 10.64.0.2 255.255.255.0 ! interface Serial0ip address 10.2.1.2 255.255.255.0router ospf 50network 10.2.1.2 0.0.0.0 area 0network 10.64.0.2 0.0.0.0
4、 area 0, 2000, Cisco Systems, Inc.,,4-9,Verifying OSPF Operation,Verifying OSPF Operation,Displays area ID and adjacency information,Verifies that OSPF is configured,Displays all the routes learned by the router,show ip ospf interface,R2#sh ip ospf int e0 Ethernet0 is up, line protocol is upInternet
5、 Address 192.168.0.12/24, Area 0Process ID 1, Router ID 192.168.0.12, Network Type BROADCAST, Cost: 10Transmit Delay is 1 sec, State DROTHER, Priority 1Designated Router (ID) 192.168.0.11, Interface address 192.168.0.11Backup Designated router (ID) 192.168.0.13, Interface address 192.168.0.13Timer i
6、ntervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5Hello due in 00:00:04Neighbor Count is 3, Adjacent neighbor count is 2Adjacent with neighbor 192.168.0.13 (Backup Designated Router)Adjacent with neighbor 192.168.0.11 (Designated Router)Suppress hello for 0 neighbor(s), 2000, Cisco Systems, Inc.,,4-12,Lab Exercises,Lab Exercises,在路由器上启动OSPF协议 声明相应网络进入OSPF路由进程 查看OSPF路由信息 Show ip route 查看OSPF协议配置信息 Show ip protocol 查看OSPF邻居路由器信息 Show ip ospf neighbor,