Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
NAME
       nemesis-dhcp -- DHCP Protocol (The Nemesis Project)

SYNOPSIS
       nemesis-dhcp  [-vZ?]  [-c  COUNT]  [-i  INTERVAL] [-d IFNAME] [-C ADDR]
		    [-D	ADDR] [-F OPT] [-f FLAGS] [-g ADDR] [-h	MAC] [-H  MAC]
		    [-I	 ID]  [-M MAC] [-o CODE] [-O FILE] [-P FILE] [-s ADDR]
		    [-S	ADDR]  [-t  IP-TOS]  [-T  TTL]	[-x  PORT]  [-y	 PORT]
		    [-Y	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	proto-
       col, and	should allow for useful	scripting  of  injected	 packets  from
       simple shell scripts.

       nemesis-dhcp provides an	interface to craft and inject DHCP packets al-
       lowing  the  user  to  specify  any portion of a	DHCP packet as well as
       lower-level IP and TCP/UDP packet information.

       By default a DHCP Discover (client) message is  created.	  To  success-
       fully send it out a network interface you must be root.

GENERAL	OPTIONS
       -c COUNT
	       Number of packets to send, default: 1.

       -i INTERVAL
	       Seconds	between	 repeatedly sent packets, only available if -c
	       is given.

       -v      Display the injected packet in human readable form.  Use	 twice
	       to  see	a  hexdump of the injected packet with printable ASCII
	       characters on the right.	 Use three times for a hexdump without
	       decoded ASCII.

DHCP OPTIONS
       -o CODE
	       BOOTP/DHCP opcode to send, default: 1 (request).

       -f FLAGS
	       Specify the FLAGS within	the DHCP header, default: 0x8000.

       -g ADDR
	       DHCP Gateway (relay agent) IP address.

       -s ADDR
	       DHCP server IP address.

       -C ADDR
	       DHCP client's IP	address.

       -Y ADDR
	       Your IP address,	the lease from the DHCP	server.

       -h MAC  Client's	HW address, MAC.

       -P FILE
	       This will cause nemesis-dhcp to use the specified FILE  as  the
	       payload	when injecting DHCP packets.  For packets injected us-
	       ing the raw interface (where -d is not used), the maximum  pay-
	       load  size is 65455 for DHCP packets.  For packets injected us-
	       ing the link layer interface (where -d IS  used),  the  maximum
	       payload	size  is  1420	bytes.	Payloads can also be read from
	       stdin by	specifying -P- instead.

	       The payload file	can consist of any arbitrary  data  though  it
	       will  be	 most useful to	create a payload resembling the	struc-
	       ture of the DHCP	packet specified using	the  command-line  op-
	       tions.

	       NOTE:  Windows systems are limited to a maximum payload size of
	       1420 bytes.

UDP OPTIONS
       -x PORT
	       UDP source port of injected packet.

       -y PORT
	       UDP target port of injected packet.

IP OPTIONS
       -D ADDR
	       Specify the destination IP address in the IP header.

       -F OPT  Specify the fragmentation options in the	IP header:

		     -FD	don't fragment
		     -FM	more fragments
		     -FR	reserved flag
		     -F	offset

	       IP fragmentation	options	can be specified individually or  com-
	       bined  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	 frag-
	       ments  (MF)  and	 the  reserved flag (RESERVED or RB) are 1-bit
	       fields.

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

       -I ID   Specify the IP ID in the	IP header.

       -O FILE
	       This will cause nemesis-dhcp to use the	specified  IP  options
	       file,  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 de-
	       sired options.  IP options can also be read from	stdin by spec-
	       ifying -O- instead of an	IP options file.

       -S ADDR
	       Specify the source IP address in	the IP header.

       -t TOS  Specify	the  IP	type-of-service	(TOS) in 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.

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

DATA LINK OPTIONS
       -d IFNAME
	       Specify	the  name  (for	 UNIX-like systems) or the number (for
	       Windows systems)	of the IFNAME to use (eg.  fxp0,  eth0,	 hme0,
	       1).

       -H MAC  Specify the source MAC address, (XX:XX:XX:XX:XX:XX).

       -M MAC  Specify the destination MAC address, (XX:XX:XX:XX:XX:XX).

       -Z      Lists  the  available  network  interfaces by number for	use in
	       link-layer injection.

	       NOTE: This feature is only relevant to Windows systems.

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

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

AUTHORS
       Joachim Nilsson <troglobit@gmail.com>

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

				 Nov 21, 2019		       nemesis-dhcp(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=nemesis-dhcp&sektion=1&manpath=FreeBSD+Ports+15.0.quarterly>

home | help