LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 12-16-2014, 01:33 PM   #1
walterbyrd
Member
 
Registered: Apr 2004
Posts: 734

Rep: Reputation: 46
Cannot reach internet after setting IP address to static.


When I has CentOS 6.5, I had my IP set to this static address: 192.168.1.109.

That is what I wanted with CentOS 7. Unfortunately, I was not able to install CentOS 7 with a static IP address. It just would not let me.

So I edited ifcfg-enp3s0. I set up the static IP address, and it worked. I can ping other computers on my home network, and other computers can ping me. No problem.

Except I cannot reach the internet. I cannot ping yahoo.com by it's name, or by it's IP: 206.190.36.45. Other computers on my home network can reach the internet.

BTW: why did redhat rename eth0 enp3s0? What good does that do?

Also, why doesn't ifup or ifdown work anymore?
 
Old 12-16-2014, 01:59 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
have you turned off the wireless & VPN enabled "network-manager"
and turned on the wired only "network"

ifup/ifdown will NOT work if you are using the desktop manager to handle the network
that is a DE plasmoid

I take you did not read the release notes to see what is NEW and what was REMOVED
http://wiki.centos.org/Manuals/ReleaseNotes/CentOS7
https://access.redhat.com/documentat..._Features.html

Last edited by John VV; 12-16-2014 at 02:05 PM.
 
Old 12-16-2014, 02:47 PM   #3
walterbyrd
Member
 
Registered: Apr 2004
Posts: 734

Original Poster
Rep: Reputation: 46
It looks to me like I am not using the network manager.

Code:
# nmcli dev status
DEVICE  TYPE      STATE      CONNECTION 
enp3s0  ethernet  unmanaged  --         
lo      loopback  unmanaged  --

Code:
# ip add
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 94:de:80:2f:c5:8b brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.109/24 brd 192.168.1.255 scope global enp3s0
       valid_lft forever preferred_lft forever
    inet6 2601:1:8900:2ba0:96de:80ff:fe2f:c58b/64 scope global dynamic 
       valid_lft 3593sec preferred_lft 3593sec
    inet6 fe80::96de:80ff:fe2f:c58b/64 scope link 
       valid_lft forever preferred_lft forever
Code:
# systemctl -l status NetworkManager.service
NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled)
   Active: active (running) since Tue 2014-12-16 11:45:30 MST; 1h 49min ago
 Main PID: 891 (NetworkManager)
   CGroup: /system.slice/NetworkManager.service
           └─891 /usr/sbin/NetworkManager --no-daemon

Dec 16 12:24:37 localhost.localdomain NetworkManager[891]: ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-lo ...
Dec 16 12:24:37 localhost.localdomain NetworkManager[891]: ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-lo ...
Dec 16 12:24:38 localhost.localdomain NetworkManager[891]: <info> (lo): link disconnected
Dec 16 12:24:38 localhost.localdomain NetworkManager[891]: ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-lo ...
Dec 16 12:24:38 localhost.localdomain NetworkManager[891]: ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-lo ...
Dec 16 12:24:38 localhost.localdomain NetworkManager[891]: ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-lo ...
Dec 16 12:24:38 localhost.localdomain NetworkManager[891]: <info> (lo): link connected
Dec 16 12:24:38 localhost.localdomain NetworkManager[891]: ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-lo ...
Dec 16 12:24:38 localhost.localdomain NetworkManager[891]: ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-lo ...
Dec 16 12:24:41 localhost.localdomain NetworkManager[891]: <info> (enp3s0): link connected




/etc/sysconfig/network-scripts/ifcfg-enp3s0
Code:
HWADDR=94:DE:80:2F:C5:8B
TYPE=Ethernet
BOOTPROTO="static"
IPADDR=192.168.1.109
NETMASK=255.255.255.0
NM_CONTROLLED=no
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=enp3s0
UUID=5d4e826e-c447-4e55-bb99-9bcb4c3e2ad9
ONBOOT=yes

Code:
# ifconfig
enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.109  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 2601:1:8900:2ba0:96de:80ff:fe2f:c58b  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::96de:80ff:fe2f:c58b  prefixlen 64  scopeid 0x20<link>
        ether 94:de:80:2f:c5:8b  txqueuelen 1000  (Ethernet)
        RX packets 900  bytes 122981 (120.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 609  bytes 124118 (121.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 11438  bytes 2310427 (2.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 11438  bytes 2310427 (2.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
Here is where I got the instructions about how to change to a static IP:

http://ask.xmodulo.com/configure-sta...ml#comment-294
 
Old 12-16-2014, 04:02 PM   #4
walterbyrd
Member
 
Registered: Apr 2004
Posts: 734

Original Poster
Rep: Reputation: 46
I edited ifcfg-enp3s0 to include a GATEWAY. I also edited resolv.conf to include nameservers. And it works now. Thanks for the replies.

BTW: is it a lot of trouble to change enp3s0 to eth0 ?
 
Old 12-16-2014, 04:21 PM   #5
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Quote:
Originally Posted by walterbyrd View Post
BTW: is it a lot of trouble to change enp3s0 to eth0 ?
http://www.freedesktop.org/wiki/Soft...nterfaceNames/

This behaviour can be disabled by adding "net.ifnames=0" as a kernel parameter.
 
  


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] how to setting a static ip address on slackware64 13 wubai Slackware 5 11-12-2012 07:21 PM
setting static IP on linux PCs with no static IP address from internet provider? solvetek Linux - Networking 1 10-22-2011 08:04 AM
Cannot reach the internet after configuring Static IP Mitchal Linux - Newbie 4 01-16-2011 04:00 PM
Setting a static IP address thedp Slackware 4 05-02-2008 01:09 PM
Setting up a static I.P. address partyk1d24 Linux - Networking 13 12-29-2005 06:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 07:25 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