1748028 Members
4970 Online
108757 Solutions
New Discussion юеВ

network configuration

 
SOLVED
Go to solution
Trent Bukowsky
Advisor

network configuration

I finally have my Linux box up and running. But I want to switch IP addresses on a regular basis.

I have only one Ether card and I have to switch between Internet and intranet IP's. I know how to change IP's using netcfg. But what I would like to know is how can I do it from the "#" prompt without GUI. WHich files should be changed and what are the commands I have to run along with syntax.

If somebody can tell me it would be most helpfull. It would also be helpful if somebody can tell me how to change IP's on an OPENBSD machine.

Thankx

trent
5 REPLIES 5
I_M
Honored Contributor
Solution

Re: network configuration

Hi

If you are using RedHat (or similar) distribution, your network configuration is stored under
/etc/sysconfig.
See /etc/sysconfig/network and /etc/sysconfig/network-script/ifcfg-eth0

and /etc/hosts, /etc/resolv.conf are also important.

Regards,

masanari iida
Santosh Nair_1
Honored Contributor

Re: network configuration

(Again on redhat systems) Alternatively, run the /sbin/netconf script with will set all the necessary files based on your responses. This program runs in a screen oriented GUI if X is not up.

-Santosh
Life is what's happening while you're busy making other plans
Trent Bukowsky
Advisor

Re: network configuration

thankx guys that was helpful.

Hope somebody can answer my OPenbsd question.

Trent
Timo Rajala
New Member

Re: network configuration

The IP information for network interfaces on OpenBSD are stored in the /etc/hostname.* -files.

Run 'man hostname.if' and 'man afterboot' for instructions.

Timo Rajala
dirk dierickx
Honored Contributor

Re: network configuration

You could also try to bind two IP addresses to one card.
(Aliases) that way, when you switch the cable, it should work automaticly.
It is not a clean solution, but a laisy one :)