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 11-20-2007, 07:50 AM   #1
lrt
Member
 
Registered: Sep 2007
Location: Chattanooga, TN
Distribution: Ubuntu
Posts: 84

Rep: Reputation: 15
no internet on dhcp client


i already posted this on ubuntuforums.org, but i'm having trouble getting help. if someone could check this out i would appreciate it.

i have a windows client (using it as a test machine) that is being assigned an ip address via dhcp. the dhcp server (ubuntu 7.10) has two nics:

eth0: 192.168.1.101 (from router 192.168.1.1)
eth1: 192.168.17.10 (assigned statically)

the dhcp server is serving addresses from eth1 to 192.168.17.0 subnet.


ipconfig/all on the windows client shows this:

Windows IP Configuration

Host Name . . . . . . . . . . . . : AAC17

Primary Dns Suffix . . . . . . . :

Node Type . . . . . . . . . . . . : Broadcast

IP Routing Enabled. . . . . . . . : No

WINS Proxy Enabled. . . . . . . . : No


Ethernet adapter Local Area Connection 2:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : D-Link DGE-530T Gigabit Ethernet Adapter

Physical Address. . . . . . . . . : 00-15-E9-F9-F7-07

Dhcp Enabled. . . . . . . . . . . : Yes

Autoconfiguration Enabled . . . . : Yes

IP Address. . . . . . . . . . . . : 192.168.17.50

Subnet Mask . . . . . . . . . . . : 255.255.255.0

Default Gateway . . . . . . . . . : 192.168.17.10

DHCP Server . . . . . . . . . . . : 192.168.17.10

Lease Obtained. . . . . . . . . . : Monday, November 19, 2007 3:26:37 PM

Lease Expires . . . . . . . . . . : Monday, November 19, 2007 3:36:37 PM



this is my dhcpd.conf on the linux machine:

ddns-update-style none;

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

authoritative;

log-facility local7;

subnet 192.168.17.0 netmask 255.255.255.0 {
range 192.168.17.10 192.168.17.50;
option routers 192.168.17.10;
}


/etc/network/interfaces shows this:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
gateway 192.168.1.1

#The secondary network interface
iface eth1 inet static
address 192.168.17.10
netmask 255.255.255.0
network 192.168.17.0
gateway 192.168.17.10


the problem:

everything on the windows machine seems to look OK, but i can't get any internet connection. i can't ping anything from the windows machine except for both nics on the linux machine, 192.168.1.101 (eth0) and 192.168.17.10 (eth1).

what do i need to do? i'm a bit lost.
 
Old 11-20-2007, 08:43 AM   #2
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
the one thing that doesn't look right to me is that your Router is also in your scope..

range 192.168.17.10 192.168.17.50;
option routers 192.168.17.10;

your range should start at 11 since your gateway is set at a static address of 10.


So how is your network setup ? does the windows client need to go through the Linux machine to reach the internet ?

<Internet Router 192.168.1.1>-------------< 192.168.1.101 Linux PC 192.168.17.10 >--------< 192.168.17.50 Windows Client>

if that's the case you need to configure IP forwarding on the Linux PC, and ensure there's a Static route defined in the Internet router that points the way to the 192.168.17.0 subnet..
 
Old 11-20-2007, 01:02 PM   #3
lrt
Member
 
Registered: Sep 2007
Location: Chattanooga, TN
Distribution: Ubuntu
Posts: 84

Original Poster
Rep: Reputation: 15
Quote:
your range should start at 11 since your gateway is set at a static address of 10.
192.168.17.10 is the dhcp server. shouldn't the dhcp server be included in the range so the client can find the server?

Quote:
So how is your network setup ? does the windows client need to go through the Linux machine to reach the internet ?

<Internet Router 192.168.1.1>-------------< 192.168.1.101 Linux PC 192.168.17.10 >----< SWITCH >----< 192.168.17.50 Windows Client>
yes, this is exactly how i have network setup, with the exception of one switch in between. the reason i want it to be routed through a linux machine is because i want to run the window clients under a samba domain controller, so eventually there will be many more windows clients.

Quote:
if that's the case you need to configure IP forwarding on the Linux PC,
i'm not sure how to do this, but i will research. could you enlighten me?

Quote:
and ensure there's a Static route defined in the Internet router that points the way to the 192.168.17.0 subnet..
i will experiment with this also. thanks.
 
Old 11-20-2007, 04:57 PM   #4
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
You NEVER include an address that is already assigned in the scope. The Scope defines the addresses that are available for your server to hand out.

If I had servers at 10, 11, 12, 13, 14 & 15 defining a scope from 10-50 could cause up to 5 IP address conflicts..

I usually reserve 1-50 for static IP address assignments then define my scope to hand out 51-254


iptables isn't my strong suit, so I'll let someone else explain ipmasq and ip forwarding to you..
 
Old 11-20-2007, 08:02 PM   #5
lrt
Member
 
Registered: Sep 2007
Location: Chattanooga, TN
Distribution: Ubuntu
Posts: 84

Original Poster
Rep: Reputation: 15
thanks for your help. i figure its time to hit the books on iptables anyway.
 
Old 11-20-2007, 08:18 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Is your router a NAT router? If that is the case you may not need to use masquerading but just IP forwarding. I did something similar when I used my laptop's wireless interface for my Desktop to access the wireless router. I used a subnet instead.
The wireless interface was on 192.168.1.0/25 and the Desktop was on 192.168.1.128/25 (these are network addresses). I believe that the router was set up for 192.168.1.0/25 as well as the wlan0 interface.

I needed to modprobe the ip_conntrack kernel module before it would work. I don't understand why. Also, the name has changed in recent kernels to I think "nf_conntrack". My Desktop was running Linux and not XP but I that shouldn't matter. Anyway, if the router is a NAT router, you shouldn't need to do the NATing in your Linux machine. But you can of course.

Note: I am not entirely certain on the old name of the kernel module. It might have been tcp_conntrack instead.

Last edited by jschiwal; 11-20-2007 at 08:19 PM.
 
  


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
Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address blackfish Linux - Server 3 08-17-2007 12:54 AM
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
DHCP and client cant connect to internet RahJiggah Linux - Networking 17 12-28-2004 12:13 AM
What is the DHCP Client Name for Cox Internet? digiplaya Linux - Networking 3 11-30-2003 12:20 AM

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

All times are GMT -5. The time now is 03:43 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