Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
a) Please post details of your network settitngs.
b) Be more precise: what do you want to achieve?
c) What have you tried?
d) What exactly is not working?
I'm playing with this about 3 days, and sometimes works sometimes not but never perfect.
I have eth0 (connected in switch with internet connection) and ra0 (wireless card where few users connects).
I need to use gateway 192.168.0.160 / 16
I want to route internet trought eth0 to ra0 and I want to access another computers which are in switch where is connected eth0...
Please help me...
I tried to make it eye-candy (like eth0 @ 192.168.1.1 lan users .1.XXX & ra0 @ 192.168.2.1 wifi users .2.XXX) but no luck.
Thank You in advance!
Yes this is very vague and hard to understand what you are trying to achieve. You have a gateway at 192.168.0.160, your eth0 card is on 192.168.1.1, these are 2 different networks. eth0 must be set to the same network as the gateway it needs to use something like 192.168.0.100
Also need to have a look at your routing table on the machine with the eth0 and ra0 card in it. To see the routing tables at the command prompt as root type:
route -n
It will give you something like this, this is from one of my machines:
The 111.222.333.444 is not a real address, i'm just masking my real ip address. Plus your interfaces will vary from this, but it will give you a general idea.
@stefan_nicolau:
d) I want to share internet connection on eth0 with ra0, and communication with users on wireless and users on switch where is eth0 connected.
I get this once with some stupid routes, and restarted machine and everything is gone
users connected at ra0 doesn't have internet connection and can't ping ra0 ip
Then, how do you know the users are actually connected? This looks more like a wireless connection problem than a routing problem. You should double-check your wireless and firewall settings.
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700
Rep:
If using ip masquerading from ra0 to eth0 then I don't think overlapping makes a difference here. This is the way I would get started based on info provided and assuming eth0 is the outside nic and ra0 would be and inside nic.
eth0
IP 192.168.0.1
Subnet 255.255.0.0
Gateway 192.168.0.160
DNS IP ***.***.***.***
ra0
IP 192.168.10.1
Subnet 255.255.255.0
No Gateway defined for ra0
Then goto http://easyfwgen.morizot.net/gen/ to build the iptables rules and ip masquerading. Only concern is the use of going from a class C on ra0 to a class B on eth0. Never done that before so cannot say if that is and issue. If worst case make ra0 172.16.0.1
edit:
Check out this link. http://www.faqs.org/docs/linux_netwo...addresses.html It talks about the limits for IP classes 192.168.0.160 cannot be a class B network. Only 128.0.0.0 through 191.255.0.0 for class B and the non routable for is 172.16.0.0 through 172.31.0.0. Same for Class C 192.0.0.0 through 223.255.255.0 and the non routable ones 192.168.0.0 through 192.168.255.0. Use non routables ip if you do not have real IP's. New I was missing something.
So this is wrong for a class B
eth0
IP 192.168.0.1
Subnet 255.255.0.0
Gateway 192.168.0.160
DNS IP ***.***.***.***
Needs to be like
eth0
IP 172.16.0.1
Subnet 255.255.0.0
Gateway 172.16.0.160
DNS IP ***.***.***.***
If you not need more than 255 IP on the eth0 side then I would make it a class C and use something like this and ra0 the same as above.
eth0
IP 192.168.0.1
Subnet 255.255.255.0
Gateway 192.168.0.160
DNS IP ***.***.***.***
edit:
a) I think that the overlaping networks are a problem: On which network should a packet for 192.168.10.5 go? Because of the order in which they are in the routing table, this will probably work as expected, but it's still a very bad idea.
b)
Quote:
It talks about the limits for IP classes 192.168.0.160 cannot be a class B network.
Says who? It's just a convention/standard, not a technical limitation (and obvoiusly, m4rk0's ISP hasn't heard about it) Also, the whole concept of classes was kind of dropped when netmasks came in. Classes are now more or less a historical concept. It's certainly not the source of the problems here.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.