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.
I want to set up home Internet-router with my old home computer. Now I have one notebook and intend to buy (later) another one. I'm not familiar with Linux networking so I need help.
Coming router (Desktop) has Internet-connection through pppoe protocol (I use rp-pppoe's pppoe-start script, but it's no longer important). Yesterday I have bought two new network cards. So, it's now there are three Ethernet interfaces on Desktop:
* eth0 - for pppoe use. It has internal address 10.19.62.31 (netmask 255.255.0.0);
* eth1 - for notebook connection. It has IP-address 10.14.0.1 (netmask 255.255.0.0);
* eth2 - for future use, not configured;
My Notebook has one network card eth0 configured with IP-address 10.19.59.192 (netmask 255.255.0.0);
At first I make sure that ip-forwarding is switched on:
--
# cat /proc/sys/net/ipv4/ip_forward
1
--
The next step was adding routes between Desktop and Notebook:
* On Desktop:
--
# route add 10.19.59.192 eth1
--
* On Notebook:
--
# route add 10.14.0.1 eth 0
--
Ping tests are OK.
But I don't know what should I do later... I know that default route in Notebook must use gateway to access Internet:
--
# route add default gw GATEWAY
--
I supposed that gateway is my Desktop computer:
--
# route add default gw 10.14.0.1
--
But it does't work :-(
Please, help me with this problem.
Thanks in advance.
Nikolay.
P.S. I don't use Windows more than 4 years. Only Linux. I undertake to set up home router mainly to look into Linux networking basics. For purity of my experiment I use Slackware Linux 11.0 in my router (Desktop) (kernel 2.6.17.11 - from kernel.org). Notebook works under SUSE Linux 10 (kernel 2.6.17.11 - from kernel.org).
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:
What I do is setup eth0 for the wan side. Define IP, Subnet, Gateway or setup as Dynamic DHCP.
Now on the eth1 lan side I setup say 192.168.1.1 IP and subnet 255.255.255.0. You can use other non routable IPs of your choice. But DO NOT define a gateway for this nic. This is what masquerading takes care of for you.
Thanks to this link I've figured out, that my router configuration needs with NAT. And now I have right direction to resolve my problem.
Quote:
Originally Posted by Brian1
What I do is setup eth0 for the wan side. Define IP, Subnet, Gateway or setup as Dynamic DHCP.
Now on the eth1 lan side I setup say 192.168.1.1 IP and subnet 255.255.255.0. You can use other non routable IPs of your choice. But DO NOT define a gateway for this nic. This is what masquerading takes care of for you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.