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. |
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.. |
Quote:
Quote:
Quote:
Quote:
|
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.. |
thanks for your help. i figure its time to hit the books on iptables anyway.
|
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. |
All times are GMT -5. The time now is 06:38 PM. |