telnet进入路由1的2604端口,密码hispider(下各端口都相同)
ospfd enable ospfd# config t ospfd(config)# router ospf ospfd(config-router)# network 172.16.23.3/24 area 1 ospfd(config-router)# network 192.168.0.44/24 area 1 ospfd(config-router)# router-id 3.3.3.3 ospfd(config-router)# write Configuration saved to /etc/config/iroute/ospfd.conf
telnet进入路由2的2604端口
ospfd enable ospfd# config t ospfd(config)# router ospf ospfd(config-router)# network 172.16.23.2/24 area 1 ospfd(config-router)# network 172.16.12.2/24 area 0 ospfd(config-router)# network 192.168.2.44/24 area 0 ospfd(config-router)# router-id 2.2.2.2 ospfd(config-router)# write Configuration saved to /etc/config/iroute/ospfd.conf
telnet进入路由3的2604端口
ospfd enable ospfd# config t ospfd(config)# router ospf ospfd(config-router)# network 172.16.12.1/24 area 0 ospfd(config-router)# network 192.168.1.44/24 area 0 ospfd(config-router)# router-id 1.1.1.1 ospfd(config-router)# write Configuration saved to /etc/config/iroute/ospfd.conf
配置好所有路由以后,telnet进入任意一个路由2601端口,进入ZEBRA终端查看路由信息
Hi-Router# sh ip route Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - ISIS, B - BGP, - selected route, * - FIB route
当拥有前面有O * 192.168.1.0/24 [120/2] via 192.168.12.1, eth0, 01:22:29 等多条O开头条目则代表OSPF配置成功生效。