Routing between a wired ethernet (internet connection) and a wireless card (home net)
Linux - Wireless NetworkingThis forum is for the discussion of wireless networking in Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Routing between a wired ethernet (internet connection) and a wireless card (home net)
Hi!,
Firstly I would like to thank you all for your help with my previous problem concerning selecting my ethernet (eth0) as the internet connection. This all now works fine, and eth0 is totally configured.
My problem at this stage is enabling the wireless interface also, I found that doing a "netconfig" would remove my eth0 settings, and only configure the wireless network. I also found that in order for the eth0 to work, eth1 had to be disabled, this; I presume is a consequence of misconfigured routing.
from a "route -n" query, I get the correct destinations of the eth0 device, along with gateways etc, and this gateway is also defined as default in /etc/rc.d/rc.inet1.conf, but nothing from eth1 (i know this should happen because It isn't told to use dhcp in the rc.d/rc.inte1.conf)...
I know my eth1 device is detected from both lspci and ifconfig, and the penultimate question I have is:
How can i configure my routing (i am assuming this is the issue) to route network packets through eth1, and internet packets through eth0...
preferably, but not essentially, I would aspire to do this without the need of going offline.
What you would do is make eth0 the default route, and do 'route add -net 192.168.0.0 netmask 255.255.255.0 eth1' (assuming your network is using the 192.168.0.x address space). That would route all internal network traffic to eth1, and everything else should go to eth0. Hopefully.
Thanks for the reply Dave, I had thoughts of it being along those lines, however I get an error from SIOCADDRT saying "No Such Device", I personally have no idea what this means, any ideas as to what I should refine?
Try doing 'ifconfig eth1 up' first. I'm guessing that's what the problem is, however I get the same error if I try to configure a device which doesn't exist, so it might be a driver issue.
yeah, I'd also think it would be a driver issue now, however I know the eth1 has been working. no kernel modules have been changed, only the inet1.conf.
still getting the same error by the way, so right now I'm pretty confused
Ok, I realise this thread died, but after acknowledging the idea that my card may infact not be recognised by my system I tried other things...
I've come across "iwconfig" and it certainly does appear that "eth1" is up and connected to the network, here's my results of iwconfig:
Quote:
eth1 IEEE 802.11-DS ESSID:"belkin54g" Nickname:"dtop"
Mode:Managed Frequency:2.462GHz Access Point: 00:30:F1:AF:B8:08
Bit Rate:2Mb/s Tx-Power=15 dBm Sensitivity:1/3
Retry min limit:8 RTS thrff Fragment thrff
Encryption keyff
Power Managementff
Link Quality:92/92 Signal level:5/153 Noise level:112/153
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
would lead me to believe theres just one simple thing I could do to fix this, but for the life of me I can't find out what.
;note, In /etc/rc.d/rc.inet1.conf, the USE DHCP for eth1 is set to OFF, this is one suspicion I have as to why it does not work, however enabling it scraps my settings for eth0.
It looks like you need to configure eth1 (i.e. give it an IP address etc). If you're using DHCP for eth1, then try running 'dhclient eth1'. If not then you can use ifconfig to set up the interface.
I'm not sure why you were getting 'No such device', though.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.