plan9 man page for iproute

Query: iproute

OS: plan9

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

IPROUTE(3)						     Library Functions Manual							IPROUTE(3)

NAME
iproute - Internet route table manager
SYNOPSIS
bind -a #P /net /net/iproute /net/ipifc
DESCRIPTION
The iproute device allows the specification of routes for families of IP addresses. It maintains a kernel-resident routing table for IP addresses used by TCP, IL and UDP. Each route consists of a destination IP address, an IP mask, and an IP gateway address. Every packet sent by the system is routed according to the route table. An address matches the route table entry when a packet's destination address matches the table destination address under the mask. When a match is found, the packet is sent to the gateway IP address. If there is no match, the packet is sent with the original destination address. If there are several matches, the one whose mask has the fewest leading zeros is chosen. (Because of the definition of IP masks, this mask preserves the largest portion of the address and is therefore the most specific.) This is forced by storing the routes in decreasing number of ones order and returning the first match. The default gateway has no ones in the mask and is thus the last matched. Reading iproute reports the current routes entered in the table. Writing control messages to iproute edits the table. Route entries are made by writing a string of format add ipdest mask ipgateway Entries are deleted by writing a string of format delete ipdest mask The whole table can be cleared by writing the string For example, to install a gateway address to accept all IP packets from a machine: % echo 'add 0.0.0.0 0.0.0.0 131.107.1.5' > /net/iproute % cat /net/iproute 0.0.0.0 & 0.0.0.0 -> 131.107.1.5 Reading ipifc reports the current IP interfaces being used, one line per interface, showing the device, the maximum transfer unit, the local address, the network mask, and the network address.
SOURCE
/sys/src/9/port/deviproute.c
SEE ALSO
ip(3), ipconfig(8) IPROUTE(3)
Related Man Pages
route(1m) - hpux
route(7) - osf1
routing(7p) - sunos
routing(7p) - plan9
routing(7p) - minix
Similar Topics in the Unix Linux Community
Where are routes stored ?
Combine multilpe lines with various combinations
gateway
basic unix question
where can i modify default gateway