LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-15-2010, 04:37 PM   #1
vector4tfc
LQ Newbie
 
Registered: Sep 2007
Posts: 6

Rep: Reputation: 0
gateway, broadcast, network, address....help!


I am having a hard time wrapping my brain around these settings. So please bear with me.

I have a server with 3 network cards (Eth0 is connected to the internet). I want to use eth1 and eth2 to serve 2 separate networks.
eth1 will serve about 15-20 unique computers and eth2 will serve a laptop network with up to 200 different laptops (that will come and go).

So I set:

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet static
address 192.168.2.1
network 192.168.2.0
netmask 255.255.255.0
broadcast 192.168.2.255

auto eth2
iface eth2 inet static
address 192.168.3.1
network 192.168.3.0
netmask 255.255.255.0
broadcast 192.168.3.255

Now here is where I get confused. My internet connection is working...I can ping internet addresses from the CLI. And the networked computers can see the server...I can ping the networked computers. But my networked computers cannot access the internet.

I don't know what step to take next. I "think" I need to set up routing but I don't know how. There are gateway addresses and such to set up but I don't know which ones to use.

Please help (and be gentle). I have been stuck here for days and I just can't figure it out.

Thanks in advance
 
Old 03-15-2010, 04:46 PM   #2
irmin
Member
 
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342

Rep: Reputation: 62
For each client the appropriate gateway will be 192.168.2.1 or 192.168.3.1, depending on the network.

If you want your server box to act as a gateway, you will need to enable IP-forwarding. (see e.g.: http://www.yolinux.com/TUTORIALS/Lin...etworking.html (Subsection: Enable Forwarding)). Basically you will need to put an 1 to /proc/sys/net/ipv4/ip_forward.

I hope this will help.

Last edited by irmin; 03-15-2010 at 04:48 PM.
 
Old 03-15-2010, 08:32 PM   #3
vector4tfc
LQ Newbie
 
Registered: Sep 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for the reply. But alas, the setting /proc/sys/net/ipv4/ip_forward is already set at 1.

The tutorial doesn't seem to address my incompetence. I still don't get it. I would love it if DHCP could dynamically assign addresses to the laptop connections. But webmin is not helpful setting up DHCP.
 
Old 03-16-2010, 05:56 AM   #4
irmin
Member
 
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342

Rep: Reputation: 62
You can setup dhcpd on your server manually by editing /etc/dhcpd.conf and starting dhcpd. "man dhcpd" provides some examples of configuration options and "man dhcpd.conf" explains all configuration options.

I modified an example from "man dhcpd.conf":
Code:
      subnet 192.168.3.0 netmask 255.255.255.0 {
         option routers 192.168.3.1;

         # Unknown clients get this pool.
         pool {
           option domain-name-servers <your DNS goes here>;
           max-lease-time 300;
           range 192.168.3.200 192.168.3.253;
           allow unknown-clients;
         }

         # Known clients get this pool.
         pool {
           option domain-name-servers <your DNS goes here>;
           max-lease-time 28800;
           range 192.168.3.5 192.168.3.199;
           deny unknown-clients;
         }
       }
Hopefully this will help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
subnetwork id,network id and broadcast address ? pradeepgokulr007 Linux - Networking 1 04-01-2009 07:30 AM
Gateway ip address removed from /etc/sysconfig/network files ehedetniem Linux - Newbie 2 04-12-2005 10:29 AM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM
What is Gateway address and what is Network address? abefroman Linux - Networking 1 03-17-2004 08:25 PM
question about network address and broadcast address yuzuohong Linux - Networking 1 09-18-2002 11:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration