Table of ContentsView in Frames

Sample /etc/rc file

The sample /etc/rc file shows default startup commands.

The following sample shows startup commands that are used in the /etc/rc file on the root volume:
#Auto-generated /etc/rc Tue May 30 14:51:36 PST 2000
hostname toaster 
ifconfig e0 'hostname'-0
ifconfig e1 'hostname'-1
ifconfig f0 'hostname'-f0
ifconfig a5 'hostname'-a5
route add default MyRouterBox
routed on
savecore

The following table explains the components of the sample /etc/rc file:

Description Explanation
hostname toaster Sets the storage system host name to "toaster".

ifconfig e0 'hostname'-0

ifconfig e1 'hostname'-1

ifconfig f0 'hostname'-f0

ifconfig a5 'hostname'-a5

Sets the IP addresses for the storage system network interfaces with a default network mask.

The arguments in single backquotes expand to "toaster" if you specify "toaster" as the host name during setup. The actual IP addresses are obtained from the /etc/hosts file on the storage system root volume. If you prefer to have the actual IP addresses in the /etc/rc file, you can enter IP addresses directly in /etc/rc on the root volume.

route add default MyRouterBox Specifies the default router.

You can set static routes for the storage system by adding route commands to the /etc/rc file. The network address for MyRouterBox must be in /etc/hosts on the root volume.

routed on Starts the routing daemon.
savecore Saves the core file from a system panic, if any, in the /etc/crash directory on the root volume. Core files are created only during the first boot after a system panic.

For more information about the ifconfig command and routing, see the Data ONTAP Network Management Guide for 7-Mode.