SNA2 Module 03
SNA2 Module 03
Module 3.
Configuring IP Connectivity
Objectives:
3-1
Module 3. Configuring IP Connectivity UNIX Network Administration
These are the steps that you should take to set up a system for communication with a network:
Your organization must maintain an up-to-date network map and Information table to record which IP
address and hostname was used by which host. This method simplifies the troubleshooting of your
network. The Information table should contain the following about each host:
Manufacturer
Model number
OS type and version
LAN card type
IP address and Hostname
MAC address
Administrator name
3-2
Module 3. Configuring IP Connectivity UNIX Network Administration
The first step in configuring a network connection is to physically install a LAN card to your
system. Check your UNIX manual if your LAN card is supported.
In order to use your LAN card properly, you need to install the proper Networking software on
your system. The networking software is bundled with every UNIX OS and is probably already installed
on your system since the default installation. To verify if the software is installed, use:
If the software is not yet installed, then use the following command to install the product:
3-3
Module 3. Configuring IP Connectivity UNIX Network Administration
Assuming that the LAN card and the networking software was properly installed on the system,
the UNIX system should now be able to recognize the LAN card once the machine is booted up. To verify
if the LAN card was properly configured, use the following command:
Diagnostic device files are required by the LAN diagnostic tools linkloop and lanadmin. These
are called DLPIs or Data Link Provider Interface. These are used for network troubleshooting. To verify
for the diagnostic device files, use the ls l or ll command:
# ls l /dev/dlpi/*
If your diagnostic device files for the LAN card are missing, then you should recreate them using
the command:
# cd /dev
# insf d dlpi -e
3-4
Module 3. Configuring IP Connectivity UNIX Network Administration
During the system startup process, the /sbin/rc program starts up several scripts in the
/sbin/init.d directory. These scripts read configuration parameters from the configuration files found in the
/etc/rc.config.d directory, and initialize the network connection.
Note that you should never modify the scripts in /sbin/init.d. Startup script configurable
parameters should only be modified via the configuration file in the /etc/rc.config.d.
3-5
Module 3. Configuring IP Connectivity UNIX Network Administration
The /etc/rc.config.d/netconf file is the primary TCP/IP configuration file for the HP-UX system.
This is read by several startup scripts that configure everything from the system host name to the
dynamic routing protocol.
The first lines of the netconf file would look like the following:
HOSTNAME=mailsrvr
OPERATING_SYSTEM=HP-UX
The HOSTNAME parameter must be changed to change your systems hostname. Never modify
LOOPBACK_ADDRESS=127.0.0.1
the other two parameters.
INTERFACE_NAME[0]=lan0
# Use the name shown in lanscan
IP_ADDRESS[0]=192.168.250.1
# Set the IP address using this parameter
SUBNET_MASK[0]=255.255.255.0
# The IPs Netmask in decimal format
BROADCAST_ADDRESS[0]=192.168.250.255
# The IPs broadcast address
INTERFACE_STATE[0]=up
# Bring card up at boot time
DHCP_ENABLEP[0]=0
# If 1, the IP address would be assigned by a DHCP Server
The ifconfig command is used to configure, or to check the configuration values of the
network interface card. You can use ifconfig to assign the network interface an IP address, netmask,
broadcast address, or change some of its parameters. To set the IP address form the command line, use
the following command:
If you are using Linux, we need to use the eth# lan card device file. The command that you need
to use is:
Note that when you configure the IP address from the command line, the IP address will be reset
once you reboot the computer. If you want the IP address to be set every time the system boots, then you
should edit the /etc/rc.config.d/netconf file and add the lines above.
3-6
Module 3. Configuring IP Connectivity UNIX Network Administration
INTERFACE_NAME[0]=lan0:0
IP_ADDRESS[0]=192.168.150.1
SUBNET_MASK[0]=255.255.255.0
INTERFACE_NAME[1]=lan0:1
IP_ADDRESS[1]=192.168.200.1
SUBNET_MASK[1]=255.255.255.0
INTERFACE_NAME[2]=lan0:2
IP_ADDRESS[2]=192.168.250.1
SUBNET_MASK[2]=255.255.255.0
After creating such modification, activate the other IP addresses by rebooting the system or by
using the following commands:
# /sbin/init.d/net start
# ifconfig lan0:0 192.168.150.1 netmask 255.255.255.0 up
# ifconfig lan0:1 192.168.200.1 netmask 255.255.255.0 up
# ifconfig lan0:2 192.168.250.1 netmask 255.255.255.0 up
# /sbin/init.d/net start
# ifconfig eth0:0 192.168.150.1 netmask 255.255.255.0 up
# ifconfig eth0:1 192.168.200.1 netmask 255.255.255.0 up
# ifconfig eth0:2 192.168.250.1 netmask 255.255.255.0 up
3-7
Module 3. Configuring IP Connectivity UNIX Network Administration
The /etc/hosts file is one of the mechanisms used by hosts to resolve hostnames to IP
addresses. Each /etc/hosts file entry should have an IP address and an associated hostname. Each entry
must also contain one or more aliases, and an optional comment preceded by a # sign.
Additional entries may be added using the vi, or any other text editor.
3-8