1856431 Members
3039 Online
104113 Solutions
New Discussion

ifconfig commands

 
SOLVED
Go to solution
hpuxrox
Respected Contributor

ifconfig commands

Anyone have a steps off hand to configure a new interface without a reboot.

ifconfig lan0 plumb
ifconfig lan0 192.168.0.53 netmask 255.255.255.0

What else to I need to route out the interface?
8 REPLIES 8
Sachin Patel
Honored Contributor
Solution

Re: ifconfig commands

#ifconfig lan1 ip_address up netmask netmask_address

up & netmask is the word you type.

For my test workstation I do

#ifconfig lan2 10.20.1.1 up netmask 255.0.0.0


Sachin
Is photography a hobby or another way to spend $
Helen French
Honored Contributor

Re: ifconfig commands

Hi Yates:

# ifconfig lanX up

Also configure it in the /etc/rc.config.d/netconf file for next reboot.

HTH,
Shiju
Life is a promise, fulfill it!
Sachin Patel
Honored Contributor

Re: ifconfig commands

I forget about route

to add route

#route add default 10.20.25.1 1

Will add default gatway on my system with one hop.

#netstat -rn (to check)

Sachin
Is photography a hobby or another way to spend $
hpuxrox
Respected Contributor

Re: ifconfig commands

What about lanadmin -X stuff??
Helen French
Honored Contributor

Re: ifconfig commands

Hi Yates:

The lanadmin -X command not necessary. If you want to set up driver specific options, then you need to use that. For eg: to set up the lan interface speed.

# man lanadmin for more details

HTH,
Shiju
Life is a promise, fulfill it!
Sachin Patel
Honored Contributor

Re: ifconfig commands

using lanadmin you can setup mtu, station address and speed.

#lanadmin -s 0 (if ppa is 0) will display the speed of card.
#lansdmin -S 0 newspeed (to setup new speed)

Sachin
Is photography a hobby or another way to spend $
Dan Copeland
Regular Advisor

Re: ifconfig commands

Edit the /etc/rc.config.d/netconfig file to have all the parrameters of the LAN card.

Edit the lan card configuration card.

/etc/rc.config.d/hpbase100conf to reflect the lancard speed and others.

Then either run the ifconfig lanX ip_address up netmask XXX.XXX.XXX.XXX or

run the stop and start scripts of the net as fast as posible. ie

/sbin/init.d/net stop ;/sbin/init.d/net start

users will not know the changes but make sure all is well with your configuration and setup.

The subnetmask, the broadcast and others are entered well in the /etc/rc.config.d/netconf file.

using the ifconfig may not give you the actual broadcast address if you do not set it well.

I am back

Lolu
hpuxrox
Respected Contributor

Re: ifconfig commands

Thanks Frank,

You answered my question.

-Yates