Re: connect to two different networks




I have found the only way to do this is to stop NetworkManager.

But even with NetworkManager stopped dhcpd keeps running in the background and resets my wireless device after a minute or so. So I added the following at the end of the script that sets up networking in this situation; it repeats relevant bits of the setup and kills itself after 5 minutes. Klutzy but it works.

#!/bin/sh
/sbin/service NetworkManager stop
 ...
delay=300
sta=ath0
KEY=abcdefabcdefabcdefabcdef64
ESSID=private
 ...
# Kill the following after $delay seconds
 ( sleep $delay ; killall $0 ) &
# Keep restarting ath0 until dhcpd has finished trying to do things
# with it.
while true; do
 sleep 2
 /sbin/ifconfig ath0|grep $IP ||
   ( /sbin/iwconfig $sta essid $ESSID key $KEY ; /sbin/ifconfig $sta $IP up )
 /sbin/route|grep 192.168.1.1 ||
   (/sbin/ifconfig $sta $IP up; /sbin/route add default gw 192.168.1.1 $sta)
done




On Mon, 26 Nov 2007, Pedro Freire wrote:


Hello list,

I am using FC6 and NetworkManager 0.6.4-5

My laptop has an ethernet card and wifi. I am trying to connect
simultaneously to the wired and wireless nets, each one with different
subnets.
However, I don't know how to do this. As soon as I connect the cable,
NetworkManager disconnects the wireless net and tries to connect via
wired. I want the wired net to have a fixed IP address ('cause there is
no dhcp server on that subnet - by the way, it's a physically distinct net).

Any help ?

Thanks,

Pedro
_______________________________________________
NetworkManager-list mailing list
NetworkManager-list gnome org
http://mail.gnome.org/mailman/listinfo/networkmanager-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]