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.
Hello,
I have a little problem with my Gentoo router. I have 3 interfaces in it. eth0 is connected to WAN and eth1(192.168.0.1) is connected to the LAN computer which has address 192.168.0.5, eth2 (192.168.0.2) is connected to the other LAN computer which has address 192.168.0.10.
This is how I'll get from LAN computers(192.168.0.5 and 192.168.0.10) to the internet and to the router of course. But I don't know how I'll have to configure the routing table to get connection between these two LAN computers. I could ping every interface from router with both LAN computers, but not the other LAN computer?
If you want to use two different interface on a router then by definition you have to use 2 networks. 192.168.0.1,2,5 and 10 are all in the same subnet using the standard mask. By looking at your routing table it looks like what you've done is set eth1 and eth2 with a 255.255.255.255 subnet mask, which is a network with a single host, which by definition means that no other hosts exist within either of those subnet.
Neither of these will work.
eth1 and its attached PC need to share 1 subnet. eth2 and its attached PC need to share another subnet. Each PC will use your router as its default gatway and it will have a default route pointing out to the internet.
Try this
eth1 192.168.0.1 255.255.255.0
eth1's PC 192.168.0.2 255.255.255.0 dg=192.168.0.1
eth2 192.168.1.1 255.255.255.0
eth2's PC 192.168.1.2 255.255.255.0 dg=192.168.1.1
I thought that I have to do it like you told me to do. I wasn't sure, so I asked from here. Do I have to enable "802.1d Ethernet Bridging" from kernel?
Not if you are routing. Bridging would allow you to use the same network on two interfaces, but I see no need to there. Your better off routing, as you don't need to muck around with the kernel to make it work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.