hp.com home products and services support and drivers solutions how to buy
cd-rom home
End of Jump to page title
HP OpenVMS systems
documentation

Jump to content


HP TCP/IP Services for OpenVMS

HP TCP/IP Services for OpenVMS
Tuning and Troubleshooting


Previous Contents Index

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.

[-]fail

Controls the specified interface. You can force the interface to fail by specifying fail and to recover by specifying -fail .

[-]home

Forces an alias address to be created with a home interface. This option is useful when you are creating an IP address. By default, all primary IP addresses are created with a home interface.

[-]fs

Creates an IP address that is not managed by failSAFE IP. By default, if the failSAFE IP services is running, all IP addresses are created as failSAFE IP addresses except for those addresses assigned to the loopback interface (LO0) (for example, the localhost address 127.0.0.1.

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 [-abd"H"im"M"nrstv] [-f address_family] [interval]


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


netstat [-i] [-p protocol]

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.

-b

Displays the contents of the Mobile IPv6 binding cache. When used with the -s option, it displays binding cache statistics.

For more information about using netstat with IPv6, refer to the HP TCP/IP Services for OpenVMS Guide to IPv6.

-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.
inet6 Specifies reports of the AF_INET6 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 .)

Use quotation marks to preserve the case of this option.

-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.

You can use the -p flag to specify a protocol for which to display statistics.

"-I" interface

Displays information about the specified interface. Use quotation marks to preserve the case of this option.

-p protocol

Displays statistics for the specified protocol. Use the -i flag with the -p flag.

-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. Use quotation marks to preserve the case of this option.

-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 
      

This example shows how to display the routing tables with network addresses.


nslookup

Queries Internet name servers interactively.


Format

nslookup [-option ...] [host_to_find | - [server] ]

description

The nslookup command is a program that is used to query Internet domain name servers. The nslookup command has two modes: noninteractive and interactive.

Note

The nslookup utility is deprecated. HP recommends that you use the dig utility instead. For information about the dig utility, see the HP TCP/IP Services for OpenVMS Management guide.

Noninteractive mode

Noninteractive mode is used to display just the name and requested information for a host or domain. Noninteractive mode is invoked when the name or Internet address of the host to be looked up is given as the first argument. The optional second argument specifies the host name or address of a name server.

Interactive mode

Interactive mode allows the user to query name servers for information about various hosts and domains or to display a list of hosts in a domain. Interactive mode is invoked when you specify nslookup without arguments (the default name server will be used), or when the first argument you specify is a hyphen (-) and the second argument is the host name or IP address of a name server.

The options listed under the set command can be specified in the .nslookuprc file in the user's home directory if they are listed one per line. Options can also be specified on the command line if they precede the arguments and are prefixed with a hyphen (-). For example, to change the default query type to host information, and the initial time out to 10 seconds, enter the following command:


$ nslookup -query=hinfo  -timeout=10 

Interactive commands

Commands can be interrupted at any time by pressing Ctrl/C. To exit, press Ctrl/D (EOF) or type exit . The command line length must be less than 256 characters. To treat a built-in command as a host name, prefix it with an escape character (^) plus a backslash (\). Note that an unrecognized command will be interpreted as a host name.


Commands

host [server]

Looks up information for the host using either the current default server or the specified server. If host is an IP address and the query type is A or PTR, the name of the host is returned. If host is a name and does not have a trailing period, the default domain name is appended to the name. (This behavior depends on the state of the set options domain , srchlist , defname , and search .) To look up a host not in the current domain, append a dot (.) to the end of the domain name.

server domain
lserver domain

Changes the default server to domain . The lserver command uses the initial server to look up information about domain , while the server command uses the current default server. If an authoritative answer cannot be found, the names of servers that might have the answer are returned.

root

Changes the default server to the server for the root of the domain name space. Currently, the host ns.internic.net is used. (This command is a synonym for lserver ns.internic.net. ) The name of the root server can be changed with the set root command.

finger [name] [> filename]
finger [name] [>> filename]

Connects with the finger server on the current host. The current host is defined when a previous lookup for a host was successful and returned address information (see the set querytype=A command). The redirection symbols (> and >>) can be used to redirect output in the usual manner.

ls [option] domain [> filename]
ls [option] domain [>> filename]

Lists the information available for domain, optionally creating or appending to filename. The default output contains host names and their IP addresses. The value for option can be one of the following:
Option Description
-t querytype Lists all records of the specified type. (See querytype in Table A-2.)
-a Lists aliases of hosts in the domain. This option is a synonym for -t CNAME .
-d Lists all records for the domain. This option is a synonym for -t ANY .
-h Lists CPU and operating system information for the domain. This option is a synonym for -t HINFO .
-s Lists well-known services of hosts in the domain. This option is a synonym for -t WKS . When output is directed to a file, a pound sign (#) is displayed for every 50 records received from the server.

view filename

Sorts and lists the output of previous ls commands.

help

Displays a brief summary of commands.

exit

Exits the program.

set keyword [=value]

Use the command to change state information that affects the lookups. Table A-2 lists the valid keywords.

Table A-2 Options to the nslookup set Command
Keyword Function
ALL Displays the current values of the options you can set as well as information about the current default server. For example:
> set all

class= value Changes the query class to one of the following:
  • IN --- The internet class (default)
  • CHAOS --- The chaos class
  • ANY --- Wildcard


The class specifies the protocol group of the information. You abbreviate this keyword to cl .

This command tells nslookup to resolve both in and chaos class queries (you can enter in and chaos ):
> set class=ANY

querytype Specifies the type of information you want. For example:
> set querytype=A

> set querytype=ANY

Valid types are:
SOA Start of authority. Marks the beginning of a zone's data and defines parameters that affect the entire zone.
NS Name server. Identifies a domain's name server.
A Address. Maps a host name to an address.
ANY Defines all available resource records for a given name.
PTR Pointer. Maps an address to a host name.
MX Identifies where to deliver mail for a given domain.
CNAME Defines an alias host name.
HINFO Host information. Describes a host's hardware and operating system.
WKS Well-known service. Advertises network services.

[no]debug Turns on debugging (default is nodebug ). nslookup displays detailed information about the packet sent to the server and the answer. For example:
> set debug

You can use the abbreviations nodeb and deb .

[no]d2 Returns all-inclusive debugging information (default is nod2 ). Displays all the fields of every packet. For example:
> set d2

recurse Tells the BIND server to contact other servers if it does not have the information you want. The servers carry out a complete (recursive) resolution for each query. For example:
> set recurse

retry Number of times that nslookup attempts to contact a BIND server if repeated tries fail. For example:
> set retry=8

timeout Length of time to wait for a reply from each attempt. For example:
> set timeout=9

root= value Changes the root server. For example, the following command changes the root server to ns.nasa.gov .
> set root=ns.nasa.gov

ignoretc Tells nslookup to ignore packet truncation errors. For example:
> set ignoretc

domain name Changes the default domain to the domain you specify.

The settings of the defname and search options control how the default domain name is appended to lookup requests. The domain search list contains the parents of the default domain if the default domain has at least two components in its name.

The default value is set in the TCP/IP configuration database. To specify the default, type the abbreviation do .

For example, if the default domain is CC.Berkeley.EDU , the search list is CC.Berkeley.EDU and Berkeley.EDU.
srchlist If set, nslookup appends each of the domain names specified in the srchlist option to an unqualified host name and performs a query until an answer is received.
srchlist= names Changes the default domain name to the first name you specify, and changes the domain search list to all the names you specify. Specify a maximum of six names separated by slashes (/).

In the following example, the command sets the default domain to lcs.MIT.EDU and changes the search list to the three specified domains. The command overrides the default domain name and associated search list for the set domain command.
> set srchlist=lcs.MIT.EDU/ai.MIT.EDU/MIT.EDU



The default is the domain name specified in the TCP/IP configuration database. The abbreviated form of the command is srchl .
[no]defname Tells nslookup to append a default domain name to a lookup request if the specified DNS name is not fully qualified. 1 The abbreviated form is [no]def .

For example, an nslookup query for the host rainy becomes rainy.cc.berkeley.edu .
[no]search Tells nslookup to append the search list domain names to the lookup request domain name if the lookup request domain name is not fully qualified. 1 The default is search . The abbreviated form is [no]sea .


1A fully qualified domain name is a name that ends with a dot (.), as in host.domain.


Examples

The following example shows how to use nslookup interactively.
#1

$ nslookup 
Default Server:  condor.lgk.dec.com       
Address:  16.99.208.53 
 
> set all                                 
Default Server:  condor.lgk.dec.com 
Address:  16.99.208.53 
 
Set options:                            
  nodebug             defname         search          recurse  
  nod2                novc            noignoretc      port=53  
  querytype=A         class=IN        timeout=4       retry=4 
  root=a.root-servers.net. 
  domain=xyz.prq.dec.com                 
  srchlist=xyz.prq.dec.com               
      


Previous Next Contents Index