LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 05-29-2018, 11:23 PM   #1
DennyY
Member
 
Registered: May 2018
Location: San Francisco, CA
Distribution: CentOS 7
Posts: 85

Rep: Reputation: 1
Question No internet access on my DHCP server


Hi All,

Now my DHCP server is up and running, but it has no internet connection.

Is this what it is supposed to be? Because now this station is a server, so it has no internet connection?

My internet connection is fine. I have internet connection on my laptop, and DHCP client station.
And also when I typed 192.168.1.131, my Apache server is up. But when I tried to go to google.com or any site, it says "server not found".

Thanks,
Denny
 
Old 05-30-2018, 12:09 AM   #2
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,971

Rep: Reputation: 271Reputation: 271Reputation: 271
Quote:
Originally Posted by DennyY View Post
Now my DHCP server is up and running, but it has no internet connection.

Is this what it is supposed to be?
No. Is it a separate computer?

Quote:
Originally Posted by DennyY View Post
My internet connection is fine. I have internet connection on my laptop, and DHCP client station.
How do you know? Is the laptop a client of the DHCP server?

Quote:
Originally Posted by DennyY View Post
when I tried to go to google.com or any site, it says "server not found".
What happens if you ping 172.217.2.238 ?
 
Old 05-30-2018, 12:17 AM   #3
DennyY
Member
 
Registered: May 2018
Location: San Francisco, CA
Distribution: CentOS 7
Posts: 85

Original Poster
Rep: Reputation: 1
Question DHCP server has no internet connection

Hi,

Yes, DHCP server and DHCP client are 2 separate computers.

On the DHCP server, it is still "wired connected" to the internet. Although everything is fine, it has no internet connection.

The DHCP client is also "wired connected". I am sending this message via my DHCP client. As you can see, I have internet connection.
My laptop is using wifi, which has no problem also. I am not sure if it is also a DHCP client or not. It's turned off at the moment.

I can't ping 172.217.2.238. "The network is unreachable".

Thank you,
Denny




Quote:
Originally Posted by RandomTroll View Post
No. Is it a separate computer?


How do you know? Is the laptop a client of the DHCP server?


What happens if you ping 172.217.2.238 ?
 
Old 05-30-2018, 05:02 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,749

Rep: Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928
Since the DHCP server is configured with a static IP address the DNS name servers also have to be manually added. If you are running a desktop you can manually add the name servers using the Network Manager applet.
 
1 members found this post helpful.
Old 05-30-2018, 11:14 PM   #5
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 510

Rep: Reputation: 58
you have to have up and running networking before getting out to internet

the installation manual for your distribution should walk you through getting out to the internet (if it doesn't: you haven't seen the right guide yet)

furst ping 127.0.0.1 (that's localhost on most linux boxes, though check your /etc/ files if they are not XML config files on your system). if that's not working you don't have anything configured.

next use 'ifconfig' to get a list of network devices that are "up". (if there are none they haven't been configured. if they can't be configured - the kernel doesn't have a driver for your network - but it probably does)

if you have an "up" interface, check your route table insure there is a route outward (note: use a routing daemon to automatically provide routes so you don't have to learn how)

finally: IF YOU HAVE A MODERN MODEM OR ROUTER steer your web browser to it's address (written on the modem somewheres)

IMPORTANT: while you can use linux to "configure site networking and firewalling": a modern modem can do the same using your web browser (it's built-in). your choice, you can guess which is easier to start with.

finally: if your using a ISP (internet service provider) they may be blocking DHCP. your not on the "internet" by default your on their local DMZ/lan and getting access to the internet through them. you may have to "pay extra" or switch providers to get a real connection and real IP without "signal blocking" - and the same for each remote machine as well, as they may only be able to get dhcp from the isp they are on.

Last edited by X-LFS-2010; 05-30-2018 at 11:19 PM.
 
1 members found this post helpful.
Old 05-31-2018, 08:31 AM   #6
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
X-LFS-2010, your post above needs help. "If you are using a ISP ..."Everyone with Internet access uses an ISP! Also, could you please provide an example of an ISP blocking DHCP? And what is ISP signal blocking? ISPs may block certain ports to prevent customers from running servers.
 
Old 05-31-2018, 10:23 AM   #7
DennyY
Member
 
Registered: May 2018
Location: San Francisco, CA
Distribution: CentOS 7
Posts: 85

Original Poster
Rep: Reputation: 1
Question no internet access on my DNS server

Hi,

Just added DNS nameservers to my DHCP server, and still no internet access.

nameserver 8.8.8.8
nameserver 4.4.4.4


Those are now in my /etc/resolv.conf

I can also ping 127.0.0.1.

Any thoughts on this?

Thanks again,
Denny




Quote:
Originally Posted by michaelk View Post
Since the DHCP server is configured with a static IP address the DNS name servers also have to be manually added. If you are running a desktop you can manually add the name servers using the Network Manager applet.
 
Old 05-31-2018, 10:44 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,749

Rep: Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928
Your server is running CentOS 7?

Can you ping 8.8.8.8?

If your running a desktop on this server the best method would be to use the Network Manager applet to add DNS servers.

If your not running a desktop then you can use the nmcli command line utility.

https://www.tecmint.com/configure-ne...tool-in-linux/
 
1 members found this post helpful.
Old 05-31-2018, 10:52 AM   #9
DennyY
Member
 
Registered: May 2018
Location: San Francisco, CA
Distribution: CentOS 7
Posts: 85

Original Poster
Rep: Reputation: 1
Question No internet access on my DHCPS server

Hi again,

Thanks again for all of your help.

Yes, the server is running on CentOS 7.

I did manually enter 8.8.8.8, and 4.4.4.4. via network setting. And then I double checked with /etc/resolv.conf. And those are also in this file.

I will try to ping 8.8.8.8. when I get home after work. (should have tried that last night!)

Have a great day,
Denny




Quote:
Originally Posted by michaelk View Post
Your server is running CentOS 7?

Can you ping 8.8.8.8?

If your running a desktop on this server the best method would be to use the Network Manager applet to add DNS servers.

If your not running a desktop then you can use the nmcli command line utility.

https://www.tecmint.com/configure-ne...tool-in-linux/
 
Old 05-31-2018, 10:53 AM   #10
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,149

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
Do you have a default gateway? What is the output of "route -n" or "ip route show" (whichever works) on your DHCP server.
 
Old 05-31-2018, 11:02 AM   #11
DennyY
Member
 
Registered: May 2018
Location: San Francisco, CA
Distribution: CentOS 7
Posts: 85

Original Poster
Rep: Reputation: 1
Question No internet access on my DHCP server

Hi,

No, I don't have a default gateway.

#ip route
192.168.1.0/24 dev p8p1 proto kernel scope link src 192.168.1.138 metric 100
192.168.122.0/24 dev vir0 proto kernel scope link src 192.168.122.1


Thanks for your reply,
Denny



Quote:
Originally Posted by smallpond View Post
Do you have a default gateway? What is the output of "route -n" or "ip route show" (whichever works) on your DHCP server.
 
Old 05-31-2018, 11:46 AM   #12
DennyY
Member
 
Registered: May 2018
Location: San Francisco, CA
Distribution: CentOS 7
Posts: 85

Original Poster
Rep: Reputation: 1
Question No internet on my DHCP server

Hi,

By the way, I also don't have a default gateway. I don't know if this is an issue or not.

And this is what I get when I typed ip route:

#ip route
192.168.1.0/24 dev p8p1 proto kernel scope link src 192.168.1.138 metric 100
192.168.122.0/24 dev vir0 proto kernel scope link src 192.168.122.1

Thanks again,
Denny




Quote:
Originally Posted by michaelk View Post
Your server is running CentOS 7?

Can you ping 8.8.8.8?

If your running a desktop on this server the best method would be to use the Network Manager applet to add DNS servers.

If your not running a desktop then you can use the nmcli command line utility.

https://www.tecmint.com/configure-ne...tool-in-linux/
 
Old 05-31-2018, 12:07 PM   #13
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
If you have Internet access you have a gateway. On one of the machines with Internet access try:
Code:
$ ip rout
The 'default via' is the gateway. DHCP servers have a static IP. So you have make a static assignment on the gateway device for the DHCP server.
 
1 members found this post helpful.
Old 05-31-2018, 12:10 PM   #14
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,749

Rep: Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928
Try the command

ip route add default via 192.168.1.1
 
1 members found this post helpful.
Old 05-31-2018, 06:53 PM   #15
DennyY
Member
 
Registered: May 2018
Location: San Francisco, CA
Distribution: CentOS 7
Posts: 85

Original Poster
Rep: Reputation: 1
Question DHCP server

Hi,

I added that default you suggested, and now my DHCP server has internet!

Can you please explain to me the concept behind this?

PS. Now gotta find out why can't log on to mysql.

Thank you so much,
Denny




Quote:
Originally Posted by michaelk View Post
Try the command

ip route add default via 192.168.1.1
 
  


Reply



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 for dhcp clients djekovic.dejan Linux - Server 8 11-26-2009 08:42 AM
(?) internet access for dhcp-clien dplung Linux - Networking 4 01-07-2008 04:34 AM
No network/internet access with dhcp and cable modem skippy1283 Linux - Networking 3 05-26-2004 08:11 AM
Problems with DHCP and Comcast cable modem Internet access tomdkat Linux - Networking 2 07-23-2003 01:17 PM

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

All times are GMT -5. The time now is 11:41 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
Open Source Consulting | Domain Registration