Scroll to navigation

nemesis-ospf(1) General Commands Manual (usm) nemesis-ospf(1)

NAME

nemesis-ospfOSPF Protocol (The Nemesis Project)

SYNOPSIS

nemesis-ospf [-vZ?] [-p TYPE] [-N ADDR] [-i SEC] [-l SEC] [-z LEN] [-x TYPE] [-B NUM] [-P FILE] [-L ADDR] [-u NUM] [-j ADDR] [-k DATA] [-y TYPE] [-w TOS] [-m METRIC] [-f ADDR] [-g TAG] [-L ADDR] [-n MASK] [-h ADDR]

DESCRIPTION

nemesis is designed to be a command line-based, portable human IP stack for UNIX-like and Windows systems. The suite is broken down by protocol, and should allow for useful scripting of injected packets from simple shell scripts.

nemesis-ospf provides an interface to craft and inject OSPF packets, allowing the the user to specify any portion of an OSPF packet, as well as lower-lever IP packet information.

OSPF Options

METRIC
OSPF Metric
NUM
OSPF Sequence Number
ADDR
OSPF Advertising Router Address
MASK
OSPF Netmask
OPT
OSPF Options, 1 byte value
ADDR
OSPF Source Router ID
ADDR
OSPF Area ID, e.g. 0.0.0.1, default 0.0.0.0
FILE
Filename to read for raw (HEX) OSPF packet payload, appended after selected packet type. I.e., can be used with -pU to create multi LSA Link State Updates.
Display the injected packet in human readable form. Use twice to see a hexdump of the injected package with printable ASCII characters on the right. Use three times for a hexdump without decoded ASCII.

OSPF Packet Types

TYPE

Hello
Database Description
Link State Request
Link State Update
Router Links Advertisement
Network Links Advertisement
IP Summary Links Advertisement
AS External Link Advertisement

OSPF HELLO options

ADDR
Neighbor Router Address
SEC
Dead Router Interval, seconds
SEC
OSPF Interval, seconds

OSPF Database Description (DBD) options

LEN
OSPF Maximum Datagram Length
TYPE
OSPF DBD Exchange Type
NUM
Number of Link State Advertisements (LSAs) to broadcast
FILE
RAW payload file with LSAs, in plain -pU mode

OSPF Router LSA options

-AR -ADDR
Link State ID: Originating Router ID (IP address)
NUM
Number of links, default 1
ADDR
Link ID
DATA
Link data
TYPE
Link type, default 1
TOS
Link TOS number, default 0
METRIC
Link TOS (0) metric (2 bytes)

OSPF Autonomous System External LSA options

ADDR
Forward Address
TAG
External route tag

OSPF Network LSA options

ADDR
Link State ID: Originating Router ID (IP address)
MASK
Netmask
ADDR
Attached Router (IP address)

OSPF Summary LSA (IP Network) options

ADDR
Link State ID: Network route to summarize
MASK
Netmask of route
NUM
Cost of this route (4 bytes)

Generic LSA options for LSR and LSU packets

LSA_Age
Link State Advertisement Age.
ADDR
Link State ID, usually the Router ID of the originating router
ADDR
Advertising Router Address
NUM
Sequence Number
MASK
Multi-purpose netmask

IP OPTIONS

ADDR
Specify the source address within the IP header.
ADDR
Specify the destination address within the IP header. Defaults to the link-local multicast address 224.0.0.5 (All OSPF Routers).
OPT
Specify the IP header fragmentation options:

don't fragment
more fragments
reserved flag
offset
 

IP fragmentation options can be specified individually or combined into a single argument to the -F command line switch by separating the options with commas (eg. -FD,M) or spaces (eg. -FM 223). The IP fragmentation offset is a 13-bit field with valid values from 0 to 8189. Don't fragment (DF), more fragments (MF) and the reserved flag (RESERVED or RB) are 1-bit fields.

NOTE: Under normal conditions, the reserved flag is unset.

ID
Specify the IP ID within the IP header.
FILE
This will cause nemesis-ospf to use the specified IP options file as the options when building the IP header for the injected packet. IP options can be up to 40 bytes in length. The IP options file must be created manually based upon the desired options. IP options can also be read from stdin by specifying -O- instead.
ADDR
Specify the source IP address within the IP header.
TOS
Specify the IP type of service (TOS) within the IP header. Valid type of service values:

2
Minimize monetary cost
4
Maximize reliability
8
Maximize throughput
24
Minimize delay

NOTE: Under normal conditions, only one type of service is set within a packet. To specify multiple types, specify the sum of the desired values as the type of service.

TTL
Specify the IP time-to-live (TTL) in the IP header.

DATA LINK OPTIONS

IFNAME
Specify the name (for UNIX-like systems) or the number (for Windows systems) of the IFNAME to use (eg. fxp0, eth0, hme0, 1).
MAC
Specify the source MAC address, (XX:XX:XX:XX:XX:XX).
MAC
Specify the destination MAC address, (XX:XX:XX:XX:XX:XX).
Lists the available network interfaces by number for use in link-layer injection.

NOTE: This feature is only relevant to Windows systems.

DIAGNOSTICS

nemesis-ospf returns 0 on a successful exit, 1 if it exits on an error.

SEE ALSO

nemesis-arp(1), nemesis-dhcp(1), nemesis-dns(1), nemesis-ethernet(1), nemesis-icmp(1), nemesis-igmp(1), nemesis-ip(1), nemesis-rip(1), nemesis-tcp(1), nemesis-udp(1).

AUTHORS

Mark Grimes <mark@stateful.net>,
Jeff Nathan <jeff@snort.org> and
Joachim Nilsson <troglobit@gmail.com>

BUGS

Please report at https://github.com/libnet/nemesis/issues

December 15, 2019