Compaq TCP/IP Services for OpenVMS
Tuning and Troubleshooting


Previous Contents Index

This example shows how to query your default name server for query type NS (default query type) and query class IN (default query class). The output shows the address records for the root name servers and their IP addresses.
#2

$ dig microsoft.com mx 
 
; <<>> DiG 8.1 <<>> microsoft.com mx 
;; res options: init recurs defnam dnsrch 
;; got answer: 
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6 
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 12, ADDITIONAL: 8 
;; QUERY SECTION: 
;;      microsoft.com, type = MX, class = IN 
 
;; ANSWER SECTION: 
microsoft.com.          2h18m8s IN MX   10 mail2.microsoft.com. 
microsoft.com.          2h18m8s IN MX   10 mail3.microsoft.com. 
microsoft.com.          2h18m8s IN MX   10 mail4.microsoft.com. 
microsoft.com.          2h18m8s IN MX   10 mail5.microsoft.com. 
microsoft.com.          2h18m8s IN MX   10 mail1.microsoft.com. 
 
;; AUTHORITY SECTION: 
com.                    5d22h12m9s IN NS  A.ROOT-SERVERS.NET. 
com.                    5d22h12m9s IN NS  E.GTLD-SERVERS.NET. 
com.                    5d22h12m9s IN NS  F.GTLD-SERVERS.NET. 
com.                    5d22h12m9s IN NS  F.ROOT-SERVERS.NET. 
com.                    5d22h12m9s IN NS  J.GTLD-SERVERS.NET. 
com.                    5d22h12m9s IN NS  K.GTLD-SERVERS.NET. 
com.                    5d22h12m9s IN NS  A.GTLD-SERVERS.NET. 
com.                    5d22h12m9s IN NS  M.GTLD-SERVERS.NET. 
com.                    5d22h12m9s IN NS  G.GTLD-SERVERS.NET. 
com.                    5d22h12m9s IN NS  C.GTLD-SERVERS.NET. 
com.                    5d22h12m9s IN NS  I.GTLD-SERVERS.NET. 
com.                    5d22h12m9s IN NS  B.GTLD-SERVERS.NET. 
 
;; ADDITIONAL SECTION: 
mail2.microsoft.com.    2h8m41s IN A    131.107.3.124 
mail3.microsoft.com.    2h27s IN A      131.107.3.123 
mail4.microsoft.com.    1h53m4s IN A    131.107.3.122 
mail5.microsoft.com.    2h8m43s IN A    131.107.3.121 
mail1.microsoft.com.    2h8m43s IN A    131.107.3.125 
A.ROOT-SERVERS.NET.     2d19h47m37s IN A  198.41.0.4 
E.GTLD-SERVERS.NET.     1d9h45m57s IN A  207.200.81.69 
F.GTLD-SERVERS.NET.     3h16m16s IN A   198.17.208.67 
 
;; Total query time: 4019 msec 
;; FROM: lassie.ucx.lkg.dec.com to SERVER: default -- 16.20.208.53 
;; WHEN: Wed Aug  9 16:55:42 2000 
;; MSG SIZE  sent: 31  rcvd: 493 
 
      

This example shows how to obtain the mail server records for Microsoft.


ifconfig

Assigns an address to a network interface, and configures and displays network interface parameters.


Format

ifconfig interface_id [address_family] [address[/bitmask]]

[dest_address] [parameters]) ifconfig -a [-d] [-u] [-v] [address_family]

ifconfig -l [-d] [-u] [-v] [address_family]

ifconfig [-v] interface-id [address_family]

description

Use the ifconfig command to define the network address of each interface. You can also use the ifconfig command at other times to display all interfaces that are configured on a system, to redefine the address of an interface, or to set other operating parameters.

Note

If you want to redefine the interface address or the net mask, you should stop TCP/IP Services. Otherwise, any TCP/IP process currently running will continue to use the old address and net mask and will fail.

Any user can query the status of a network interface; only a privileged user can modify the configuration of network interfaces.

You specify an interface with the ifconfig interface-id syntax. (See your hardware documentation for information on obtaining an interface ID.)

If you specify only interface-id, the ifconfig program displays the current configuration for the specified network interface only.

If a protocol family is specified by the address_family parameter, ifconfig reports only the configuration details specific to that protocol family.

When changing an interface configuration, if the address family cannot be inferred from the address parameter, an address family must be specified. The address family is required because an interface can receive transmissions in different protocols, each of which can require a separate naming scheme.

The address parameter is the network address of the interface being configured. For the inet address family, the address parameter is either a host name or an IP address in the standard dotted-decimal notation with or without the optional Classless Inter-Domain Routing (CIDR) bit mask (/bitmask). If you specify bitmask, do not use the netmask parameter.

The destination address (dest_address) parameter specifies the address of the correspondent on the remote end of a point-to-point link.


Flags

-a

Displays information about all interfaces that are configured on a system.

-d

Displays information about interfaces that are down.

-l

Displays interface names that are configured on a system.

-u

Displays information about interfaces that are up.

-v

Displays detailed information about interfaces, such as hardware addresses.

Parameters

alias alias_address[/bitmask]

Establishes an additional network address for this interface. This can be useful when changing network numbers and you want to continue to accept packets addressed to the old interface.

If you do not specify a bit mask or net mask with the alias address, the default net mask is based on the alias address's network class.

If you are using the optional bit mask argument, do not use the net mask argument.

-alias alias_address

Removes the network address specified. This can be used if you incorrectly specified an alias or if an alias is no longer needed. The -alias parameter functions in the same manner as the delete parameter.

aliaslist address_list[/bitmask]

Establishes a range of additional network addresses for this interface. The range can be a comma-separated list or a hyphenated list, and is inclusive. You can also specify the optional CIDR bit mask (/bitmask) argument at the end of the list. Do not use both a comma-separated list and a hyphenated list for a range.

-aliaslist

Removes a range of network addresses for this interface. This can be useful when deleting network numbers and you want to keep the primary interface address. The -aliaslist rules are the same as for the aliaslist parameter.

allmulti

Enables the reception of all multicast packets.

-allmulti

Disables the reception of all multicast packets.

arp

Enables the use of the Address Resolution Protocol (ARP) in mapping between network-level addresses and link-level addresses. This parameter is on by default.

-arp

Disables the use of the ARP. Use of this parameter is not recommended.

broadcast broad_address

Specifies the address to use to represent broadcasts to the network. The default broadcast address is the address with a host part consisting of all ones (1). Note that the computation of the host part is dependent on netmask (see the description of the netmask parameter).

delete [net_address]

Removes the network address specified. Use this parameter if you incorrectly specified an alias or if the alias was no longer needed. If you have incorrectly set an NS address, removing all NS addresses w ill allow you to specify the host portion again.

If no address is specified, ifconfig deletes all network addresses for the interface.

down

Marks an interface as not working (down), which keeps the system from trying to transmit messages through that interface. If possible, the ifconfig command also resets the interface to disable the reception of messages. Routes that use the interface, however, are not automatically disabled.

ipmtu mtu_value

Alters the size of the maximum transmission unit (MTU) for messages that your system transmits. It might be necessary to reduce the MTU size so that bridges connecting token rings can transfer frames without error.

metric number

Sets the routing metric, or number of hops, for the interface to the value of number. The default value is zero (0) if number is not specified, indicating that both hosts are on the same network. The routing metric is used by the ROUTED and GATED services, with higher metrics indicating that the route is less favorable.

netmask mask

Specifies how much of the address to reserve for subdividing networks into sub-networks. This parameter can only be used with an address family of inet . Do not use this parameter if you are specifying the CIDR mask (/bitmask) with the address parameter, alias parameter, or aliaslist parameter.

The mask variable includes both the network part of the local address and the subnet part, which is taken from the host field of the address. The mask can be specified as a single hexadecimal number beginning with 0x, in the standard Internet dotted-decimal notation, or beginning with a name.

The mask contains ones (1) for the bit positions in the 32-bit address that are reserved for the network and subnet parts, and zeros (0) for the bit positions that specify the host. The mask should contain at least the standard network portion.

The default net mask is based on the address parameter's network class.

up

Marks an interface as working (up). This parameter is used automatically when setting the first address for an interface, or it can be used to enable an interface after an ifconfig down command. If the interface was reset when previously marked with the down parameter, the hardware will be reinitialized.

Examples

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

TCPIP>  ifconfig sl0 
sl0: flags=10 
      

This example shows how to query the status of serial line interface sl0.

#2

TCPIP>  ifconfig lo0 inet  127.0.0.1 up 
      

This example shows how to configure the local loopback interface. Only a user with system privileges can modify the configuration of a network interface.

#3

TCPIP>  ifconfig ln0 212.232.32.1/22 
      

This example shows how to configure an ln0 interface. The broadcast address is 212.232.35.255 as the 22-bit mask specifies four Class C networks.

#4

TCPIP>  ifconfig tra0 130.180.4.1/24 speed 4 
      

This example shows how to configure the token ring interface for a 4 Mb/s token ring with a net mask of 255.255.255.0 in CIDR format.

#5

TCPIP>  ifconfig tra0 down 
TCPIP>  ifconfig tra0 speed 16 up 
      

This example shows how to stop the token ring interface and start it for a 16 Mb/s token ring.

#6

TCPIP>  ifconfig we0 alias 132.50.40.35/24 
      

This example shows how to add alias 132.50.40.35 with a net mask of 255.255.255.0 in CIDR format to interface we0.

#7

TCPIP>  ifconfig we0 aliaslist 132.240.32-36.40-50/24 
      

This example shows how to add network addresses 40 through 50, to subnets 18.240.32, 18.240.33, 18.240.34, 18.240.35, and 18.240.36 with a net mask of 255.255.255.0 in CIDR format to the we0 interface.

#8

TCPIP>  ifconfig we0 down delete abort 
145.92.16.1: aborting 7 tcp connection(s) 
      

This example shows how to stop Ethernet interface we0, delete all addresses associated with the interface, and close all TCP connections.

#9

TCPIP>  ifconfig we0 -alias 145.92.16.2 abort 
145.92.16.2: aborting 2 tcp connection(s) 
      

This example shows how to delete the alias address 145.92.16.2 on interface tu0 and close all TCP connections.

#10

TCPIP>  ifconfig we0 alias 145.92.16.2 physaddr aa:01:81:43:02:11 
      

This example shows how to associate MAC address aa:01:81:43:02:11 with the alias address 145.92.16.2.

#11

TCPIP>  ifconfig we0 -alias 145.92.16.2 -physaddr aa:01:81:43:02:11 
      

This example shows how to disassociate MAC address aa:01:81:43:02:11 from the alias address 145.92.16.2.

#12

A72KT: ifconfig -l 
TCPIP>ifconfig -l 
LO0 TN0 WE0 
      

This example shows how to display the names of the interfaces on the system only.

#13

TCPIP> ifconfig -v WE0 
wE0: flags=c43<UP,BROADCAST,RUNNING,MULTICAST,SIMPLEX> 
     HWaddr aa:0:4:0:72:f8 
     inet 10.10.2.2 netmask ffffff00 broadcast 10.10.2.255 ipmtu 1500 
      

This example shows how to display the hardware and IP addresses of interface WE0.


ndc

Manages the BIND server.


Format

ndc directive [directive ... ]

description

This command allows the name server administrator to send various messages to a name server. You can specify zero or more directives from the following list.

Directives

status

Displays the current status of the BIND server process.

dumpdb

Causes the BIND server to dump its database and cache to SYS$SPECIFIC:[TCPIP$BIND]TCPIP$BIND_SERVER_ZONES_DUMP.DB.

reload

Causes the BIND server to check the serial numbers of all primary and secondary zones and to reload those that have changed.

stats

Causes the BIND server to dump statistics to SYS$SPECIFIC:[TCPIP$BIND]TCPIP$BIND_SERVER_STATISTICS.LOG.

trace

Causes the BIND server to increment its tracing level by 0. Trace information is written to SYS$SPECIFIC:[TCPIP$BIND]TCPIP$BIND_RUN.LOG. Higher tracing levels result in more detailed information.

notrace

Causes the BIND server to set its tracing level to 0.

start

Causes the BIND server to be started, if it is not running.

stop

Causes the BIND server to be stopped if it is running.

restart

Causes the BIND server to be stopped and restarted.


Examples

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

$ ndc status 
BIND Server process information: 
  Process ID:                   44C0021C 
  Process name:               TCPIP$BIND_1 
  Priority:                            9 
  Elapsed CPU time:        0 00:00:31.19 
  Buffered I/O count:             214082 
  Direct I/O count:                  404 
  Page Faults:                       485 
  Pages:                            4096 
  Peak virtual size:              173696 
  Peak working set size:            5920 
  Process state:                     LEF 
      

This example shows how to display the current status of the BIND server process.

#2

$ ndc dumpdb 
      

This example shows how to dump the BIND server's database into the SYS$SPECIFIC:[TCPIP$BIND]TCPIP$BIND_SERVER_ZONES_DUMP.DB file. Use the DCL command TYPE to view the contents of this file.

#3

$ ndc stats 
      

This example shows how to dump BIND server statistics to the SYS$SPECIFIC:[TCPIP$BIND]TCPIP$BIND_SERVER_ZONES_STATISTICS.LOG file. Use the DCL command TYPE to view the contents of this file.


netstat

Displays network-related data in various formats.


Format

netstat [-rn | [-an] [-f address_family] [interval]


netstat [-adHimMnrstv] [-f address_family] [interval]


netstat [-ntdz] [-I interface] [interval]

description

The interval argument specifies in seconds the interval for updating and displaying information. The first line of the display shows cumulative statistics; subsequent lines show statistics recorded during interval.

Default display

When used without flags, the netstat command displays a list of active sockets for each protocol. The default display shows the following items:

Address formats are of the form host.port or network.port if a socket's address specifies a network but no specific host address. The host and network address are displayed symbolically unless -n is specified.

Interface display

The network interface display provides a table of cumulative statistics for the following:

Routing table display

A route consists of a destination host or network and a gateway to use when forwarding packets. Direct routes are created automatically for each interface attached to the local host when you issue the ifconfig command. Routes can be modified automatically in response to the prevailing condition of the network.

The routing-table display format indicates available routes and the status of each in the following fields:

Flags

Displays the state of the route as one or more of the following:
U Up, or available.
G This route is to a gateway.
H This route is to a host.
D This route was dynamically created by a redirect.
M This route was modified by a redirect.
S This is a static route that was created by the route command.
R This is a reject route that was created by the route command.

refcnt

Gives the current number of active uses for the route. Connection-oriented protocols hold on to a single route for the duration of a connection; connectionless protocols obtain routes in the process of sending to a destination.

use

Provides a count of the number of packets sent using the route.

interface

Indicates the network interface used for the route.

When the -v flag is specified, the routing table display includes the route metrics. An asterisk (*) indicates the metric is locked.


Flags

-a

Displays the state of sockets related to the Internet protocol. Includes sockets for processes such as servers that are currently listening at a socket but are otherwise inactive.

-d

Displays the number of dropped packets; for use with the -I interface or -i flags. You can also specify an interval argument (in seconds).

-f address_family

Limits reports to the specified address family. The address families that can be specified might include the following:
inet Specifies reports of the AF_INET family, if present in the kernel.
all Lists information about all address families in the system.
any Lists information about any address families in the system.

-H

Displays the current ARP table (behaves like arp -a ).

-i

Displays the state of configured interfaces. (Interfaces that are statically configured into the system but not located at system startup are not shown.)

When used with the -a flag, -i displays IP and link-level addresses associated with the interfaces.

You can use the -i flag to retrieve your system's hardware address.

-I interface

Displays information about the specified interface.

-m

Displays information about memory allocated to data structures associated with network operations.

-M

Displays Internet protocol multicast routing information. When used with the -s flag, -M displays IP multicast statistics.

-n

Displays network address in numerical format with network masks in CIDR format. When this flag is not specified, the address is displayed as host name and port number. This flag can be used with any of the display formats.

-r

Displays the host's routing tables. When used with the -s flag, -r shows the host's routing statistics instead of its routing tables.

-s

Displays statistics for each protocol.

-t

Displays timer information. Use with the -I interface or -i flag.

-v

Displays detailed output when specified with the -r flag. In this case, route metric values are displayed.

-z

Sets the network interface counters to zero. This flag must be specified with the -I interface flag. You must have system privileges to use the -z flag.

Examples

The following examples show how to use the netstat command to display information about configured interfaces and routing tables.
#1

TCPIP> netstat -i 
 
Name  Mtu   Network     Address               Ipkts Ierrs    Opkts Oerrs  Coll 
LO0   4096  <Link>      Link#1                  167     0      167     0     0 
LO0   4096  loop        LOCALHOST               167     0      167     0     0 
SE0   1500  <Link>      aa:0:4:0:6d:f8         1544     0      157     0     0 
SE0   1500  loop        RUFUS                  1544     0      157     0     0 
TN0*  1280  <Link>      Link#2                    0     0        0     0     0 
 
      

This example shows how to display the state of the configured interfaces.

#2

TCPIP> netstat -r 
Routing tables 
Destination      Gateway            Flags     Refs     Use  Interface 
 
Route Tree for Protocol Family 26: 
 
Route Tree for Protocol Family 2: 
default          sqagate            UG          0        0  SE0 
10.10.2          v72kt              U           2      125  SE0 
v72kt            v72kt              UHL         0       50  SE0 
LOCALHOST        LOCALHOST          UHL         7      117  LO0 
      

This example shows how to display the routing tables.

#3

TCPIP> netstat -rn 
Routing tables 
Destination      Gateway            Flags     Refs     Use  Interface 
 
Route Tree for Protocol Family 26: 
 
Route Tree for Protocol Family 2: 
default          10.10.2.66         UG          0        0  SE0 
10.10.2/24       10.10.2.4          U           2      109  SE0 
10.10.2.4        10.10.2.4          UHL         0       50  SE0 
127.0.0.1        127.0.0.1          UHL         7      117  LO0 
      


Previous Next Contents Index