Unit 2. Configuring TCP/IP

What This Unit Is About

This unit covers the configuration of TCP/IP. It describes the files that are used by TCP/IP and the commands that can be used to gather information about your configuration.

What You Should Be Able To Do

After completing this unit, students should be able to • Configure TCP/IP • Test and review TCP/IP configuration with selected AlX and TCP/IP commands. • Start and stop TCP/IP services • Login to a remote system • Transfer files to/from a remote system

How You Will Check Your Progress

Accountability: • Checkpoint questions • Exercises Objectives

After completing this unit, students should be able to:

• Configure TCP/IP • Test and review TCP/IP configuration with selected AlX and TCP/IP commands • Start and stop TCP/IP services • Login to a remote system • Transfer files to/from a remote system

Figure 2-1. Objectives

Notes: Instructor Notes:

Purpose — Review the objectives for this unit.

Details — In this unit the emphasis is on configuring TCP/IP on the RISC System/6000. Students will be shown how to use SMIT to configure it and then the files and commands that are used by SMIT. Students will also be introduced to several commands that can be used to test the configuration along with telnet and ftp so during the exercises they get a chance to see it all working.

Transition Statement — Let's begin our discussion by looking at the software support that comes with AlX Version 4/5. TCP/IP Software Support

 Base operating system must be installed  bos.net is the network package which will install -Asynchronous Terminal Emulator (bos.net.ate) -PPP (bos.net.ppp) -CacheFS (bos.net.nfs.cachefs) -IP Security (bos.net.ipsec.rte) -NCS (bos.net.ncs) -NFS Client (bos.net.nfs.client) -NFS Development Toolkit (bos.net.nfs.adt) -NFS Server (bos.net.nfs.server) -NIS Client (bos.net.nis.client) -NIS Server (bos.net.nis.server) -TCP/IP Application Toolkit (bos.net.tcp.adt) -TCP/IP Client Support (bos.net.tcp.client) -TCP/IP Server (bos.net.tcp.server) -TCP/IP SMIT Support (bos.net.tcp.smit) -UUCP(bos.net.uucp)

Figure 2-2. TCP/IP Software Support

Notes:

In AlX Version 4/5 the TCP/IP network utilities are broken up into their component parts (such as NFS, NIS) and further divided into client and server pieces. This was done to provide only the code needed to perform specific functions. If a system will never be a server then the server code is simply taking up valuable disk space that could be used for data or applications. To install the appropriate filesets use SMIT Software Installation and Maintenance select Install and Update Software and then Install and Update from LATEST Available Software. Instructor Notes:

Purpose — Describe what software needs to be installed to support TCP/IP.

Details — For the purposes of this course the students will be working with all the network software except for UUCP, ate, CacheFS, IP Security, NCS and the NFS and TCP/IP Tool Kits. For the exercises all the software should already be installed. However, the students need to know what filesets are needed in order to support TCP/IP at their sites.

Additional Information — To see what is already installed on a system, use the following command: $ Islpp -I (for a complete listing) $ Islpp -I | grep bos.net (to list all the network related filesets)

Transition Statement — Let's look at an overview of the customization steps for TCP/IP. TCP/IP Customization Steps

• Define/configure adapters • Define/configure network interfaces • Set the hostid and hostname • Define name resolution information • Define routing information • Enable server services (daemons) •To do this: -Use SMIT fast path smit tcpip (ODM database is used) or

-Configure by editing text files and shell scripts (ODM not used)

Figure 2-3. TCP/IP Customization Steps

Notes: Instructor Notes:

Purpose — Provide a summary of the steps involved in customizing TCP/IP.

Details — This foil is placed here to provide a quick overview of TCP/IP customization steps. Each item will be discussed further so be careful not to go into detail on any of them yet. Routing will be covered in two completely separate units. The one item to emphasize is the fact that either SMIT or editing of text files can be used, but they shouldn't be mixed. In addition, you may want to point out that AlX supports the traditional BSD style of configuration. We will be showing students how to use SMIT and the various files and commands that are accessed by SMIT. Once they are comfortable with the files and commands, they should be prepared to either configure via SMIT or via BSD style configuration. SMIT is the preferred method because it updates the configuration database (ODM) and all the key steps can be done by filling out one screen, the TCP/IP Minimum Configuration and Startup screen.

Transition Statement — Let's start at the top of the list, define adapters, and work our way down. Configuring Adapters

Most adapters will be automatically detected and defined during system startup.

Use the SMIT "Devices" menu, "Communications" submenu for:

Ethernet (check connector) Token-Ring (check speed) X.25 Adapter Serial Optical Link FDDI Adapter ATM Block Multiplexor Channel Adapter

Figure 2-4. Configuring Adapters

Notes:

Install the adapters and cabling for your network. Adapter cards in a RISC System/6000 are automatically detected and configured during system startup, so normally you would only need to change adapter characteristics if the defaults are not appropriate. Use the SMIT fast path smit commodev) menus (or the chdev command) if you need to change the default attributes.

For example, the Ethernet Adapter has two connectors; a bnc (coaxial) connector or a dix (15-pin D-shell connector). The default will be bnc, unless you have the integrated Ethernet adapter, so you may need to change this.

Also, the Token Ring Adapter can run at two speeds; either 4 or 16 Mbps. The default is 4 on the classical RISC System/6000. On PCI based systems the speed is set on the adapter card when configuring the card.

WARNING: If your network is running at 16 Mbps, you should remember to change the speed to 16 before starting the network interface, otherwise you could bring down your network. Networks

• Each network adapter has an associated network interface • AlX Version 4/5 supported interfaces are:

Adapter Interface Description Prefix Prefix ent en Ethernet et IEEE 802.3 tok tr Token-Ring sx25a xs X.25 tty Si Serial Line Internet Protocol (SLIP) tty PP Point-to-Point Protocol (PPP) ops So Serial Optical Channel Converter cat Ca Block Channel Multiplexor atm At Asynchronous Transfer Mode fddi Fi FDDI -- Lo Loopback CSS CSS SP Switch diva PP ISDN fc Fibre Channel

Figure 2-5. Network Interface

Notes:

When each adapter/port is added, a logical device is created in the ODM such as: • Ethernet adapters are ent0, entl etc. • Token-Ring adapters are tok0, tokl, etc.

A corresponding network interface in the kernel will allow TCP/IP to use an adapter. For auto- detectable adapters, such as Token-Ring and Ethernet, the network interface is created at the same time as the adapter device. For manually-added devices, the network interface must be manually created.

The loopback is a special interface which is defined so that a host can send messages to itself for diagnostic purposes. Data sent to this interface will never appear on a network, it will just be sent back up through the software layers.

Network interfaces are represented by logical devices. They are given the interface device names shown in the chart.

TCP/IP support in AlX is provided by a kernel extension called inet0. A kernel extension is a separate entity from the kernel but runs in the kernel address space. Inet0 provides the IP,TCP,UDP functions. Configuration information for inet0 is stored in the ODM. The standard device management commands (chdev, etc) can be used to set the attributes of inetO, and this can also be done through the SMIT TCP/IP menus.

Because the information is defined in the ODM, it is preserved after a system reboot. The traditional UNIX approach is to run a series of commands when the system boots up to set the information. This can also be done in AlX. Ethernet Network Interface

• Standard Ethernet Version 2 (en0) DA SA TYPE DATA

SA=Source Address DA=Destination Address TYPE=TCP/IP, DECnet, XNS

• IEEE 802.3 (et0)

DA SA LENGTH DATA

Figure 2-6. Ethernet Network Interface

Notes:

The Ethernet adapters on the RISC System/6000 can be configured to support either Ethernet Version 2 or IEEE802.3 network interface driver software. The difference between the two lies in the header information.

The Ethernet V2 type field defines the higher-layer protocol that is used within the data field. It is a two-byte field that is administered by Xerox. Type examples might be 0800 hex for the IP of TCP/IP, 0600 hex for XNS, and 6003 hex for DECnet.

The IEEE 802.3 length field is the length of the data field that follows. With IEEE 802.3, the designation of the higher-level protocol is done by the 802.2 Logical Link Control.

Because of this difference either a network is configured as IEEE 802.3 or Ethernet Version 2. A workstation configured as Ethernet Version 2 cannot communicate with one configured as IEEE 802.3 and vice versa. Defining and Configuring Network Interfaces

• Most interfaces will already be defined during automatic system configuration • Use SMIT "Minimum Configuration & Startup" dialog to configure the first interface • Use SMIT "Network Interfaces" menu to "Further Configuration" to change interfaces or add additional interfaces • To manually configure interfaces, use ifconfig

Figure 2-7. Defining and Configuring Network Interfaces

Notes:

Some interfaces are defined automatically during system configuration.

When you run the SMIT Minimum Configuration & Startup dialog you are asked to select a defined interface. When you run the dialog, that interface is brought up.

Use the SMIT Network Interfaces menu to define new interfaces or change the characteristics of existing interfaces.

The mkdev/chdev commands can be used to update the information in the ODM that describes network interfaces. Changes made will take effect immediately and will be permanent.

The ifconfig command can be used to configure an interface. We will cover this in more detail further on. Minimum Configuration & Startup # smit mktcpip

Minimum Configuration & Startup

To delete existing configuration data, please use further Configuration menus

Type or select values in entry fields Press Enter AFTER making all desired changes.

[Entry Fields] * HOSTNAME [ ] * Internet ADDRESS (dotted decimal) [ ] Network MASK (dotted decimal) [ ] * Network INTERFACE en0 NAMESERVER Internet ADDRESS (dotted decimal) [ ] DOMAIN Name [ ] Default Gateway Address [ ] (dotted decimal or symbolic name) Your CABLE Type + bnc START TCP/! P daemons Now no + Fl=Help F5=Reset F2=Refresh F3=Cancel F4=List F9=Shell F6=Comand F7=Edit F8=lmage F10=Exit Enter=Do

Figure 2-8. Minimum Configuration & Startup

Notes:

The screen before this one is a selector screen to choose the appropriate interface. If trO was available and selected, one line on the SMIT screen would be different. The line that shows "Your CABLE Type" would read "Ring speed". The choices would be 4 or 16 megabytes.

Configuring TCP/IP on a system with one network adapter is as easy as filling out this SMIT menu. The steps on the following pages will show the manual steps of TCP/IP configuration. Keep in mind that SMIT is doing all these steps for you behind the scenes.

If your system has more than one network adapter card, the TCP/IP Further Configuration SMIT menu would be used to configure those cards.

The minimum information that is required to start TCP/IP is the hostname, one interface and the internet address. If subnetting is used then the subnet mask should be specified. Notice that with this one screen all six TCP/IP customization steps can be accomplished. Instructor Notes:

Purpose — Show how simple TCP/IP configuration is when using SMIT.

Details — Explain that configuring TCP/IP on the RISC System/6000 is as easy as filling out this menu. Further explain that we will go through the command line method of configuration so the students understand exactly what SMIT is doing for them behind the scenes. If they are going to install TCP/IP in an open environment, the steps as listed in the lecture can apply to most other systems that do not have a systems management interface tool.

Later in the lecture and in the routing lecture, it will be mentioned that some systems will have more than one network adapter connecting the system to more than one network. This is done in the case of routers. The Minimum Configuration menu can be used for the first adapter card configured, but the Further Configuration menu would be used to configure all other adapter cards in the system. There is not a view of the Further Configuration menu. They will have a chance to see it during lab.

You may want to come back to this foil after covering ifconfig, hostname, and /etc/hosts to show all that this menu does to configure TCP/IP. Keep this page handy.

Additional Information — Further configuration should be used for anything else other than a basic configuration to get the system functional on the network. The logic goes as follows: 1) Everything that Minimum Configuration does can be done by Further Configuration. You are not required to use the minimum configuration screen at all. It does, though, provide a handy shortcut for getting the system up on the network quickly; 2) Further Configuration must be used to configure additional adapters. Only one adapter should be configured using minimum configuration.

Default AlX-style configuration uses the data in the ODM database and uses the file /etc/rc.net to define, load, and configure a corresponding interface.

For those who are familiar with other UNIXes, BSD-style configuration uses the traditional ifconfig command and the file /etc/rc.bsdnet to configure the corresponding interface.

To change from AlX to BSD style, use smit setbootup_option.

By selecting BSD, the system will update the ODM database, /etc/objrepos/Config_Rules, to have the cfgmgr execute /etc/rc.bsdnet at startup instead of /etc/rc.net.

With BSD-style configuration for TCP/IP, it means no SRC support and no ODM support. Do one way only, either all BSD or all SMIT. A combination can get you in trouble.

After making this change you will need to: • Run the ifconfig command to configure the interfaces. • Run the hostname command to set the hostname and hostid command to set the host ID or IP address • Update the /etc/rc.bsdnet file to include all appropriate ifconfig, hostname and hostid statement so the network can be configured properly at the next system reboot. Also included in the file should be any routing commands. (Routing wil be covered in a later unit.) • Edit /etc/hosts to include the names of all the hosts to which you wish to communicate. • Uncomment any daemons in the /etc/rc.tcpip script and run it to start up TCP/IP services. • Uncomment any subservers in /etc/inetd.conf and run the command refresh -s inetd or kill-1 < PID of inetd >. /etc/rc.bsdnet

A = This is where you are setting your system host name. B=This section is where you configure all the network interfaces in your machine. You can replace hostname with your network interface name, which the system resolves to an IP address based on /etc/hosts, or enter the IP address for the adapter. This may be the same name as used in A if there is only one network interface. If there is more than one, the names should be unique for each interface. It is recommended to use the IP address for each interface to avoid name resolution problems.

C = This section is where you will configure all your routing.

D = Replace hostname with your host name as entered in A. This section executes the hostid command and uname command.

If you have selected to use the default AlX-style configuration, the system will be using ODM and /etc/rc.net to configure TCP/IP. normally you will not need to edit /etc/rc.net You will never use /etc/rc.bsdnet if you use the default AlX-style configuration.

Transition Statement — Let's take a look at the command that can be used for configuring an interface or check or change configuration once an interface is configured. ifconfig Command

# ifconfig en0 inet 9.19.98.1 netmask 255.255.255.0 up A B C D E A: interface => en, et, tr, xs, si, lo, op, ca B: address family => inet, xns C: address => Ip address for adapter or hostname D: parameter + value metric number mtu value network mask

E: parameters alias delete debug allcast detach -debug

-allcast down up

d hwloop arp -arp -hwloop

Figure 2-9. ifconfig Command

Notes:

The ifconfig command configures or displays network interface parameters for a network.

If a machine has more than one adapter card that will be used for TCP/IP, like the router, then the ifconfig command needs to be executed for each adapter.

The 0x in the netmask indicates a hex value.

Xerox Network Systems, xns, is a transport protocol that was developed by Xerox, and AlX allows the RISC System/6000 to participate in that environment.

To display, simply enter ifconfig. While any user can query the status of a network interface using ifconfig, only a user who has root authority can modify the configuration of the interface.

The D parameters require a value. The E parameters do not.

I Instructor Notes:

Purpose — Explain the ifconfig command.

Details — The ifconfig command is the TCP/IP standard way of configuring and displaying information of network adapter cards for LANs.

Explain the ifconfig command parameters shown in the example. For the other parameter values under D, explain a couple of the more frequently-used ones like delete, detach, down and up. Caution students about playing with the mtu parameter. The ifconfig command in the following format DOES NOT display the mtu value, it sets it to 0.

ifconfig trO mtu

Following are some of the parameter values and their use: alias Establishes an additional network address for the interface. When changing network numbers, this is useful for accepting packets addressed to the old interface. allcast Sets the Token-Ring interface to broadcast to all rings on the network. -allcast Confines the Token-Ring interface to broadcast only to the local ring. arp Enables the ifconfig command to use the Address Resolution Protocol in mapping between network-level addresses and link-level addresses. This flag is in effect by default. -arp Disables the use of the Address Resolution Protocol. debug Enables driver-dependent debug code. -debug Disables driver-dependent debug code. delete Removes the specified network address. This is used when an alias is incorrectly specified or when it is no longer needed. detach Removes an interface from the network interface list. If the last interface is detached, the network interface driver code is unloaded. down Marks an interface as inactive (down), which keeps the system from trying to transmit messages through that interface. If possible, the ifconfig command also resets the interface to disable reception of messages. Routes that use the interface, however, are not automatically disabled. hwloop Enables hardware loopback. The hardware loopback specifies that locally- addressed packets handled by an interface should be sent out using the associated adapter. -hwloop Disables hardware loopback. The hardware loopback specifies that locally- addressed packets handled by an interface should be sent out using the associated adaptor. metric Number Sets the routing metric of the interface to the value specified by the Number variable. The default is 0 (zero). The routing metric is used by the routing protocol (the routed daemon). Higher metrics have the effect of making a route less favorable. Metrics are counted as addition hops to the destination network or host. mtu Value Sets the maximum IP packet size for this system. The Value variable can be any number from 60 through 4096, depending on the network interface. See "Automatic Configuration of Network Interfaces" in AlX Version 4/5.3 System Management Guide: Communications and Networks for maximum transmission unit (MTU) values by interface. netmask Mask Specifies how much of the address to reserve for subdividing networks into subnetworks. This parameter can be used only with an address family of inet. 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 Ox, in standard Internet dotted decimal notation, or beginning with a name or alias that is listed in the /etc/networks file. up Marks an interface as active (up). This parameter is used automatically when setting the first address for an interface. It can also be used to enable an interface after an ifconfig down command.

Additional Information — The ifconfig command is very useful in seeing the values and status of an interface. For example: enl: flags=e080863 inet 10.1.1.3 netmask OxffffffOO broadcast 10.1.1.255

Flags from ifconfig output: ALLCAST The token ring interface broadcasts to all rings on the network. BROADCAST The adapter supports broadcast messages. MULTICAST The adapter supports multicast messages. DEBUG Adapter-dependent debug is enabled. SIMPLEX The adapter will not receive its own broadcast. HWLOOP The adaptor supports hardware loopback (IP normally does the loopback) NOARP The interface does not do ARP translation. NOECHO The adapter associated with the interface does not do local echo. NOTRAILERS The interface does not append trailers to frames RUNNING The interface is up and running. UP The interface is up. It must also be running to be usable.

Transition Statement — The next step is to set the host ID and hostname. Host Name

Used by some applications to identify or authenticate your system • Hostname set when TCP/IP is configured using SMIT by running the hostname command

To display the hostname: # hostname aixserv

To change the hostname until next system reboot: # hostname sys1 # hostname sys1

Use SMIT for permanent change

Figure 2-10. Host name and Host ID

Notes:

The hostname is used by applications to find out the name of your system for authentication purposes and to obtain your internet address.

The hostname can be displayed using the command: hostname

The hostname is stored in the inet0 kernel extension. To change this permanently use SMIT or: chdev -I inet0 -a hostname = hostname. /etc/hosts

# The format of the file is: # Internet Address Hostname # comments # Items are separated by any number of blanks an tabls. A "#" # Indicates the beginning of a comment; characters up to the # end of the line are interpreted by routines which search # this file. Blank lines are allowed.

# Internet Address Hostname # Comments 127.0.0.1 loopback localhost 192.9.200.1 hostl timeserver 192.9.200.2 host2 192.9.200.3 host3 192.9.200.4 host4 # router

Figure 2-11. /etc/hosts

Notes:

Host names (symbolic network interface names) and their IP addresses are associated with each other by entries in the /etc/hosts file.

Entries should be included in /etc/hosts for (1) loopback, (2) the local machine, and (3) any other hosts known to the system. Typically, /etc/hosts is kept consistent among all machines.

Aliases can be created in this file by entering them after the host name. Each alias is separated by a space. Aliases cannot exceed 255 characters and each entry must be contained on one line:

When you add the local machine via Minimum Configuration and Startup, the system will automatically update /etc/hosts with the local machine entry. To add the other hosts: #smit mkhostent

'INTERNET ADDRESS (dotted decimal) [ ] *HOST NAME ALIAS(ES) (if any - separated by blank space) COMMENT (if any - for the host entry) [ ]

This method of name resolution is called flat name resolution. Networks that use /etc/hosts for doing name resolution are called flat networks. Starting Daemons

The /etc/rctcpip file run at system startup can start the following TCP/IP daemons:

- syslogd Logs error messages - portmap Port lookup facility - inetd Super daemon - named Domain nameserver - Ipd Print server - routed or gated Dynamic routing - sendmail Mail - timed, xntpd Time daemons - rwhod Remote uptime and users - snmpd, dpid2 SNMP daemons - dhcpcd, dhcprd, dhcpsd DHCP daemons - autoconf6, ndpd-host IPv6 daemons - mrouted Multicast routing

Figure 2-12. Starting Daemons

Notes:

/etc/rctcpip assumes interfaces are brought up by /etc/rc.net or /etc/rc.bsdnet. shell This script starts the TCP/IP daemons.

All these daemons can be started or stopped using the subsystem commands of the system resource controller. They are stopsrc, startsrc or refresh.

System Resource Controller (SRC) is a tool designed to aid a system administrator in controlling daemons. It allows you to start, stop, trace, list, and refresh daemons. It also gives you the ability to group them.

SMIT provides a way to start up some of the daemons listed above through the fastpath smit otherserv. Select the daemons you want to start. When you select a daemon, SMIT gives you the choice to start the daemon now, at next system restart, or both. When you select at next system restart or both, the system uncomments the appropriate line in /etc/rctcpip.

The syslogd, portmap, inetd, Ipd, and sendmail daemons are started automatically. The others must be uncommented. /etc/inetd.conf

## Internet server configuration database ## ftp stream tcp6 nowait root /usr/sbin/ftpd ftpd telnet stream tcp6 nowait root /usr/sbin/telnetd telnetd shell stream tcp6 nowait root /usr/sbin/rshd rshd login stream tcp6 nowait root /usr/sbin/rlogind rlogind exec stream tcp6 nowait root /usr/sbin/rexecd rexecd #comsat dgram udp wait root /usr/sbin/comsat comsat #uucp stream tcp nowait root /usr/sbin/uucpd uucpd #bootps dgram udp wait root /usr/sbin/bootpd bootpd /etc/bootptab ## ## Finger, systat and netstat give out user information which may be ## valuable to potential "system crackers." Many sites choose to disable ## some or all of these services to improve security. ## #finger stream tcp nowait nobody /usr/sbin/fingerd fingerd #systat stream tcp nowait nobody /usr/bin/ps ps -ef #netstat stream tcp nowait nobody /usr/bin/netstat netstat -f inet ##tftp dgram udp6 wait nobody /usr/sbin/tftpd tftpd -n #talk dgram udp wait root /usr/sbin/talkd talkd ntalk dgram udp wait root /usr/sbin/talkd talkd

Figure 2-13. /etc/inetd.conf

Notes:

This is not a listing of the complete file.

The inetd daemon is started at boot time from /etc/rc.tcpip. When it is started, inetd reads its configuration from the /etc/inetd.conf file. This file contains the names of the services that inetd listens for requests and starts as needed to handle these requests.

The inetd daemon reads /etc/inetd.conf only when its starts, receives a SIGHUP signal, or when the SRC command refresh -s inetd is executed.

You can add or delete services by editing the /etc/inetd.conf file.

If you edit it directly you need to execute the refresh -s inetd command or find the process id for inetd and run kill -1 .

Socket Type: stream is for TCP and dgram is for UDP.

Wait/Nowait: wait is for dgram and nowait is for stream. It determines whether the inetd daemon waits for a datagram server to release the socket before continuing to listen at the socket.

I r TCP/IP Startup Flow

Figure 2-14. TCP/IP Startup Flow

Notes:

When the system starts up, it reads out of the ODM whether to use rc.net (AlX default network configuration file) or rc.bsdnet (BSD-style network configuration file) to initialize the network interfaces and set up routing.

An entry in the /etc/intitab file is made at installation time to execute the /etc/rc.tcpip shell script at system startup. The various uncommented daemons are started. The system is now ready to accept communication requests from various applications.

"Daemons that are started automatically. Others must be uncommented. netstat Command

Purpose: Shows network status

Example: # netstat -i

Output:

Name Mtu Network Address lpkts lerrs Opkts Oerrs coll lo0 16896 link#1 105 0 107 0 0 lo0 16896 127 iocalhost 105 0 107 0 0 lo0 16896 ::1 105 0 107 0 0 en1 1500 link#2 2.60.8c.2f.b5.a5. 8243 0 5976 0 0 en1 1500 9.19.98 sysl .ibm.com 8243 0 5976 0 0

Figure 2-15. netstat Command

Notes:

The netstat command is used to display active sockets for each protocol, routing table information, or contents of a network data structure.

The -i option shows the state of configured interfaces. This display format provides a table of cumulative statistics for: errors, collisions, and packets transferred. It provides the interface name, number, and address as well as the maximum transmission units (MTUs).

The address field of the first entry for each interface provides the hardware address of the adapter. ping Command

Purpose: Indicates if a remote host can be reached

Example: # ping 9.19.98.1

Output:

PING (9.19.98.1): 56 data bytes 64 bytes from 9.19.98.1: icmp_seq=0 ttl=255 time=2 ms 64 bytes from 9.19.98.1: icmp_seq=1 ttl=255 time=2 ms 64 bytes from 9.19.98.1: icmp_seq=2 tti=255 time=2 ms

— 9.19.98.1 ping statistics — 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max = 2/2/2 ms

Figure 2-16. ping Command

Notes:

The ping command sends an ICMP ECHO_REQUEST to obtain an ICMP ECHO_RESPONSE from a host or router. If the host is operational and on the network, it responds to the echo.

The default is to continuously send echo requests until an interrupt is received with , but there is an option (-c) to specify the number of packets sent. The ping command sends one datagram per second and prints one line of output for every response received. It calculates round trip times and packet loss statistics, and displays a brief summary upon completion.

Because of the load continuous echo requests can place on the system, repeated requests should be used primarily for problem isolation.

The ping command is useful for: • Determining status of networks and hosts • Tracking and isolating hardware and software problems • Testing, measuring, and managing networks host Command

Purpose: Resolves a host name into an Internet address or vice versa

Example: # host sys3 or # host 9.19.98.3

Output: sys3 is 9.19.98.3

Figure 2-17. host Command

Notes:

The host command returns a host name and IP address.

The host command searches through the /etc/hosts file and finds the first match of the parameter specified with the command. If any aliases are associated with the parameter, they too will be displayed.

When using the host command to verify name and address resolution, be sure that host and host return consistent information. arp

Purpose: Display and modify address resolution

Example: # arp -a

Output:

sys2 (9.19.98.2) at 2:60:8c:2b:34:5 [ethernet] sys8 (9.19.98.8) at 2:60:8b:2e:65:94 [ethernet] sys2x (9.19.98.21) at 2:60:8a:2b:42:5 [ethernet] permanent

Figure 2-18. arp

Notes:

Dynamic entries are added during the course of normal IP traffic on a physical network. Infrequently used mappings added in this fashion have a short lifetime in the ARP table. After 20 minutes (by default) without reference to the entry, it is then purged from the table. Entries that are never answered are purged from the table after 3 minutes.

Permanent entries are loaded into the ARP table once at boot time and are useful if a host must communicate with a node that cannot respond to an ARP request during some part of its startup procedure (e.g., Xstation, diskless). Instructor Notes:

Purpose — Discuss the output of the arp command.

Details — The arp table shows the names, IP addresses, and physical addresses of systems that have been recently contacted. This is the internet-to-adapter address translation table used by the Address Resolution Protocol (ARP).

-a displays all the current ARP entries.

-d will delete any entry. You must have root authority to execute arp. It may be necessary to delete entries. For example, when a system's Ethernet card is changed because it went bad, the ARP table's physical address no longer agrees. If it hasn't been 20 minutes since trying to access the system it may not have been purged for you.

-n suppress name resolution in the arp cache.

For entries like Xstation and diskless, a permanent entry is listed because these systems can't respond to an ARP request at certain times during system startup.

The default timeout for an entry in the arp cache can be changed using the no command.

Transition Statement — Now you have the system communicating, let's use an application or two. Unit Summary

• Only one SMIT screen is required to configure TCP/IP -Minimum Configuration and Startup • Several files are used by TCP/IP - /etc/rc.net, /etc/rc.tcpip, /etc/services, /etc/inetd.conf, /etc/hosts • ifconfig, hostname, ping, netstat, arp, and host are commands used in configuring or testing TCP/IP • TCP/IP services can be controlled using the System Resource Manager commands • telnet can be used to login to a remote system • ftp can be used to transfer files to/from a remote system

Figure 2-23. Unit Summary