You are not logged in.
Hello,
I'm wondering if anyone can point me in the right direction. I'm doing some work with an embedded device that I need to access by ethernet. The device is configured to sit on 192.168.10.1 (at the moment). I've configured my laptop to sit on 192.168.10.23. At the same time, I have my laptop connect to a corporate guest wifi connection - which gives me access to the internet.
My problem is that I can bring both the wireless and wired interfaces up, but as soon as the wired interface comes up, I can no longer access the internet through the wifi connection. What I want to is have any connections outside of 192.168.10.x routed through the wifi.
What is the easiest/cleanest way to accomplish this?
Thanks in advance.
Last edited by matt.tyler (2014-03-01 00:22:52)
Offline
You need to adjust your route. use ip route
You may want to spend some time reading man ip-route
What is the embedded project? Sounds cool.
Edit: BTW ip route will tell you the current state of affairs. When you associate with a new network, your route may change. What is the sub net of the wired network?
Last edited by ewaller (2014-02-28 05:04:41)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Cheers, I'll have a read.
The project is for work. We have another system that needs some log files pulled off them automatically - and this needs to be done over serial with Xmodem-1024. That's essentially the job of the embedded device. The technicians are fairly patchy with remembering/bothering to off-board log files - as it usually involves waiting for a good 6 or 7 minutes (transfer rate is a blistering 19200 kbps). We're trying to build a database of these log files to get a good idea of the health of the system, so we're tying to go for 100% coverage.
Getting these routes set up is more for my own personal convenience. The subnet of the wired network is /24.
Offline
Run "man route", look at the "metric" parameter.
Or maybe edit the routes, to remove the "default" entry for wired.
Offline
Excellent, I completely understand now, thanks guys. I know enough to sort this out.
For anyone else who might have the same problem -
There are two issues here; the priority of the network and the default route.
The metric parameter listed in the routing table determines the priority of the network. The network priority determines which networks gets to go first. The lower this number is the more important it is.
The default route is the 'fall-through' rule. If your destination address does not match any other rule, it will fall through to this.
In my situation, I'd need to set the metric parameter on the eth0 route rule higher than the wlan routes, and then remove the default routing rule on eth0 and ensure it exists for wlan0.
In the event you want to make this automatic, you can add routing commands into your netctl profiles with the 'Routes' or alternatively the 'ExecUpPost' commands. See https://bbs.archlinux.org/viewtopic.php?pid=1360955
Edit:
Now I've had time to fix this I'll add an example
Description='A connect to Jetbox'
Interface=eth0
Connection=ethernet
IP=static
Address=('192.168.10.23/24')
Routes=('192.168.0.0/24 via 192.168.10.1')
#Gateway='192.168.10.1'
8 DNS=('192.168.10.1')
For me, commenting out the gateway prevented the default route from being added and ensured that it gave preference to the wifi connection.
Last edited by matt.tyler (2014-03-04 08:58:05)
Offline