LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   isolated network-can't get server to receive a IP via dhcp (https://www.linuxquestions.org/questions/linux-networking-3/isolated-network-cant-get-server-to-receive-a-ip-via-dhcp-637058/)

ncsuapex 04-22-2008 10:58 AM

isolated network-can't get server to receive a IP via dhcp
 
I have 2 PCs that I am trying to get to connect on their own isolated network.

PC1: Centos 5. This is my DHCP server
PC2: FC2 this is the PC i am trying to obtain an IP via DHCP.


my dhcpd.conf on PC1 is

# Sample /etc/dhcpd.conf
# (add your comments here)
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "mydomain.org";

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
range 192.168.1.150 192.168.1.200;
}



The 2 PCs are connected to a 8port Nway switch.
I also tried connecting them to each other with just a cross-over cable.


On PC2 I run system-config-network, set it to DHCP
then run service network restart and it waits a few minutes then FAILS.


What am I doing wrong?

If I set PC2 to a static IP then the 2 PCs can talk to each other. But I need PC1 to be a DHCP server.

DHCPD service is running on PC1

Thanks


UPDATE:

The last line in PC2:/var/log/messages shows
localhost dhclient: No DHCPOFFERS received.


UPDATE2:
connected PC2 back to the main network and ran service network restart and it came back with a DHCP IP. So looks like PC1 is the problem...

Junior Hacker 04-22-2008 01:06 PM

Although I'm not sure if this will help. I have issues getting an IP on a certain network with Windows on a dual boot with Linux Debian laptop, Debian boots up fine with an IP address, not Windows. To get an IP in Windows, I reset the TCP/IP properties for the interface to not use DHCP and specify an address. Then I check the connection, usually it's good. Then I go back and re-set it to obtain it's address dynamically via DHCP, which it does even after a re-boot.
All the information you will require to specify your own address is in your post, such as the default gateway, subnet-mask, and the range of IP addresses to try, ex. (range 192.168.1.10 192.168.1.100), try 192.168.1.16, if that don't work because another computer uses that address, try something else in that range at random.

ncsuapex 04-22-2008 02:48 PM

this is a windows free isolated network.



BTW.. got it working


changed the dhcpd.conf to this:


ddns-update-style interim;
ignore client-updates;

subnet 192.168.1.0 netmask 255.255.255.0 {

# --- default gateway
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;

#option nis-domain "domain.org";
#option domain-name "domain.org";
#option domain-name-servers 192.168.1.1;

#option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;

range dynamic-bootp 192.168.1.128 192.168.1.254;
default-lease-time 21600;
max-lease-time 43200;

# we want the nameserver to appear at a fixed address
#host ns {
# next-server marvin.redhat.com;
# hardware ethernet 12:34:56:78:AB:CD;
# fixed-address 207.175.42.254;
#}
}


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