This is a self-study, lab based tutorial using Juniper Networks routers. Although this was developed on some old J2300 routers, any Junos based router should work for purposes of this tutorial. If Junos based routers are unavailable, the Junosphere virtual environment can definately be used. This assumes that the reader has some working knowledge of Junos operation and configuration.
admin@J2300-1> show ospf database summary Area 0.0.0.0: 7 Router LSAs 8 Network LSAs Externals: Interface fe-0/0/1.12: Area 0.0.0.0: Interface fe-0/0/1.13: Area 0.0.0.0: Interface lo0.0: Area 0.0.0.0:
admin@J2300-1> show ospf database
OSPF database, Area 0.0.0.0
Type ID Adv Rtr Seq Age Opt Cksum Len
Router *10.0.0.1 10.0.0.1 0x8000000a 801 0x22 0x2e48 60
Router 10.0.0.2 10.0.0.2 0x80000005 768 0x22 0x84da 60
Router 10.0.0.3 10.0.0.3 0x80000007 506 0x22 0x7a4d 72
Router 10.0.0.4 10.0.0.4 0x80000009 372 0x22 0x4b44 72
Router 10.0.0.5 10.0.0.5 0x80000005 337 0x22 0x1fbf 60
Router 10.0.0.6 10.0.0.6 0x80000004 338 0x22 0x6c55 60
Router 10.0.12.2 10.0.12.2 0x80000008 1115 0x22 0x6af7 48
Network *10.0.12.1 10.0.0.1 0x80000003 801 0x22 0x5f9 32
Network 10.0.13.3 10.0.0.3 0x80000002 1296 0x22 0xe118 32
Network 10.0.24.2 10.0.12.2 0x80000001 1115 0x22 0xb225 32
Network 10.0.24.4 10.0.0.4 0x80000002 808 0x22 0x707a 32
Network 10.0.34.3 10.0.0.3 0x80000001 1079 0x22 0x26bc 32
Network 10.0.35.3 10.0.0.3 0x80000001 506 0x22 0x29b7 32
Network 10.0.46.6 10.0.0.6 0x80000002 378 0x22 0x8d3f 32
Network 10.0.56.5 10.0.0.5 0x80000001 337 0x22 0x4381 32
admin@J2300-1> show ospf database detail
OSPF database, Area 0.0.0.0
Type ID Adv Rtr Seq Age Opt Cksum Len
Router *10.0.0.1 10.0.0.1 0x8000000a 1091 0x22 0x2e48 60
bits 0x0, link count 3
id 10.0.12.1, data 10.0.12.1, Type Transit (2)
Topology count: 0, Default metric: 10
id 10.0.13.3, data 10.0.13.1, Type Transit (2)
Topology count: 0, Default metric: 10
id 10.0.0.1, data 255.255.255.255, Type Stub (3)
Topology count: 0, Default metric: 0
Topology default (ID 0)
Type: Transit, Node ID: 10.0.13.3
Metric: 10, Bidirectional
Type: Transit, Node ID: 10.0.12.1
Metric: 10, Bidirectional
Router 10.0.0.2 10.0.0.2 0x80000005 1058 0x22 0x84da 60
bits 0x0, link count 3
id 10.0.12.1, data 10.0.12.2, Type Transit (2)
Topology count: 0, Default metric: 10
id 10.0.24.4, data 10.0.24.2, Type Transit (2)
Topology count: 0, Default metric: 10
id 10.0.0.2, data 255.255.255.255, Type Stub (3)
.
.
.
admin@J2300-1> show ospf database extensive
OSPF database, Area 0.0.0.0
Type ID Adv Rtr Seq Age Opt Cksum Len
Router *10.0.0.1 10.0.0.1 0x8000000a 1182 0x22 0x2e48 60
bits 0x0, link count 3
id 10.0.12.1, data 10.0.12.1, Type Transit (2)
Topology count: 0, Default metric: 10
id 10.0.13.3, data 10.0.13.1, Type Transit (2)
Topology count: 0, Default metric: 10
id 10.0.0.1, data 255.255.255.255, Type Stub (3)
Topology count: 0, Default metric: 0
Topology default (ID 0)
Type: Transit, Node ID: 10.0.13.3
Metric: 10, Bidirectional
Type: Transit, Node ID: 10.0.12.1
Metric: 10, Bidirectional
Gen timer 00:30:17
Aging timer 00:40:17
Installed 00:19:42 ago, expires in 00:40:18, sent 00:19:42 ago
Last changed 00:19:42 ago, Change count: 6, Ours
Router 10.0.0.2 10.0.0.2 0x80000005 1149 0x22 0x84da 60
bits 0x0, link count 3
id 10.0.12.1, data 10.0.12.2, Type Transit (2)
.
.
.
admin@J2300-1> show ospf interface brief Interface State Area DR ID BDR ID Nbrs fe-0/0/1.12 DR 0.0.0.0 10.0.0.1 10.0.0.2 1 fe-0/0/1.13 BDR 0.0.0.0 10.0.0.3 10.0.0.1 1 lo0.0 DR 0.0.0.0 10.0.0.1 0.0.0.0 0Clearing the LSDB
admin@J2300-1> show ospf route
Topology default Route Table:
Prefix Path Route NH Metric NextHop Nexthop
Type Type Type Interface Address/LSP
10.0.0.2 Intra Router IP 10 fe-0/0/1.12 10.0.12.2
10.0.0.3 Intra Router IP 10 fe-0/0/1.13 10.0.13.3
10.0.0.4 Intra Router IP 20 fe-0/0/1.12 10.0.12.2
fe-0/0/1.13 10.0.13.3
10.0.0.5 Intra Router IP 20 fe-0/0/1.13 10.0.13.3
10.0.0.6 Intra Router IP 30 fe-0/0/1.12 10.0.12.2
fe-0/0/1.13 10.0.13.3
10.0.0.1/32 Intra Network IP 0 lo0.0
10.0.0.2/32 Intra Network IP 10 fe-0/0/1.12 10.0.12.2
10.0.0.3/32 Intra Network IP 10 fe-0/0/1.13 10.0.13.3
10.0.0.4/32 Intra Network IP 20 fe-0/0/1.12 10.0.12.2
fe-0/0/1.13 10.0.13.3
10.0.0.5/32 Intra Network IP 20 fe-0/0/1.13 10.0.13.3
10.0.0.6/32 Intra Network IP 30 fe-0/0/1.12 10.0.12.2
fe-0/0/1.13 10.0.13.3
10.0.12.0/24 Intra Network IP 10 fe-0/0/1.12
10.0.13.0/24 Intra Network IP 10 fe-0/0/1.13
10.0.24.0/24 Intra Network IP 20 fe-0/0/1.12 10.0.12.2
10.0.34.0/24 Intra Network IP 20 fe-0/0/1.13 10.0.13.3
10.0.35.0/24 Intra Network IP 20 fe-0/0/1.13 10.0.13.3
10.0.46.0/24 Intra Network IP 30 fe-0/0/1.12 10.0.12.2
fe-0/0/1.13 10.0.13.3
10.0.56.0/24 Intra Network IP 30 fe0/0/1.13 10.0.13.3
admin@J2300-1>
admin@J2300-1> show route protocol ospf
inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.0.2/32 *[OSPF/10] 00:50:13, metric 10
> to 10.0.12.2 via fe-0/0/1.12
10.0.0.3/32 *[OSPF/10] 00:58:22, metric 10
> to 10.0.13.3 via fe-0/0/1.13
10.0.0.4/32 *[OSPF/10] 00:50:13, metric 20
to 10.0.12.2 via fe-0/0/1.12
> to 10.0.13.3 via fe-0/0/1.13
10.0.0.5/32 *[OSPF/10] 00:45:17, metric 20
> to 10.0.13.3 via fe-0/0/1.13
10.0.0.6/32 *[OSPF/10] 00:43:01, metric 30
to 10.0.12.2 via fe-0/0/1.12
> to 10.0.13.3 via fe-0/0/1.13
10.0.24.0/24 *[OSPF/10] 00:50:13, metric 20
> to 10.0.12.2 via fe-0/0/1.12
10.0.34.0/24 *[OSPF/10] 00:58:22, metric 20
> to 10.0.13.3 via fe-0/0/1.13
10.0.35.0/24 *[OSPF/10] 00:58:22, metric 20
> to 10.0.13.3 via fe-0/0/1.13
10.0.46.0/24 *[OSPF/10] 00:50:13, metric 30
to 10.0.12.2 via fe-0/0/1.12
> to 10.0.13.3 via fe-0/0/1.13
10.0.56.0/24 *[OSPF/10] 00:45:17, metric 30
> to 10.0.13.3 via fe-0/0/1.13
224.0.0.5/32 *[OSPF/10] 01:03:15, metric 1
MultiRecv
admin@J2300-1>
procotols ospf level of the Junos heirarchyarea 0.0.0.0area 0.0.0.1area 0.0.1.0
user@Router> edit
Entering configuration mode
[edit]
user@Router# edit protocols ospf
[edit protocols ospf]
user@Router# set area 0 interface fe-0/0/1.0
[edit protocols ospf]
user@Router# set area 1.2.3.4 interface ge-0/0/3.300
[edit protocols ospf]
user@Router# show
area 0.0.0.0 {
interface fe-0/0/1.0;
}
area 1.2.3.4 {
interface ge-0/0/3.300;
}
[edit protocols ospf]
user@Router#
protocols ospf spf-options
admin@J2300-1> show ospf log
Topology default SPF log:
Last instance of each event type
When Type Elapsed
00:09:42 SPF 0.000433
00:09:42 Stub 0.000024
00:09:42 Interarea 0.000007
00:09:42 External 0.000002
00:09:42 NSSA 0.000001
00:09:42 Cleanup 0.000026
Maximum length of each event type
When Type Elapsed
02:02:57 SPF 0.001650
02:02:57 Stub 0.000852
00:09:42 Interarea 0.000007
02:03:02 External 0.000020
02:03:02 NSSA 0.000018
02:03:02 Cleanup 0.003413
Last 100 events
When Type Elapsed
02:02:05 Total 0.001847
02:01:23 SPF 0.000032
02:01:23 Stub 0.000006
02:01:23 Interarea 0.000001
02:01:23 External 0.000001
02:01:23 NSSA 0.000001
02:01:23 Cleanup 0.000012
02:01:23 Total 0.000077
02:01:18 SPF 0.000043
02:01:18 Stub 0.000011
02:01:18 Interarea 0.000002
02:01:18 External 0.000001
.
.
.
cost = (reference bandwidth) / (physical interface bandwidth)set protocols ospf area interface metric (cost) [edit] admin@J2300-1# edit protocols ospf [edit protocols ospf] admin@J2300-1# set reference-bandwidth 10g [edit protocols ospf] admin@J2300-1#
[edit] admin@J2300-1# edit interfaces fe-0/0/1 unit 12 [edit interfaces fe-0/0/1 unit 12] admin@J2300-1# set bandwidth 192k [edit interfaces fe-0/0/1 unit 12] admin@J2300-1#
[edit] admin@J2300-1# edit protocols ospf area 0 interface fe-0/0/1.12 [edit protocols ospf area 0.0.0.0 interface fe-0/0/1.12] admin@J2300-1# set metric 1234 [edit protocols ospf area 0.0.0.0 interface fe-0/0/1.12] admin@J2300-1#
set protocols ospf overload command>set protocols ospf overload timeout admin@J2300-1> edit Entering configuration mode [edit] admin@J2300-1# set protocols ospf overload timeout 60 [edit] admin@J2300-1#
detail flag with the operational mode command show ospf interfaceadmin@J2300-1> show ospf interface fe-0/0/1.12 detail Interface State Area DR ID BDR ID Nbrs fe-0/0/1.12 BDR 0.0.0.0 10.0.0.2 10.0.0.1 1 Type: LAN, Address: 10.0.12.1, Mask: 255.255.255.0, MTU: 1496, Cost: 1234 DR addr: 10.0.12.2, BDR addr: 10.0.12.1, Priority: 128 Adj count: 1 Hello: 10, Dead: 40, ReXmit: 5, Not Stub Auth type: None Protection type: None Topology default (ID 0) -> Cost: 1234 admin@J2300-1>
show route and show ospf route commands show the overall cost to a destination -- not link costs
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version # | Type | Packet length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Router ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Area ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum | AuType |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version # | 1 | Packet length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Router ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Area ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum | AuType |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Network Mask |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| HelloInterval | Options | Rtr Pri |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| RouterDeadInterval |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Designated Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Backup Designated Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Neighbor |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
+--------------------------------------+
| DN | O | DC | EA | N/P | MC | E | MT |
+--------------------------------------+
The Options Field Bits are defined as follows:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version # | 2 | Packet length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Router ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Area ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum | AuType |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Interface MTU | Options |0|0|0|0|0|I|M|MS
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| DD sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+- -+
| |
+- An LSA Header -+
| |
+- -+
| |
+- -+
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version # | 3 | Packet length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Router ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Area ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum | AuType |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link State ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version # | 4 | Packet length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Router ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Area ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum | AuType |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| # LSAs |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+- +-+
| LSAs |
+- +-+
| ... |
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version # | 5 | Packet length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Router ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Area ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum | AuType |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Authentication |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+- -+
| |
+- An LSA Header -+
| |
+- -+
| |
+- -+
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
set protocols ospf area interface authentication simple-password
Example: Configuring a simple password for OSPF authentication
admin@J2300-1> edit
Entering configuration mode
[edit]
admin@J2300-1# edit protocols ospf area 0 interface fe-0/0/1.12
[edit protocols ospf area 0.0.0.0 interface fe-0/0/1.12]
admin@J2300-1# set authentication simple-password OSPFpass
[edit protocols ospf area 0.0.0.0 interface fe-0/0/1.12]
admin@J2300-1# show
authentication {
simple-password "$9$9WJOpBRSrKv8xwYmTzFAtWLxdYo"; ## SECRET-DATA
}
[edit protocols ospf area 0.0.0.0 interface fe-0/0/1.12]
admin@J2300-1#
Example: Packet capture of OSPF packet with simple authentication
admin@J2300-1> monitor interface fe-0/0/1 no-resolve detail
Address resolution is OFF.
Listening on fe-0/0/1, capture size 1514 bytes
08:12:44.695436 Out IP (tos 0xc0, ttl 1, id 6212, offset 0, flags [none], proto: OSPF (89), length: 64) 10.0.12.1 > 224.0.0.5: OSPFv2, Hello, length 44
Router-ID 10.0.0.1, Backbone Area, Authentication Type: simple (1)
Simple text password: OSPFpass
Options [External]
Hello Timer 10s, Dead Timer 40s, Mask 255.255.255.0, Priority 128
Designated Router 10.0.12.1
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 0 | Key ID | Auth Data Len |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cryptographic sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Fields are defined as follows:
Example: Packet capture of OSPF packet with cryptographic authentication
admin@J2300-1# run monitor traffic interface fe-0/0/1 detail no-resolve
Address resolution is OFF.
Listening on fe-0/0/1, capture size 1514 bytes
08:21:48.855167 Out IP (tos 0xc0, ttl 1, id 6339, offset 0, flags [none], proto: OSPF (89), length: 80) 10.0.12.1 > 224.0.0.5: OSPFv2, Hello, length 44
Router-ID 10.0.0.1, Backbone Area, Authentication Type: MD5 (2)
Key-ID: 0, Auth-Length: 16, Crypto Sequence Number: 0x4e57579d
Options [External]
Hello Timer 10s, Dead Timer 40s, Mask 255.255.255.0, Priority 128
Designated Router 10.0.12.1
set protocols ospf area interface authentication md5 key start-time option for a particular keyExample: Configuring OSPF for MD5 authentication with a key that is always valid, and a key to start using at the start of 2012
[edit protocols ospf area 0.0.0.0 interface fe-0/0/1.12]
admin@J2300-1# set authentication md5 0 key AlwaysGoodKEY
[edit protocols ospf area 0.0.0.0 interface fe-0/0/1.12]
admin@J2300-1# set authentication md5 12 key NextYearKEY start-time 2012-01-01.00:00
[edit protocols ospf area 0.0.0.0 interface fe-0/0/1.12]
admin@J2300-1# show
metric 5;
authentication {
md5 0 key "$9$cv1yrKbwgDHmM8kPQzAtREclMXJZj.mTp0ESrKXx"; ## SECRET-DATA
md5 12 key "$9$Rqbclvx7Vb2aNdTFn/0O1RhyvL2gajiqEc" start-time "2012-1-1.00:00:00 +0000"; ## SECRET-DATA
}
[edit protocols ospf area 0.0.0.0 interface fe-0/0/1.12]
admin@J2300-1#
error flagOSPF packet ignored: authentication type mismatch (2) from 10.0.12.1
OSPF packet ignored: authentication failure (missing key-id). OSPF packet ignored: authentication failure from 10.0.12.1
OSPF packet ignored: authentication failure (bad cksum). OSPF packet ignored: authentication failure from 10.0.12.1Example: Configuring traceoptions to troubleshoot an authentication mismatch problem
admin@J2300-2> show ospf interface Interface State Area DR ID BDR ID Nbrs fe-0/0/1.12 DR 0.0.0.0 10.0.0.2 0.0.0.0 0 fe-0/0/1.24 DR 0.0.0.0 10.0.0.2 10.0.0.4 1 lo0.0 DR 0.0.0.0 10.0.0.2 0.0.0.0 0 admin@J2300-2> edit Entering configuration mode [edit] admin@J2300-2# edit protocols ospf traceoptions [edit protocols ospf traceoptions] admin@J2300-2# set file ospf.log size 1m [edit protocols ospf traceoptions] admin@J2300-2# set flag error detail [edit protocols ospf traceoptions] admin@J2300-2# commit commit complete [edit protocols ospf traceoptions] admin@J2300-2# run monitor start ospf.log [edit protocols ospf traceoptions] admin@J2300-2# *** ospf.log *** Aug 26 09:30:05.016062 OSPF packet ignored: authentication type mismatch (2) from 10.0.12.1 Aug 26 09:30:13.672798 OSPF packet ignored: authentication type mismatch (2) from 10.0.12.1 Aug 26 09:30:21.478337 OSPF packet ignored: authentication type mismatch (2) from 10.0.12.1 Aug 26 09:30:29.048099 OSPF packet ignored: authentication type mismatch (2) from 10.0.12.1 [edit protocols ospf traceoptions] admin@J2300-2# run monitor stop
set protocols ospf area interface ipsec-sa Exercise:OSPF Authentication
set protocols ospf area interface level of the heirarchyset protocols ospf area interface hello-interval set protocols ospf area interface poll-interval set protocols ospf area interface dead-interval set protocols ospf area interface priority set protocols ospf area interface retransmit-interval set protocols ospf area interface retransmit-interval set protocols ospf area interface interface-type (nbma|p2mp|p2p) set protocols ospf area interface neighbor statementinet address family but don't assign any IP addressset interface unit unnumbered where the donor interface is an interface that the IP will be borrowed fromset protocols ospf area interface demand-circuit set protocols ospf area interface flood-reduction area,interface or neighbor to narrow resultsExample: Viewing neighbors on an interface
admin@J2300-1> show ospf neighbor extensive interface fe-0/0/1.12 Address Interface State ID Pri Dead 10.0.12.2 fe-0/0/1.12 Full 10.0.0.2 128 96 Area 0.0.0.0, opt 0x42, DR 10.0.12.1, BDR 10.0.12.2 Up 02:07:16, adjacent 02:07:16 Topology default (ID 0) -> Bidirectional admin@J2300-1>
show ospf interfacearea or interface to narrow down resultsdetail and extensive flags to vary the amount of informationExample: Examening an interface
admin@J2300-1> show ospf interface fe-0/0/1.12 extensive Interface State Area DR ID BDR ID Nbrs fe-0/0/1.12 DR 0.0.0.0 10.0.0.1 10.0.0.2 1 Type: NBMA, Address: 10.0.12.1, Mask: 255.255.255.0, MTU: 1496, Cost: 5 DR addr: 10.0.12.1, BDR addr: 10.0.12.2, Priority: 128 Adj count: 1 Hello: 30, Poll: 90, Dead: 120, ReXmit: 8, Not Stub Auth type: Password Protection type: None Topology default (ID 0) -> Cost: 5 admin@J2300-1>
clear ospf neighborarea,interface or neighbor clear specific neihborsclear ospf neighbor without any arguments as it will clear all the OSPF adjacencies on the routerExample: Clearing all the neighbors!
admin@J2300-1> show ospf neighbor Address Interface State ID Pri Dead 10.0.12.2 fe-0/0/1.12 Full 10.0.0.2 128 111 10.0.13.3 fe-0/0/1.13 Full 10.0.0.3 128 39 10.101.0.10 fe-0/0/1.101 Full 10.10.10.10 128 31 10.102.0.10 fe-0/0/1.102 Full 10.10.10.10 128 39 10.1.111.101 fe-0/0/1.1001 Full 10.1.0.1 128 10 admin@J2300-1> clear ospf neighbor admin@J2300-1> show ospf neighbor Address Interface State ID Pri Dead 10.0.12.2 fe-0/0/1.12 Full 10.0.0.2 128 119 10.0.13.3 fe-0/0/1.13 Full 10.0.0.3 128 39 10.101.0.10 fe-0/0/1.101 Full 10.10.10.10 128 39 10.102.0.10 fe-0/0/1.102 Exchange 10.10.10.10 128 39 10.1.111.101 fe-0/0/1.1001 Full 10.1.0.1 128 10 admin@J2300-1>
protocols ospf traceoptionsfile /var/log by defaultmonitor start monitor stop Example: Configuring traceoptions to look for OSPF error conditions
admin@J2300-1> edit Entering configuration mode [edit] admin@J2300-1# edit protocols ospf traceoptions [edit protocols ospf traceoptions] admin@J2300-1# set file ospf.log [edit protocols ospf traceoptions] admin@J2300-1# set flag error detail [edit protocols ospf traceoptions] admin@J2300-1# commit commit complete [edit protocols ospf traceoptions] admin@J2300-1#
Example: Monitoring the ospf.log file in realtime
admin@J2300-1> monitor start ospf.log admin@J2300-1> *** ospf.log *** Aug 30 08:45:48.098450 OSPF packet ignored: configuration mismatch from 10.1.111.101 on intf fxp1.1001 area 0.0.0.1 Aug 30 08:45:49.052569 OSPF packet ignored: configuration mismatch from 10.1.111.101 on intf fxp1.1001 area 0.0.0.1 Aug 30 08:45:50.002191 OSPF packet ignored: configuration mismatch from 10.1.111.101 on intf fxp1.1001 area 0.0.0.1 Aug 30 08:45:50.950214 OSPF packet ignored: configuration mismatch from 10.1.111.101 on intf fxp1.1001 area 0.0.0.1 Aug 30 08:45:51.886726 OSPF packet ignored: configuration mismatch from 10.1.111.101 on intf fxp1.1001 area 0.0.0.1 monitor stop admin@J2300-1>
Example: Examening the ospf.log file
admin@J2300-1> show log ospf.log
Aug 30 08:37:06 trace_on: Tracing to "/var/log/ospf.log" started
Aug 30 08:37:06.590718 OSPF packet ignored: configuration mismatch from 10.1.111.101 on intf fxp1.1001 area 0.0.0.1
Aug 30 08:37:07.533255 OSPF packet ignored: configuration mismatch from 10.1.111.101 on intf fxp1.1001 area 0.0.0.1
Aug 30 08:37:08.522669 OSPF packet ignored: configuration mismatch from 10.1.111.101 on intf fxp1.1001 area 0.0.0.1
Aug 30 08:37:09.356771 OSPF packet ignored: configuration mismatch from 10.1.111.101 on intf fxp1.1001 area 0.0.0.1
Aug 30 08:37:10.170148 OSPF packet ignored: configuration mismatch from 10.1.111.101 on intf fxp1.1001 area 0.0.0.1
Aug 30 08:37:11.016943 OSPF packet ignored: configuration mismatch from 10.1.111.101 on intf fxp1.1001 area 0.0.0.1
Aug 30 08:37:11.825845 OSPF packet ignored: configuration mismatch from 10.1.111.101 on intf fxp1.1001 area 0.0.0.1
Aug 30 08:37:12.589728 OSPF packet ignored: configuration mismatch from 10.1.111.101 on intf fxp1.1001 area 0.0.0.1
Aug 30 08:37:13.543683 OSPF packet ignored: configuration mismatch from 10.1.111.101 on intf fxp1.1001 area 0.0.0.1
Aug 30 08:37:14.388735 OSPF packet ignored: configuration mismatch from 10.1.111.101 on intf fxp1.1001 area 0.0.0.1
Aug 30 08:37:15.160456 OSPF packet ignored: configuration mismatch from 10.1.111.101 on intf fxp1.1001 area 0.0.0.1
admin@J2300-1>
set interface mtu set interface unit family inet mtu show interface operational mode commandExample: ExStart Debugging
admin@srx100-1> show ospf neighbor Address Interface State ID Pri Dead 1.0.0.2 fe-0/0/0.0 ExStart 2.2.2.2 128 37 admin@srx100-1> edit Entering configuration mode [edit] admin@srx100-1# top warning: already at top of configuration; use 'exit' to exit [edit] admin@srx100-1# edit protocols ospf traceoptions [edit protocols ospf traceoptions] admin@srx100-1# set file ospf.log [edit protocols ospf traceoptions] admin@srx100-1# set flag error detail [edit protocols ospf traceoptions] admin@srx100-1# commit commit complete [edit protocols ospf traceoptions] admin@srx100-1# run monitor start ospf.log [edit protocols ospf traceoptions] admin@srx100-1# *** ospf.log *** Aug 30 11:03:40.323386 OSPF packet ignored: MTU mismatch from 1.0.0.2 on intf fe-0/0/0.0 area 0.0.0.0 Aug 30 11:03:42.741430 OSPF packet ignored: no matching interface from 10.0.100.76, IFL 73 Aug 30 11:03:44.690793 OSPF packet ignored: MTU mismatch from 1.0.0.2 on intf fe-0/0/0.0 area 0.0.0.0 run monitor stop Aug 30 11:03:49.673924 OSPF packet ignored: MTU mismatch from 1.0.0.2 on intf fe-0/0/0.0 area 0.0.0.0 Aug 30 11:03:52.741840 OSPF packet ignored: no matching interface from 10.0.100.76, IFL 73 ospf.log [edit protocols ospf traceoptions] admin@srx100-1#
set router-id under the routing-options level of the Junos hierarchyExample: Setting the Router ID
user@Router> edit Entering configuration mode [edit] user@Router# set routing-options router-id 1.2.3.4 [edit] user@Router# show routing-options router-id 1.2.3.4; [edit]Exercise:DR Battle
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS age | Options | LS type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link State ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The Fields are defined as follows:
show ospf overview
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS age | Options | 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link State ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 0 Nt|W|V|E|B| 0 | # links |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link Data |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | # TOS | metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TOS | 0 | TOS metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link Data |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
Link State ID of the common LSA header is set to the Router ID of the originating router.
show ospf database routerarea , advertising-router , lsa-id to narrow down the output resultsdetail and extensive flags to tailor output level of detailsummary flag for an overview of the LSAsExample: Viewing all of the information for the router LSA for the 10.0.0.6 router
admin@J2300-1> show ospf database router lsa-id 10.0.0.6 extensive
OSPF database, Area 0.0.0.0
Type ID Adv Rtr Seq Age Opt Cksum Len
Router 10.0.0.6 10.0.0.6 0x80000017 1392 0x22 0x4e4d 72
bits 0x1, link count 4
id 10.0.46.4, data 10.0.46.6, Type Transit (2)
Topology count: 0, Default metric: 5
id 10.0.0.5, data 10.0.56.6, Type PointToPoint (1)
Topology count: 0, Default metric: 5
id 10.0.56.0, data 255.255.255.0, Type Stub (3)
Topology count: 0, Default metric: 5
id 10.0.0.6, data 255.255.255.255, Type Stub (3)
Topology count: 0, Default metric: 0
Topology default (ID 0)
Type: PointToPoint, Node ID: 10.0.0.5
Metric: 5, Bidirectional
Type: Transit, Node ID: 10.0.46.4
Metric: 5, Bidirectional
Aging timer 00:36:48
Installed 00:23:07 ago, expires in 00:36:48, sent 00:23:07 ago
Last changed 01:23:20 ago, Change count: 1
admin@J2300-1>
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS age | Options | 2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link State ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Network Mask |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Attached Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
The Fields are defined and populated as follows:
show ospf database networkarea , advertising-router , lsa-id to narrow down the output resultsdetail and extensive flags to tailor output level of detailsummary flag for an overview of the LSAsExample: Viewing all of the information for the network LSAs in area 0.0.0.0
admin@J2300-1> show ospf database network detail area 0
OSPF database, Area 0.0.0.0
Type ID Adv Rtr Seq Age Opt Cksum Len
Network 10.0.12.2 10.0.0.2 0x80000012 2552 0x22 0xd21b 32
mask 255.255.255.0
attached router 10.0.0.2
attached router 10.0.0.1
Topology default (ID 0)
Type: Transit, Node ID: 10.0.0.1
Metric: 0, Bidirectional
Type: Transit, Node ID: 10.0.0.2
Metric: 0, Bidirectional
Network 10.0.34.4 10.0.0.4 0x80000008 1027 0x22 0x4d5 32
mask 255.255.255.0
attached router 10.0.0.4
attached router 10.0.0.3
Topology default (ID 0)
Type: Transit, Node ID: 10.0.0.3
Metric: 0, Bidirectional
Type: Transit, Node ID: 10.0.0.4
Metric: 0, Bidirectional
Network 10.0.35.5 10.0.0.5 0x80000008 636 0x22 0xf2e2 32
mask 255.255.255.0
attached router 10.0.0.5
attached router 10.0.0.3
Topology default (ID 0)
Type: Transit, Node ID: 10.0.0.3
Metric: 0, Bidirectional
Type: Transit, Node ID: 10.0.0.5
Metric: 0, Bidirectional
Network 10.0.46.4 10.0.0.4 0x80000009 1185 0x22 0xa722 32
mask 255.255.255.0
attached router 10.0.0.4
attached router 10.0.0.6
Topology default (ID 0)
Type: Transit, Node ID: 10.0.0.6
Metric: 0, Bidirectional
Type: Transit, Node ID: 10.0.0.4
Metric: 0, Bidirectional
admin@J2300-1>
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS age | Options | 3 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link State ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Network Mask |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 0 | metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TOS | TOS metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
The Fields are defined and populated as follows:
show ospf database netsummaryarea , advertising-router , lsa-id to narrow down the output resultsdetail and extensive flags to tailor output level of detailsummary flag for an overview of the LSAsExample: Viewing network summary LSAs of the information for the network LSAs in area 0.0.0.0
admin@J2300-1> show ospf database netsummary area 0
OSPF database, Area 0.0.0.0
Type ID Adv Rtr Seq Age Opt Cksum Len
Summary *10.1.14.0 10.0.0.1 0x80000005 619 0x22 0x5ddf 28
Summary 10.1.14.0 10.0.0.3 0x80000006 426 0x22 0x7b6e 28
Summary *10.1.23.0 10.0.0.1 0x80000005 562 0x22 0xc25d 28
Summary 10.1.23.0 10.0.0.3 0x80000006 343 0x22 0x4fa5 28
Summary *10.1.34.0 10.0.0.1 0x80000005 505 0x22 0xe43a 28
Summary 10.1.34.0 10.0.0.3 0x80000006 261 0x22 0x3aa5 28
Summary *10.1.111.0 10.0.0.1 0x80000007 390 0x22 0xc51e 28
Summary 10.1.111.0 10.0.0.3 0x80000006 178 0x22 0xb0cd 28
Summary *10.1.123.0 10.0.0.1 0x80000005 448 0x22 0xd6da 28
Summary 10.1.123.0 10.0.0.3 0x80000009 1252 0x22 0x9403 28
Summary 10.2.57.0 10.0.0.2 0x80000006 752 0x22 0x3692 28
Summary 10.2.57.0 10.0.0.4 0x80000006 98 0x22 0x2a9c 28
Summary 10.2.58.0 10.0.0.2 0x80000006 670 0x22 0xc60b 28
Summary 10.2.58.0 10.0.0.4 0x80000005 1255 0x22 0x8537 28
Summary 10.2.67.0 10.0.0.2 0x80000006 588 0x22 0x2c88 28
Summary 10.2.67.0 10.0.0.4 0x80000005 1173 0x22 0x596e 28
Summary 10.2.128.0 10.0.0.2 0x8000000b 425 0x22 0x533d 28
Summary 10.2.128.0 10.0.0.4 0x80000005 1090 0x22 0xe487 28
Summary 10.2.146.0 10.0.0.2 0x80000006 507 0x22 0x2833 28
Summary 10.2.146.0 10.0.0.4 0x80000009 1008 0x22 0x84f9 28
Summary 10.3.91.0 10.0.0.5 0x80000006 700 0x22 0x3c70 28
Summary 10.3.91.0 10.0.0.6 0x80000004 1117 0x22 0x396 28
Summary 10.3.120.0 10.0.0.5 0x80000006 620 0x22 0xc4b6 28
Summary 10.3.120.0 10.0.0.6 0x80000004 1038 0x22 0xf996 28
Summary 10.3.121.0 10.0.0.5 0x80000006 540 0x22 0x552f 28
Summary 10.3.121.0 10.0.0.6 0x80000004 960 0x22 0x5332 28
Summary 10.3.159.0 10.0.0.5 0x8000000a 380 0x22 0xe08d 28
Summary 10.3.159.0 10.0.0.6 0x80000004 881 0x22 0x78d2 28
Summary 10.3.161.0 10.0.0.5 0x80000006 460 0x22 0x64e3 28
Summary 10.3.161.0 10.0.0.6 0x80000009 802 0x22 0xc6a5 28
Summary *10.30.0.0 10.0.0.1 0x80000005 733 0x22 0xb8fe 28
Summary 10.30.0.0 10.0.0.2 0x80000006 855 0x22 0x1465 28
Summary 10.30.0.0 10.0.0.3 0x80000006 818 0x22 0xe6a 28
Summary 10.30.0.0 10.0.0.4 0x80000006 532 0x22 0x86f 28
Summary 10.30.0.0 10.0.0.5 0x80000006 860 0x22 0x274 28
Summary 10.30.0.0 10.0.0.6 0x80000006 487 0x22 0xfb79 28
Summary *10.101.0.0 10.0.0.1 0x80000008 276 0x22 0xd815 28
Summary 10.101.0.0 10.0.0.2 0x80000009 343 0x22 0x347b 28
Summary 10.101.0.0 10.0.0.3 0x80000008 1086 0x22 0x307f 28
Summary 10.101.0.0 10.0.0.4 0x80000008 925 0x22 0x2a84 28
Summary 10.101.0.0 10.0.0.5 0x80000009 300 0x22 0x228a 28
Summary 10.101.0.0 10.0.0.6 0x80000008 723 0x22 0x1e8e 28
Summary *10.102.0.0 10.0.0.1 0x80000007 333 0x22 0xce1f 28
Summary 10.102.0.0 10.0.0.2 0x80000009 261 0x22 0x2886 28
Summary 10.102.0.0 10.0.0.3 0x80000009 674 0x22 0x228b 28
Summary 10.102.0.0 10.0.0.4 0x80000008 842 0x22 0x1e8f 28
Summary 10.102.0.0 10.0.0.5 0x80000009 780 0x22 0x1695 28
Summary 10.102.0.0 10.0.0.6 0x80000008 645 0x22 0x1299 28
admin@J2300-1>
Example: Viewing network summary LSAs for the 10.102.0.0 network in the backbone area
admin@J2300-1> show ospf database netsummary area 0 lsa-id 10.102.0.0 detail
OSPF database, Area 0.0.0.0
Type ID Adv Rtr Seq Age Opt Cksum Len
Summary *10.102.0.0 10.0.0.1 0x80000007 502 0x22 0xce1f 28
mask 255.255.255.0
Topology default (ID 0) -> Metric: 2500
Summary 10.102.0.0 10.0.0.2 0x80000009 430 0x22 0x2886 28
mask 255.255.255.0
Topology default (ID 0) -> Metric: 10
Summary 10.102.0.0 10.0.0.3 0x80000009 843 0x22 0x228b 28
mask 255.255.255.0
Topology default (ID 0) -> Metric: 10
Summary 10.102.0.0 10.0.0.4 0x80000008 1011 0x22 0x1e8f 28
mask 255.255.255.0
Topology default (ID 0) -> Metric: 10
Summary 10.102.0.0 10.0.0.5 0x80000009 949 0x22 0x1695 28
mask 255.255.255.0
Topology default (ID 0) -> Metric: 10
Summary 10.102.0.0 10.0.0.6 0x80000008 814 0x22 0x1299 28
mask 255.255.255.0
Topology default (ID 0) -> Metric: 10
admin@J2300-1>
set protocols ospf area area-range override-metric flagrestrict flagExample: Configure an ABR to coalesce all of the addresses in the 10.0.0.0/8 subnet into a single Network Summary LSA from area 0.0.0.1
admin@J2300-1> show ospf database advertising-router 10.0.0.1 netsummary area 0
OSPF database, Area 0.0.0.0
Type ID Adv Rtr Seq Age Opt Cksum Len
Summary *10.1.14.0 10.0.0.1 0x80000001 29 0x22 0x65db 28
Summary *10.1.23.0 10.0.0.1 0x80000001 29 0x22 0xca59 28
Summary *10.1.34.0 10.0.0.1 0x80000001 29 0x22 0xec36 28
Summary *10.1.111.0 10.0.0.1 0x80000001 29 0x22 0xd118 28
Summary *10.1.123.0 10.0.0.1 0x80000001 29 0x22 0xded6 28
Summary *10.30.0.0 10.0.0.1 0x80000006 951 0x22 0xb6ff 28
Summary *10.101.0.0 10.0.0.1 0x80000009 458 0x22 0xd616 28
Summary *10.102.0.0 10.0.0.1 0x80000008 519 0x22 0xcc20 28
admin@J2300-1> edit
Entering configuration mode
[edit]
admin@J2300-1# edit protocols ospf area 1
[edit protocols ospf area 0.0.0.1]
admin@J2300-1# set area-range 10/8
[edit protocols ospf area 0.0.0.1]
admin@J2300-1# commit and-quit
commit complete
Exiting configuration mode
admin@J2300-1> show ospf database advertising-router 10.0.0.1 netsummary area 0
OSPF database, Area 0.0.0.0
Type ID Adv Rtr Seq Age Opt Cksum Len
Summary *10.0.0.0 10.0.0.1 0x80000001 10 0x22 0x39f8 28
Summary *10.30.0.0 10.0.0.1 0x80000006 1051 0x22 0xb6ff 28
Summary *10.101.0.0 10.0.0.1 0x80000009 558 0x22 0xd616 28
Summary *10.102.0.0 10.0.0.1 0x80000008 619 0x22 0xcc20 28
admin@J2300-1>
network-summary-export configured under the areanetwork-summary-import configured under the area
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS age | Options | 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link State ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Network Mask |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 0 | metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TOS | TOS metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
The Fields are defined and populated as follows:
show ospf database asbrsummaryarea , advertising-router , lsa-id to narrow down the output resultsdetail and extensive flags to tailor output level of detailsummary flag for an overview of the LSAsExample: Viewing a specfiic ASBR summary LSAs in detail
admin@J2300-1> show ospf database asbrsummary area 0 lsa-id 10.10.10.10 advertising-router 10.0.0.1 detail
OSPF database, Area 0.0.0.0
Type ID Adv Rtr Seq Age Opt Cksum Len
ASBRSum *10.10.10.10 10.0.0.1 0x80000011 1115 0x22 0x2efc 28
mask 0.0.0.0
Topology default (ID 0) -> Metric: 2500
admin@J2300-1>
[edit]
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS age | Options | 5 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link State ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Network Mask |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|E| 0 | metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Forwarding address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| External Route Tag |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|E| TOS | TOS metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Forwarding address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| External Route Tag |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
The Fields are defined and populated as follows:
show ospf database externaldetail and extensive flags to tailor output level of detailsummary flag for an overview of the LSAsExample: Viewing a specfiic external LSA in detail
admin@J2300-1> ...atabase external advertising-router 10.1.0.1 extensive
OSPF AS SCOPE link state database
Type ID Adv Rtr Seq Age Opt Cksum Len
Extern 10.1.0.1 10.1.0.1 0x80000008 1933 0x22 0xf1a1 36
mask 255.255.255.255
Topology default (ID 0)
Type: 2, Metric: 0, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
Aging timer 00:27:47
Installed 00:32:10 ago, expires in 00:27:47, sent 00:32:08 ago
Last changed 05:48:52 ago, Change count: 1
export policy to have a router generate thempolicy-options policy-statement metric - Set the metric valueexternal - Export as an external routetype (1|2) to specifiy the route should be a Type 1 or Type 2 external routeadd or subtract Example: Policy to export RFC-1918 static routes as Type 2 Externals and tag them with a value of 100, and to export all other static routes as Type 1 externals with a metric of 50000 and a tag of 333
admin@J2300-1# show
policy-statement EXPORT-STATIC {
term RFC-1918 {
from {
protocol static;
route-filter 10.0.0.0/8 orlonger;
route-filter 192.168.0.0/16 orlonger;
route-filter 172.16.0.0/12 orlonger;
}
then {
tag 100;
external {
type 2;
}
}
}
term OTHER-STATICS {
from protocol static;
then {
metric 50000;
tag 333;
external {
type 1;
}
accept;
}
}
}
[edit policy-options]
admin@J2300-1#
Example: Policy to export RIP routes with a tag according to the metric of the RIP route
admin@J2300-1# show
policy-statement EXPORT-RIP {
term RIP-Metric-1 {
from {
protocol rip;
metric 1;
}
then {
metric 1000;
tag 1;
accept;
}
}
term RIP-Metric-2 {
from {
protocol rip;
metric 2;
}
then {
metric 1000;
tag 2;
accept;
}
}
term RIP-Metric-3 {
from {
protocol rip;
metric 3;
}
then {
metric 1000;
tag 3;
accept;
}
}
term RIP-Too-Many-Hops {
from protocol rip;
then {
metric 1000;
tag 16;
accept;
}
}
}
Example: Applying the two policies above as export policies for OSPF
[edit] admin@J2300-1# edit protocols ospf [edit protocols ospf] admin@J2300-1# set export EXPORT-STATIC [edit protocols ospf] admin@J2300-1# set export EXPORT-RIP [edit protocols ospf] admin@J2300-1# show export [ EXPORT-STATIC EXPORT-RIP ];
set protocols ospf import set protocols ospf prefix-export-limit where the number ranges from 0 to 4294967295This section discusses the preference of routes within the OSPF itself.
set protocols ospf no-rfc-1583Example: Route with more than one next-hop, and it's forwarding entry
admin@J2300-1> show route 7.7.7.0
inet.0: 49 destinations, 49 routes (49 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
7.7.7.0/24 *[OSPF/150] 15:56:46, metric 1000, tag 7
to 10.0.12.2 via fe-0/0/1.12
> to 10.0.13.3 via fe-0/0/1.13
admin@J2300-1> show route forwarding-table destination 7.7.7.0
Routing table: default.inet
Internet:
Destination Type RtRef Next hop Type Index NhRef Netif
7.7.7.0/24 user 0 10.0.13.3 ucst 574 13 fe-0/0/1.13
Routing table: __master.anon__.inet
Internet:
Destination Type RtRef Next hop Type Index NhRef Netif
default perm 0 rjct 525 1
admin@J2300-1>
Example: Enabling flow based load balancing in Junos with an export policy
admin@J2300-1> edit Entering configuration mode The configuration has been changed but not committed [edit] admin@J2300-1# edit policy-options policy-statement LOAD-BALANCE [edit policy-options policy-statement LOAD-BALANCE] admin@J2300-1# set then load-balance per-packet [edit policy-options policy-statement LOAD-BALANCE] admin@J2300-1# top [edit] admin@J2300-1# set routing-options forwarding-table export LOAD-BALANCE [edit] admin@J2300-1# commit and-quit commit complete Exiting configuration mode
Example: ECMP route with micro-flow based load balancing applied. Note two potential next hops appear in the forwarding table
admin@J2300-1> show route forwarding-table destination 7.7.7.0
Routing table: default.inet
Internet:
Destination Type RtRef Next hop Type Index NhRef Netif
7.7.7.0/24 user 0 ulst 131070 6
10.0.12.2 ucst 575 8 fe-0/0/1.12
10.0.13.3 ucst 574 11 fe-0/0/1.13
Routing table: __master.anon__.inet
Internet:
Destination Type RtRef Next hop Type Index NhRef Netif
default perm 0 rjct 525 1
admin@J2300-1>
set protocols ospf preference where the preference is from 0 to 4294967295set protocols ospf external-preference where the preference is from 0 to 4294967295Since intra-area paths are always considered better than inter-area paths, this can introduce some routing inefficiences.
Example: For the network below, the best path from R1 to R5 is over the slow T1 links through Area 1.1.1.1 even though some nice fast Gigabit links exist
set protocols ospf area interface secondary passive flagstub keyword underneath the area definition with set protocols area stubdefault-metric after the stub keyword where the metric is from 1 to 16777215show ospf interface with the detail flag setExample: Interface participating in a stub area
admin@J2300-1> show ospf interface fe-0/0/1.1001 detail Interface State Area DR ID BDR ID Nbrs fe-0/0/1.1001 DRother 0.0.0.1 0.0.0.0 0.0.0.0 0 Type: LAN, Address: 10.1.111.1, Mask: 255.255.255.0, MTU: 1496, Cost: 2500 Priority: 0 Adj count: 0 Hello: 1, Dead: 11, ReXmit: 3, Stub Auth type: None Protection type: None Topology default (ID 0) -> Cost: 2500 admin@J2300-1>
Example: Router LSA for a stub area
admin@J2300-1> show ospf database area 1 detail
OSPF database, Area 0.0.0.1
Type ID Adv Rtr Seq Age Opt Cksum Len
Router *10.0.0.1 10.0.0.1 0x80000001 314 0x20 0xc510 36
bits 0x1, link count 1
id 10.1.111.0, data 255.255.255.0, Type Stub (3)
Topology count: 0, Default metric: 2500
Summary *10.0.0.1 10.0.0.1 0x80000001 313 0x20 0xba6e 28
mask 255.255.255.255
Topology default (ID 0) -> Metric: 0
Sep 1 13:54:46.684118 OSPF packet ignored: area stubness mismatch from 10.1.111.101 on intf fe-0/0/1.1001 area 0.0.0.1
Example: Viewing a default route injected into a stub area by an ABR
admin@J2300-1> show ospf database lsa-id 0.0.0.0 area 1 detail
OSPF database, Area 0.0.0.1
Type ID Adv Rtr Seq Age Opt Cksum Len
Summary *0.0.0.0 10.0.0.1 0x80000001 111 0x20 0xa123 28
mask 0.0.0.0
Topology default (ID 0) -> Metric: 111
no-summaries flag to the stub directive: set protocols ospf area stub no-summaries
+--------------------------------------+
| DN | O | DC | EA | N/P | MC | E | MT |
+--------------------------------------+
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS age | Options | 7 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Link State ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Network Mask |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|E| 0 | metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Forwarding address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| External Route Tag |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|E| TOS | TOS metric |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Forwarding address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| External Route Tag |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
The Fields are defined and populated as follows: Most everything is the same as a Type 5 External LSA
show ospf database nssaadvertising-router , lsa-id to narrow down the output resultsdetail and extensive flags to tailor output level of detailsummary flag for an overview of the LSAsExample: Viewing a specific NSSA LSAs in detail
admin@J2300-1> show ospf database nssa lsa-id 5.1.3.0 detail
OSPF database, Area 0.0.0.1
Type ID Adv Rtr Seq Age Opt Cksum Len
NSSA 5.1.3.0 10.0.0.3 0x80000002 2243 0x20 0xc1d7 36
mask 255.255.255.128
Topology default (ID 0)
Type: 1, Metric: 1, Fwd addr: 0.0.0.0, Tag: 0.0.0.1
nssa keyword underneath the area definition with set protocols area nssano-summaries keyworddefault-lsa default-metric after the nssa keyword where the metric is from 1 to 16777215type-7 keyword metric-type (1|2)area-range command for the NSSAoverride-metric keyword where metric is from 1 to 16777215exact flagrestrict flagno-nssa-abr flag at the protocols ospf levelshow ospf interface with the detail flag setadmin@J2300-1> show ospf interface fe-0/0/1.1001 detail Interface State Area DR ID BDR ID Nbrs fe-0/0/1.1001 DRother 0.0.0.1 10.1.0.1 0.0.0.0 1 Type: LAN, Address: 10.1.111.1, Mask: 255.255.255.0, MTU: 1496, Cost: 2500 DR addr: 10.1.111.101, Priority: 0 Adj count: 1 Hello: 1, Dead: 11, ReXmit: 3, Stub NSSA Auth type: None Protection type: None Topology default (ID 0) -> Cost: 2500 admin@J2300-1>
Sep 1 13:54:46.684118 OSPF packet ignored: area stubness mismatch from 10.1.111.101 on intf fe-0/0/1.1001 area 0.0.0.1 Sep 5 10:16:31.272796 OSPF packet ignored: area nssaness mismatch from 10.1.111.101 on intf fe-0/0/1.1001 area 0.0.0.1
no-summaries is configuredExample: Viewing a default route injected into a stub area by an ABR as a Type 7 LSA
admin@J2300-1> show ospf database lsa-id 0.0.0.0 area 1 detail
OSPF database, Area 0.0.0.1
Type ID Adv Rtr Seq Age Opt Cksum Len
NSSA *0.0.0.0 10.0.0.1 0x80000001 11 0x20 0x53e8 36
mask 0.0.0.0
Topology default (ID 0)
Type: 1, Metric: 1000, Fwd addr: 0.0.0.0, Tag: 0.0.0.0
admin@J2300-1>
Example: Type-7 LSA and it's Tranlation to an External LSA
admin@J2300-1> show ospf database lsa-id 3.3.3.0 detail
OSPF database, Area 0.0.0.1
Type ID Adv Rtr Seq Age Opt Cksum Len
NSSA 3.3.3.0 10.1.0.3 0x80000003 1046 0x28 0xe8b3 36
mask 255.255.255.0
Topology default (ID 0)
Type: 1, Metric: 100, Fwd addr: 10.1.0.3, Tag: 0.0.0.3
OSPF AS SCOPE link state database
Type ID Adv Rtr Seq Age Opt Cksum Len
Extern 3.3.3.0 10.0.0.3 0x80000002 1034 0x22 0x693d 36
mask 255.255.255.0
Topology default (ID 0)
Type: 1, Metric: 100, Fwd addr: 10.1.0.3, Tag: 0.0.0.3
admin@J2300-1>
Example: ASBR Summary LSA created because of a NSSA to External LSA Translation
admin@J2300-1> show ospf database asbrsummary lsa-id 10.1.0.3 detail
OSPF database, Area 0.0.0.0
Type ID Adv Rtr Seq Age Opt Cksum Len
ASBRSum *10.1.0.3 10.0.0.1 0x80000004 378 0x22 0xcdac 28
mask 0.0.0.0
Topology default (ID 0) -> Metric: 5010
ASBRSum 10.1.0.3 10.0.0.3 0x80000005 181 0x22 0xbf85 28
mask 0.0.0.0
Topology default (ID 0) -> Metric: 2510
...
..
.
Example: NSSA LSA and matching External LSA created by an NSSA ABR
admin@J2300-1> show ospf database lsa-id 5.1.1.0 detail
OSPF database, Area 0.0.0.1
Type ID Adv Rtr Seq Age Opt Cksum Len
NSSA *5.1.1.0 10.0.0.1 0x80000004 2684 0x20 0xdfbb 36
mask 255.255.255.128
Topology default (ID 0)
Type: 1, Metric: 1, Fwd addr: 0.0.0.0, Tag: 0.0.0.1
OSPF AS SCOPE link state database
Type ID Adv Rtr Seq Age Opt Cksum Len
Extern *5.1.1.0 10.0.0.1 0x80000008 113 0x22 0xd5c1 36
mask 255.255.255.128
Topology default (ID 0)
Type: 1, Metric: 1, Fwd addr: 0.0.0.0, Tag: 0.0.0.1
admin@J2300-1>
Exercise: NSSA Areas
+--------------------------------------+
| DN | O | DC | EA | N/P | MC | E | MT |
+--------------------------------------+
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS age | Options | 9, 10, or 11 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opaque Type | Opaque ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ +
| Opaque Information |
+ +
| ... |
The Fields are defined and populated as follows:
show ospf database opaque-areaadvertising-router , lsa-id to narrow down the output resultsdetail and extensive flags to tailor output level of detailsummary flag for an overview of the LSAs
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS age | Options | 9 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 3 | 0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+- TLVs -+
| ... |
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Value... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
set routing-options graceful-restartset routing-options graceful-restart restart-duration protocols ospf graceful-restartdisable flaghelper-disablerestart-duration where seconds is from 1 to 3600no-strict-lsa-checking flagcommand show ospf overveiwExample: OSPF router with Graceful Restart enabled for OSPF
admin@J2300-1> show ospf overview
Instance: master
Router ID: 10.0.0.1
Route table index: 0
Area border router, AS boundary router, NSSA router
LSA refresh time: 50 minutes
Restart: Enabled
Restart duration: 180 sec
Restart grace period: 210 sec
Helper mode: Enabled
Area: 0.0.0.0
Stub type: Not Stub
Authentication Type: None
Area border routers: 5, AS boundary routers: 5
Neighbors
Up (in full state): 2
Area: 0.0.0.1
Stub type: Stub NSSA, Stub cost: 1000
Authentication Type: None
Area border routers: 1, AS boundary routers: 4
Neighbors
Up (in full state): 2
Area: 30.30.30.30
Stub type: Not Stub
Authentication Type: None
Area border routers: 5, AS boundary routers: 5
Neighbors
Up (in full state): 2
Area: 101.101.101.101
Stub type: Not Stub
Authentication Type: None
Area border routers: 6, AS boundary routers: 6
Neighbors
Up (in full state): 2
Area: 102.102.102.102
Stub type: Not Stub
Authentication Type: None
Area border routers: 6, AS boundary routers: 6
Neighbors
Up (in full state): 2
Topology: default (ID 0)
Prefix export count: 2
Full SPF runs: 13
SPF delay: 0.200000 sec, SPF holddown: 5 sec, SPF rapid runs: 3
Backup SPF: Not Needed
admin@J2300-1>
graceful-restart flag under the traceoptions for the protocolTraffic Engineering is basically controlling and regulating the path that packets take through the network. This can be done a number of ways, by tweaking link costs, and policy routing for example. OSPF can help construct a special database that can be used for calculating the paths of MPLS Label Switched Paths (LSPs) on which to map network onto. When these LSPs are initiated, they can consult the database built by OSPF (or IS-IS) to help them determine the paths through the network based on bandwidth, priority, usage, cost, link type and class. To help construct the Traffic Engineering Database (TED), a special LSA was added to OSPF.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS age | Options | 10 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 1 | Instance |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Advertising Router |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| LS checksum | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Value... |
. .
. .
. .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
set protocols ospf traffic-engineeringadvertise-unnumbered-interfaces flag to use unnumbered interfaces for TEcredibility-protocol-preference to instruct the router that OSPF is the more preferred protocol to contribute to the Traffic Engineering Database (TED)no-topology to disable TE topology informationshortcuts directive to instruct OSPF to use MPLS LSPs as next hopsset protocols ospf traffic-engineering shortcuts lsp-metric-into-summary directiveignore-lsp-metrics flagset protocols ospf area interface te-metric where the metric is from 1 to 4294967295show ospf database opaque-areaadvertising-router, area to limit outputlsa-id to limit it to certain LSASdetail, extensive and summary flags to vary the amount of information shownExample: Viewing a TE LSA with a Router Address TLV Note: the TLV Type, Length and value is shown in the LSA guts
admin@J2300-1> show ospf database opaque-area area 0 advertising-router 10.0.0.1 lsa-id 1.0.0.1 detail
OSPF database, Area 0.0.0.0
Type ID Adv Rtr Seq Age Opt Cksum Len
OpaqArea*1.0.0.1 10.0.0.1 0x80000011 1377 0x22 0xfb0d 28
Area-opaque TE LSA
RtrAddr (1), length 4: 10.0.0.1
admin@J2300-1>
Example: Viewing a TE LSA with a Link TLV and it subTLVs
admin@J2300-1> show ospf database opaque-area area 0 advertising-router 10.0.0.1 lsa-id 1.0.0.3 detail
OSPF database, Area 0.0.0.0
Type ID Adv Rtr Seq Age Opt Cksum Len
OpaqArea*1.0.0.3 10.0.0.1 0x80000012 952 0x22 0xcba9 136
Area-opaque TE LSA
Link (2), length 112:
Linktype (1), length 1:
1
LinkID (2), length 4:
10.0.0.2
LocIfAdr (3), length 4:
10.0.12.1
RemIfAdr (4), length 4:
10.0.12.2
TEMetric (5), length 4:
5
MaxBW (6), length 4:
10Gbps
MaxRsvBW (7), length 4:
10Gbps
UnRsvBW (8), length 32:
Priority 0, 10Gbps
Priority 1, 10Gbps
Priority 2, 10Gbps
Priority 3, 10Gbps
Priority 4, 10Gbps
Priority 5, 10Gbps
Priority 6, 10Gbps
Priority 7, 10Gbps
LinkLocalRemoteIdentifier (11), length 8:
Local 68, Remote 0
Color (9), length 4:
0
admin@J2300-1>
show ted protocolExample: TED Protocol Contributions
admin@J2300-1> show ted protocol Protocol name Credibility Self node OSPF(0) 502 10.0.0.1 OSPF(1) 502 10.0.0.1 OSPF(505290270) 502 10.0.0.1 OSPF(1701143909) 502 10.0.0.1 OSPF(1717986918) 502 10.0.0.1 admin@J2300-1>
show ted databasedetail and extensive flags to vary the amount of information shownshow ted database Example: Viewing the TED for a particular system
admin@J2300-1> show ted database 10.0.0.2 detail
TED database: 0 ISIS nodes 15 INET nodes
NodeID: 10.0.0.2
Type: Rtr, Age: 13902 secs, LinkIn: 4, LinkOut: 1
Protocol: OSPF(0.0.0.0)
To: 10.0.0.1, Local: 10.0.12.2, Remote: 10.0.12.1
Local interface index: 68, Remote interface index: 0
Protocol: OSPF(30.30.30.30)
Protocol: OSPF(101.101.101.101)
Protocol: OSPF(102.102.102.102)
admin@J2300-1>
show ted linkdetail flag for more informationExample: Viewing the links in the TED
admin@J2300-1> show ted link ID ->ID LocalPath LocalBW 10.0.0.1 10.0.0.2 1 0bps 10.0.0.2 10.0.0.1 0 0bps 10.0.0.3 10.0.0.1 0 0bps 10.101.0.10-1 10.0.0.1 0 0bps 10.101.0.10-1 10.0.0.6 0 0bps 10.101.0.10-1 10.0.0.5 0 0bps 10.101.0.10-1 10.0.0.4 0 0bps 10.101.0.10-1 10.0.0.3 0 0bps 10.101.0.10-1 10.0.0.2 0 0bps 10.101.0.10-1 10.10.10.10 0 0bps 10.102.0.10-1 10.0.0.1 0 0bps 10.102.0.10-1 10.0.0.6 0 0bps 10.102.0.10-1 10.0.0.5 0 0bps 10.102.0.10-1 10.0.0.4 0 0bps 10.102.0.10-1 10.0.0.3 0 0bps 10.102.0.10-1 10.0.0.2 0 0bps 10.102.0.10-1 10.10.10.10 0 0bps 10.30.30.30-1 10.0.0.1 0 0bps 10.30.30.30-1 99.99.99.99 0 0bps 10.30.30.30-1 10.0.0.6 0 0bps 10.30.30.30-1 10.0.0.5 0 0bps 10.30.30.30-1 10.0.0.4 0 0bps 10.30.30.30-1 10.0.0.3 0 0bps 10.30.30.30-1 10.0.0.2 0 0bps 10.1.111.101-1 10.0.0.1 0 0bps 10.1.111.101-1 10.1.0.1 0 0bps 10.1.123.102-1 10.0.0.3 0 0bps 10.1.123.102-1 10.1.0.2 0 0bps admin@J2300-1>
Editorial Note: Since an LSA with area flooding scope is used to build the TED, you wind up with a separate TED for each area. Due to the nature of OSPF, it isn't guaranteed that a router, especially a non-backbone router, will have complete information of the entire domain topology. This is certain if any kind of stub areas, summarizing addresses at ABRs. Thus, a router trying to precompute the path for a LSP won't necessarily have all of the needed information if the LSP terminates outside it's own area. So if you're planning on doing any TE, do your best to keep your OSPF design to a single area. To do TE in multiple areas you need to arrange for meeting points of LSPs in each area, and stitch them together. There are a lot of expired RFCs and things in the works. So stay tuned for a good working implementation, but don't hold your breath.
Exercise: OSPF Traffic Engineering Databaseset protocols ospf interface ldp-synchronization set protocols ospf interface ldp-synchronization hold-time where the time is from 1 to 65536 secondsset protocols ospf area label-switched-path protocols mpls label-switched-path metric if one is not configured under OSPFset protocols ospf area interface link-protection for the interface to be protectedset protocols ospf area interface node-link-protection for the interface to be protectedbackup flag in the LSPs configurationset protocols mpls label-switched-path to be used for BackupExample: Area 4.4.4.4 is severed from the backbone area, but R41 has a connection to R33 in area 3.3.3.3
A virtual link is put up from R41 (ABR) to R03 (ABR) to connnect area 4.4.4.4 virtually to the backbone using area 3.3.3.3 as the Transit area.
virtual-linktransit-area neighbor-id Example: Configuring a virtual link
[edit]
admin@J2300-1# edit protocols ospf area 0
[edit protocols ospf area 0.0.0.0]
admin@J2300-1# set virtual-link rou
^
syntax error, expecting or .
admin@J2300-1# set virtual-link neighbor-id 13.13.13.13 transit-area 101.101.101.10
[edit protocols ospf area 0.0.0.0]
admin@J2300-1#
show ospf interface command will return resultsvl- of remote side>Example: Virtual link is displayed as interface vl-13.13.13.13
admin@J2300-1> show ospf interface Interface State Area DR ID BDR ID Nbrs fxp1.12 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1 fxp1.13 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1 lo0.0 DRother 0.0.0.0 0.0.0.0 0.0.0.0 0 vl-13.13.13.13 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1 fxp1.1001 DRother 0.0.0.1 10.1.0.1 0.0.0.0 1 fxp1.13 PtToPt 0.0.0.1 0.0.0.0 0.0.0.0 1 fxp1.100 DRother 30.30.30.30 99.99.99.99 10.0.0.4 7 fxp1.101 DRother 101.101.101.101 10.10.10.10 10.0.0.4 6 fxp1.102 DRother 102.102.102.102 10.10.10.10 10.0.0.4 6
Example: Virtual link is displayed in detail
admin@J2300-1> show ospf interface vl-13.13.13.13 detail Interface State Area DR ID BDR ID Nbrs vl-13.13.13.13 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1 Type: Virtual, Address: 10.101.0.1, Mask: 0.0.0.0, MTU: 0, Cost: 2510 Transit Area: 101.101.101.101, Destination: 13.0.0.0 Adj count: 1 Hello: 10, Dead: 40, ReXmit: 5, Not Stub Auth type: None Protection type: None, No eligible backup Topology default (ID 0) -> Cost: 2510 admin@J2300-1>
Down if parameters are not correctExample: Virtual link in the Down state
admin@J2300-1> show ospf interface vl-14.14.14.14 detail Interface State Area DR ID BDR ID Nbrs vl-14.14.14.14 Down 0.0.0.0 0.0.0.0 0.0.0.0 0 Type: Virtual, Address: 0.0.0.0, Mask: 0.0.0.0, MTU: 0, Cost: 1 Transit Area: 14.14.14.14 Adj count: 0 Hello: 10, Dead: 40, ReXmit: 5, Not Stub Auth type: None Protection type: None, No eligible backup Topology default (ID 0) -> Down, Cost: 65535
Example: Adjacency over a virtual link in Junos
admin@J2300-1> show ospf neighbor | match vl 13.0.0.0 vl-13.13.13.13 Full 13.13.13.13 0 39
Example: A Virtual Link Displayed in the Router LSA
admin@J2300-1> show ospf database router lsa-id 10.0.0.1 area 0 detail
OSPF database, Area 0.0.0.0
Type ID Adv Rtr Seq Age Opt Cksum Len
Router *10.0.0.1 10.0.0.1 0x80000026 281 0x22 0xdfb6 96
bits 0x3, link count 6
id 10.0.0.2, data 10.0.12.1, Type PointToPoint (1)
Topology count: 0, Default metric: 5
id 10.0.12.0, data 255.255.255.0, Type Stub (3)
Topology count: 0, Default metric: 5
id 10.0.0.3, data 10.0.13.1, Type PointToPoint (1)
Topology count: 0, Default metric: 5
id 10.0.13.0, data 255.255.255.0, Type Stub (3)
Topology count: 0, Default metric: 5
id 10.0.0.1, data 255.255.255.255, Type Stub (3)
Topology count: 0, Default metric: 0
id 13.13.13.13, data 10.101.0.1, Type Virtual (4)
Topology count: 0, Default metric: 2510
Topology default (ID 0)
Type: Virtual, Node ID: 13.13.13.13
Metric: 2510, Bidirectional
Type: PointToPoint, Node ID: 10.0.0.3
Metric: 5, Bidirectional
Type: PointToPoint, Node ID: 10.0.0.2
Metric: 5, Bidirectional
Editorial Note: Most network books seem to paint a really awesome picture of a network that has an area severed from the backbone, and a heroic network engineer steps in and saves the day with a zero-cost virutal link! However, much like their ugly cousin the GRE tunnel, try to avoid using these wherever possible. They are like putting a band-aid on a gunshot wound. Sure it stops the immediate bleeding, but there are bigger problems a lot deeper that the virtual link band aide is just covering up. A network that needs a virtual link actually needs a real architectural overhaul. If you're using these, there are probably a lot better ways to "fix" your problem.
Exercise: Virtual LinksDiagram: OSPF used as the routing protocol between the CE and PE in a MPLS L3VPN
Diagram: Backdoor Problem with L3VPNs running OSPF between Customer Sites
The Type 1 and 2 LSAs in area 0.0.0.0 at site 1 are advertised into BGP by PE1. The OSPF values are encoded into extended BGP communities and advertised to PE2 via BGP. The LSAs are reconstructed as Type 3 LSAs at the other side by PE2 and flooded into the OSPF area at site 2. However, due to the fact that Type 1 and 2 LSAs can flow over the T1 link between Site 1 and Site 2, these will always be preferred.
Diagram: Backdoor Problem solved by configuring a sham link
The Type 1 and 2 LSAs can now flow over the sham link. Thus, preference on whether or not to send traffic between the sites over the T1 as opposed to the L3VPN becomes a matter of the cost of the links.
Editorial Note: As much fun it is to set up OSPF as the routing protocol between the CE and PE in a MPLS L3VPN, it is really quite nasty and should not be attempted by mortal network engineers (really , it is fun). This involves some of the most advanced level routing concepts you'll ever run into between BGP and OSPF. This is also plagued by some strangeish behavior - the Type 1 & 2 LSA converstion to a Type 3 LSA which can be really daunting and misleading. It also suffers from some messy hacks -- the sham link, which sleeps in the bed next to the virtual link and GRE tunnel. It's really good to understand how all this works for one simple reason -- talking people out of using it! There are far better protocols for route distribution between the CE and PE - RIP, BGP and even static routes. As scared as some people are about using BGP, it is for the most part straight forward and predictable -- use it instead of OSPF.
edit protcols ospf area interface bfd-liveness-detection minimum-interval directive where the time is from 1 to 255000 millisecondstransmit-interval minimum-interval directiveminimum-receive-interval directiveno-adaptation flagmultiplier commandfull-neighbors-only flagExample: Setting up a BFD session on a neighbor session using a 1 second packet interval
admin@J2300-1> edit Entering configuration mode [edit] admin@J2300-1# edit protocols ospf area 0 interface fxp1.13 [edit protocols ospf area 0.0.0.0 interface fxp1.13] admin@J2300-1# edit bfd-liveness-detection [edit protocols ospf area 0.0.0.0 interface fxp1.13 bfd-liveness-detection] admin@J2300-1# set minimum-interval 1000 [edit protocols ospf area 0.0.0.0 interface fxp1.13 bfd-liveness-detection] admin@J2300-1# commit commit complete
show bfd session shows BFD sessions and statusdetail and extensive flags to vary amount of detailaddress, discriminator and prefix to narrow down results that are returnedExample: BFD session details
admin@J2300-1> show bfd session detail
Detect Transmit
Address State Interface Time Interval Multiplier
10.0.12.2 Up fe-0/0/1.12 4.500 1.500 3
Client OSPF realm ospf-v2 Area 0.0.0.0, TX interval 1.000, RX interval 1.000
Session up time 00:27:33
Local diagnostic NbrSignal, remote diagnostic None
Remote state Up, version 1
Detect Transmit
Address State Interface Time Interval Multiplier
10.0.13.3 Down fe-0/1/1.13 0.000 1.000 3
Client OSPF realm ospf-v2 Area 0.0.0.0, TX interval 1.000, RX interval 1.000
Local diagnostic None, remote diagnostic None
Remote state AdminDown, version 1
2 sessions, 2 clients
Cumulative transmit rate 1.7 pps, cumulative receive rate 0.7 pps
clear bfd sessionaddress and discriminator clear bfd adaptationaddress and discriminator traceoptions under edit protocols bfdedit protocols ospf3Editorial Note: I wish we could divorce ourself of IPv4 addresses in routing protocols designed for IPv6
OSPF Configuration Options for OSPFv2 for Junos 10.0
protocols {
ospf {
disable;
export [ policy-names ];
external-preference preference;
graceful-restart {
disable;
helper-disable;
notify-duration seconds;
restart-duration seconds;
}
import [ policy-names ];
no-nssa-abr;
no-rfc-1583;
overload {
timeout seconds;
}
preference preference;
prefix-export-limit;
rib-group group-name;
reference-bandwidth reference-bandwidth;
sham-link {
local address;
}
spf-options {
delay milliseconds;
rapid-runs number;
holddown milliseconds;
}
traffic-engineering {
advertise-unnumbered-interfaces;
multicast-rpf-routes;
no-topology;
shortcuts {
ignore-lsp-metrics;
lsp-metric-into-summary;
}
}
traceoptions {
file filename ;
flag flag ;
}
area area-id {
area-range network/mask-length ;
interface interface-name {
disable;
authentication {
md5 key-id {
key [ key-values ];
start-time time;
}
simple-password key;
}
bfd-liveness-detection {
authentication {
algorithm algorithm-name;
key-chain key-chain-name;
loose-check;
}
detection-time {
threshold milliseconds;
}
full-neighbors-only;
minimum-interval milliseconds;
minimum-receive-interval milliseconds;
multiplier number;
no-adaptation;
transmit-interval {
threshold milliseconds;
minimum-interval milliseconds;
}
version (1 | automatic);
}
dead-interval seconds;
demand-circuit;
flood-reduction;
hello-interval seconds;
interface-type type;
ipsec-sa name;
ldp-synchronization {
disable;
hold-time seconds;
}
metric metric;
neighbor address ;
passive {
traffic-engineering {
remote-node-id address;
}
}
poll-interval seconds;
priority number;
retransmit-interval seconds;
secondary;
te-metric metric;
topology (ipv4-multicast | name) {
metric metric;
}
transit-delay seconds;
}
label-switched-path name metric metric;
network-summary-export [ policy-names ];
network-summary-import [policy-names ];
nssa {
area-range network/mask-length ;
default-lsa {
default-metric metric;
metric-type type;
type-7;
}
(summaries | no-summaries);
}
peer-interface interface-name {
disable;
dead-interval seconds;
demand-circuit;
flood-reduction;
hello-interval seconds;
retransmit-interval seconds;
transit-delay seconds;
}
sham-link-remote address {
demand-circuit;
flood-reduction;
ipsec-sa name;
metric metric;
}
}
stub ;
virtual-link neighbor-id router-id transit-area area-id {
disable;
authentication {
md5 key-id {
key [ key-values ];
}
simple-password key;
}
dead-interval seconds;
demand-circuit;
flood-reduction;
hello-interval seconds;
ipsec-sa name;
retransmit-interval seconds;
topology (ipv4-multicast | name) disable;
transit-delay seconds;
}
}
}
Whew!
After all of this is said and done, I actually really prefer IS-IS as my IGP.
If I ever find some time, I may expand this section a bit in the following ways:
RFC 1583 OSPF Version 2
RFC 1587 The OSPF NSSA Option
RFC 1918 Address Allocation for Private Internets
RFC 2328 OSPF Version 2
RFC 2370 The OSPF Opaque LSA Option
RFC 2470 Transmission of IPv6 Packets over Token Ring Networks
RFC 3101 The OSPF Not-So-Stubby Area (NSSA) Option
RFC 3623 Graceful OSPF Restart
RFC 3630 Traffic Engineering (TE) Extensions to OSPF Version 2
RFC 4203 OSPF Extensions in Support of Generalized Multi-Protocol Label Switching (GMPLS)
RFC 5185 OSPF Multi-Area Adjacency
RFC 5250 The OSPF Opaque LSA Option
RFC 5340 OSPF for IPv6
RFC 5709 OSPFv2 HMAC-SHA Cryptographic Authentication
RFC 5786 Advertising a Router's Local Addresses in OSPF Traffic Engineering (TE) Extensions
RFC 5880 Bidirectional Forwarding Detection (BFD)
John T. Moy OSPF: Anatomy of an Internet Routing Protcol, ISBN: 9780201634723
Juniper Networks Junos OS Documentation, Release 10.0
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version 0 | C | Plenty |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Router ID - www.blackhole-networks.com |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Area ID - OSPF Deep Dive |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum OK | Construction |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+- -+
| PAGE STILL |
+- UNDER -+
| CONSTRUCTION |
+- -+
| ROUGH AROUND THE EDGES |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+