ip address 203.250.14.1 255.255.255.0 router ospf 10 network 203.250.13.41 0.0.0.0 area 1 network 203.250.0.0 0.0.255.255 area 0.0.0.0 RTF# hostname RTF interface Ethernet0 ip address 203.250.14.2 255.255.255.0 router ospf 10 network 203.250.0.0 0.0.255.255 area 0.0.0.0 Выше приведен простой пример, который демонстрирует использование двух команд, которые очень полезны при отладке сетей OSPF. show ip ospf interface Эта команда выполняет быструю проверку, того принадлежат ли все интерфейсы к областям, к которым они должны принадлежать. Последовательность, в которой перечисляются команды сети OSPF, очень важна.
В конфигурации RTA, если инструкция "network 203.250.0.0 0.0.255.255 area 0.0.0.0" находится перед инструкцией "network 203.250.13.41 0.0.0.0 area 1", все интерфейсы будут в области 0, что неверно, так как возвратная петля находится в области 1. Проанализируем выходные данные команды для RTA, RTF, RTB, and RTD: RTA# show ip ospf interface e0 Ethernet0 is up, line protocol is up Internet Address 203.250.14.1 255.255.255.0, Area 0.0.0.0 Process ID 10, Router ID 203.250.13.41, Network Type BROADCAST , Cost:
10 Transmit Delay is 1 sec, State BDR, Priority 1 Designated Router (ID) 203.250.15.1 , Interface address 203.250.14.2 Backup Designated router (ID) 203.250.13.41 , Interface address 203.250.14.1 Timer intervals configured, Hello 10, Dead 40 , Wait 40, Retransmit 5 Hello due in 0:00:02 Neighbor Count is 3, Adjacent neighbor count is 3 Adjacent with neighbor 203.250.15.1 (Designated Router) Loopback0 is up, line protocol is up Internet Address 203.250.13.41 255.255.255.255, Area 1 Process ID 10, Router ID 203.250.13.41, Network Type LOOPBACK, Cost:
1 Loopback interface is treated as a stub Host RTF# show ip ospf interface e0 Ethernet0 is up, line protocol is up Internet Address 203.250.14.2 255.255.255.0, Area 0.0.0.0 Process ID 10, Router ID 203.250.15.1, Network Type BROADCAST , Cost:
10 Transmit Delay is 1 sec, State DR, Priority 1 Designated Router (ID) 203.250.15.1 , Interface address 203.250.14.2 Backup Designated router (ID) 203.250.13.41 , Interface address 203.250.14.1 Timer intervals configured, Hello 10, Dead 40 , Wait 40, Retransmit 5 Hello due in 0:00:08 Neighbor Count is 3, Adjacent neighbor count is 3 Adjacent with neighbor 203.250.13.41 (Backup Designated Router) RTD# show ip ospf interface e0 Ethernet0 is up, line protocol is up Internet Address 203.250.14.4 255.255.255.0, Area 0.0.0.0 Process ID 10, Router ID 192.208.10.174, Network Type BROADCAST , Cost:
10 Transmit Delay is 1 sec, State DROTHER , Priority 1 Designated Router (ID) 203.250.15.1 , Interface address 203.250.14.2 Backup Designated router (ID) 203.250.13.41 , Interface address 203.250.14.1 Timer intervals configured, Hello 10, Dead 40 , Wait 40, Retransmit 5 Hello due in 0:00:03 Neighbor Count is 3, Adjacent neighbor count is 2 Adjacent with neighbor 203.250.15.1 (Designated Router) Adjacent with neighbor 203.250.13.41 (Backup Designated Router)