LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   no internet access on my DHCPS server.... again (https://www.linuxquestions.org/questions/linux-newbie-8/no-internet-access-on-my-dhcps-server-again-4175631222/)

DennyY 06-04-2018 07:27 PM

no internet access on my DHCPS server.... again
 
Hi All,

I had some help, and my DHCP server finally had internet. And now it has no internet connection again. My DHCP client is fine. I am using the client at the moment.

And my DHCP server conf. haven't change:

ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
authoritative;

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.139 192.168.1.160;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
option domain-name-servers 8.8.8.8,4.4.4.4;
}

IP = 192.168.1.138
netmask = 255.255.255.0


Where should I try to modify?

Thank you,
Denny

michaelk 06-04-2018 08:13 PM

The DHCP server is just one program that runs on the computer and is independent of its own network connections. All of its network settings are static and from your previous threads the original problem was due to no defined route and name server information. While we provided you with the commands to add the information I forgot tell you how to make the information persistent.

You never posted how you originally configured the "DHCP server" with a static IP address. In whatever method used you can add both the name servers and gateway information.

DennyY 06-04-2018 08:43 PM

network-scripts file for DHCP server configuration
 
Hello,

So here are a few lines of my network-scripts:

BOOTPROTO="static"
IPADDR="192.168.1.138"
NETWORK="192.168.1.0"
NETMASK="255.255.255.0"
BROADCAST="192.168.1.255"


Thank you again for your help,
Denny



Quote:

Originally Posted by michaelk (Post 5863711)
The DHCP server is just one program that runs on the computer and is independent of its own network connections. All of its network settings are static and from your previous threads the original problem was due to no defined route and name server information. While we provided you with the commands to add the information I forgot tell you how to make the information persistent.

You never posted how you originally configured the "DHCP server" with a static IP address. In whatever method used you can add both the name servers and gateway information.


michaelk 06-04-2018 08:51 PM

Would of been nice if you posted the entire file. Adding the following information to the network-scripts file should make the settings persistent.

Code:

GATEWAY=192.168.1.1
DNS1=8.8.8.8
DNS2=8.8.4.4


DennyY 06-04-2018 09:01 PM

network-scripts
 
Sorry.... I thought other info aren't as important. And didn't want to waste your time looking at those lines.

I will add those codes now and see what happens.

Thanks again,
Denny




Quote:

Originally Posted by michaelk (Post 5863727)
Would of been nice if you posted the entire file. Adding the following information to the network-scripts file should make the settings persistent.

Code:

GATEWAY=192.168.1.1
DNS1=8.8.8.8
DNS2=8.8.4.4



DennyY 06-04-2018 09:14 PM

another network-scripts
 
Hi,

Just noticed there is another networkscripts under /etc/sysconfig/networkscripts/ifcfg-Wired_Connections_1:

TYPE=Ethernet
BOOTPROTO=dhcp
IPADDR=192.168.1.138
DNS1=8.8.8.8
DNS2=4.4.4.4
ONBOOT=yes
PREFIX=24


After I added those codes you provided, and restarted dhcpd, the internet is still down.

Not sure if this script has anything to do with it or not.

Thanks again,
Denny






Quote:

Originally Posted by michaelk (Post 5863727)
Would of been nice if you posted the entire file. Adding the following information to the network-scripts file should make the settings persistent.

Code:

GATEWAY=192.168.1.1
DNS1=8.8.8.8
DNS2=8.8.4.4



michaelk 06-04-2018 09:30 PM

You need to restart networking or the computer itself.

You bootproto should be static. What is the name of the other ifcfg file?

scasey 06-05-2018 04:57 PM

DennyY, (again) please use code tags when pasting commands or contents of config files.

I recently discovered that networking will process all files beginning with ifcfg- found in the /etc/sysconfig/network-scripts/ directory.
I believe it does that in the listing order, but I'm not sure.

Please post the result of
Code:

ls -l /etc/sysconfig/network-scripts/ifcfg-*
and (as michaelk requested) the contents of each of the ifcfg-* files in that directory:
Code:

more ifcfg-*


All times are GMT -5. The time now is 02:56 PM.