LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-04-2018, 07:27 PM   #1
DennyY
Member
 
Registered: May 2018
Location: San Francisco, CA
Distribution: CentOS 7
Posts: 76

Rep: Reputation: 1
Question 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
 
Old 06-04-2018, 08:13 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,065

Rep: Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367
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.
 
1 members found this post helpful.
Old 06-04-2018, 08:43 PM   #3
DennyY
Member
 
Registered: May 2018
Location: San Francisco, CA
Distribution: CentOS 7
Posts: 76

Original Poster
Rep: Reputation: 1
Question 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 View Post
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.
 
Old 06-04-2018, 08:51 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,065

Rep: Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367
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

Last edited by michaelk; 06-04-2018 at 08:52 PM.
 
1 members found this post helpful.
Old 06-04-2018, 09:01 PM   #5
DennyY
Member
 
Registered: May 2018
Location: San Francisco, CA
Distribution: CentOS 7
Posts: 76

Original Poster
Rep: Reputation: 1
Smile 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 View Post
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
 
Old 06-04-2018, 09:14 PM   #6
DennyY
Member
 
Registered: May 2018
Location: San Francisco, CA
Distribution: CentOS 7
Posts: 76

Original Poster
Rep: Reputation: 1
Question 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 View Post
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
 
Old 06-04-2018, 09:30 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,065

Rep: Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367Reputation: 3367
You need to restart networking or the computer itself.

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

Last edited by michaelk; 06-04-2018 at 10:49 PM.
 
Old 06-05-2018, 04:57 PM   #8
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.8.2003
Posts: 4,835

Rep: Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765Reputation: 1765
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-*
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] PPPOE server access the internet clients fail to access the internet simbini Linux - Newbie 3 08-31-2010 12:37 AM
Internet Access from the Server DarkFlame Linux - Server 6 12-14-2008 10:02 PM
internet server that use a prepaid account to access the internet elgieb1 Linux - General 0 02-19-2007 11:59 PM
Unable to access my ssh server and ftp server from the Internet, but smtp works foxone Linux - Networking 1 05-28-2004 05:17 PM
Internet Access via Server louisb Linux - Security 3 01-09-2004 10:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:23 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration