LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   DHCP Server Client no connection to Internet (https://www.linuxquestions.org/questions/linux-networking-3/dhcp-server-client-no-connection-to-internet-295729/)

westverg 02-28-2005 12:20 AM

DHCP Server Client no connection to Internet
 
ok, heres my problem i'm searching for two weeks now. first i'm using a FC3 as a dhcp server in our company. it has 2NIC, eth0 is 202.73xxx.xxx, eth1 is 192.168.1.1..
my configuration in dhcpd.conf is:
Subnet 192.168.1.0 netmask 255.255.255.0 {
max-lease-time 518400;
default-lease-time 259200;
range 192.168.1.2 192.168.1.254;
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;
option subnet-mask 255.255.255.0;
option domain-name-servers 202.73.xxx.xxx,202.73.xxx.xxx;
}
host gateway {
fixed-address 192.168.1.1;
our client PCs uses win2000 when i make the setting obatain automatically, seems no problem becase it gives me the dhcp server, default gateway, DNS and ip, problem is i cant connect to the internet,

eth0=202.73.xxx.xxx
DNS=202.73.xxx.xxx
202.73.xxx.xxx
gateway=202.73.xxx.xxx

eth1 =192.168.1.1
thanks

fr_laz 02-28-2005 02:31 AM

You've forgotten the mac-address setting in the host section :
host gateway {
...
hardware ethernet 00:D0:59:CC:F8:B0;
}

The hardware line is themost important in a host section, since it's the only way to identify the host in the dhcp queries.

If this line is not in your conf file, then your gateway is almost certainly misconfigured (meaning configured as a standard PC).

Does this lines work ?

eth0=202.73.xxx.xxx
DNS=202.73.xxx.xxx
202.73.xxx.xxx
gateway=202.73.xxx.xxx
eth1 =192.168.1.1

I thought you had to use this syntax :
hardware ethernet 00:D0:59:CC:F8:B0;
fixed-address maillard;
option domain-name "something.org";
option domain-name-servers dns_IP;
option broadcast-address 192.168.0.255;
option routers gateway_IP;

camh 02-28-2005 05:44 AM

i think he was just stating his network setup

Darin 02-28-2005 07:08 AM

The config from the client looks wrong. Your clients should be on the private 192.168.1.0/24 subnet and need a gateway that knows how to GET off the subnet, but it has to BE on the subnet. So if your router is 192.168.1.1 then that is what the clients should get as their default gateway, then it's up to the node at 192.168.1.1 to figure out how to get to the world from there, not the clients.

If your host is the gateway (router) it needs a static IP, especially if it's the DHCP server, as it has to cement it's address before it can give out dynamic addresses.

If you are implimenting a new network, or redisigning an existing one, it's also not a bad idea to set aside a few IPs for static assignment, or pseudo-static assignment in your DHCP setup so start the pool with a higher number like 10:
Code:

#remove or remark the line below if it's in here
option routers 202.73.xxx.xxx;
#change the pool and verify the router is inside this section
subnet 192.168.1.0 netmask 255.255.255.0 {
...other paramaters...
  option routers 192.168.1.1;
  range 192.168.1.20 192.168.1.254; }

host server2 { hardware ethernet 01:23:45:67:8A:9B;
    fixed-address 192.168.1.5; }

If you only have one IP address at your ISP then it should be assigned to the router's other network card and you use NAT/IPTABLES to let the systems inside your network have their own private IP addresses and all get to the 'net through the one public IP.


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