shouldn't have a problem having 2 interfaces, actually you shouldn't have a problem running 8 of them.
ifconfig isn't normally in the path of a user, only root should be able to access it, plus just switching to "su" won't set the path properly, but that's not a big deal to add /sbin to your stuff.
🙂 I actually prefer to use "sudo su" then that sets all the eviromental stuff automaticly, but you have to allow your user to use sudo thru editing the /etc/sudo.users file.
Could be a resource confict like both devices running irq 5 or something. Try to select "using a non-plug'n'play OS" stuff in your bios. Or maybe if it already selected as a non plugnplay OS, select the other one. Also maybe try (just for a test) turning off usb support or sound card suppor or serial ports or everything and see if that makes a difference. Modern BIOS should handle the irq/mem address assignment nowadays, but sometimes the don't work all that hot and the OS has to, this plugnplay aware OS controls that in a course way.
Could try turning off acpi support, but since this is a laptop that may not be so hot. Pass acpi=off to the kernel at boot up.
Also check out the "dmesg" command output.
If you can't get it to work so that you can have both Eth0 devices going at once you can try
ifconfig eth1 down
ifconfig eth0 up
commands, to switch back and forth.
Then if you can switch back and forth easily like that, then you can put that into a script (and use a simple lock file)
#!/bin/bash
# location: /sbin/ name: switch.sh
if grep 1 ~/var/lock/ifconfig.lock
then
ifconfig eth1 down
ifconfig eth0 up
echo "0" > ~/var/lock/ifconfig.lock
else
ifconfig eth0 down
ifconfig eth1 up
echo "1" > ~/bin/xawtv.lock
fi
Then run it (if you have sudo setup) like thus:
sudo /sbin/switch
to get the one interface working, then:
sudo /sbin/switch
again to get the other one.
Technicly you may have to make the script more complicated or not. The way to get interfaces working correctly while doing manually would be:
modprobe driver.for.device
ifconfig eth0 192.168.1.10 up
route add default gw 192.168.1.254
Then to take it down:
route del default gw
ifconfig eth0 down
rmmod driver.for.device
or at least something close to that.
If you want to get fancy then you can make a script for a bunch of different networks:
#!/bin/bash
# location: /sbin name: switch syntax: /sbin/switch network.name
if [ $1 == "home" ]
then
echo "setting up home"
#here it sets up a bunch of stuff for that network
fi
if [ $1 == "roaming" ]
then
echo "setting up wireless"
#here it sets up a bunch of stuff for that network
fi
if [ $1 == "work" ]
then
echo "setting up work"
#here it sets up a bunch of stuff for that network
fi
if [ $1 == "hacked.corporate.lan" ]
then
echo "setting up hacked.corporate.lan"
#here it sets up a bunch of stuff for that network
fi
Then you would just go:
sudo /sbin/switch home
for your home
or maybe
sudo /sbin/switch work
to switch to the network lan.
Also to use dhcp you can
dhcpcd eth0
or maybe
dhclient eth0
or something like that.