arp

package: net-tools

title: arp(8)

summary: manipulate the system ARP cache

text:
# arp(8)

## NAME
arp - manipulate the system ARP cache

## SYNOPSIS
arp [-evn] [-H type] [-i if] -a [hostname]

arp [-v] [-i if] -d hostname [pub]

arp [-v] [-H type] [-i if] -s hostname hw_addr [temp]

arp [-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub

arp [-v] [-H type] [-i if] -Ds hostname ifa [netmask nm] pub

arp [-vnD] [-H type] [-i if] -f [filename]

## NOTE
This program is obsolete. For replacement check ip neighbor.

## DESCRIPTION
Arp manipulates the kernel's ARP cache in various ways. The primary options are clearing an address mapping entry and manually setting up one. For debugging purposes, the arp program also allows a complete dump of the ARP cache.

## OPTIONS
-v, --verbose

Tell the user what is going on by being verbose.

-n, --numeric

shows numerical addresses instead of trying to determine symbolic host, port or user names.

-H type, --hw-type type, -t type

When setting or reading the ARP cache, this optional parameter tells arp which class of entries it should check for. The default value of this parameter is ether (i.e. hardware code 0x01 for IEEE 802.3 10Mbps Ethernet). Other values might include network technologies such as ARCnet (arcnet) , PROnet (pronet) , AX.25 (ax25) and NET/ROM (netrom).

-a [hostname], --all [hostname]

Shows the entries of the specified hosts. If the hostname parameter is not used, all entries will be displayed. The entries will be displayed in alternate (BSD) style.

-d hostname, --delete hostname

Remove any entry for the specified host. This can be used if the indicated host is brought down, for example.

-D, --use-device

Use the interface ifa's hardware address.

-e

Shows the entries in default (Linux) style.

-i If, --device If

Select an interface. When dumping the ARP cache only entries matching the specified interface will be printed. When setting a permanent or temp ARP entry this interface will be associated with the entry; if this option is not used, the kernel will guess based on the routing table. For pub entries the specified interface is the interface on which ARP requests will be answered. NOTE: This has to be different from the interface to which the IP datagrams will be routed.

-s hostname hw_addr, --set hostname

Manually create an ARP address mapping entry for host hostname with hardware address set to hw_addr class, but for most classes one can assume that the usual presentation can be used. For the Ethernet class, this is 6 bytes in hexadecimal, separated by colons. When adding proxy arp entries (that is those with the publish flag set a netmask may be specified to proxy arp for entire subnets. This is not good practice, but is supported by older kernels because it can be useful. If the temp flag is not supplied entries will be permanent stored into the ARP cache.

NOTE: As of kernel 2.2.0 it is no longer possible to set an ARP entry for an entire subnet. Linux instead does automagic proxy arp when a route exists and it is forwarding. See arp(7) for details.

-f filename, --file filename

Similar to the -s option, only this time the address info is taken from file filename set up. The name of the data file is very often /etc/ethers, but this is not official. If no filename is specified /etc/ethers is used as default. The format of the file is simple; it only contains ASCII text lines with a hardware address and a hostname separated by whitespace. Additionally the pub, temp and netmask flags can be used.

In all places where a hostname is expected, one can also enter an IP address in dotted-decimal notation.

As a special case for compatibility the order of the hostname and the hardware address can be exchanged.

Each complete entry in the ARP cache will be marked with the C flag. Permanent entries are marked with M and published entries have the P flag.

## FILES
/proc/net/arp,

/etc/networks

/etc/hosts

/etc/ethers

## SEE ALSO
ip(8)

## AUTHORS
Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> with a lot of improvements from net-tools Maintainer Bernd Eckenfels <net-tools@lina.inka.de>.


ifconfig

title: ifconfig(8)

summary: configure a network interface

text:
# ifconfig(8)

## NAME
ifconfig - configure a network interface

## SYNOPSIS
ifconfig [interface]

ifconfig interface [aftype] options | address ...

## NOTE
This program is obsolete! For replacement check ip addr and ip link. For statistics use ip -s link.

## DESCRIPTION
Ifconfig is used to configure the kernel-resident network interfaces. It is used at boot time to set up interfaces as necessary. After that, it is usually only needed when debugging or when system tuning is needed.

If no arguments are given, ifconfig displays the status of the currently active interfaces. If a single interface argument is given, it displays the status of the given interface only; if a single -a argument is given, it displays the status of all interfaces, even those that are down. Otherwise, it configures an interface.

## Address Families
If the first argument after the interface name is recognized as the name of a supported address family, that address family is used for decoding and displaying all protocol addresses. Currently supported address families include inet (TCP/IP, default), inet6 (IPv6), ax25 (AMPR Packet Radio), ddp (Appletalk Phase 2), ipx (Novell IPX) and netrom (AMPR Packet radio). All numbers supplied as parts in IPv4 dotted decimal notation may be decimal, octal, or hexadecimal, as specified in the ISO C standard (that is, a leading 0x or 0X implies hexadecimal; otherwise, a leading '0' implies octal; otherwise, the number is interpreted as decimal). Use of hexamedial and octal numbers is not RFC-compliant and therefore its use is discouraged and may go away.

## OPTIONS
interface

The name of the interface. This is usually a driver name followed by a unit number, for example eth0 for the first Ethernet interface.

up

This flag causes the interface to be activated. It is implicitly specified if an address is assigned to the interface.

down

This flag causes the driver for this interface to be shut down.

[-]arp

Enable or disable the use of the ARP protocol on this interface.

[-]promisc

Enable or disable the promiscuous mode of the interface. If selected, all packets on the network will be received by the interface.

[-]allmulti

Enable or disable all-multicast mode. If selected, all multicast packets on the network will be received by the interface.

metric N

This parameter sets the interface metric. It is not available under GNU/Linux.

mtu N

This parameter sets the Maximum Transfer Unit (MTU) of an interface.

dstaddr addr

Set the remote IP address for a point-to-point link (such as PPP). This keyword is now obsolete; use the pointopoint keyword instead.

netmask addr

Set the IP network mask for this interface. This value defaults to the usual class A, B or C network mask (as derived from the interface IP address), but it can be set to any value.

add addr/prefixlen

Add an IPv6 address to an interface.

del addr/prefixlen

Remove an IPv6 address from an interface.

tunnel ::aa.bb.cc.dd

Create a new SIT (IPv6-in-IPv4) device, tunnelling to the given destination.

irq addr

Set the interrupt line used by this device. Not all devices can dynamically change their IRQ setting.

io_addr addr

Set the start address in I/O space for this device.

mem_start addr

Set the start address for shared memory used by this device. Only a few devices need this.

media type

Set the physical port or medium type to be used by the device. Not all devices can change this setting, and those that can vary in what values they support. Typical values for type are 10base2 (thin Ethernet), 10baseT (twisted-pair 10Mbps Ethernet), AUI (external transceiver) and so on. The special medium type of auto can be used to tell the driver to auto-sense the media. Again, not all drivers can do this.

[-]broadcast [addr]

If the address argument is given, set the protocol broadcast address for this interface. Otherwise, set (or clear) the IFF_BROADCAST flag for the interface.

[-]pointopoint [addr]

This keyword enables the point-to-point mode of an interface, meaning that it is a direct link between two machines with nobody else listening on it.

If the address argument is also given, set the protocol address of the other side of the link, just like the obsolete dstaddr keyword does. Otherwise, set or clear the IFF_POINTOPOINT flag for the interface.

hw class address

Set the hardware address of this interface, if the device driver supports this operation. The keyword must be followed by the name of the hardware class and the printable ASCII equivalent of the hardware address. Hardware classes currently supported include ether (Ethernet), ax25 (AMPR AX.25), ARCnet and netrom (AMPR NET/ROM).

multicast

Set the multicast flag on the interface. This should not normally be needed as the drivers set the flag correctly themselves.

address

The IP address to be assigned to this interface.

txqueuelen length

Set the length of the transmit queue of the device. It is useful to set this to small values for slower devices with a high latency (modem links, ISDN) to prevent fast bulk transfers from disturbing interactive traffic like telnet too much.

## NOTES
Since kernel release 2.2 there are no explicit interface statistics for alias interfaces anymore. The statistics printed for the original address are shared with all alias addresses on the same device. If you want per-address statistics you should add explicit accounting rules for the address using the ipchains(8) command.

Interrupt problems with Ethernet device drivers fail with EAGAIN. See http://www.scyld.com/expert/irq-conflict.html for more information.

## FILES
/proc/net/socket

/proc/net/dev

/proc/net/if_inet6

## BUGS
Ifconfig uses obsolete kernel interface. It uses the ioctl access method to get the full address information, which limits hardware addresses to 8 bytes. Since an Infiniband address is 20 bytes, only the first 8 bytes of Infiniband address are displayed.

While appletalk DDP and IPX addresses will be displayed they cannot be altered by this command.

## SEE ALSO
ip(8)

## AUTHORS
Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>

Alan Cox, <Alan.Cox@linux.org>

Phil Blundell, <Philip.Blundell@pobox.com>

Andi Kleen


ipmaddr

title: ipmaddr(8)

text:
# ipmaddr(8)

## NAME
ipmaddr - adds, deletes, and displays multicast addresses

## SYNOPSIS
/usr/sbin/ipmaddr [<operation>] [<args>]

## NOTE
This program is obsolete. For replacement check ip maddress.

## DESCRIPTION
The ipmaddr command can perform one of the following operations:

add - add a multicast address

del - delete a multicast address

show - list multicast addresses

## SEE ALSO
ip(8).


iptunnel

title: iptunnel(8)

text:
# iptunnel(8)

## NAME
iptunnel - creates, deletes, and displays configured tunnels

## SYNOPSIS
/usr/sbin/iptunnel [<operation>] [<args>]

## NOTE
This program is obsolete. For replacement check ip tunnel.

## DESCRIPTION
The iptunnel command creates configured tunnels for sending and receiving IPV6 or IPV4 packets that are encapsulated as the payload of an IPV4 datagram.

The iptunnel command can perform one of the following operations:

create - create a tunnel interface, which you must subsequently configure.

delete - delete a tunnel interface. You must disable the tunnel before you can delete it.

show - show the tunnel attributes (name, tunnel end points, next hop for tunneled packets).

## SEE ALSO
ip(8).


mii-tool

title: mii-tool(8)

text:
# mii-tool(8)

## NAME
mii-tool - view, manipulate media-independent interface status

## SYNOPSIS
mii-tool [-v, --verbose] [-V, --version] [-R, --reset] [-r, --restart] [-w, --watch] [-l, --log] [-A, --advertise=media,...] [-F, --force=media] [interface ...]

## NOTE
This program is obsolete. Valid media are only 100baseT4, 100baseTx-FD,100baseTx-HD, 10baseT-FD and 10baseT-HD ethernet cards. For replacement check ethtool.

## DESCRIPTION
This utility checks or sets the status of a network interface's Media Independent Interface (MII) unit. Most fast ethernet adapters use an MII to autonegotiate link speed and duplex setting.

Most intelligent network devices use an autonegotiation protocol to communicate what media technologies they support, and then select the fastest mutually supported media technology. The -A or --advertise options can be used to tell the MII to only advertise a subset of its capabilities. Some passive devices, such as single-speed hubs, are unable to autonegotiate. To handle such devices, the MII protocol also allows for establishing a link by simply detecting either a 10baseT or 100baseT link beat. The -F or --force options can be used to force the MII to operate in one mode, instead of autonegotiating. The -A and -F options are mutually exclusive.

The default short output reports the negotiated link speed and link status for each interface. If an interface or interfaces are not specified on the command line, then mii-tool will check any available interfaces from eth0 through eth7.

## OPTIONS
-v, --verbose

Display more detailed MII status information. If used twice, also display raw MII register contents.

-V, --version

Display program version information.

-R, --reset

Reset the MII to its default configuration.

-r, --restart

Restart autonegotiation.

-w, --watch

Watch interface(s) and report changes in link status. The MII interfaces are polled at one second intervals.

-l, --log

Used with -w, records link status changes in the system log instead of printing on standard output.

-F media, --force=media

Disable autonegotiation, and force the MII to either 100baseTx-FD, 100baseTx-HD, 10baseT-FD, or 10baseT-HD operation.

-A media,..., --advertise=media,...

Enable and restart autonegotiation, and advertise only the specified media technologies. Multiple technologies should be separated by commas. Valid media are 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, and 10baseT-HD.

## SEE ALSO
ethtool(8)

## AUTHORS
David Hinds - dhinds@pcmcia.sourceforge.org

Donald Becker - becker@scyld.com


nameif

title: nameif(8)

text:
# nameif(8)

## NAME
nameif - name network interfaces based on MAC addresses

## SYNOPSIS
nameif [-c configfile] [-s]

nameif [-c configfile] [-s] {interface macaddress}

## NOTE
This program is obsolete. For replacement check ip link. This functionality is also much better provided by udev methods.

## DESCRIPTION
nameif renames network interfaces based on mac addresses. When no arguments are given /etc/mactab is read. Each line of it contains an interface name and a Ethernet MAC address. Comments are allowed starting with #. Otherwise the interfaces specified on the command line are processed. nameif looks for the interface with the given MAC address and renames it to the name given.

When the -s argument is given all error messages go to the syslog.

When the -c argument is given with a file name that file is read instead of /etc/mactab.

## NOTES
nameif should be run before the interface is up, otherwise it'll fail.

## FILES
/etc/mactab

## SEE ALSO
ip(8), udev(7)

## BUGS
Only works for Ethernet currently.


netstat

title: netstat(8)

text:
# netstat(8)

## NAME
netstat - Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships

## SYNOPSIS
netstat [address_family_options] [--tcp|-t] [--udp|-u] [--raw|-w] [--listening|-l] [--all|-a] [--numeric|-n] [--numeric-hosts][--numeric-ports][--numeric-ports] [--symbolic|-N] [--extend|-e[--extend|-e]] [--timers|-o] [--program|-p] [--verbose|-v] [--continuous|-c] [delay]

netstat {--route|-r} [address_family_options] [--extend|-e[--extend|-e]] [--verbose|-v] [--numeric|-n] [--numeric-hosts][--numeric-ports][--numeric-ports] [--continuous|-c] [delay]

netstat {--interfaces|-I|-i} [iface] [--all|-a] [--extend|-e] [--verbose|-v] [--program|-p] [--numeric|-n] [--numeric-hosts][--numeric-ports][--numeric-ports] [--continuous|-c] [delay]

netstat {--groups|-g} [--numeric|-n] [--numeric-hosts][--numeric-ports][--numeric-ports] [--continuous|-c] [delay]

netstat {--masquerade|-M} [--extend|-e] [--numeric|-n] [--numeric-hosts][--numeric-ports][--numeric-ports] [--continuous|-c] [delay]

netstat {--statistics|-s} [--tcp|-t] [--udp|-u] [--raw|-w] [delay]

netstat {--version|-V}

netstat {--help|-h}

address_family_options:

[--protocol={inet,unix,ipx,ax25,netrom,ddp}[,...]] [--unix|-x] [--inet|--ip] [--ax25] [--ipx] [--netrom] [--ddp]

## NOTE
This program is obsolete. Replacement for netstat is netlist. Replacement for netstat -r is ip route. Replacement for netstat -i is ip -s link. Replacement for netstat -g is ip maddr.

## DESCRIPTION
Netstat prints information about the Linux networking subsystem. The type of information printed is controlled by the first argument, as follows:

### (none)
By default, netstat displays a list of open sockets. If you don't specify any address families, then the active sockets of all configured address families will be printed.

### --route , -r
Display the kernel routing tables.

### --groups , -g
Display multicast group membership information for IPv4 and IPv6.

### --interfaces=iface , -I=iface , -i
Display a table of all network interfaces, or the specified iface.

### --masquerade , -M
Display a list of masqueraded connections.

### --statistics , -s
Display summary statistics for each protocol.

## OPTIONS

### --verbose , -v
Tell the user what is going on by being verbose. Especially print some useful information about unconfigured address families.

### --numeric , -n
Show numerical addresses instead of trying to determine symbolic host, port or user names.

### --numeric-hosts
shows numerical host addresses but does not affect the resolution of port or user names.

### --numeric-ports
shows numerical port numbers but does not affect the resolution of host or user names.

### --numeric-users
shows numerical user IDs but does not affect the resolution of host or port names.

### --protocol=family , -A
Specifies the address families (perhaps better described as low level protocols) for which connections are to be shown. family is a comma (',') separated list of address family keywords like inet, unix, ipx, ax25, netrom, and ddp. This has the same effect as using the --inet, --unix (-x), --ipx, --ax25, --netrom, and --ddp options.

The address family inet includes raw, udp and tcp protocol sockets.

### -c, --continuous
This will cause netstat to print the selected information every second continuously.

### -e, --extend
Display additional information. Use this option twice for maximum detail.

### -o, --timers
Include information related to networking timers.

### -p, --program
Show the PID and name of the program to which each socket belongs.

### -l, --listening
Show only listening sockets. (These are omitted by default.)

### -a, --all
Show both listening and non-listening sockets. With the --interfaces option, show interfaces that are not marked

### -F
Print routing information from the FIB. (This is the default.)

### -C
Print routing information from the route cache.

### delay
Netstat will cycle printing through statistics every delay seconds. UP.

## OUTPUT

### Proto
The protocol (tcp, udp, raw) used by the socket.

### Recv-Q
The count of bytes not copied by the user program connected to this socket.

### Send-Q
The count of bytes not acknowledged by the remote host.

### Local Address
Address and port number of the local end of the socket. Unless the --numeric (-n) option is specified, the socket address is resolved to its canonical host name (FQDN), and the port number is translated into the corresponding service name.

### Foreign Address
Address and port number of the remote end of the socket. Analogous to "Local Address."

### State
The state of the socket. Since there are no states in raw mode and usually no states used in UDP, this column may be left blank. Normally this can be one of several values:

ESTABLISHED

The socket has an established connection.

SYN_SENT

The socket is actively attempting to establish a connection.

SYN_RECV

A connection request has been received from the network.

FIN_WAIT1

The socket is closed, and the connection is shutting down.

FIN_WAIT2

Connection is closed, and the socket is waiting for a shutdown from the remote end.

TIME_WAIT

The socket is waiting after close to handle packets still in the network.

CLOSED

The socket is not being used.

CLOSE_WAIT

The remote end has shut down, waiting for the socket to close.

LAST_ACK

The remote end has shut down, and the socket is closed. Waiting for acknowledgement.

LISTEN

The socket is listening for incoming connections. Such sockets are not included in the output unless you specify the --listening (-l) or --all (-a) option.

CLOSING

Both sockets are shut down but we still don't have all our data sent.

UNKNOWN

The state of the socket is unknown.

### User
The username or the user id (UID) of the owner of the socket.

### PID/Program name
Slash-separated pair of the process id (PID) and process name of the process that owns the socket. --program causes this column to be included. You will also need superuser privileges to see this information on sockets you don't own. This identification information is not yet available for IPX sockets.

### Timer
(this needs to be written)

### Proto
The protocol (usually unix) used by the socket.

### RefCnt
The reference count (i.e. attached processes via this socket).

### Flags
The flags displayed is SO_ACCEPTON (displayed as ACC), SO_WAITDATA (W) or SO_NOSPACE (N). SO_ACCECPTON is used on unconnected sockets if their corresponding processes are waiting for a connect request. The other flags are not of normal interest.

### Type
There are several types of socket access:

SOCK_DGRAM

The socket is used in Datagram (connectionless) mode.

SOCK_STREAM

This is a stream (connection) socket.

SOCK_RAW

The socket is used as a raw socket.

SOCK_RDM

This one serves reliably-delivered messages.

SOCK_SEQPACKET

This is a sequential packet socket.

SOCK_PACKET

Raw interface access socket.

UNKNOWN

Who ever knows what the future will bring us - just fill in here :-)

### State
This field will contain one of the following Keywords:

FREE

The socket is not allocated

LISTENING

The socket is listening for a connection request. Such sockets are only included in the output if you specify the --listening (-l) or --all (-a) option.

CONNECTING

The socket is about to establish a connection.

CONNECTED

The socket is connected.

DISCONNECTING

The socket is disconnecting.

(empty)

The socket is not connected to another one.

UNKNOWN

This state should never happen.

### PID/Program name
Process ID (PID) and process name of the process that has the socket open. More info available in Active Internet connections section written above.

### Path
This is the path name as which the corresponding processes attached to the socket.

### Active IPX sockets
(this needs to be done by somebody who knows it)

### Active NET/ROM sockets
(this needs to be done by somebody who knows it)

### Active AX.25 sockets
(this needs to be done by somebody who knows it)

## NOTES
Starting with Linux release 2.2 netstat -i does not show interface statistics for alias interfaces. To get per alias interface counters you need to setup explicit rules using the ipchains(8) command.

## FILES
/etc/services -- The services translation file

/proc -- Mount point for the proc filesystem, which gives access to kernel status information via the following files.

/proc/net/dev -- device information

/proc/net/raw -- raw socket information

/proc/net/tcp -- TCP socket information

/proc/net/udp -- UDP socket information

/proc/net/igmp -- IGMP multicast information

/proc/net/unix -- Unix domain socket information

/proc/net/ipx -- IPX socket information

/proc/net/ax25 -- AX25 socket information

/proc/net/appletalk -- DDP (appletalk) socket information

/proc/net/nr -- NET/ROM socket information

/proc/net/route -- IP routing information

/proc/net/ax25_route -- AX25 routing information

/proc/net/ipx_route -- IPX routing information

/proc/net/nr_nodes -- NET/ROM nodelist

/proc/net/nr_neigh -- NET/ROM neighbours

/proc/net/ip_masquerade -- masqueraded connections

/proc/net/snmp -- statistics

## SEE ALSO
netlist(1),ip(8)

## BUGS
Occasionally strange information may appear if a socket changes as it is viewed. This is unlikely to occur.

## AUTHORS
The netstat user interface was written by Fred Baumgarten <dc6iq@insu1.etec.uni-karlsruhe.de> the man page basically by Matt Welsh <mdw@tc.cornell.edu>. It was updated by Alan Cox <Alan.Cox@linux.org> but could do with a bit more work. It was updated again by Tuan Hoang <tqhoang@bigfoot.com>.

The man page and the command included in the net-tools package is totally rewritten by Bernd Eckenfels <ecki@linux.de>.


plipconfig

title: plipconfig(8)

summary: fine tune PLIP device parameters

text:
# plipconfig(8)

## NAME
plipconfig - fine tune PLIP device parameters

## SYNOPSIS
plipconfig interface

plipconfig interface [nibble NN] [trigger NN] [unit NN]

## DESCRIPTION
Plipconfig is used to (hopefully) improve PLIP performance by changing the default timing parameters used by the PLIP protocol. Results are dependent on the parallel port hardware, cable, and the CPU speed of each machine on each end of the PLIP link.

If the single interface argument is given, plipconfig displays the status of the given interface only. Otherwise, it will try to set the options.

## OPTIONS
nibble NN

Sets the nibble wait value in microseconds. Default is 3000.

trigger NN

Sets the trigger wait value in microseconds. Default is 500.

PLIP speed can in some cases be improved by lowering the default values. Values which are too low may cause excess use of CPU, poor interrupt response time resulting in serial ports dropping characters, or in dropping of PLIP packets. Changing the plip MTU can also affect PLIP speed.

## NOTE
If you get no response it is far more likely the irq is wrong and needs setting with ifconfig. The few cases where the default parameters will be too fast are those using very long cables. Something you should never do as the parallel port is not specified or designed for driving long cable runs.

## SEE ALSO
ifconfig(8)

## BUGS
Non.

## AUTHOR
John Paul Morrison, <jmorriso@bogomips.ee.ubc.ca>, <ve7jpm@ve7jpm.ampr.org>


route

title: route(8)

summary: show / manipulate the IP routing table

text:
# route(8)

## NAME
route - show / manipulate the IP routing table

## SYNOPSIS
route [-CFvnee]

route

[-v] [-A family] add [-net|-host] target [netmask Nm] [gw Gw] [metric N] [mss M] [window W] [irtt I] [reject] [mod] [dyn] [reinstate] [[dev] If]

route

[-v] [-A family] del [-net|-host] target [gw Gw] [netmask Nm] [metric N] [[dev] If]

route

[-V] [--version] [-h] [--help]

## NOTE
This program is obsolete. For replacement check ip route.

## DESCRIPTION
Route manipulates the kernel's IP routing tables. Its primary use is to set up static routes to specific hosts or networks via an interface after it has been configured with the ifconfig(8) program.

When the add or del options are used, route modifies the routing tables. Without these options, route displays the current contents of the routing tables.

## OPTIONS
-A family

use the specified address family (eg `inet'; use `route --help' for a full list).

-F

operate on the kernel's FIB (Forwarding Information Base) routing table. This is the default.

-C

operate on the kernel's routing cache.

-v

select verbose operation.

-n

show numerical addresses instead of trying to determine symbolic host names. This is useful if you are trying to determine why the route to your nameserver has vanished.

-e

use netstat(8)-format for displaying the routing table. -ee will generate a very long line with all parameters from the routing table.

del

delete a route.

add

add a new route.

target

the destination network or host. You can provide IP addresses in dotted decimal or host/network names.

-net

the target is a network.

-host

the target is a host.

netmask NM

when adding a network route, the netmask to be used.

gw GW

route packets via a gateway. NOTE: The specified gateway must be reachable first. This usually means that you have to set up a static route to the gateway beforehand. If you specify the address of one of your local interfaces, it will be used to decide about the interface to which the packets should be routed to. This is a BSDism compatibility hack.

metric M

set the metric field in the routing table (used by routing daemons) to M.

mss M

set the TCP Maximum Segment Size (MSS) for connections over this route to M bytes. The default is the device MTU minus headers, or a lower MTU when path mtu discovery occured. This setting can be used to force smaller TCP packets on the other end when path mtu discovery does not work (usually because of misconfigured firewalls that block ICMP Fragmentation Needed)

window W

set the TCP window size for connections over this route to W bytes. This is typically only used on AX.25 networks and with drivers unable to handle back to back frames.

irtt I

set the initial round trip time (irtt) for TCP connections over this route to I milliseconds (1-12000). This is typically only used on AX.25 networks. If omitted the RFC 1122 default of 300ms is used.

reject

install a blocking route, which will force a route lookup to fail. This is for example used to mask out networks before using the default route. This is NOT for firewalling.

mod, dyn, reinstate

install a dynamic or modified route. These flags are for diagnostic purposes, and are generally only set by routing daemons.

dev If

force the route to be associated with the specified device, as the kernel will otherwise try to determine the device on its own (by checking already existing routes and device specifications, and where the route is added to). In most normal networks you won't need this. If dev If is the last option on the command line, the word dev may be omitted, as it's the default. Otherwise the order of the route modifiers (metric - netmask - gw - dev) doesn't matter.

## EXAMPLES
route add -net 127.0.0.0

adds the normal loopback entry, using netmask 255.0.0.0 (class A net, determined from the destination address) and associated with the "lo" device (assuming this device was prviously set up correctly with ifconfig(8)).

route add -net 192.56.76.0 netmask 255.255.255.0 dev eth0

adds a route to the network 192.56.76.x via "eth0". The Class C netmask modifier is not really necessary here because 192.* is a Class C IP address. The word "dev" can be omitted here.

route add default gw mango-gw

adds a default route (which will be used if no other route matches). All packets using this route will be gatewayed through "mango-gw". The device which will actually be used for that route depends on how we can reach "mango-gw" - the static route to "mango-gw" will have to be set up before.

route add ipx4 sl0

Adds the route to the "ipx4" host via the SLIP interface (assuming that "ipx4" is the SLIP host).

route add -net 192.57.66.0 netmask 255.255.255.0 gw ipx4

This command adds the net "192.57.66.x" to be gatewayed through the former route to the SLIP interface.

route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0

This is an obscure one documented so people know how to do it. This sets all of the class D (multicast) IP routes to go via "eth0". This is the correct normal configuration line with a multicasting kernel.

route add -net 10.0.0.0 netmask 255.0.0.0 reject

This installs a rejecting route for the private network "10.x.x.x."

## OUTPUT
The output of the kernel routing table is organized in the following columns

Destination

The destination network or destination host.

Gateway

The gateway address or '*' if none set.

Genmask

The netmask for the destination net; '255.255.255.255' for a host destination and '0.0.0.0' for the default route.

Flags

Possible flags include

U (route is up)

H (target is a host)

G (use gateway)

R (reinstate route for dynamic routing)

D (dynamically installed by daemon or redirect)

M (modified from routing daemon or redirect)

A (installed by addrconf)

C (cache entry)

! (reject route)

Metric

The 'distance' to the target (usually counted in hops). It is not used by recent kernels, but may be needed by routing daemons.

Ref

Number of references to this route. (Not used in the Linux kernel.)

Use

Count of lookups for the route. Depending on the use of -F and -C this will be either route cache misses (-F) or hits (-C).

Iface

Interface to which packets for this route will be sent.

MSS

Default maximum segement size for TCP connections over this route.

Window

Default window size for TCP connections over this route.

irtt

Initial RTT (Round Trip Time). The kernel uses this to guess about the best TCP protocol parameters without waiting on (possibly slow) answers.

HH (cached only)

The number of ARP entries and cached routes that refer to the hardware header cache for the cached route. This will be -1 if a hardware address is not needed for the interface of the cached route (e.g. lo).

Arp (cached only)

Whether or not the hardware address for the cached route is up to date.

## FILES
/proc/net/ipv6_route

/proc/net/route

/proc/net/rt_cache

## SEE ALSO
ip(8)

## HISTORY
Route for Linux was originally written by Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> and then modified by Johannes Stille and Linus Torvalds for pl15. Alan Cox added the mss and window options for Linux 1.1.22. irtt support and merged with netstat from Bernd Eckenfels.

## AUTHOR
Currently maintained by Phil Blundell <Philip.Blundell@pobox.com>.


slattach

title: slattach(8)

text:
# slattach(8)

## NAME
slattach - attach a network interface to a serial line

## SYNOPSIS
slattach [-dehlLmnqv] [-c command] [-p proto] [-s speed] [tty]

## DESCRIPTION
Slattach is a tiny little program that can be used to put a normal terminal ("serial") line into one of several "network" modes, thus allowing you to use it for point-to-point links to other computers.

## OPTIONS
[-c command]

Execute command when the line is hung up. This can be used to run scripts or re-establish connections when a link goes down.

[-d]

Enable debugging output. Useful when determining why a given setup doesn't work.

[-h]

Exit when the carrier is lost. This works on both /dev/tty and /dev/cua devices by directly monitoring the carrier status every 15 seconds. [-v] Enable verbose output. Useful in shell scripts.

[-q]

Operate in quiet mode - no messages at all.

[-l]

Create an UUCP-style lockfile for the device in /var/lock/serial.

[-n]

Equivalent to the "mesg n" command.

[-m]

Do not initialize the line into 8 bits raw mode.

[-e]

Exit right after initializing device, instead of waiting for the line to hangup.

[-L]

Enable 3 wire operation. The terminal is moved into CLOCAL mode, carrier watching is disabled.

[-p proto]

Set a specific kind of protocol to use on the line. The default is set to cslip , i.e. compressed SLIP. Other possible values are slip (normal SLIP), adaptive (adaptive CSLIP/SLIP), ppp (Point-to-Point Protocol) and kiss (a protocol used for communicating with AX.25 packet radio terminal node controllers). The special argument tty can be used to put the device back into normal serial operation. Using 'ppp' mode is not normally useful as ppp requires an additional ppp daemon pppd to be active on the line. For kiss connections the axattach program should be used.

[-s speed]

Set a specific line speed, other than the default.

If no arguments are given, the current terminal line (usually: the login device) is used. Otherwise, an attempt is made to claim the indicated terminal port, lock it, and open it.

## FILES
/dev/cua* /var/lock/serial/LCK.*

## BUGS
None known.

## SEE ALSO
axattach(8), dip(8) pppd(8), sliplogin(8).

## AUTHORS
Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>

Alan Cox, <Alan.Cox@linux.org>

Miquel van Smoorenburg, <miquels@drinkel.ow.org>

George Shearer, <gshearer@one.net>

Yossi Gottlieb, <yogo@math.tau.ac.il>


afpd

package: netatalk

title: afpd(8)

summary: Apple Filing Protocol daemon

text:
# afpd(8)

## NAME
afpd - Apple Filing Protocol daemon

## SYNOPSIS
afpd [-d] [-F configfile]

afpd -v | -V | -h

## DESCRIPTION
afpd provides an Apple Filing Protocol (AFP) interface to the Unix file system. It is normally started at boot time by netatalk(8).

afp.conf is the configuration file used by afpd to determine the behavior and configuration of a file server.

## OPTIONS
-d

Specifies that the daemon should not fork.

-v

Print version information and exit.

-V

Print verbose information and exit.

-h

Print help and exit.

-F configfile

Specifies the configuration file to use.

## SIGNALS
To shut down a user's afpd process it is recommended that SIGKILL (-9) NOT be used, except as a last resort, as this may leave the CNID database in an inconsistent state. The safe way to terminate an afpd is to send it a SIGTERM (-15) signal and wait for it to die on its own.

SIGTERM and SIGUSR1 signals that are sent to the main afpd process are propagated to the children, so all will be affected.

SIGTERM

Clean exit. Propagates from master to childs.

SIGQUIT

Send this to the master afpd, it will exit leaving all children running! Can be used to implement AFP service without downtime.

SIGHUP

Sending a SIGHUP to afpd will cause it to reload its configuration files.

SIGINT

Sending a SIGINT to a child afpd enables max_debug logging for this process. The log is sent to the file /tmp/afpd.PID.XXXXXX. Sending another SIGINT will revert to the original log settings.

SIGUSR1

The afpd process will send the message "The server is going down for maintenance." to the client and shut itself down in 5 minutes. New connections are not allowed. If this is sent to a child afpd, the other children are not affected. However, the main process will still exit, disabling all new connections.

SIGUSR2

The afpd process will look in the message directory configured at build time for a file named message.pid. For each one found, a the contents will be sent as a message to the associated AFP client. The file is removed after the message is sent. This should only be sent to a child afpd.

## FILES
afp.conf

configuration file used by afpd

afp_signature.conf

list of server signature

afp_voluuid.conf

list of UUID for Time Machine volume

extmap.conf

file name extension mapping

message.pid

contains messages to be sent to users.

## SEE ALSO
netatalk(8), hosts_access(5), afp.conf(5), afp_signature.conf(5), afp_voluuid.conf(5), extmap.conf(5), dbd(1).

## AUTHOR
See CONTRIBUTORS[1]

## NOTES
1.

CONTRIBUTORS

https://github.com/Netatalk/netatalk/blob/main/CONTRIBUTORS


title: cnid_dbd(8)

summary: CNID database access daemon

text:
# cnid_dbd(8)

## NAME
cnid_dbd - CNID database access daemon

## SYNOPSIS
cnid_dbd

cnid_dbd -v | -V

## DESCRIPTION
cnid_dbd provides an interface for storage and retrieval of catalog node IDs (CNIDs) and related information to the afpd daemon. CNIDs are a component of Macintosh based file systems with semantics that map not easily onto Unix file systems. This makes separate storage in a database necessary. cnid_dbd is part of the CNID backend framework of afpd and implements the dbd backend.

cnid_dbd is never started via the command line or system startup scripts but only by the cnid_metad daemon. There is one instance of cnid_dbd per netatalk volume.

cnid_dbd uses the Berkeley DB database library and uses transactionally protected updates. The dbd backend with transactions will avoid corruption of the CNID database even if the system crashes unexpectedly.

cnid_dbd inherits the effective userid and groupid from cnid_metad on startup, which is normally caused by afpd serving a netatalk volume to a client. It changes to the Berkeley DB database home directory dbdir that is associated with the volume. If the userid inherited from cnid_metad is 0 (root), cnid_dbd will change userid and groupid to the owner and group of the database home directory. Otherwise, it will continue to use the inherited values. cnid_dbd will then attempt to open the database and start serving requests using filedescriptor clntfd. Subsequent instances of afpd that want to access the same volume are redirected to the running cnid_dbd process by cnid_metad via the filedescriptor ctrlfd.

cnid_dbd can be configured to run forever or to exit after a period of inactivity. If cnid_dbd receives a TERM or an INT signal it will exit cleanly after flushing dirty database buffers to disk and closing Berkeley DB database environments. It is safe to terminate cnid_dbd this way, it will be restarted when necessary. Other signals are not handled and will cause an immediate exit, possibly leaving the CNID database in an inconsistent state (no transactions) or losing recent updates during recovery (transactions).

The Berkeley DB database subsystem will create files named log.xxxxxxxxxx in the database home directory dbdir, where xxxxxxxxxx is a monotonically increasing integer. These files contain the transactional database changes. They will be removed regularly, unless the logfile_autoremove option is specified in the db_param configuration file (see below) with a value of 0 (default 1).

## OPTIONS
-v, -V

Show version and exit.

## CONFIGURATION
cnid_dbd reads configuration information from the file db_param in the database directory dbdir on startup. If the file does not exist or a parameter is not listed, suitable default values are used. The format for a single parameter is the parameter name, followed by one or more spaces, followed by the parameter value, followed by a newline. The following parameters are currently recognized:

logfile_autoremove

If set to 0, unused Berkeley DB transactional logfiles (log.xxxxxxxxxx in the database home directory) are not removed on startup of cnid_dbd and on a regular basis. Default: 1.

cachesize

Determines the size of the Berkeley DB cache in kilobytes. Default: 8192. Each cnid_dbd process grabs that much memory on top of its normal memory footprint. It can be used to tune database performance. The db_stat utility with the -m option that comes with Berkeley DB can help you determine whether you need to change this value. The default is pretty conservative so that a large percentage of requests should be satisfied from the cache directly. If memory is not a bottleneck on your system you might want to leave it at that value. The Berkeley DB Tutorial and Reference Guide has a section Selecting a cache size that gives more detailed information.

flush_frequency, flush_interval

flush_frequency (Default: 1000) and flush_interval (Default: 1800) control how often changes to the database are checkpointed. Both of these operations are performed if either i) more than flush_frequency requests have been received or ii) more than flush_interval seconds have elapsed since the last save/checkpoint. Be careful to check your harddisk configuration for on disk cache settings. Many IDE disks just cache writes as the default behaviour, so even flushing database files to disk will not have the desired effect.

fd_table_size

is the maximum number of connections (filedescriptors) that can be open for afpd client processes in cnid_dbd. Default: 512. If this number is exceeded, one of the existing connections is closed and reused. The affected afpd process will transparently reconnect later, which causes slight overhead. On the other hand, setting this parameter too high could affect performance in cnid_dbd since all descriptors have to be checked in a select() system call, or worse, you might exceed the per process limit of open file descriptors on your system. It is safe to set the value to 1 on volumes where only one afpd client process is expected to run, e.g. home directories.

idle_timeout

is the number of seconds of inactivity before an idle cnid_dbd exits. Default: 600. Set this to 0 to disable the timeout.

## UPDATING
Note that the first version to appear after Netatalk 2.1 i.e. Netatalk 2.1.1, will support Berkeley DB updates on the fly without manual intervention. In other words Netatalk 2.1 does contain code to prepare the Berkeley DB database for upgrades and to upgrade it in case it has been prepared before. That means it can't upgrade a 2.0.x version because that one didn't prepare the database.

In order to update between older Netatalk releases using different Berkeley DB library versions, follow this steps:

•Stop the to be upgraded old version of Netatalk

•Using the old Berkeley DB utilities run db_recover -h <path to .AppleDB>

•Using the new Berkeley DB utilities run db_upgrade -v -h <path to .AppleDB> -f cnid2.db

•Again using the new Berkeley DB utilities run db_checkpoint -1 -h <path to .AppleDB>

•Start the the new version of Netatalk

## SEE ALSO
cnid_metad(8), afpd(8), dbd(1)

## AUTHOR
See CONTRIBUTORS[1]

## NOTES
1.

CONTRIBUTORS

https://github.com/Netatalk/netatalk/blob/main/CONTRIBUTORS


title: cnid_metad(8)

text:
# cnid_metad(8)

## NAME
cnid_metad - daemon for starting cnid_dbd(8) daemons on demand

## SYNOPSIS
cnid_metad [-d] [-F configuration file]

cnid_metad -v | -V

## DESCRIPTION
cnid_metad waits for requests from afpd to start up instances of the cnid_dbd daemon. It keeps track of the status of a cnid_dbd instance once started and will restart it if necessary. cnid_metad is normally started at boot time by netatalk(8) and runs until shutdown.

## OPTIONS
-d

cnid_metad will remain in the foreground and will also leave the standard input, standard output and standard error file descriptors open. Useful for debugging.

-F configuration file

Use configuration file as the configuration file.

-v, -V

Show version and exit.

## CAVEATS
cnid_metad does not block or catch any signals apart from SIGPIPE. It will therefore exit on most signals received. This will also cause all instances of cnid_dbd's started by that cnid_metad to exit gracefully. Since state about and IPC access to the subprocesses is only maintained in memory by cnid_metad this is desired behaviour. As soon as cnid_metad is restarted afpd processes will transparently reconnect.

## SEE ALSO
netatalk(8), cnid_dbd(8), afpd(8), dbd(1), afp.conf(5)

## AUTHOR
See CONTRIBUTORS[1]

## NOTES
1.

CONTRIBUTORS

https://github.com/Netatalk/netatalk/blob/main/CONTRIBUTORS


netatalk

title: netatalk(8)

text:
# netatalk(8)

## NAME
netatalk - Netatalk AFP server service controller daemon

## SYNOPSIS
netatalk [-F configfile]

netatalk -v | -V

## DESCRIPTION
netatalk is the service controller daemon responsible for starting and restarting the AFP daemon afpd and the CNID daemon cnid_metad. It is normally started at boot time by an init system (BSD-style init, SysV-sytle init, systemd, Upstart, OpenRC, SMF and so on).

## OPTIONS
-d

Starts netatalk in non-forking mode, for debugging purposes.

-F configfile

Specifies the configuration file to use.

-v | -V

Print version information and exit.

## SIGNALS
SIGTERM

Stop Netatalk service, AFP and CNID daemons

SIGHUP

Sending a SIGHUP will cause the AFP daemon reload its configuration file.

## FILES
afp.conf

configuration file used by netatalk(8), afpd(8) and cnid_metad(8)

## SEE ALSO
afpd(8), cnid_metad(8), afp.conf(5).

## AUTHOR
See CONTRIBUTORS[1]

## NOTES
1.

CONTRIBUTORS

https://github.com/Netatalk/netatalk/blob/main/CONTRIBUTORS


netatopd

package: netatop

title: netatopd(8)

text:
# netatopd(8)

## NAME
netatopd - log network statistics of finished processes

## DESCRIPTION
This manual page documents the netatopd daemon. This daemon reads the counters of exited processes delivered by the netatop module and writes the counters to a logfile.

The 'usual' state of this daemon is the getsockopt() command NETATOP_GETCNT_EXIT. With this command, netatopd blocks until an exited task is available on the exitlist of the netatop module. The obtained netpertask struct that countains the counters of an exited process is written to a logfile (similar to the process accounting info provided by the base kernel itself). The daeon stops logging when there is only 5% of free space left in the filesystem of the logfile.

The logfile starts with a small header struct that contains a.o. a sequence number indicating how many netpertask structs are currently logged. This header is mmapped and can be consulted by analysis processes like atop that consult the logfile. Behind the header, the netpertask structs can be found in compressed form. Every compressed netpertask struct is preceeded by one byte specifying the size of the compressed netpertask struct.

Before an analysis process starts using the logfile, it has to subscribe itself by decrementing a semaphore owned by the netatopd daemon. In this way, netatopd knows how many analysis processes are currently using the logfile. When no processes use the logfile any more, netatopd truncates the logfile and start building a new one as soon as a new subscription of an analysis process is noticed.

## FILES
/var/run/netatop.log

File in which netatopd writes the compressed accounting records about processes that have finished.

## SEE ALSO
netatop(4), atop(1), atopsar(1), atoprc(5)

http://www.atoptool.nl

## AUTHOR
Gerlof Langeveld (gerlof.langeveld@atoptool.nl)


netdate

package: netdate

title: netdate(8)

text:
# netdate(8)

## NAME
netdate - set date and time by ARPA Internet RFC 868

## SYNOPSIS
netdate [ -v ] [ -l limit ] [ protocol ] hostname...

## DESCRIPTION
Netdate takes a list of names of Internet hosts as arguments, selects the one which supplies the best time, and sets the system time accordingly. The invoker must be the super-user for the time to be set. Protocol names (either udp or tcp) may be interspersed with the host names, and determine the protocol which will be used to connect to the hosts whose names follow, up to the next protocol name or the end of the arguments. The default protocol is udp.

The ``best'' time is chosen by polling the named hosts once each to find their times and taking their differences from the local host's time. These differences are used to find the largest group of hosts whose times agree with each other within a certain limit. The first host in the largest group is picked as the best host. (The assumption is that the hosts which are usually most accurate will be named first.) That host is polled again and the local host's time is set to the result. The chosen host's time is checked on this second poll to insure that its difference from the local host's time has not varied more than the limit from its difference at the first poll.

The default limit is five seconds. It may be set with the -l option. The -v option causes the groups to be shown. The host name localhost is recognized as a synonym for the name of the local host, no network connection is made for it, and its time difference is always zero. If localhost is chosen as having the best time, the system time will not be set. Hosts which do not respond are not counted in the groups. If the limit is set to zero, the time is set to that of the first host to respond and no other checking is done. Supplying only one host name argument also sets the limit to zero.

While the RFC868 protocol only returns 32 bits of data, containing the time in seconds, netdate will accept an extra 32 bits, containing microseconds (expected to be accurate to no more than milliseconds). Delays on long haul networks may make this extra precision useless, but it is useful on local area networks. The extra precision is not used on the first poll of a host, but it is used on the second poll of the chosen host, if that host supplies it.

## EXAMPLE
The most accurate hosts are named first in each example. Some such call on netdate should be put at the end of /etc/init.d/boot.local, so that the time will be set properly on system startup. It is also useful to have a shell script, e.g., /sbin/timehosts, which contains a call on netdate with arguments appropriate to the local system, so that it is easy to set the time manually.

## netdate -l 30 udp dcn-gate tcp neighbor
Dcn-gate is a hypothetical host which usually keeps time accurate to within milliseconds of Coordinated Universal Time, but may occasionally be eight hours off. Neighbor is a neighbor of the local host which keeps time with moderate accuracy. The time will be set to that of dcn-gate if that and neighbor agree to within thirty seconds, else it will not be set at all. This is almost good enough for most circumstances, but won't do when the local host's time is known to be wrong (e.g., after a long downtime or a bad crash) and must be set to something. If one of the hosts named is inaccurate or not responding, there is a problem.

## netdate -l 30 udp dcn-gate tcp neighbor neighbor2
Only two of the three hosts named must agree on the time. The time will still be set (to that of the first neighbor), even if dcn-gate is far off as long as the two neighbors agree. This is probably good enough for most cases. One can arbitrarily gerrymander the vote for more insurance (and less clarity), as in the following example.

## netdate udp dcn-gate dcn1 tcp bbn-unix localhost neighbor
Here dcn1 and bbn-unix are more hypothetical very accurate timekeepers, at least one of which keeps time independently from dcn-gate, one hopes. It is very likely that the time will be set to that one of those three very accurate hosts, as long as at least two of them agree, or at least one of them agrees with the neighbor or the local host's time. If all the foreign hosts disagree, the time will not be set, since localhost will be chosen as best.

## netdate -l 3 localhost localhost udp dcn-gate dcn1 tcp bbn-unix
This example gives localhost two votes and declares it to usually have the most accurate time. All three foreign hosts must agree within three seconds and also differ from localhosts by more than three seconds for the time to be set. Thus the time will be set only if it really needs to be.

## FILES

```
/etc/services	for the time service port number
/etc/protocols	for the protocol numbers
/var/log/wtmp	to record time-setting
```

## SEE ALSO
ARPANET Request for Comments 868, gettimeofday(2), date(1), WWV (USA): 2.5,5,10,15 MHz AM for Coordinated Universal Time (UCT).


nethogs

package: nethogs

title: nethogs(8)

text:
# nethogs(8)

## NAME
nethogs - Net top tool grouping bandwidth per process

## SYNOPSIS
nethogs [-h] [-V] [-d] [-v] [-t] [-c] [-p] [-s] [device(s)]

## DESCRIPTION
NetHogs is a small 'net top' tool. Instead of breaking the traffic down per protocol or per subnet, like most such tools do, it groups bandwidth by process - and does not rely on a special kernel module to be loaded. So if there's suddenly a lot of network traffic, you can fire up NetHogs and immediately see which PID is causing this, and if it's some kind of spinning process, kill it.

### Options
-h

display available commands usage.

-V

prints Version info.

-d

delay for refresh rate.

-v

select view mode

-p

sniff in promiscious mode (not recommended).

-t

tracemode.

-c

limit number of refreshes

-s

sort by traffic sent

device(s) to monitor. By default eth0 is being used.

## INTERACTIVE CONTROL
m

cycle between display modes (kb/s, kb, b, mb)

r

sort by 'received'

s

sort by 'sent'

q

quit

## SEE ALSO
netstat(8) tcpdump(1) pcap(3)

## AUTHOR

```
Written by Arnout Engelen <arnouten@bzzt.net>.
```


netlabel-config

title: netlabel-config(8)

summary: NetLabel configuration utility

text:
# netlabel-config(8)

## NAME
netlabel-config - NetLabel configuration utility

## SYNOPSIS
netlabelctl reset| load

## DESCRIPTION
The NetLabel configuration utility, netlabel-config, is a script designed to make it easier for system administratiors to create, manage, and use complex NetLabel configurations. The netlabel-config script uses the netlabelctl(8) tool and /etc/netlabel.rules configuration file to load a saved NetLabel configuration into the kernel and reset the kernel's NetLabel configuration to the default state when needed.

reset

Removes any NetLabel configuration loaded into the kernel and resets the kernel's NetLabel state to the default.

load

Loads the NetLabel configuration specified by /etc/netlabel.rules into the kernel.

## EXIT STATUS
Returns zero on success, errno values on failure.

## NOTES
The NetLabel subsystem is supported on Linux Kernels version 2.6.19 and later. The static, or fallback, labels are only supported on Linux Kernels version 2.6.25 and later. The domain mapping address selectors are only supported on Linux Kernels 2.6.28 and later and CALIPSO/RFC5570 is only supported on Linux Kernels 4.8.0 and later.

The NetLabel project site, with more information including the source code repository, can be found at https://github.com/netlabel. Please report any bugs at the project site or directly to the author.

## AUTHOR
Paul Moore <paul@paul-moore.com>

## SEE ALSO
netlabelctl(8)


netlabelctl

title: netlabelctl(8)

summary: NetLabel management utility

text:
# netlabelctl(8)

## NAME
netlabelctl - NetLabel management utility

## SYNOPSIS
netlabelctl [<global_flags>] <module> [<module_commands>]

## DESCRIPTION
The NetLabel management utility, netlabelctl, is a command line program designed to allow system administrators to configure the NetLabel system in the kernel. The utility is based around different "modules" which correspond to the different types of NetLabel commands supported by the kernel.

## OPTIONS

### Global Flags
-h

Help message

-p

Attempt to make the output human readable or "pretty"

-t <seconds>

Set a timeout to be used when waiting for the NetLabel subsystem to respond

-v

Enable extra output

-V

Display the version information

### Modules and Commands
mgmt

The management module is used to perform general queries about the NetLabel subsystem within the kernel. The different commands and their syntax are listed below.

version

Display the kernel's NetLabel management protocol version.

protocols

Display the kernel's list of supported labeling protocols.

map

The domain mapping module is used to map different NetLabel labeling protocols to either individual LSM domains or the default domain mapping. It is up to each LSM to determine what defines a domain. With SELinux, the normal SELinux domain should be used, i.e. "ping_t". In addition to protocol selection based only on the LSM domain, it is also possible to select the labeling protocol based on both the LSM domain and destination address. The network address selectors can specify either single hosts or entire networks and work for both IPv4 and IPv6, although the labeling protocol chosen must support the IP version chosen. When specifying the labeling protocol to use for each mapping there is an optional "extra" field which is used to further identify the specific labeling protocol configuration. When specifying the unlabeled protocol, "unlbl", an extra value of either "4" or "6" may be used. This restricts the mapping to IPv4 or IPv6 addresses. Omitting the extra value will result in a mapping for all address families. When specifying the CIPSO/IPv4 or the CALIPSO/IPv6 protocol, "cipso" or "calipso", the DOI value should be specified; see the EXAMPLES section for details. The different commands and their syntax are listed below.

add default|domain:<domain> [address:<ADDR>[/<MASK>]] protocol:<protocol>[,<extra>]

Add a new LSM domain / network address to NetLabel protocol mapping.

del default|domain:<domain>

Delete an existing LSM domain to NetLabel protocol mapping.

list

Display all of the configured LSM domain to NetLabel protocol mappings.

unlbl

The unlabeled (unlbl) module controls the unlabeled protocol which is used both when labeling outgoing traffic is not desired as well as when unlabeled traffic is received by the system. This module allows administrators to block all unlabeled packets from the system through the "accept" flag and assign static, or fallback, security labels to unlabeled traffic based on the inbound network interface and source address.

accept on|off

Toggle the unlabeled traffic accept flag.

add default|interface:<dev> address:<addr>[/<mask>] label:<label>

Add a new static/fallback entry.

del default|interface:<dev> address:<addr>[/<mask>]

Delete an existing static/fallback entry.

list

Display the status of the unlabeled accept flag.

cipso

The CIPSO/IPv4 (cipso) module controls the CIPSO/IPv4 labeling engine in the kernel. The CIPSO/IPv4 engine provided by NetLabel supports multiple Domains Of Interpretation (DOI) and the CIPSO/IPv4 module allows for different configurations for each DOI. At present there are three types of configurations, the "trans" configuration which allows on-the-fly translation of MLS sensitivity labels, the "pass" configuration which does not perform any translation of the MLS sensitivity label and the "local" configuration which conveys the full LSM security label over localhost/loopback connections. Regardless of which configuration type is chosen a DOI value must be specified and if the "trans" or "pass" configurations are specified then a list of the CIPSO/IPv4 tag types to use when generating the CIPSO/IPv4 packet labels must also be specified. The list of CIPSO/IPv4 tags is ordered such that when possible the first tag type listed is used when a CIPSO/IPv4 label is generated. However, if it is not possible to use the first tag type then each tag type is checked, in order, until a suitable tag type is found. If a valid tag type can not be found then the operation causing the CIPSO/IPv4 label will fail, typically this occurs whenever a new socket is created. The different commands and their syntax are listed below.

add trans doi:<DOI> tags:<T1>,<Tn> levels:<LL1>=<RL1>,<LLn>=<RLn> categories:<LC1>=<RC1>,<LCn>=<RCn>

Add a new CIPSO/IPv4 configuration using the standard/translated mapping with the given level and category translations. The levels are translated in such a way that the local level "LLn" is translated to the remote, on-the-wire level of "RLn"; the reverse translation is done for incoming packets. The same translation is done for the categories using "LCn" and "RCn". In order for a packet to be accepted, or a socket created by an application, there must be a translation for the sensitivity level and all the categories present in the MLS sensitivity label; if the entire requested sensitivity label can not be translated the application will fail.

add pass doi:<DOI> tags:<T1>,<Tn>

Add a new CIPSO/IPv4 configuration without any level or category translations.

add local doi:<DOI>

Add a new CIPSO/IPv4 configuration for localhost/loopback connections.

del doi:<DOI>

Delete an existing CIPSO/IPv4 configuration with the given DOI value. If any LSM domain mappings are present which make use of this DOI they will also be deleted.

list [doi:<DOI>]

Display a list of all the CIPSO/IPv4 configurations or just the configuration matching the optionally specified DOI.

calipso

The CALIPSO/IPv6 (calipso) module controls the CALIPSO/IPv6 labeling engine in the kernel. This behaves in a very similar way to the CIPSO/IPv4 engine, however the protocol only specifies one tag-type (equivalent to CIPSO tag-type 1) and so the tag-type should not be specified. In addition there is no support for the "local" or "trans" configuration. The different commands and their syntax are listed below.

add pass doi:<DOI>

Add a new CALIPSO/IPv6 configuration without any level or category translations.

del doi:<DOI>

Delete an existing CALIPSO/IPv6 configuration with the given DOI value. If any LSM domain mappings are present which make use of this DOI they will also be deleted.

list [doi:<DOI>]

Display a list of all the CALIPSO/IPv6 configurations or just the configuration matching the optionally specified DOI.

## EXIT STATUS
Returns zero on success, errno values on failure.

## EXAMPLES
netlabelctl cipso add pass doi:16 tags:1

Add a CIPSO/IPv4 configuration with a DOI value of "16", using CIPSO tag "1" (the permissive bitmap tag). The CIPSO and LSM levels/categories are passed through the NetLabel subsystem without any translation.

netlabelctl cipso add trans doi:8 tags:1 levels:0=0,1=1 categories:0=1,1=0

Add a CIPSO/IPv4 configuration with a DOI value of "8", using CIPSO tag "1" (the permissive bitmap tag). The specified mapping converts local LSM levels "0" and "1" to CIPSO levels "0" and "1" respectively while local LSM categories "0" and "1" are mapped to CIPSO categories "1" and "0" respectively.

netlabelctl -p cipso list

Display all of the CIPSO/IPv4 configurations in a human readable format.

netlabelctl -p cipso list doi:16

Display specific information about the CIPSO/IPv4 DOI 16 configuration.

netlabelctl cipso del doi:8

Delete the CIPSO/IPv4 configuration assigned to DOI 8. In addition to removing the CIPSO/IPv4 configuration any domain mappings using this configuration will also be removed.

netlabelctl map add domain:lsm_domain protocol:cipso,8

Add a domain mapping so that all outgoing packets sent from the "lsm_domain" will be labeled according to the CIPSO/IPv4 protocol using DOI 8.

netlabelctl map add domain:lsm_domain address:192.168.1.0/24 protocol:cipso,8

Add a mapping so that all outgoing packets sent from the "lsm_domain" to the 192.168.1.0/24 network will be labeled according to the CIPSO/IPv4 protocol using DOI 8.

netlabelctl -p map list

Display all of the domain mappings in a human readable format.

netlabelctl del domain:lsm_domain

Delete the domain mapping for the "lsm_domain", packets sent from the "lsm_domain" will fallback to the default NetLabel mapping.

netlabelctl unlbl add interface:lo address:::1 label:foo

Add a static/fallback label to assign the "foo" security label to unlabeled packets entering the system over the "lo" (loopback) interface with an IPv6 source address of "::1" (localhost).

netlabelctl unlbl add default address:192.168.0.0/16 label:bar

Add a static/fallback label to assign the "bar" security label to unlabeled packets entering the system over any interface with an IPv4 source address in the 192.168.0.0/16 network.

## NOTES
The NetLabel subsystem is supported on Linux Kernels version 2.6.19 and later. The static, or fallback, labels are only supported on Linux Kernels version 2.6.25 and later. The domain mapping address selectors are only supported on Linux Kernels 2.6.28 and later and CALIPSO/RFC5570 is only supported on Linux Kernels 4.8.0 and later.

The NetLabel project site, with more information including the source code repository, can be found at https://github.com/netlabel. Please report any bugs at the project site or directly to the author.

## AUTHOR
Paul Moore <paul@paul-moore.com>

## SEE ALSO
netlabel-config(8)


netplan-apply

package: netplan

title: netplan-apply(8)

text:
# netplan-apply(8)

## NAME
netplan-apply - apply configuration from Netplan YAML files to a running system

## SYNOPSIS
netplan [--debug] apply -h|--help

netplan [--debug] apply

## DESCRIPTION
netplan apply applies the current Netplan configuration to a running system.

The process works as follows:

1.

The back-end configuration is generated from Netplan YAML files.

2.

The appropriate back ends (systemd-networkd(8) or NetworkManager(8)) are invoked to bring up configured interfaces.

3.

netplan apply iterates through interfaces that are still down, unbinding them from their drivers and rebinding them. This gives udev(7) renaming rules the opportunity to run.

4.

If any devices have been rebound, the appropriate back ends are re-invoked in case more matches can be done.

For information about the generation step, see netplan-generate(8). For details of the configuration file format, see netplan(5).

## OPTIONS
-h, --help

Print basic help.

--debug

Print debugging output during the process.

## KNOWN ISSUES
netplan apply will not remove virtual devices such as bridges and bonds that have been created, even if they are no longer described in the Netplan configuration. That is due to the fact that Netplan operates statelessly and is not aware of the previously defined virtual devices.

This can be resolved by manually removing the virtual device (for example ip link delete dev bond0) and then running netplan apply, by rebooting, or by creating a temporary backup of the YAML state in /etc/netplan before modifying the configuration and passing this state to Netplan (e.g. mkdir -p /tmp/netplan_state_backup/etc && cp -r /etc/netplan /tmp/netplan_state_backup/etc/ then running netplan apply --state /tmp/netplan_state_backup).

## SEE ALSO
netplan(5), netplan-generate(8), netplan-try(8), udev(7), systemd-networkd.service(8), NetworkManager(8)

## AUTHORS
Daniel Axtens (<daniel.axtens@canonical.com>).


netplan-dbus

title: netplan-dbus(8)

text:
# netplan-dbus(8)

## NAME
netplan-dbus - daemon to access Netplan functionality via a D-Bus API

## SYNOPSIS
netplan-dbus

## DESCRIPTION
netplan-dbus is a D-Bus daemon, providing io.netplan.Netplan on the system bus. The /io/netplan/Netplan object provides an io.netplan.Netplan interface, offering the following methods:

•

Apply() -> b: calls netplan apply and returns a success or failure status.

•

Generate() -> b: calls netplan generate and returns a success or failure status.

•

Info() -> a(sv): returns a dictionary "Features -> as", containing an array of all available feature flags.

•

Config() -> o: prepares a new configuration object as /io/netplan/Netplan/config/<ID>, by copying the current state from /{etc,run,lib}/netplan/*.yaml.

The /io/netplan/Netplan/config/<ID> objects provide a io.netplan.Netplan.Config interface, offering the following methods:

•

Get() -> s: calls netplan get --root-dir=/run/netplan/config-ID all and returns the merged YAML configuration of the the given configuration object's state

•

Set(s:CONFIG_DELTA, s:ORIGIN_HINT) -> b: calls netplan set --root-dir=/run/netplan/config-ID --origin-hint=ORIGIN_HINT CONFIG_DELTA

CONFIG_DELTA can be something like: network.ethernets.eth0.dhcp4=true and ORIGIN_HINT can be something like: 70-snapd (it will then write the configuration to 70-snapd.yaml). Once Set() is called on a configuration object, all other current and future configuration objects are being invalidated and cannot Set() or Try()/Apply() anymore, due to this pending dirty state. After the dirty configuration object is rejected via Cancel(), the other configuration objects are valid again. If the dirty configuration object is accepted via Apply(), newly created configuration objects will be valid, while the older states will stay invalid.

•

Try(u:TIMEOUT_SEC) -> b: replaces the main Netplan configuration with this configuration object's state and calls netplan try --timeout=TIMEOUT_SEC.

•

Cancel() -> b: rejects a currently running Try() attempt on this configuration object and/or discards the configuration object.

•

Apply() -> b: replaces the main Netplan configuration with this configuration object's state and calls netplan apply.

For information about the Apply()/Try()/Get()/Set() functionality, see netplan-apply(8)/netplan-try(8)/netplan-get(8)/netplan-set(8) accordingly. For details of the configuration file format, see netplan(5).

## SEE ALSO
netplan(5), netplan-apply(8), netplan-try(8), netplan-get(8), netplan-set(8)

## AUTHORS
Lukas Märdian (<lukas.maerdian@canonical.com>).


netplan-generate

title: netplan-generate(8)

text:
# netplan-generate(8)

## NAME
netplan-generate - generate back-end configuration from Netplan YAML files

## SYNOPSIS
netplan [--debug] generate -h|--help

netplan [--debug] generate [--root-dir ROOT_DIR] [--mapping MAPPING]

## DESCRIPTION
netplan generate converts Netplan YAML into configuration files understood by the back ends (systemd-networkd(8) or NetworkManager(8)). It does not apply the generated configuration.

You will not normally need to run this directly as it is run by netplan apply, netplan try, or at boot.

Only if executed during the systemd initializing phase (i.e. "Early boot, before basic.target is reached"), will it attempt to start/apply the newly created service units. **Requires feature: generate-just-in-time**

When called as a systemd.generator(7), all the parsing and validation errors will be ignored by default. If network definitions are skipped due to parsing errors, they might be incomplete. That means that the back end configuration emitted might not be fully valid.

For details of the configuration file format, see netplan(5).

## OPTIONS
-h, --help

Print basic help.

--debug

Print debugging output during the process.

--root-dir ROOT_DIR

Instead of looking in /{lib,etc,run}/netplan, look in /ROOT_DIR/{lib,etc,run}/netplan.

--mapping MAPPING

Instead of generating output files, parse the configuration files and print some internal information about the device specified in MAPPING.

## HANDLING MULTIPLE FILES
There are 3 locations that netplan generate considers:

•

/lib/netplan/*.yaml

•

/etc/netplan/*.yaml

•

/run/netplan/*.yaml

If there are multiple files with exactly the same name, then only one will be read. A file in /run/netplan will shadow (completely replace) a file with the same name in /etc/netplan. A file in /etc/netplan will itself shadow a file in /lib/netplan.

Or, in other words, /run/netplan is top priority, then /etc/netplan, with /lib/netplan having the lowest priority.

If there are files with different names, then they are considered in lexicographical order - regardless of the directory they are in. Later files add to or override earlier files. For example, /run/netplan/10-xyz.yaml would be updated by /lib/netplan/20-abc.yaml.

If you have two files with the same key/setting, the following rules apply:

•

If the values are YAML boolean or scalar values (numbers and strings) the old value is overwritten by the new value.

•

If the values are sequences, the sequences are concatenated - the new values are appended to the old list.

•

If the values are mappings, Netplan will examine the elements of the mappings in turn using these rules.

## SEE ALSO
netplan(5), netplan-apply(8), netplan-try(8), systemd-networkd(8), NetworkManager(8)

## AUTHORS
Daniel Axtens (<daniel.axtens@canonical.com>).


netplan-get

title: netplan-get(8)

text:
# netplan-get(8)

## NAME
netplan-get - read merged Netplan YAML configuration

## SYNOPSIS
netplan [--debug] get -h|--help

netplan [--debug] get [--root-dir=ROOT_DIR] [key]

## DESCRIPTION
netplan get key reads all YAML files from /{etc,lib,run}/netplan/*.yaml and returns a merged view of the current configuration.

You can specify all as a key (the default) to get the full YAML tree or extract a subtree by specifying a nested key like: [network.]ethernets.eth0.

For details of the configuration file format, see netplan(5).

## OPTIONS
-h, --help

Print basic help.

--debug

Print debugging output during the process.

--root-dir

Read YAML files from this root instead of /.

## SEE ALSO
netplan(5), netplan-set(8), netplan-dbus(8)

## AUTHORS
Lukas Märdian (lukas.maerdian@canonical.com).


netplan-info

title: netplan-info(8)

text:
# netplan-info(8)

## NAME
netplan-info - show available features

## SYNOPSIS
netplan [--debug] info -h|--help

netplan [--debug] info [--json|--yaml]

## DESCRIPTION
netplan info displays the supported features.

## OPTIONS
-h, --help

Print basic help.

--debug

Print debugging output during the process.

--json

Output version and features in JSON format.

--yaml

Output version and features in YAML format (default).

## SEE ALSO
netplan(5)

## AUTHORS
Danilo Egea Gondolfo (danilo.egea.gondolfo@canonical.com).


netplan-ip

title: netplan-ip(8)

text:
# netplan-ip(8)

## NAME
netplan-ip - retrieve IP information (like DHCP leases) from the system

## SYNOPSIS
netplan [--debug] ip -h|--help

netplan [--debug] ip COMMAND [--root-dir=ROOT_DIR] ARGUMENTS

## DESCRIPTION
netplan ip retrieves IP information (like DHCP leases) from the system.

## DHCP COMMANDS
leases INTERFACE

Displays DHCP IP leases

Example: netplan ip leases enp5s0

## OPTIONS
-h, --help

Print basic help.

--debug

Print debugging output during the process.

--root-dir

Read YAML files from this root instead of /.

## SEE ALSO
netplan(5), netplan-get(8), netplan-status(8)

## AUTHORS
Danilo Egea Gondolfo (danilo.egea.gondolfo@canonical.com).


netplan-rebind

title: netplan-rebind(8)

text:
# netplan-rebind(8)

## NAME
netplan-rebind - rebind SR-IOV virtual functions to their driver

## SYNOPSIS
netplan [--debug] rebind -h|--help

netplan [--debug] rebind [interfaces]

## DESCRIPTION
netplan rebind [interfaces] rebinds SR-IOV virtual functions of given physical functions to their driver.

## OPTIONS
-h, --help

Print basic help.

--debug

Print debugging output during the process.

interfaces

Space-separated list of physical-function interface names.

## SEE ALSO
netplan(5), netplan-set(8), netplan-apply(8)

## AUTHORS
Danilo Egea Gondolfo (danilo.egea.gondolfo@canonical.com).


netplan-set

title: netplan-set(8)

text:
# netplan-set(8)

## NAME
netplan-set - write Netplan YAML configuration snippets to file

## SYNOPSIS
netplan [--debug] set -h|--help

netplan [--debug] set [--root-dir=ROOT_DIR] [--origin-hint=ORIGIN_HINT] [key=value]

## DESCRIPTION
netplan set [key=value] writes a given key/value pair or YAML subtree into a YAML file in /etc/netplan/ and validates its format.

You can specify a single value as: "[network.]ethernets.eth0.addresses=[1.2.3.4/24, 5.6.7.8/24]" or a full subtree as: "[network.]ethernets.eth0={dhcp4: true, dhcp6: true}".

For details of the configuration file format, see netplan(5).

## OPTIONS
-h, --help

Print basic help.

--debug

Print debugging output during the process.

--root-dir

Write YAML files into this root instead of /.

--origin-hint

Specify a name for the configuration file, e.g.: 70-netplan-set => /etc/netplan/70-netplan-set.yaml.

## SEE ALSO
netplan(5), netplan-get(8), netplan-dbus(8)

## AUTHORS
Lukas Märdian (lukas.maerdian@canonical.com).


netplan-status

title: netplan-status(8)

text:
# netplan-status(8)

## NAME
netplan-status - query networking state of the running system

## SYNOPSIS
netplan [--debug] status -h|--help

netplan [--debug] status [interface]

## DESCRIPTION
netplan status [interface] queries the current network configuration and displays it in human-readable format.

You can specify interface to display the status of a specific interface.

Currently, netplan status depends on systemd-networkd as a source of data and will try to start it if it's not masked.

## OPTIONS
-h, --help

Print basic help.

--debug

Print debugging output during the process.

-a, --all

Show all interface data including inactive.

--diff

Analyse and display differences between the current system configuration and network definitions present in the YAML files. The configuration analysed includes IP addresses, routes, MAC addresses, DNS addresses, search domains and missing network interfaces.

The output format is similar to popular diff tools, such diff and git diff. Configuration present only in the system (and therefore missing in the Netplan YAML) will be displayed with a + sign and will be highlighted in green. Configuration present only in Netplan (and therefore missing in the system) will be displayed with a - sign and highlighted in red. The same is applied to network interfaces.

--diff-only

Same as --diff but omits all the information that is not a difference.

--root-dir

Read YAML files from this root instead of /.

--verbose

Show extra information.

-f FORMAT, --format FORMAT

Output in machine-readable json or yaml format.

## SEE ALSO
netplan(5), netplan-get(8), netplan-ip(8)

## AUTHORS
Danilo Egea Gondolfo (danilo.egea.gondolfo@canonical.com).


netplan-try

title: netplan-try(8)

text:
# netplan-try(8)

## NAME
netplan-try - try a configuration, optionally rolling it back

## SYNOPSIS
netplan [--debug] try -h|--help

netplan [--debug] try [--config-file CONFIG_FILE] [--timeout TIMEOUT]

## DESCRIPTION
netplan try takes a netplan(5) configuration, applies it, and automatically rolls it back if the user does not confirm the configuration within a time limit.

A configuration can be confirmed or rejected interactively or by sending the SIGUSR1 or SIGINT signals.

This may be especially useful on remote systems, to prevent an administrator being permanently locked out of systems in the case of a network configuration error.

## OPTIONS
-h, --help

Print basic help.

--debug

Print debugging output during the process.

--config-file CONFIG_FILE

In addition to the usual configuration, apply CONFIG_FILE. It must be a YAML file in the netplan(5) format.

--timeout TIMEOUT

Wait for TIMEOUT seconds before reverting. Defaults to 120 seconds. Note that some network configurations (such as STP) may take over a minute to settle.

## KNOWN ISSUES
netplan try uses similar procedures to netplan apply, so some of the same caveats apply around virtual devices.

There are also some known bugs: if netplan try times out or is cancelled, make sure to verify if the network configuration has in fact been reverted.

As with netplan apply, a reboot should fix any issues. However, be sure to verify that the configuration on disk is in the state you expect before rebooting!

## SEE ALSO
netplan(5), netplan-generate(8), netplan-apply(8)

## AUTHORS
Daniel Axtens (<daniel.axtens@canonical.com>).


astraceroute

package: netsniff-ng

title: astraceroute(8)

summary: autonomous system trace route utility

text:
# astraceroute(8)

## NAME
astraceroute - autonomous system trace route utility

## SYNOPSIS
astraceroute [options]

## DESCRIPTION
astraceroute is a small utility to retrieve path information in a traceroute like way, but with additional geographical location information. It tracks the route of a packet from the local host to the remote host by successively increasing the IP's TTL field, starting from 1, in the hope that each intermediate node will send an ICMP TIME_EXCEEDED notification back to the local host when the TTL value is decremented to 0.

astraceroute supports IPv4 and IPv6 queries and will display country and city information, if available, the AS number the hop belongs to, and its ISP name. astraceroute also displays timing information and reverse DNS data.

Due to astraceroute's configurability, it is also possible to gather some more useful information about the hop regarding what it does and does not allow to pass through. This is done by using clear text strings for probing DPIs or ``great firewalls'' to determine if they will filter out blocked critical keywords. This tool might be a good start for further in-depth analysis of such systems.

## OPTIONS
-H <host>, --host <host>

Hostname or IPv4 or IPv6 address of the remote host where the AS route should be traced to. In the case of an IPv6 address or host, option -6 must be used. IPv4 is the default.

-p <port>, --port <port>

TCP port for the remote host to use. If not specified, the default port used is 80.

-i <device>, -d <device>, --dev <device>

Networking device to start the trace route from, e.g. eth0, wlan0.

-b <IP>, --bind <IP>

IP address to bind to other than the network device's address. You must specify -6 for an IPv6 address.

-f <ttl>, --init-ttl <ttl>

Initial TTL value to be used. This option might be useful if you are not interested in the first n hops, but only the following ones. The default initial TTL value is 1.

-m <ttl>, --max-ttl <ttl>

Maximum TTL value to be used. If not otherwise specified, the maximum TTL value is 30. Thus, after this has been reached astraceroute exits.

-q <num>, --num-probes <num>

Specifies the number of queries to be done on a particular hop. The default is 2 query requests.

-x <sec>, --timeout <sec>

Tells astraceroute the probe response timeout in seconds, in other words the maximum time astraceroute must wait for an ICMP response from the current hop. The default is 3 seconds.

-X <string>, --payload <string>

Places an ASCII cleartext string into the packet payload. Cleartext that contains whitespace must be put into quotes (e.g.: "censor me").

-l <len>, --totlen <len>

Specifies the total length of the packet. Payload that does not have a cleartext string in it is padded with random garbage.

-4, --ipv4

Use IPv4 only requests. This is the default.

-6, --ipv6

Use IPv6 only requests. This must be used when passing an IPv6 host as an argument.

-n, --numeric

Tells astraceroute to not perform reverse DNS lookup for hop replies. The reverse option is -N.

-u, --update

The built-in geo-database update mechanism will be invoked to get Maxmind's latest version. To configure search locations for databases, the file /etc/netsniff-ng/geoip.conf contains possible addresses. Thus, to save bandwidth or for mirroring Maxmind's databases (to bypass their traffic limit policy), different hosts or IP addresses can be placed into geoip.conf, separated by a newline.

-L, --latitude

Also show latitude and longitude of hops.

-N, --dns

Tells astraceroute to perform reverse DNS lookup for hop replies. The reverse option is -n.

-S, --syn

Use TCP's SYN flag for the request.

-A, --ack

Use TCP's ACK flag for the request.

-F, --fin

Use TCP's FIN flag for the request.

-P, --psh

Use TCP's PSH flag for the request.

-U, --urg

Use TCP's URG flag for the request.

-R, --rst

Use TCP's RST flag for the request.

-E, --ecn-syn

Use TCP's ECN flag for the request.

-t <tos>, --tos <tos>

Explicitly specify IP's TOS.

-G, --nofrag

Set IP's no fragmentation flag.

-Z, --show-packet

Show and dissect the returned packet.

-v, --version

Show version information and exit.

-h, --help

Show user help and exit.

## USAGE EXAMPLE
astraceroute -i eth0 -N -S -H netsniff-ng.org

This sends out a TCP SYN probe via the ''eth0'' networking device to the remote IPv4 host netsniff-ng.org. This request is most likely to pass. Also, tell astraceroute to perform reverse DNS lookups for each hop.

astraceroute -6 -i eth0 -S -E -N -H www.6bone.net

In this example, a TCP SYN/ECN probe for the IPv6 host www.6bone.net is being performed. Also in this case, the ''eth0'' device is being used as well as a reverse DNS lookup for each hop.

astraceroute -i eth0 -N -F -H netsniff-ng.org

Here, we send out a TCP FIN probe to the remote host netsniff-ng.org. Again, on each hop a reverse DNS lookup is being done and the queries are transmitted from ''eth0''. IPv4 is used.

astraceroute -i eth0 -N -FPU -H netsniff-ng.org

As in most other examples, we perform a trace route to IPv4 host netsniff-ng.org and do a TCP Xmas probe this time.

astraceroute -i eth0 -N -H netsniff-ng.org -X censor-me -Z

In this example, we have a Null probe to the remote host netsniff-ng.org, port 80 (default) and this time, we append the cleartext string "censor-me" into the packet payload to test if a firewall or DPI will let this string pass. Such a trace could be done once without and once with a blocked string to gather possible information about censorship.

## NOTE
If a TCP-based probe fails after a number of retries, astraceroute will automatically fall back to ICMP-based probes to pass through firewalls and routers used in load balancing for example.

To gather more information about astraceroute's displayed AS numbers, see e.g.: http://bgp.he.net/AS<number>.

## BUGS
The geographical locations are estimated with the help of Maxmind's GeoIP database and can differ from the real physical location. To decrease the possible errors, update the database regularly using astraceroute's --update option.

At some point in time, we need a similar approach to gather more reliable path information such as in the paris-traceroute tool.

Due to the generic nature of astraceroute, it currently has a built-in mechanism to stop the trace after a fixed number of hops, since the configurable TCP flags can have anything included. It is possible to decrease this number of course. In the future, if a SYN probe is sent out, there should be a listener so that we can stop the trace if we detect a handshake in progress.

## LEGAL
astraceroute is licensed under the GNU GPL version 2.0.

## HISTORY
astraceroute was originally written for the netsniff-ng toolkit by Daniel Borkmann. It is currently maintained by Tobias Klauser <tklauser@distanz.ch> and Daniel Borkmann <dborkma@tik.ee.ethz.ch>.

## SEE ALSO
netsniff-ng(8), trafgen(8), mausezahn(8), ifpps(8), bpfc(8), flowtop(8), curvetun(8)

## AUTHOR
Manpage was written by Daniel Borkmann.

## COLOPHON
This page is part of the Linux netsniff-ng toolkit project. A description of the project, and information about reporting bugs, can be found at http://netsniff-ng.org/.