Example
[edit protocols ospf]
user@Chablis# set area 0 interface all
user@Chablis# set area 0 interface fxp0 disable
[edit protocols ospf]
user@Chablis# show
area 0.0.0.0 {
interface all;
interface fxp0.0 {
disable;
}
}
или на каждый интерфейс
protocols {
ospf {
area 0.0.0.0 {
interface em0.0;
interface em4.0;
}
area 0.0.0.1 {
interface em1.0;
}
}
}
Troubleshooting
show ospf interface
root@jun2> show ospf interface
Interface State Area DR ID BDR ID Nbrs
em0.0 DR 0.0.0.0 172.20.20.2 0.0.0.0 1
em4.0 DR 0.0.0.0 172.20.20.2 10.10.10.1 1
em1.0 BDR 0.0.0.1 172.20.40.1 172.20.20.2 1
Interface Configured OSPF interfaces that are physically present in the router are displayed in this column. Failure to properly enter a logical unit value results in the interface not appearing in this output.
State The current state of the interface is displayed in this column. Possible values include:
BDR—The local router is the backup designated router.
Down—The interface is not currently operational.
DR—The local router is the designated router.
DRother—The local router is neither the DR nor the BDR.
PtToPt—This is a point-to-point interface.
Area This field displays the current area ID assigned to the interface.
DR ID The router ID of the current designated router is displayed in this column. Point-to-point interfaces use a value of 0.0.0.0.
BDR ID The router ID of the current backup designated router is displayed in this column. Point-to-point interfaces use a value of 0.0.0.0.
Nbrs The value in this column represents the total number of OSPF neighbors discovered across this interface.
show ospf neighbor
root@jun2> show ospf neighborAddress The physical interface IP address of the neighbor is displayed in this column.
Address Interface State ID Pri Dead
192.168.10.1 em0.0 Init 172.20.10.1 128 38
172.20.20.1 em4.0 Full 10.10.10.1 128 32
192.168.20.1 em1.0 Full 172.20.40.1 128 37
Interface This column shows the OSPF interface that the neighbor is reachable across.
State The current OSPF adjacency state is displayed here. The possible state values are discussed in the “Forming Adjacencies” section earlier in this chapter.
ID This field shows the router ID of the neighbor. This is used with the Pri field to elect a DR or BDR on a broadcast segment.
Pri The router priority is displayed in this field. This value is used with the ID field to elect a DR or BDR on a broadcast or NBMA segment.
Dead The time remaining until the OSPF neighbor is declared unreachable appears in this column. Each received hello packet resets this timer to the router dead interval value.
clear ospf neighbor
root@jun2> clear ospf neighbor
show ospf database
root@jun2> show ospf database
OSPF database, Area 0.0.0.0
Type ID Adv Rtr Seq Age Opt Cksum Len
Router 10.10.10.1 10.10.10.1 0x8000001d 12 0x22 0x2161 48
Router 172.20.10.1 172.20.10.1 0x8000001e 13 0x22 0xb0b1 48
Router *172.20.20.2 172.20.20.2 0x80000007 32 0x22 0x1b31 48
Network 172.20.10.1 172.20.10.1 0x80000012 13 0x22 0x8521 32
Network *172.20.20.2 172.20.20.2 0x80000003 32 0x22 0x4351 32
Summary 10.10.10.0 10.10.10.1 0x80000003 985 0x22 0x2fcd 28
Summary 10.10.20.0 10.10.10.1 0x80000002 980 0x22 0xcc26 28
Summary *192.168.20.0 172.20.20.2 0x80000006 27 0x22 0xaf33 28
Summary *192.168.30.0 172.20.20.2 0x80000003 27 0x22 0x5189 28
OSPF database, Area 0.0.0.1
Type ID Adv Rtr Seq Age Opt Cksum Len
Router *172.20.20.2 172.20.20.2 0x80000007 28 0x22 0x8bf4 36
Router 172.20.40.1 172.20.40.1 0x80000008 29 0x22 0xd663 48
Router 192.168.30.2 192.168.30.2 0x80000003 319 0x22 0x63a8 36
Network 192.168.20.1 172.20.40.1 0x80000004 29 0x22 0x7994 32
Network 192.168.30.1 172.20.40.1 0x80000001 319 0x22 0x67ec 32
Summary *10.10.10.0 172.20.20.2 0x80000001 989 0x22 0xe85d 28
Summary *10.10.20.0 172.20.20.2 0x80000001 982 0x22 0x84b6 28
Summary *172.20.10.0 172.20.20.2 0x80000007 22 0x22 0x2271 28
Summary *172.20.20.0 172.20.20.2 0x80000003 994 0x22 0xb1dc 28
Summary *192.168.10.0 172.20.20.2 0x80000003 481 0x22 0x24cb 28
Type The LSA type is displayed in this field. The possible names include:
Router—Type 1 router LSA
Network—Type 2 network LSA
Summary—Type 3 network summary LSA
ASBRSum—Type 4 ASBR summary LSA
Extern—Type 5 AS external LSA
NSSA—Type 7 NSSA external LSA
ID This field shows the Link-State ID field from the LSA. This value is used to provide uniqueness for each LSA. Entries marked with an asterisk (*) are LSAs generated by the local router.
Adv Rtr The router ID of the originating router for each LSA is displayed in this field.
Seq The sequence number assists the router to determine the most recent version of the LSA.
Age This field displays the current age of the LSA. All LSAs begin with a lifetime of 0 and increment to a defined MaxAge of 3600 seconds. Each LSA must be refreshed before the MaxAge value is reached.
Opt The Options field from the OSPF header is displayed in this column. The possible bit values are discussed in the “Hello Packet” section earlier in this chapter.
Cksum The calculated checksum value of the LSA is stored in this field. Each router calculates a new checksum when the LSA is received and verifies the value against the received value to ensure packet integrity.
Len This field displays the total length of the LSA.
clear ospf database
root@jun2> clear ospf database
show ospf log
root@jun1> show ospf log
Topology default SPF log:
Last instance of each event type
When Type Elapsed
00:00:04 SPF 0.000316
00:00:04 Stub 0.000020
00:00:04 Interarea 0.000158
00:00:04 External 0.000008
00:00:04 NSSA 0.000006
00:00:04 Cleanup 0.000147
Maximum length of each event type
When Type Elapsed
00:29:23 SPF 0.012426
00:29:23 Stub 0.013933
00:29:33 Interarea 0.000965
00:06:12 External 0.000152
00:29:33 NSSA 0.000694
00:28:42 Cleanup 0.014985
Last 100 events
When Type Elapsed
00:03:29 Total 0.001644
00:03:23 SPF 0.000304
00:03:23 Stub 0.000056
00:03:23 Interarea 0.000072
00:03:23 External 0.000008
00:03:23 NSSA 0.000007
00:03:23 Cleanup 0.001967
00:03:23 Total 0.002761
00:02:49 SPF 0.000058
00:02:49 Stub 0.000110
00:02:49 Interarea 0.000041
00:02:49 External 0.000008
show ospf statistics
root@jun1> show ospf statistics
Packet type Total Last 5 seconds
Sent Received Sent Received
Hello 684 164 1 0
DbD 67 88 0 0
LSReq 4 26 0 0
LSUpdate 123 84 0 0
LSAck 45 83 0 0
DBDs retransmitted : 1, last 5 seconds : 0
LSAs flooded : 13, last 5 seconds : 0
LSAs flooded high-prio : 83, last 5 seconds : 0
LSAs retransmitted : 38, last 5 seconds : 0
LSAs transmitted to nbr: 26, last 5 seconds : 0
LSAs requested : 12, last 5 seconds : 0
LSAs acknowledged : 68, last 5 seconds : 0
Flood queue depth : 0
Total rexmit entries : 0
db summaries : 0
lsreq entries : 0
Receive errors:
42 Hellos received on point-to-point LAN with DR/BDR elected
Viewing OSPF Routes
show ospf route
root@jun1> show ospf route
Topology default Route Table:
Prefix Path Route NH Metric NextHop Nexthop
Type Type Type Interface Address/LSP
10.10.10.1 Intra Area BR IP 1 em1.0 172.20.10.2
172.20.20.2 Intra Area BR IP 1 em0.0 192.168.10.2
10.10.10.0/24 Inter Network IP 2 em1.0 172.20.10.2
10.10.20.0/24 Inter Network IP 3 em1.0 172.20.10.2
172.20.10.0/24 Intra Network IP 1 em1.0
172.20.20.0/24 Intra Network IP 2 em0.0 192.168.10.2
em1.0 172.20.10.2
192.168.10.0/24 Intra Network IP 1 em0.0
192.168.20.0/24 Inter Network IP 2 em0.0 192.168.10.2
192.168.30.0/24 Inter Network IP 3 em0.0 192.168.10.2
show route protocol ospf
root@jun1> show route protocol ospf
inet.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.10.10.0/24 *[OSPF/10] 00:01:22, metric 2
> to 172.20.10.2 via em1.0
10.10.20.0/24 *[OSPF/10] 00:01:22, metric 3
> to 172.20.10.2 via em1.0
172.20.20.0/24 *[OSPF/10] 00:01:22, metric 2
to 192.168.10.2 via em0.0
> to 172.20.10.2 via em1.0
192.168.20.0/24 *[OSPF/10] 00:02:50, metric 2
> to 192.168.10.2 via em0.0
192.168.30.0/24 *[OSPF/10] 00:02:50, metric 3
> to 192.168.10.2 via em0.0
224.0.0.5/32 *[OSPF/10] 00:36:25, metric 1
MultiRecv
Комментариев нет:
Отправить комментарий