LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-24-2016, 06:31 AM   #16
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895

Post the /etc/sysconfig/network-scripts/ifcfg-eth0 file

Try the following for assigning an IP address via ifconfig.

ifconfig eth0 192.168.0.212 netmask 255.255.255.0 up

localhost i.e. 127.0.0.1 is a virtual interface and therefore pinging it does not use any real hardware.
 
Old 01-24-2016, 06:51 AM   #17
ZZII
Member
 
Registered: Dec 2014
Location: house
Distribution: Fedora Cinnamon 30
Posts: 61

Original Poster
Rep: Reputation: Disabled
Code:
DEVICE=eth0
HWADDR=b8:ac:6f:1c:46:38
TYPE=Ethernet
UUID=6fa5aa0d-234e-4f12-a590-ef8c7f12209d
ONBOOT=no
NM_CONTROLLED=yes
BOOTPROTO=none
USERCTL=no
IPV6INIT=no
DNS1=(the DNS that my desktop reports)
DNS2=8.8.8.8     <-- I don't know why this is still here I tried to clear it in system-config-network
IPADDR=192.168.0.121
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
Okay, so I tried that ifconfig string and it succeeded. "route" worked too, but had no default destination. The ping of localhost was successful. But google.com gave unknown host.

Also by the way, I have a wireless repeater going into a router then to the Optiplex if that makes a difference. Is gateway the router IP, the repeater, or the IP of the modem the repeater gets it's signal from?

Last edited by ZZII; 01-24-2016 at 06:56 AM.
 
Old 01-24-2016, 07:05 AM   #18
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
ONBOOT=no
should be changed to
ONBOOT=yes

The gateway address should be the LAN IP address of the router if I understand your setup.
 
Old 01-24-2016, 03:36 PM   #19
ZZII
Member
 
Registered: Dec 2014
Location: house
Distribution: Fedora Cinnamon 30
Posts: 61

Original Poster
Rep: Reputation: Disabled
Yeah, I'll change ONBOOT.

The setup goes:

Code:
     MODEM
       |
Wireless repeater
       |
     Router
       |
     --------
    |        |
 Desktop  Optiplex
 (Mint)   (CentOS)
There is a reason to this, and some some unimportant devices are omitted.

The router IP is what I am using as gateway (192.168.0.1)

I changed ONBOOT and now it activates on boot, and even shows the inet, bcast and netmask in ifconfig now. But ping google.com still gives unknown host.

Last edited by ZZII; 01-24-2016 at 03:49 PM.
 
Old 01-24-2016, 05:18 PM   #20
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Can you ping google's IP address?

ping 216.58.219.78
 
Old 01-24-2016, 07:35 PM   #21
ZZII
Member
 
Registered: Dec 2014
Location: house
Distribution: Fedora Cinnamon 30
Posts: 61

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
Can you ping google's IP address?

ping 216.58.219.78
Indeed I can.
 
Old 01-24-2016, 08:04 PM   #22
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Good, so this is just a DNS problem.

So post the contents of your /etc/resolv.conf file.

If it does not contain the DNS servers then you can set NM_CONTROLLED=no and add the DNS servers to /etc/resolv.conf
 
Old 01-24-2016, 08:57 PM   #23
ZZII
Member
 
Registered: Dec 2014
Location: house
Distribution: Fedora Cinnamon 30
Posts: 61

Original Poster
Rep: Reputation: Disabled
It has "nameserver (the IP)"

(Can I post my DNS? I've seen people sensor their's)
 
Old 01-24-2016, 09:05 PM   #24
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Sure.
 
Old 01-24-2016, 09:10 PM   #25
ZZII
Member
 
Registered: Dec 2014
Location: house
Distribution: Fedora Cinnamon 30
Posts: 61

Original Poster
Rep: Reputation: Disabled
/etc/resolv.conf =
Code:
nameserver 127.0.1.1
 
Old 01-24-2016, 09:17 PM   #26
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
127.0.1.1 is another IP address for a local loopback device which is why you can not ping a name. Change that to:
nameserver 8.8.8.8

And hopefully that will work.
 
Old 01-24-2016, 09:21 PM   #27
ZZII
Member
 
Registered: Dec 2014
Location: house
Distribution: Fedora Cinnamon 30
Posts: 61

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
127.0.1.1 is another IP address for a local loopback device which is why you can not ping a name. Change that to:
nameserver 8.8.8.8

And hopefully that will work.
Oh. I just though it was the correct DNS because that's what my desktop has for it's.

Well there you go, it was that simple. Thank you very much. It pings now.
 
  


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
ODBC connection from Wins7 to a VMWare VM running Centos 6.5 and a DB linuxhelpreq Linux - Networking 6 11-13-2014 05:26 AM
Patch Centos boxes without internet connection raylux Linux - Software 3 10-03-2012 09:10 AM
How to set up internet connection on Centos 5.5 after installation? dopisnik Linux - Newbie 4 06-14-2010 04:18 AM
How do I use wireless internet connection in CentOS? defrak Linux - Newbie 1 07-02-2009 12:48 PM
internet connection on centos linux lokesh_s Linux - Newbie 4 03-03-2008 09:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:26 PM.

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