Operating System - HP-UX
1823143 Members
3444 Online
109647 Solutions
New Discussion юеВ

Adding the gateway addresses.

 
SOLVED
Go to solution
Amruth
Regular Advisor

Adding the gateway addresses.


Hello,

My new HP l-class servers are having 3 Network Interface cards each. Can you tell me how to put the default gateways for each of the cards except the base card lan0 (i know that set_parms work for this first interface).
I hope i have to put it in /etc/rc.config.d but i don't know the syntax.

Thanks in advance,
am
If i am doing the same way you are doing to me then what is the difference between us.
3 REPLIES 3
Marcel Boon
Trusted Contributor
Solution

Re: Adding the gateway addresses.

Hi,

In the /etc/rc.config.d there is a file called netconf. This file is used to configure your NIC's.

I think you see this:
INTERFACE_NAME[0]=lan0
enz...
INTERFACE_NAME[1]=lan...
enz..
INTERFACE_NAME[2]=lan...
enz..

The [0] [1] [2] stands for your NIC's.
In these file you can also configure the gateway, so look for the number( 0,1,2)and configure it,
You can read in the file how you must configure it.

Marcel
See the man pages
Alex Glennie
Honored Contributor

Re: Adding the gateway addresses.

How do I configure/add the IP address for a new interface?

RESOLUTION

Add an entry to the netconf file to identify this new IP address and lan
interface name:
vi /etc/rc.config.d/netconf
INTERFACE_NAME[1]=lan1
IP_ADDRESS[1]=15.43.233.100
SUBNET_MASK[1]=255.255.255.0
BROADCAST_ADDRESS[1]=""
LANCONFIG_ARGS[1]="ether"
DHCP_ENABLE[1]=0

If you have a new IP address, you may also need to add a default route.
This is done in the netconf file just below where you configure your interface:
ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]=15.43.233.100
ROUTE_COUNT[0]=0
ROUTE_ARGS[0]=""

If the ip address of your gateway is a hub/router/switch you will want to set
ROUTE_COUNT=1. If the gateway is your local interface card you will set
ROUTE_COUNT=0.

*Note: If there are multiple interfaces in the system, they all need to be on
separate subnets. You may not back up the netconf file in the rc.config.d
directory. If you need to back up this file move it out to another directory.

Andreas Voss
Honored Contributor

Re: Adding the gateway addresses.

Hi,

default gateway can only be set generally in /etc/rc.config.d/netconf:

ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]=
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""

Regards