Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

srtconfig(1) [netbsd man page]

SRTCONFIG(1)						    BSD General Commands Manual 					      SRTCONFIG(1)

NAME
srtconfig -- configure srt interfaces SYNOPSIS
srtconfig srtX srtconfig srtX N srtconfig srtX del N srtconfig srtX add srcaddr mask dstif dstaddr srtconfig srtX set N srcaddr mask dstif dstaddr DESCRIPTION
srtconfig configures, or queries the configuration of, srt(4) interfaces. An srt(4) interface parcels packets out to other interfaces based on their source addresses (the normal routing mechanisms handle routing decisions based on destination addresses). An interface may have any number of routing choices; they are examined in order until one matching the packet is found. The packet is sent to the corresponding inter- face. (Any interface, even another srt interface, may be specified; if the configurations collaborate to cause a packet to loop forever, the system will lock up or crash.) When run with only one argument, srtconfig prints the settings for the specified interface. When run with two arguments, srtconfig prints the settings for the routing choice whose number is given as the second argument. The form with 'del' deletes a routing choice, identified by its number. Other choices with higher numbers, if any, will be renumbered accordingly. The 'add' form adds a choice; the other arguments describe it, and are documented below. The new choice is added at the end of the list. The 'set' form replaces an existing choice, given its number. The other arguments describe the new choice which is to replace whatever cur- rently exists at the given number N. A choice is described by four pieces of information: a source address and mask, which are used to determine which choice an outgoing packet uses, a destination interface, and a destination address for the new interface. The source address and mask are specified like any Internet addresses (for convenience, the mask may instead be specified as a '/' followed by a small integer, CIDR-style; note that in this case the mask must still be a separate argument; it cannot be appended to the end of the source address argument). Each srt interface also has ordinary source and destination addresses which are set with ifconfig(8) like any other interface; these should not be confused with any of the above. AUTHORS
der Mouse <mouse@rodents.montreal.qc.ca> BSD
August 21, 2000 BSD

Check Out this Related Man Page

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)
Man Page