[oe] Network Interfaces (wire & wireless)

John Tobias jtobias at viaas.com
Thu Jan 19 20:10:46 UTC 2012


Hello All,

I have two network interfaces (wire and wireless), both of them are
connected to the network correctly. It looks like my kernel is using
the wireless interface to send my data over the network. I would like
to tell to the kernel which interface should be use if my both
interfaces are connected to the network. So, I executed the commands
below and set the phy0 with higher priority than my wifi, but it's not
working.
Any idea how to fix it?

#(wired)
/sbin/ip route flush table phy0
/sbin/ip route add table phy0 to 192.168.1.0/24 dev eth0
/sbin/ip route add table phy0 to default via 192.168.1.1 dev eth0

#(wireless)
/sbin/ip route flush table wifi
/sbin/ip route add table wifi to 10.0.1.0/24 dev ra0
/sbin/ip route add table wifi to default via 10.0.1.1 dev ra0

/sbin/ip rule add from 192.168.1.0/24 table phy0 priority 1000
/sbin/ip rule add from 10.0.1.0/24 table wifi priority 1002

/sbin/ip route flush cache

Thanks,

john




More information about the Openembedded-devel mailing list