IRIX Networking: sys_id, netif.options, NFS and OpenSSH

SGI IRIX series, part 5. Earlier parts: overview, admin commands, software installs and disks and XFS. This part covers IRIX 6.5 networking: the hostname, interface files, a default route, NFS and OpenSSH. For hung NFS mounts on a current Linux client, see Troubleshoot Stuck and Hung NFS Mounts on AlmaLinux 10.

File names and the supported configuration command come from the IRIX 6.5.30 configNetIf(1M) page. NFS and interface behavior come from the same release’s networking and NFS reference pages. This is a reference post, not a lab. I did not run these commands on IRIX hardware for this post. Keep the machine on an isolated lab network: IRIX has had no security fixes since 2013, and the stock remote-access services are telnet and the r-commands, not a modern SSH stack.

Prerequisites

  • Root access on an IRIX 6.5.x system, and a console you can still use if the network comes up wrong (console in NVRAM, part 2).
  • The interface name from hinv -c network and ifconfig -a. On many Indy and O2 systems the onboard Ethernet is ec0; Octane, Fuel and later systems often use other names such as ef0. Do not copy an interface name from a different machine.
  • A unique hostname and IPv4 address on your lab subnet, and the default gateway if you need one.
  • If you plan to install OpenSSH, local freeware or nekoware media (part 3). Do not open the machine to the internet to download it.

Hostname: /etc/sys_id and /etc/hosts

The system hostname is stored as a single name in /etc/sys_id. It must also appear in /etc/hosts with the primary address. The supported tool that keeps these in sync for the primary interface is configNetIf, which the System Manager tasks “Set Up and Start Networking” and “Turn Off Networking” call for you:

# show the current hostname
cat /etc/sys_id
hostname
uname -n

# example: configNetIf on the primary interface (-p) with a new hostname
# (see configNetIf(1M); it updates /etc/sys_id and /etc/hosts for the primary)
configNetIf -p -h myindy

If you edit the files by hand, change both, and keep the name in /etc/hosts on the same line as the primary IP. A typical hosts fragment looks like this:

# example /etc/hosts entries
127.0.0.1          localhost
192.168.10.50      myindy myindy.lab.example.com

A hostname change is not complete until you also review /etc/config/netif.options (the primary address is often $HOSTNAME) and restart networking or reboot. If you use NIS, DNS or license managers that key off the hostname, update those as well.

Interfaces: netif.options and ifconfig-*.options

configNetIf(1M) lists the files it maintains:

FileRole
/etc/sys_idThe hostname.
/etc/hostsThe local hosts database, including the primary name and address.
/etc/config/netif.optionsWhich interface is if1 (primary), if2, and so on, and where each address comes from.
/etc/config/ifconfig-*.optionsExtra ifconfig arguments for an interface, typically the netmask (and sometimes broadcast or other flags).
/etc/config/networkThe network configuration file used with the network chkconfig flag (part 2).

On a single-interface workstation, netif.options commonly names the onboard Ethernet as interface 1 and takes its address from the hostname:

# example /etc/config/netif.options (interface name MUST match hinv)
if1name=ec0
if1addr=$HOSTNAME
if2name=
if2addr=

The matching options file for interface 1 is usually /etc/config/ifconfig-1.options. Put the netmask there, in the form ifconfig expects (a dotted mask or a hex mask). Example for a 24-bit lab network:

# example /etc/config/ifconfig-1.options
netmask 255.255.255.0

After you change these files, apply them and confirm. A reboot is the cleanest test; you can also stop and start the network script. If you change the primary address, do it from the console, not over the same interface.

# example: apply and check
/etc/init.d/network stop
/etc/init.d/network start
ifconfig -a
hinv -c network
ping -c 3 127.0.0.1
chkconfig network

The network chkconfig flag must be on or the machine will stay isolated at boot (part 2). There is no NetworkManager and no nmcli.

Default route

A static default route is kept in /etc/config/static-route.options. The file is a list of route commands that the network startup runs. The usual pattern uses the $ROUTE and $QUIET variables the script already sets:

# example /etc/config/static-route.options
# replace the gateway with the router on your lab subnet
$ROUTE $QUIET add net default 192.168.10.1

Read the comments in the file on your system before you copy this blindly; site-local syntax sometimes differs. Apply it and check the table:

/etc/init.d/network start
netstat -rn
# or: route -n show
ping -c 3 192.168.10.1

Name resolution

IRIX uses /etc/resolv.conf for DNS, the same idea as Linux:

# example /etc/resolv.conf
search lab.example.com
nameserver 192.168.10.2

The host lookup order is controlled by /etc/nsswitch.conf on later 6.5 systems (and by hostresorder / IRS configuration on some setups). Keep files first while you are debugging, so a typo in DNS cannot hide a working /etc/hosts entry. chkconfig named on starts a local BIND server only if you intend this machine to serve DNS; it is not required for a client.

NFS

IRIX can be an NFS server, a client, or both. The server export list is /etc/exports. The nfs and nfsd chkconfig flags control client and server behavior (nfsd needs nfs on, as noted in part 2). Example export and apply:

# example /etc/exports -- lab subnet only, read-only tree
/disk2  -ro,access=192.168.10.0
# some sites use host lists instead of a subnet; see exports(4) on your box

exportfs -a
chkconfig nfs on
chkconfig nfsd on
/etc/init.d/nfs start
exportfs
rpcinfo -p localhost | grep nfs

On a client, mount a server export and, if it should come back at boot, add a line to /etc/fstab with type nfs (part 4 describes the six-field format):

# example one-off mount
mkdir -p /mnt/fromserver
mount server:/disk2 /mnt/fromserver

# example /etc/fstab line
server:/disk2  /mnt/fromserver  nfs  rw,bg  0  0

Enable only one of autofs or automount, never both. For a hung NFS mount on a modern AlmaLinux client talking to an old server, the Linux-side troubleshooting is in the post linked at the top of this article. On the IRIX side, check exportfs, rpcinfo, and that the client address is actually allowed in /etc/exports.

SSH and OpenSSH on IRIX

Stock IRIX 6.5 does not ship OpenSSH. Remote login is telnet, rlogin and rsh, which you should leave off on any network you do not fully trust. OpenSSH came later on the SGI freeware CDs (under /usr/freeware) and in community tardist collections such as nekoware (often under /usr/nekoware). Install from local media with inst or swmgr as in part 3, then add the freeware or nekoware bin directory to PATH.

# example: after a freeware OpenSSH install
ls /usr/freeware/bin/ssh /usr/freeware/sbin/sshd
/usr/freeware/sbin/sshd -t
# start command and chkconfig flag names vary by package; read the
# release notes that came with the tardist or freeware image.

Even with OpenSSH installed, keep the daemon bound to the lab network, use key authentication, and do not port-forward the service to the internet. An IRIX sshd built in the mid-2000s is itself unmaintained.

Verification checklist

  • cat /etc/sys_id, hostname and the primary name in /etc/hosts all match.
  • netif.options uses the interface name that hinv -c network shows, and ifconfig -a has the address and netmask you set.
  • chkconfig network is on, and a reboot still has the address.
  • If you configured a gateway, netstat -rn shows the default route and you can ping it.
  • If you export NFS, exportfs lists the directory and a lab client can mount it. If you installed OpenSSH, you can log in from a lab client without using telnet.

Troubleshooting

ProblemLikely causeFix
No Ethernet address after bootnetwork is off, wrong if1name, or a typo in /etc/hosts / sys_idchkconfig network on, fix netif.options to the name hinv shows, and edit from the console.
Interface exists but no connectivityWrong netmask, missing default route, or a cable/speed issueCheck ifconfig-1.options, static-route.options and the link lights; compare with another host on the same subnet.
Hostname reverts or does not match the addressOnly one of /etc/sys_id, /etc/hosts and if1addr was changedChange all three, or use configNetIf / System Manager so they stay consistent, then reboot.
NFS client cannot mountExport does not allow this client, nfsd is off, or RPC is blockedFix /etc/exports, run exportfs -a, chkconfig nfsd on, and check rpcinfo -p.
No ssh commandOpenSSH is not in the base OSInstall from freeware or nekoware media (part 3) and put that bin directory on PATH.
You lose the session while changing the primary IPYou were logged in over that interfaceUse the console or a serial terminal. Set nvram console first if you need serial (part 2).

AlmaLinux equivalents

  • Hostname: hostnamectl set-hostname and /etc/hosts (no /etc/sys_id).
  • Interfaces: NetworkManager key files or nmcli, not netif.options.
  • Default route: a default gateway on the connection, or ip route.
  • NFS: /etc/exports plus exportfs -a and systemctl enable --now nfs-server; clients use mount -t nfs.
  • SSH: openssh-server is in the base OS; systemctl enable --now sshd.

Next in this series

Part 6 covers the PROM monitor, booting, the miniroot and system recovery. Part 7 is a tour of the Indigo Magic desktop and the applications people usually kept these machines for.

Sources

  • IRIX 6.5.30 reference pages: configNetIf(1M), ifconfig(1M), exports(4), fstab(4), as published on man.irix.fans.
  • SGI, IRIX Admin: Networking and Mail (document 007-2860).
  • AlmaLinux and RHEL documentation for NetworkManager, NFS and OpenSSH.

Leave a Reply

Your email address will not be published. Required fields are marked *