Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I tried to setup a linux server to route packets between 2 routers, here is my configuration:
eth 0 (192.168.1.2) -> to Router A
eth 1 (10.1.1.2) -> to Router B
router A (192.168.1.1) -> client 1 and linux server connected to it's LAN
router B (10.1.1.1) -> client 2 and linux server connected to it's LAN
client 1 (192.168.1.3) -> to Router A
client 2 (10.1.1.3) -> to Router B
Both routers doesn's have internet connection (WAN port is not used), I want to be able to connect client 1 to client 2 without internet connection. To do so, I want the linux server to act as the router between this 2 private networks. Right now client 2 is invisible to client 1, but client 1 and client 2 are both visible to the linux server. I added an entry for static routes on both routers:
The Gateways are the IP addresses of the Linux server, my problem now is that it didn't work, I believe I need to set some rules to forward the packet from eth 0 to eth 1, vice versa. Anyone have any suggestion on what should I do (Perhaps some iptables rules, or routed)? I'm running Linux Enterprise AS 3.0.
In your set up there, you have no need for routers A and B. Eth0 of the Linux server and client1 can both connect to the same switch or hub. Client1's default gateway should be eth0's IP address of 192.168.1.2. Eth1 of the Linux server and client2 can both connect to the same hub or switch. Client2's default gateway dould be eth1's IP address of 10.1.1.2.
To start the Linux server forwarding packets between eth0 and eth1, enter this command as root:
echo 1 > /proc/sys/net/ipv4/ip_forward
For routerA and routerB to actually be routers, they'll need to have 2 interfaces on them with IP addresses on different subnets.