eth0 - How to enable?

Issues related to configuring your network

eth0 - How to enable?

Postby agriz » 2011/11/27 12:58:24

How do i enable my network in terminal?

Thanks
agriz
 
Posts: 227
Joined: 2011/11/19 15:17:40

Re: eth0 - How to enable?

Postby dejanst » 2011/11/28 09:52:57

Edit the cd /etc/sysconfig/network-scripts/ifcfg-ethX (X is the index of your NIC) according to your network topology and manipulate with the NIC up/down status with commands ifup/ifdown.
dejanst
 
Posts: 124
Joined: 2011/09/20 14:13:13

Re: eth0 - How to enable?

Postby alirezaheidari » 2011/11/28 09:56:06

[color=000066][font=Arial]this is so easy..[/font][/color]
you just..
Code: Select all
su - root

Code: Select all
/sbin/ifconfig eth0

Code: Select all
/sbin/ifconfig eth0 up

enjoy it..
alirezaheidari
 
Posts: 2
Joined: 2011/11/28 09:37:53
Location: IR

eth0 - How to enable?

Postby pschaff » 2011/11/28 21:17:01

CentOS-6 uses NetworkManager by default. If you wish to use the "traditional" network service from the command line then use chkconfig to disable NetworkManager and make sure the network service is running. If etc/sysconfig/network-scripts/ifcfg-eth0 (or whatever your device is named) has a line
Code: Select all
NM_CONTROLLED="yes"
change it to
Code: Select all
NM_CONTROLLED="no"


See also CentOS-6 FAQ #2. Why does my Ethernet not work unless I log in and explicitly enable it?

If more help is needed then please explain the problem more completely and provide more information about your system by running "./getinfo.sh network" and showing us the output file.
pschaff
Retired Moderator
 
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: eth0 - How to enable?

Postby pkoraca » 2011/11/29 08:07:04

I did a minimal CentOS installation on Hyper-V and by default I didn't have network file in /etc/sysconfig/ and ifcfg-eth0 in /etc/sysconfig/network-scripts so I had to create those two files.
pkoraca
 
Posts: 3
Joined: 2011/11/23 13:25:38

Re: eth0 - How to enable?

Postby minigts » 2014/11/25 14:56:35

Just wanted to post because this helped me. I'm running CentOS 7. For my version, the path is correct but eth0 was named and I had an option of ONBOOT=NO, set it to YES and this set my NIC as active on boot.

Thanks again for the help!
minigts
 
Posts: 1
Joined: 2014/11/25 14:53:44

Re: eth0 - How to enable?

Postby automatikdonn » 2014/11/29 19:02:33

You can also type sudo ifup eth0

As posted before make sure ONBOOT = yes
automatikdonn
 
Posts: 8
Joined: 2014/11/29 18:46:01


Return to CentOS 6 - Networking Support

Who is online

Users browsing this forum: AlanBartlett and 4 guests