OSPF в Juniper
Материал из Xgu.ru
Настройка протокола динамической маршрутизации OSPF в Juniper JUNOS:
Посмотреть соседей можно командой "show ospf neighbor":
root@jun-1> show ospf neighbor Address Interface State ID Pri Dead 100.0.0.2 em0.0 Full 200.0.0.2 128 38
Посмотреть маршруты, полученные по протоколу OSPF можно командой "show route protocol ospf":
root@jun-1> show route protocol ospf inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 200.0.0.2/32 *[OSPF/10] 00:01:39, metric 1 > to 100.0.0.2 via em0.0 224.0.0.5/32 *[OSPF/10] 00:02:48, metric 1 MultiRecv
[править] Ключевые команды для мониторинга и траблшутинга работы OSPF
- show ospf route
root@Jun-1> show ospf route Topology default Route Table: Prefix Path Route NH Metric NextHop Nexthop Type Type Type Interface Address/LSP 20.20.20.20 Intra Router IP 1 em0.0 10.0.0.2 10.0.0.0/30 Intra Network IP 1 em0.0 10.10.10.10/32 Intra Network IP 0 lo0.0 11.11.11.11/32 Intra Network IP 0 lo0.0 20.20.20.20/32 Intra Network IP 1 em0.0 10.0.0.2 21.21.21.21/32 Intra Network IP 1 em0.0 10.0.0.2
- show ospf database
root@Jun-1> show ospf database OSPF database, Area 0.0.0.0 Type ID Adv Rtr Seq Age Opt Cksum Len Router *10.10.10.10 10.10.10.10 0x80000006 42 0x22 0x63ee 60 Router 20.20.20.20 20.20.20.20 0x80000004 43 0x22 0xfab7 60 Network 10.0.0.2 20.20.20.20 0x80000002 43 0x22 0x3b2c 32
- show ospf statistic
root@Jun-1> show ospf statistics Packet type Total Last 5 seconds Sent Received Sent Received Hello 64 16 1 1 DbD 7 2 0 0 LSReq 1 1 0 0 LSUpdate 3 3 0 0 LSAck 3 3 0 0 DBDs retransmitted : 4, last 5 seconds : 0 LSAs flooded : 2, last 5 seconds : 0 LSAs flooded high-prio : 0, last 5 seconds : 0 LSAs retransmitted : 0, last 5 seconds : 0 LSAs transmitted to nbr: 1, last 5 seconds : 0 LSAs requested : 1, last 5 seconds : 0 LSAs acknowledged : 4, last 5 seconds : 0 Flood queue depth : 0 Total rexmit entries : 0 db summaries : 0 lsreq entries : 0 Receive errors: None
- show ospf log - очень интересная команда. Позволяет посмотреть в какое время и какие действия происходили касательно пересчетов алгоритма SPF.
When - во сколько произошел пересчет. Type - тип пересчета. Elapsed - сколько времени в секундах занял пересчет.
root@Jun-1> show ospf log Topology default SPF log: Last instance of each event type When Type Elapsed 00:01:07 SPF 0.003709 00:01:07 Stub 0.000052 00:01:07 Interarea 0.000009 00:01:07 External 0.000005 00:01:07 NSSA 0.000004 00:01:07 Cleanup 0.003531 Maximum length of each event type When Type Elapsed 00:01:07 SPF 0.003709 00:03:25 Stub 0.003650 00:03:35 Interarea 0.000151 00:03:35 External 0.000047 00:03:35 NSSA 0.000151 00:03:35 Cleanup 0.006514 Last 100 events When Type Elapsed 00:03:35 SPF 0.001007 00:03:35 Stub 0.000183 00:03:35 Interarea 0.000151 00:03:35 External 0.000047 00:03:35 NSSA 0.000151 00:03:35 Cleanup 0.006514 00:03:35 Total 0.013490 00:03:30 SPF 0.000021 00:03:30 Stub 0.000004 00:03:30 Interarea 0.000009 00:03:30 External 0.000004 00:03:30 NSSA 0.000003 00:03:30 Cleanup 0.000024 00:03:30 Total 0.000120 00:03:25 SPF 0.000287 00:03:25 Stub 0.003650 00:03:25 Interarea 0.000009 00:03:25 External 0.000004 00:03:25 NSSA 0.000004 00:03:25 Cleanup 0.000592 00:03:25 Total 0.004606 00:02:51 SPF 0.000343 00:02:51 Stub 0.000531 00:02:51 Interarea 0.000130 00:02:51 External 0.000037 00:02:51 NSSA 0.000025 00:02:51 Cleanup 0.000750 00:02:51 Total 0.002013 00:02:45 SPF 0.000023 00:02:45 Stub 0.000204 00:02:45 Interarea 0.000007 00:02:45 External 0.000004 00:02:45 NSSA 0.000003 00:02:45 Cleanup 0.000160 00:02:45 Total 0.000481 00:02:17 SPF 0.000031 00:02:17 Stub 0.000140 00:02:17 Interarea 0.000007 00:02:17 External 0.000005 00:02:17 NSSA 0.000006 00:02:17 Cleanup 0.000194 00:02:17 Total 0.000510 00:02:12 SPF 0.000030 00:02:12 Stub 0.000058 00:02:12 Interarea 0.000007 00:02:12 External 0.000004 00:02:12 NSSA 0.000004 00:02:12 Cleanup 0.000655 00:02:12 Total 0.000857 00:02:07 SPF 0.000031 00:02:07 Stub 0.000061 00:02:07 Interarea 0.000007 00:02:07 External 0.000004 00:02:07 NSSA 0.000004 00:02:07 Cleanup 0.000113 00:02:07 Total 0.000325 00:01:17 SPF 0.000032 00:01:17 Stub 0.000061 00:01:17 Interarea 0.000008 00:01:17 External 0.000004 00:01:17 NSSA 0.000004 00:01:17 Cleanup 0.000058 00:01:17 Total 0.000272 00:01:12 SPF 0.000071 00:01:12 Stub 0.000056 00:01:12 Interarea 0.000008 00:01:12 External 0.000005 00:01:12 NSSA 0.000004 00:01:12 Cleanup 0.000068 00:01:12 Total 0.000317 00:01:07 SPF 0.003709 00:01:07 Stub 0.000052 00:01:07 Interarea 0.000009 00:01:07 External 0.000005 00:01:07 NSSA 0.000004 00:01:07 Cleanup 0.003531 00:01:07 Total 0.007433
- show ospf interface
root@Jun-1> show ospf interface Interface State Area DR ID BDR ID Nbrs em0.0 BDR 0.0.0.0 20.20.20.20 10.10.10.10 1 lo0.0 DR 0.0.0.0 10.10.10.10 0.0.0.0 0 lo0.0 DR 0.0.0.0 10.10.10.10 0.0.0.0 0
Важный момент в работе OSPF в JUNOS - обновление всех LSA происходит не раз в 30 минут как в Cisco IOS, а раз в 50 минут.