![]() |
Reference Manual |
NAME
setsr - interact with the route selection mechanism.SYNOPSIS
setsr [ifn] [ip] [mask]DESCRIPTION
When invoked with only the ifn argument, setsr prints the current Source Route settings for that interface. If no argument is specified, the settings for all interfaces are printed.Argument ifn can be an interface number, or one of the NAT32 environment variables p (Primary interface), s (Secondary interface) or ifn (Current interface).
Argument ip is the IP address of a computer to be permitted to use the specified interface. If several computers are to be allowed, a mask can be specified, thus allowing all computers on such a pseudo subnet to communicate via the interface.
Example:
% setsr p 192.168.4.8 255.255.255.0
2 192.168.4.8 255.255.255.0 192.168.4.0
In the above example, the command specifies the Primary interface p, the IP address 192.168.4.8, and the Mask 255.255.255.0. The new settings for Interface 2 are then printed. NAT32 will then only forward traffic over Interface 2 (its main Internet interface in this example) from computers with an IP address 192.168.4.x, because the Mask 255.255.255.0 specified a pseudo subnet 192.168.4.0.
If several Internet interfaces exist, the setsr command can be used to force traffic from certain computers to be routed over one such Internet interface, while traffic from other computers will be routed over some other Internet interface.
Note that the Source Route mechanism overrides the Interface Selection mechanism if enabled.
NOTES
SEE ALSOThe term Source Routing is widely used to denote an IP Routing option which allows a list of Nexthop Addresses (gateways) to be specified in the IP Header of a datagram. However, because that list is limited to a maximum of 9 entries (because the IP HLEN field is only a 4-bit quantity), and because of security implications (all packets could be forced to pass through a hacker's gateway), Source Routing as described in RFC791 is usually disabled in most IP Routers.
In NAT32, the term Source Routing is used to denote route selection based on both the IP destination and IP source address of a packet.
netcfg, setht, setis