LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   load different net work config @boot (https://www.linuxquestions.org/questions/linux-networking-3/load-different-net-work-config-%40boot-38526/)

pika 12-16-2002 12:20 PM

load different net work config @boot
 
Hello,

I have Redhat 7.3 installed on my laptop, at home I use a dhcp server to connect to my network, at work I have to use a static IP.

As you might guess, I have to wait every time for eth0 to timeout, edit my network settings, and restart the network before I can start doing things that need a network connection.

I was just wondering if it was possible to specify which network settings to use at boot time. Something like an extra entry in the bootloader that uses different network settings.

Sorry if there something like this is already explained somewhere (I didn't find it).

Any help would be greatly appreciated,

Regards

indi 12-16-2002 01:48 PM

I have two interfaces

static
=================================
[root@linux network-scripts]# more ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.7.1
NETMASK=255.255.255.0


dynamic --- you won't be having eth1
=================================
[root@linux network-scripts]# more ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=dhcp

what I can suggest is go to /etc/sysconfig/network-scripts and create a ifcfg-eth0:0 it will be a new virtual interface configured for DHCP.

=================================
[root@linux network-scripts]# more ifcfg-eth0:0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp

Try it :-) hopefully shd work. may be you can try DHCP one as eth0 and static one as eth0:0

let me know if it works or not.

trickykid 12-16-2002 01:56 PM

moved: more suitable in the networking forum

pika 12-16-2002 02:24 PM

Thanks for you answer,

I'm sure it's possible and I will try the stuff you suggested as soon as possible, I'll let you know if it works or if I find another solution.

Greetz


All times are GMT -5. The time now is 07:11 PM.