LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-31-2007, 02:34 AM   #1
expatCM
Member
 
Registered: Apr 2006
Location: Chiang Mai, Thailand
Distribution: Ubuntu 14.04 64 bit
Posts: 104

Rep: Reputation: 15
DHCP server - getting client Internet


I am in the process of setting up a dhcp server. I can get the correct IP addresses allocated. The client will pick up an active lease. All appears on track. Except the Internet which does not appear at all.

eth0 is used only to connect to the router and has the 192.168.1.x range.

eth1 is used for the local network and has the 10.0.0.x range.

From a client the Internet does not appear (no browser, no skype) but also if I ping eth0 or the gateway from a client then I get the error unreachable. The server can be used to ping google.com without issue.

cat /etc/resolv.conf shows the two name server addresses.

This is the dhcpd.conf with the commented out blocks removed.

Code:
> cat dhcpd.conf
option routers 192.168.1.1;

ddns-update-style none;

option domain-name-servers 208.67.222.222, 208.67.220.220;

default-lease-time 600;
max-lease-time 7200;


# Internet Access
subnet 192.168.1.0 netmask 255.255.255.0 {
        option domain-name-servers 208.67.222.222 , 208.67.220.220;
        option routers 192.168.1.1;
        range 192.168.1.70 192.168.1.80;
        }
# Local Network
subnet 10.0.0.0 netmask 255.255.0.0 {
        option domain-name-servers 208.67.222.222 , 208.67.220.220;
        option subnet-mask 255.255.0.0;
        option routers 192.168.1.1;
        range 10.0.0.80 10.0.0.100;
        }
# Gateway eth0
host eth0 {
        option domain-name-servers 208.67.222.222, 208.67.220.220;
        option routers 192.168.1.1;
        hardware ethernet 00:13:49:AB:45:7D;
        fixed-address 192.168.1.70;
        }
# Local Network
host eth1 {
        option domain-name-servers 208.67.222.222 , 208.67.220.220;
        option routers 192.168.1.1;
        hardware ethernet 00:13:49:AB:CE:A3;
        fixed-address 10.0.0.88;
        }
What did I miss?

Last edited by expatCM; 12-31-2007 at 02:36 AM.
 
Old 12-31-2007, 02:45 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
the gateway for 10.0.0.0/24 must be *IN* 10.0.0.0/24 otherwise it can't even reach that. this very server is acting as that gateway by all accounts, so should be that ip, not your internet router.
 
Old 12-31-2007, 02:51 AM   #3
expatCM
Member
 
Registered: Apr 2006
Location: Chiang Mai, Thailand
Distribution: Ubuntu 14.04 64 bit
Posts: 104

Original Poster
Rep: Reputation: 15
Thanks for your message but sorry, I do not understand it.

I set eth1 to 10.0.0.88. Are you telling me that this is wrong?

or are you telling me that the gateway address of 192.168.1.1 is not much good when used with eth1? But if that is the case how can the eth1 find the gateway off eth0.
 
Old 12-31-2007, 02:54 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Code:
# Local Network
subnet 10.0.0.0 netmask 255.255.0.0 {
        option domain-name-servers 208.67.222.222 , 208.67.220.220;
        option subnet-mask 255.255.0.0;
        option routers 192.168.1.1;
        range 10.0.0.80 10.0.0.100;
        }
those three must be in the same subnet.

also those "host" sections are totally wrong and mean nothing. what do you expect them to do for you? a host definition defines a known specific machine with a known mac address that you want special measures to be taken on.... you have no need for that at all as of yet. you certainly wouldn't server *yourself* DHCP....

Last edited by acid_kewpie; 12-31-2007 at 02:56 AM.
 
Old 12-31-2007, 05:41 AM   #5
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
either put everything in the same subnet, or configure the server to be a router with NAT
 
Old 01-01-2008, 12:52 AM   #6
expatCM
Member
 
Registered: Apr 2006
Location: Chiang Mai, Thailand
Distribution: Ubuntu 14.04 64 bit
Posts: 104

Original Poster
Rep: Reputation: 15
to answer ....

I think I made a mistake in using webmin to set this up. I did follow the notes and that is why I ended up with the host sections. So they are now gone. It still does not work which is annoying but no idea why not. Is the broadcast address correct for eth1?

The network card on the client and the corresponding card on the server are using different ranges so this must be the problem.

I have tried changing the network card settings on the client from the roaming default to DHCP to giving a fixed address but nothing seems to make any difference.


The dhcpd.conf now is this which is not exactly complex

Code:
option routers 192.168.1.1;

option domain-name-servers 208.67.222.222, 208.67.220.220;

default-lease-time 600;
max-lease-time 7200;


# Internet Access
subnet 192.168.16.0 netmask 255.255.255.0 {
	option domain-name-servers 208.67.222.222 , 208.67.220.220;
	option routers 192.168.1.1;
	range 192.168.1.70 192.168.1.80;
	}
# Local Network
subnet 10.0.0.0 netmask 255.255.255.0 {
	option domain-name-servers 208.67.222.222 , 208.67.220.220;
	option routers 192.168.1.1;
	range 10.0.0.80 10.0.0.100;
	}
The service ifconfig is this

Code:
> ifconfig
eth0      Link encap:Ethernet  HWaddr 00:13:49:AB:45:7D  
          inet addr:192.168.1.70  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::213:49ff:feab:457d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:49860 errors:0 dropped:0 overruns:0 frame:0
          TX packets:52873 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:24989655 (23.8 MB)  TX bytes:33955819 (32.3 MB)
          Interrupt:20 Base address:0x2000 

eth1      Link encap:Ethernet  HWaddr 00:13:49:AB:CE:A3  
          inet addr:10.0.0.88  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::213:49ff:feab:cea3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1006 errors:0 dropped:0 overruns:0 frame:0
          TX packets:858 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:107709 (105.1 KB)  TX bytes:270219 (263.8 KB)
          Interrupt:21 Base address:0x8000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:67 errors:0 dropped:0 overruns:0 frame:0
          TX packets:67 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:5192 (5.0 KB)  TX bytes:5192 (5.0 KB)
But the Client gives a message of Network is Unreacheable.

The ifconfig is this
Code:
eth0      Link encap:Ethernet  HWaddr 00:16:E6:82:54:D6  

          inet addr:10.0.0.100  Bcast:10.0.255.255  Mask:255.255.0.0

          inet6 addr: fe80::216:e6ff:fe82:54d6/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:397 errors:0 dropped:0 overruns:0 frame:0

          TX packets:467 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:149605 (146.0 KB)  TX bytes:56732 (55.4 KB)

          Interrupt:10 Base address:0xc000 


lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:411 errors:0 dropped:0 overruns:0 frame:0

          TX packets:411 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:21436 (20.9 KB)  TX bytes:21436 (20.9 KB)
 
Old 01-02-2008, 02:03 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
am i going to have to say that the gateway is invald for a third time? am i writing in mandarin by accident or something?
 
  


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
no internet on dhcp client lrt Linux - Networking 5 11-20-2007 08:18 PM
DHCP server and DHCP client in same box Eicos Linux - Networking 3 03-03-2007 01:28 PM
connect to internet without dhcp client snip128 Linux - Networking 2 07-06-2005 04:29 AM
DHCP Server Client no connection to Internet westverg Linux - Networking 3 02-28-2005 07:08 AM
XP Pro Build 2600/sp1 v.1105 DHCP Client to Redhat 8.0 DHCP Server - Problems atomant Linux - Networking 5 06-28-2003 11:24 AM

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

All times are GMT -5. The time now is 05:05 AM.

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