pacifico
2005-10-13, 08:03 PM CDT
I just installed FC4 on an IBM T40 laptop (my first laptop install) with wireless and ethernet interfaces.
I wish to tell the kernel to preferentially use the ethernet port, i.e. if it is unplugged, use the wireless interface instead. The GUI network tools didn't seem to be flexible enough to give me the desired configuration.
My network has a hardware router (connected to a DSL modem), a wireless access point, two linux desktops, an HP network printer, a windows laptop, and now this linux laptop. In the past, I've had the wireless access point configured to dynamically assign IP addresses to the windows laptop (although I've wondered about the security implications of having the wireless access point and windows laptop on the same network, 192.168.123.xx).
Output of ip link show:
# ip link show
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0e:9b:a7:66:2c brd ff:ff:ff:ff:ff:ff
3: wifi0: <BROADCAST,MULTICAST,UP> mtu 2312 qdisc pfifo_fast qlen 100
link/ieee802.11 00:0e:9b:a7:66:2c brd ff:ff:ff:ff:ff:ff
4: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0d:60:2d:33:3c brd ff:ff:ff:ff:ff:ff
5: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
The wifi0 interface is created with the airo.c kernel module for the Cisco card in the machine and is (counterintuitively) not what I want to send/receive packets over, but rather used to sense the presence of wireless networks. I want to choose eth1 (the ethernet port) rather than eth0 (the wireless interface) when possible.
Output of ip route list table main:
# ip route list table main
192.168.123.0/24 dev eth0 proto kernel scope link src 192.168.123.3
192.168.123.0/24 dev eth1 proto kernel scope link src 192.168.123.3
192.168.123.0/24 dev wifi0 proto kernel scope link src 192.168.123.3
169.254.0.0/16 dev wifi0 scope link
default via 192.168.123.254 dev eth0
As you can see, eth0 and eth1 have the same IP address. (BTW, anyone know what the 169.254.0.0 route is about...? I see that shows up on my FC4 desktop too.) I can't use eth1 unless I add that route, but
#route add default gw 192.168.123.254 dev eth1
adds it as the last route and the (slow) wireless connection continues to be used. The http://lartc.org/howto URL didn't help, probably because there wasn't a concrete enough example for me.
I imagine I need to tell the kernel to choose eth1 preferentially andif it times out, then use eth0. Also, I wish to make these preferences the default, i.e. every time the machine boots.
Since I've wondered about the security implications about the DHCP assignment to the same network, an alternative would be to change the wireless interface to use a different network (i.e. WAN = 192.168.123.xx and LAN = 192.168.124.xx) and then the ethernet interface would have a different IP address. However, in that case, I still face the same issue re: preferred interface for the default route.
Any guidance?
Thanks.
-al
I wish to tell the kernel to preferentially use the ethernet port, i.e. if it is unplugged, use the wireless interface instead. The GUI network tools didn't seem to be flexible enough to give me the desired configuration.
My network has a hardware router (connected to a DSL modem), a wireless access point, two linux desktops, an HP network printer, a windows laptop, and now this linux laptop. In the past, I've had the wireless access point configured to dynamically assign IP addresses to the windows laptop (although I've wondered about the security implications of having the wireless access point and windows laptop on the same network, 192.168.123.xx).
Output of ip link show:
# ip link show
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0e:9b:a7:66:2c brd ff:ff:ff:ff:ff:ff
3: wifi0: <BROADCAST,MULTICAST,UP> mtu 2312 qdisc pfifo_fast qlen 100
link/ieee802.11 00:0e:9b:a7:66:2c brd ff:ff:ff:ff:ff:ff
4: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0d:60:2d:33:3c brd ff:ff:ff:ff:ff:ff
5: sit0: <NOARP> mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
The wifi0 interface is created with the airo.c kernel module for the Cisco card in the machine and is (counterintuitively) not what I want to send/receive packets over, but rather used to sense the presence of wireless networks. I want to choose eth1 (the ethernet port) rather than eth0 (the wireless interface) when possible.
Output of ip route list table main:
# ip route list table main
192.168.123.0/24 dev eth0 proto kernel scope link src 192.168.123.3
192.168.123.0/24 dev eth1 proto kernel scope link src 192.168.123.3
192.168.123.0/24 dev wifi0 proto kernel scope link src 192.168.123.3
169.254.0.0/16 dev wifi0 scope link
default via 192.168.123.254 dev eth0
As you can see, eth0 and eth1 have the same IP address. (BTW, anyone know what the 169.254.0.0 route is about...? I see that shows up on my FC4 desktop too.) I can't use eth1 unless I add that route, but
#route add default gw 192.168.123.254 dev eth1
adds it as the last route and the (slow) wireless connection continues to be used. The http://lartc.org/howto URL didn't help, probably because there wasn't a concrete enough example for me.
I imagine I need to tell the kernel to choose eth1 preferentially andif it times out, then use eth0. Also, I wish to make these preferences the default, i.e. every time the machine boots.
Since I've wondered about the security implications about the DHCP assignment to the same network, an alternative would be to change the wireless interface to use a different network (i.e. WAN = 192.168.123.xx and LAN = 192.168.124.xx) and then the ethernet interface would have a different IP address. However, in that case, I still face the same issue re: preferred interface for the default route.
Any guidance?
Thanks.
-al