Operating System - Linux
1829905 Members
1355 Online
109993 Solutions
New Discussion

2 nics dhcpcd activation according to where i am..

 
eugene_6
Advisor

2 nics dhcpcd activation according to where i am..

hi

i have 2 nics ..
eth0 for roadrunner at home
wlan0 for wireless network at school..

at home, there's no problem.
at school, at boot time, my box tries to contact dhcp server through eth0..and this takes about 1-2 min..

can i set up my box so that it can decide activate eth0 or wlan0, according to where i am?

thank you
Eugene Kim
2 REPLIES 2
Eugen Cocalea
Respected Contributor

Re: 2 nics dhcpcd activation according to where i am..

Hi,

I think you can tell the kernel at boot time which card to use. So, using lilo, you can choose before loading the kernel which card should be activated, or just to disable the eth0 when you're at school.

E.

To Live Is To Learn
Marco Paganini
Respected Contributor

Re: 2 nics dhcpcd activation according to where i am..

Hello eugene:

This may prove to be hard because your computer has no idea about where you are. You could try to improvise a script that 'pings' a given host and then you decide which interface to put under DHCP (via pump or whatever) control.

If I were you, I'd setup dummy IP addresses on those interfaces and run a shell script that assigns the addresses via pump (dhcp) depending on the place you are.

Regards,
Paga
Keeping alive, until I die.