Compaq TCP/IP Services for OpenVMS
Tuning and Troubleshooting


Previous Contents Index


route

Manually manipulates the routing tables.


Format

Adding a Route route [-nqvC] add [-net|-host] [family] destination[/bitmask] gateway [-link] [modifiers [args]]

Changing a Route route [-nqv] change [-net|-host] [family] destination gateway [-link] [modifiers args]

Monitoring a Route route [-n] monitor

Deleting a Route route [-nqvC] delete [-net|-host] [family] destination[/bitmask] [-link] gateway [modifiers args]

Deleting All Routes route [-nqvC] flush [family]

description

The route command allows you to manually manipulate the network routing tables. It normally is not needed, since a system-routing table management daemon, such as GATED or ROUTED, should tend to this task.

The route command accepts five commands:
add Adds a route.
flush Removes all routes.
delete Deletes a specific route.
change Changes aspects of a route (such as its gateway).
monitor Reports any changes to the routing information base, r` lookup misses, or suspected network partitions.

The flush command has the following format:


route [-n] flush [family] 

In this format, the address family can be specified by the -inet keyword.

The other commands have the following format:


route [-n]  command [-net | -host] destination[/bitmask] gateway modifier [-netmask mask] 

Unless the net or the host parameter is specified on the command line, route creates a host route or a network route by interpreting the Internet address associated with destination parameter. If the destination has a local address part of INADDR_ANY, or if the destination is the symbolic name of a network, a network route is created; otherwise, a host route is created.

For example, 128.32 is interpreted as -host 128.0.0.32 , 128.32.130 is interpreted as -host 128.32.0.130 ; -net 128.32 is interpreted as 128.32.0.0 , and -net 128.32.130 is interpreted as 128.32.130.0 .

All symbolic names specified for a destination or gateway are looked up first as a host name using gethostbyname() . If this lookup fails, getnetbyname() is then used to interpret the name as that of a network.

Routes added with the route command are marked as RTF_STATIC to differentiate them from routes added by the routing daemons (GATED or ROUTED). The GATED daemon does not remove the RTF_STATIC routes when it is shut down.

The route utility uses a routing socket and the new message types RTM_ADD, RTM_DELETE, and RTM_CHANGE. As such, only a privileged user can modify the routing tables.


Flags

-n

Prevents attempts to display host and network names symbolically when reporting actions.

-v

Displays additional details.

-q

Suppresses all output.

Modifiers

-all

Specifies that the kernel add or delete the specified route on all interfaces (for example, TU0 and TU1 ) that are in the same subnet as the gateway. Use this modifier only with the add and delete modifiers. Do not use -all with the -dev and -olddev modifiers.

-blackhole

Specifies that this route is a blackhole route. Packets sent to blackhole routes are dropped, and notification is not sent to the packet originators. This is different from a normal route, which allows packets to be forwarded out on it. You must specify 127.0.0.1 (localhost) as the gateway argument.

-cloning

Generates a new route on use of this route.

-dev device

Specifies the interface device to use in the routing entry. Use this modifier when you want to designate a particular interface for a route. If you do not specify this modifier, the route is added on the first interface that is found.

-genmask mask

Specifies that the netmask mask is used for all routes cloned from this route.

-hopcount count

Sets this route's maximum hopcount to the value specified by count.

-iface | -interface

Specifies that this route is through an interface instead of through a gateway (gateway is the default). This means the destination is reachable directly through an interface; no intermediate system is required. The gateway parameter is the host address to be used for transmission.

-inet

Sets this route's type as AF_INET. When you specifiy inet with the delete or flush command, only AF_INET routes are deleted.

-llinfo

Specifies that this route contains valid link-layer information.

-lock

Locks the metric specified by the next modifier specified on the command line. A locked metric is not modified by the kernel. The following metrics can be locked: mtu , hopcount , recvpipe , sendpipe , ssthresh , rtt , and rttvar .

-lockrest

Locks the metrics specified by all the modifiers that follow on the command line. A locked metric is not modified by the kernel. The following metrics can be locked: mtu , hopcount , recvpipe , sendpipe , ssthresh , rtt , and rttvar .

-mtu size

Sets this route's maximum transmission unit (MTU) (in bytes) to the value specified by size.

-netmask mask

Specifies the subnet mask to use for the routing entry. Networks that use a nonstandard subnet must include this modifier. Specify this modifier after any optional modifiers. Do not specify this modifier if you specify a CIDR bitmask (/bitmask). Do not specify this modifier with the change command.

-nofragtopmtu

Specifies that IP datagram fragmentation is disabled for this route.

-nopmtudisc

Specifies that path MTU discovery is disabled for this route.

-olddev device

Specifies the old interface device that you want to change in the routing entry. Use this modifier with the change command only to move a route from one interface to another.

-oldgateway name

Specifies the old gateway that you want to change in the routing entry. Use this modifier with the change command only.

-precedence value

Sets the precedence of the route to the value specified by value. Among equivalent routes to the same destination, the route with the lower precedence is preferred.

-recvpipe bandwidth

Sets this route's inbound delay bandwidth product (in bytes) to the value specified by bandwidth.

-reject

Specifies that this route is a reject route. Packets sent to reject routes are dropped, and messages designating the route as unreachable are sent to the packet originators. This is different from a normal route, which allows packets to be forwarded out on it. You must specify 127.0.0.1 (localhost) as the gateway argument.

-rtt time

Sets this route's round-trip time (in microseconds) to the value specified by time.

-rttvar variance

Sets this route's round-trip time variance (in microseconds) to the value specified by variance.

-sendpipe bandwidth

Sets this route's outbound delay bandwidth product (in bytes) to the value specified by bandwidth.

-ssthresh threshold

Sets this route's outbound gateway buffer limit (in bytes) to the value specified by threshold.

Examples

The following examples show how to use the route utility.
#1

TCPIP>  route   add   default   128.32.0.130 
      

The example shows how to add gateway 128.32.0.130 as a default gateway.

#2

TCPIP> route   add   -host   milan  128.32.0.130 
      

The example shows how to add a route to host milan via gateway 128.32.0.130 .

#3

TCPIP> route   delete   -host   milan   128.32.0.130 
      

The example shows how to delete an existing route via gateway 128.32.0.130 to host milan .

#4

TCPIP> route   add  -precedence 1 -host   milan   128.32.0.130 
      

The example shows how to add a route with a precedence value of 1 to host milan via gateway 128.32.0.130 .

#5

TCPIP> route  change  -oldgateway 128.32.0.130 -oldinterface le0 - 
_TCPIP>  -host milan 128.32.10.101 
      

The example shows how to change an existing route for host milan via gateway 128.32.0.130 to use a new gateway 128.32.10.101 .


sysconfig

Maintains the kernel subsystem configuration.


Format

sysconfig -c | -q | -Q | -r | -s | -u [subsystem-name] [attribute-list]

description

The sysconfig command is used to query and modify the kernel subsystem configuration. You use this command to add subsystems to your running kernel, reconfigure subsystems already in the kernel, ask for information about (query) subsystems in the kernel, and unconfigure and remove subsystems from the kernel.

A subset of kernel subsystems can be managed using the sysconfig command. This command allows you to modify the value of subsystem attributes, as long as the subsystem supports run-time modifications.

The first argument to the sysconfig command is the subsystem-name argument. The subsystem-name argument names the subsystem on which you want to perform the operation specified by one of the required flags, such as the -c (configure) flag or the -q (query attributes) flag. The subsystem-name argument is required for all flags except -s and -m . If you omit subsystem-name when you use one of these flags, the sysconfig command displays information about all loaded subsystems.

The attribute-list argument lists attribute names and, depending on the operation, attribute values. For reconfigure ( -r ) operations, the attribute-list argument has the following format:


attribute1=value1 attribute2=value2... 

You cannot include spaces between the attribute name, the equals sign (=), and the value.

For query attribute ( -q ) operations, the attribute-list argument has the following format:


attribute1 attribute2... 

The attribute-list argument is required when you use the -r flag and is optional with the -q flag. Any attribute-list specified with other flags is ignored by the sysconfig command.

When you configure a subsystem using the -c flag, you make that subsystem available for use. If the subsystem is loadable, the sysconfig command loads the subsystem and then initializes the value of its attributes.

If you want to modify the value of a subsystem attribute, you use the -r (reconfigure) flag. When you use the -r flag, the sysconfig command modifies the named attributes by storing the value you specify in them. The modifications take effect immediately.

To get information about subsystem attributes, use either the -q flag or the -Q flag. You can specify an attribute list with both these flags. When you use the -q flag, the sysconfig command reads the value of attributes from the kernel and displays thos values on your local display. When you use the -Q flag, the sysconfig command displays the following information about either each attribute in the subsystem or, if specified, each attribute in the attribute-list :

To get information about the state of subsystems, use the -s flag. This flag provides a list of the subsystems that are currently loaded and configured into the kernel. If you specify subsystem-name , the command displays information about the state of that subsystem. Each subsystem can have one of three states:

Subsystems that are not being used can be unconfigured using the -u flag. Unconfiguring subsystems can help save kernel memory, making it available for other uses. You can unconfigure any static or loadable subsystem that supports run-time unconfiguration. If you unconfigure a loadable subsystem, that subsystem is also unloaded from the kernel.

You can use the sysconfig command to display the value of attributes on the local system. If you want to configure, reconfigure, or unconfigure a subsystem, you must be authorized to modify the kernel configuration. Only users who have a system group UIC or who have an account with SYSPRV, BYPASS, OPER privileges can configure, reconfigure, or unconfigure the subsystems.


Flags

-c

Configures the specified subsystem by initializing its attribute values and, possibly, loading it into the kernel.

-q

Queries attribute values for the configured subsystem specified by subsystem-name . If you omit attribute-list , values for all the specified subsystem's attributes are displayed.

-Q

Queries information about attributes of the configured subsystem specified by subsystem-name . The information includes the attribute data type, the operations supported, and the minimum and maximum values allowed for the attribute. Note that the minimum and maximum values refer to length and size for attributes of char and binary types, respectively. If you omit the attribute-list argument, information about all attributes in the specified subsystem is displayed.

-r

Reconfigures the specified subsystem. You must supply the subsystem-name argument and the attribute-list argument when you use this flag.

-s

Queries the subsystem state for the specified subsystems. If you omit the subsystem name, sysconfig displays the state of all the configured subsystems.

-u

Unconfigures and, if the subsystem is loadable, unloads the specified subsystem from the kernel.

Examples

The following examples show how to use the sysconfig command.
#1

TCPIP> sysconfig -s 
inet: loaded and configured 
net: loaded and configured 
socket: loaded and configured 
iptunnel: loaded and configured 
ipv6: loaded and configured 
snmpinfo: loaded and configured 
      

This example shows how to display the kernel subsystems and their status.

#2

TCPIP> sysconfig -q net 
net: 
ifnet_debug = 0 
ifqmaxlen = 1024 
lo_devs = 1 
lo_def_ip_mtu = 4096 
nslip = 0 
TCPIP> 
      

This example shows how to display subsystem attributes and their values.

#3

TCPIP> sysconfig -s net 
net: loaded and configured 
%SYSTEM-F-NOPRIV, insufficient privilege or object protection violation 
TCPIP> 
      

This example shows how to query the state of a particular subsystem.

#4

TCPIP> sysconfig -u net 
Unable to find subsystem NET 
%SYSTEM-F-NOPRIV, insufficient privilege or object protection violation 
TCPIP> 
      

This example shows how to unconfigure a particular subsystem. You must have system privileges to display the output from this command.


TCPTRACE

Traces packets between two hosts.


Format

TCPTRACE host [/BUFFERS=n | /FULL | /OUTPUT=file | /PACKETS=n | /PORT=option | /PROTOCOL=option]

description

TCPTRACE traces packets as they travel between the local and remote host. You can trace all packets or you can use command qualifiers to monitor only those packets of interest.

Qualifiers

/BUFFERS=n

Optional. The default is 100.
Specifies the number of buffers that TCPTRACE allocates for temporary storage.
These buffers must be locked into the working set, so the number can be:

/FULL

Optional. The default is brief display.

Displays the packet's contents.

/OUTPUT=file

Optional. The default is screen display. Redirects the output from screen to the specified file. If this file name already exists, the output is appended to it.

/PACKETS=n

Optional. The default it 10.

Stops the trace after the specified number of packets is displayed.

/PORT=option

{LOCAL=n | REMOTE=n}

Optional for port number. The default is that all traffic is displayed.

Required for port type. Filters the trace to the specified port.

/PROTOCOL=option

{ARP | ICMP | IP | TCP | UDP}

Optional. The default is /PROTOCOL=IP.

Filters the specified protocol.


Examples

The following examples show how to use the TCPTRACE command.
#1

$ TCPTRACE HOST1 /FULL /PORT=(REMOTE=21) 
      

This example shows how to use the TCPTRACE command to trace packets between the local system and Host1 . TCPTRACE filters all packets except those packets directed to port 21 on the remote host.

#2

$ TCPTRACE HOST2 /PORT=(LOCAL=23, REMOTE=1056) - 
_$ /FULL /PACKETS=30 /OUTPUT=TELNET_TRACE.TXT 
      

This example shows how to use the TCPTRACE command to trace packets between the local system and Host2 . TCPTRACE filters all packets except those packets directed to port 23 on the local host and port 1056 on the remote host. The trace results are output to a file with the name TELNET_TRACE.TXT. The trace stops after 30 packets meeting the specifications are encountered.


Previous Next Contents Index