Script broadcast-ospf2-discover

Script types: prerule
Categories: broadcast, discovery, safe

Script Summary

Discover IPv4 networks using Open Shortest Path First version 2(OSPFv2) protocol.

The script works by listening for OSPF Hello packets from the multicast address. The script then replies and attempts to create a neighbor relationship, in order to discover network database.

If no interface was provided as a script argument or through the -e option, the script will fail unless a single interface is present on the system.

Script Arguments


MD5 digest key to use if message digest authentication is disclosed.


Router ID to use. Defaults to


Time in seconds that the script waits for hello from other routers. Defaults to 10 seconds, matching OSPFv2 default value for hello interval.


Interface to send on (overrides -e). Mandatory if not using -e and multiple interfaces are present.

max-newtargets, newtargets

See the documentation for the target library.

Example Usage

nmap --script=broadcast-ospf2-discover
nmap --script=broadcast-ospf2-discover -e wlan0

Script Output

Pre-scan script results:
| broadcast-ospf2-discover:
|   Area ID:
|   External Routes
|_  Use the newtargets script-arg to add the results as targets



  • Emiliano Ticci

License: Same as Nmap--See