LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-02-2016, 08:46 PM   #1
Noo
LQ Newbie
 
Registered: Mar 2016
Posts: 8

Rep: Reputation: Disabled
Static IP not working in CentOS 6.5


I am using centOS6.5 64bit facing this error
Code:
Bringing up interface eth0:  Error: Connection activation failed: Device not managed by NetworkManager or unavailable
[FAILED]
I setup network connection by using NetworkManager following is the details of
Code:
/etc/sysconfig/network-scripts/ifcfg-eth0
Code:
EVICE=eth0
TYPE=Ethernet
UUID=210fa6e0-3621-4bf4-92ed-423d3b2db364
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPV6INIT=no
USERCTL=no
IPADDR=122.129.243.187
NETMASK=255.255.255.128
HWADDR=D8:D3:85:8F:02:48
PREFIX=25
GATEWAY=255.255.255.128
DNS1=122.129.240.1
DNS2=219.252.1.100
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
NAME="System eth0"

I also tried to disable NetworkManager and user network but no luck.

ifconfig output
Code:
eth0      Link encap:Ethernet  HWaddr D8:D3:85:8F:02:48  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:19 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:56 errors:0 dropped:0 overruns:0 frame:0
          TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:4080 (3.9 KiB)  TX bytes:4080 (3.9 KiB)
/etc/init.d/network restart output

Code:
/etc/init.d/network restart
Shutting down interface eth0:                              [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:  Error: Connection activation failed: Device not managed by NetworkManager or unavailable
                                                           [FAILED]
Let me know if you need more details.
 
Old 03-02-2016, 09:02 PM   #2
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 617

Rep: Reputation: 142Reputation: 142
from my minimal network knowledge I would have expected a different gateway.

Quote:
GATEWAY=255.255.255.128
Are you sure that is correct?
 
Old 03-02-2016, 11:08 PM   #3
Noo
LQ Newbie
 
Registered: Mar 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
No this was a typo, I made it correct.
Code:
GATEWAY=122.129.243.214
Though still I can't ping www.centos.org
Ping result "uknown host"
 
Old 03-03-2016, 12:22 AM   #4
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,274

Rep: Reputation: 148Reputation: 148
Hi;
Something not correct; see this example interface configuration
DEVICE=eth0
# eth0
IPADDR=192.168.10.100
NETMASK=255.255.255.0
BOOTPROTO=static
ONBOOT=yes
NOZEROCONF=yes
VLAN=no
USERCTL=no

if you configure static ip, BOOTPROTO=static

look at your ifconfig output, IP address is missing, so the interface wasn't up correctly with IP address
 
Old 03-03-2016, 12:30 AM   #5
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,274

Rep: Reputation: 148Reputation: 148
Hi;
if you add DNS{1,2} in the interface configuration you supposed to add another parameter PEERDNS=yes
usually i add DNS server under /etc/resolv.conf instead of interface config

here you can see all the meaning of interface configuration parameter.
https://access.redhat.com/documentat...nterfaces.html
 
Old 03-03-2016, 12:43 AM   #6
Noo
LQ Newbie
 
Registered: Mar 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
I change accordingly, move DNS1 and DNS2 /etc/resolv.conf.
And changed /etc/sysconfig/network-scripts/ifcfg-eth0 as below

Code:
DEVICE=eth0
TYPE=Ethernet
UUID=210fa6e0-3621-4bf4-92ed-423d3b2db364
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPV6INIT=no
USERCTL=no
IPADDR=122.129.243.187
NETMASK=255.255.255.128
HWADDR=D8:D3:85:8F:02:48
NAME="System eth0"
Now IP is appeared

ifconfig output
Code:
eth0      Link encap:Ethernet  HWaddr D8:D3:85:8F:02:48  
          inet addr:122.129.243.187  Bcast:122.129.243.255  Mask:255.255.255.128
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:19 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:145 errors:0 dropped:0 overruns:0 frame:0
          TX packets:145 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:11728 (11.4 KiB)  TX bytes:11728 (11.4 KiB)
 
Old 03-03-2016, 01:29 AM   #7
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,274

Rep: Reputation: 148Reputation: 148
Hi;
still not working?
 
Old 03-03-2016, 01:54 AM   #8
Noo
LQ Newbie
 
Registered: Mar 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
Yeah still not working!!
 
Old 03-03-2016, 02:22 AM   #9
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,274

Rep: Reputation: 148Reputation: 148
Hi;
Then do few sanity check
1. ping to the default gw
2. ethtool eth0, check the link status
3. dmesg | grep eth0
4. ping to external ip other than the domain name
 
Old 03-03-2016, 02:44 AM   #10
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,264

Rep: Reputation: 200Reputation: 200Reputation: 200
Exclamation

Quote:
Originally Posted by kirukan View Post
Hi;
Then do few sanity check
1. ping to the default gw
2. ethtool eth0, check the link status
3. dmesg | grep eth0
4. ping to external ip other than the domain name
To just add something to above procedure.

Device is equal to eth0

Just make sure that the network cable is plugged in eth0.

Or if the device has only one NIC, then try replacing network cable.

But if you are using a server that has multiple NICs plug the cable to different NIC port while pinging a website and check if you will get a reply.

I have done this silly mistake once. sigh.

Last edited by JJJCR; 03-03-2016 at 03:45 AM. Reason: edit
 
Old 03-03-2016, 03:40 AM   #11
Noo
LQ Newbie
 
Registered: Mar 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
1- ping to default gateway- destination host unreachable

2-
Code:
ethtool eth0
Settings for eth0:
	Supported ports: [ TP ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Half 1000baseT/Full 
	Supported pause frame use: No
	Supports auto-negotiation: Yes
	Advertised link modes:  10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Half 1000baseT/Full 
	Advertised pause frame use: Symmetric
	Advertised auto-negotiation: Yes
	Speed: Unknown!
	Duplex: Unknown! (255)
	Port: Twisted Pair
	PHYAD: 1
	Transceiver: internal
	Auto-negotiation: on
	MDI-X: Unknown
	Supports Wake-on: g
	Wake-on: g
	Current message level: 0x000000ff (255)
			       drv probe link timer ifdown ifup rx_err tx_err
	Link detected: no
3. dmesg | grep eth0
Code:
dmesg | grep eth0
tg3 0000:1e:00.0: eth0: Tigon3 [partno(BCM95723) rev 5784100] (PCI Express) MAC address d8:d3:85:8f:02:48
tg3 0000:1e:00.0: eth0: attached PHY is 5784 (10/100/1000Base-T Ethernet) (WireSpeed[1], EEE[0])
tg3 0000:1e:00.0: eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[1] TSOcap[1]
tg3 0000:1e:00.0: eth0: dma_rwctrl[76180000] dma_mask[64-bit]
ADDRCONF(NETDEV_UP): eth0: link is not ready
ADDRCONF(NETDEV_UP): eth0: link is not ready
ADDRCONF(NETDEV_UP): eth0: link is not ready
4- Ping default gateway unknown host

Last edited by Noo; 03-03-2016 at 03:45 AM.
 
Old 03-03-2016, 03:48 AM   #12
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,264

Rep: Reputation: 200Reputation: 200Reputation: 200
please post output of this command: cat /sys/class/net/eth0/carrier

Last edited by JJJCR; 03-03-2016 at 03:48 AM. Reason: edit
 
Old 03-03-2016, 03:51 AM   #13
Noo
LQ Newbie
 
Registered: Mar 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
cat /sys/class/net/eth0/carrier is just 0
 
Old 03-03-2016, 03:56 AM   #14
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,264

Rep: Reputation: 200Reputation: 200Reputation: 200
Cool

Quote:
Originally Posted by Noo View Post
cat /sys/class/net/eth0/carrier is just 0
Most probably there is no network cable connected.

Because if there is a network cable it will be 1.
 
1 members found this post helpful.
Old 03-03-2016, 06:22 PM   #15
Noo
LQ Newbie
 
Registered: Mar 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
I check cable on Windows 7 and its working fine
 
  


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
Centos internet not working with local static ip adress. DeSouffle Linux - Networking 6 09-03-2013 03:58 PM
CentOS 6 - Persistent Static Route karim.wallani Linux - Newbie 4 05-24-2013 08:52 AM
Centos 6.2 set static IP velvetbulldozer Linux - Server 6 02-26-2012 07:32 AM
[SOLVED] installing centos 5.3 with static ip? windstory Linux - Newbie 4 10-12-2009 08:55 PM
CentOS DHCP to Static mitchell2345 Linux - Networking 5 11-01-2008 10:38 AM


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