Why the default eth0 interface is down by default on CentOS?
2013-04-02 17:46
411 查看
I am already a little bit familiar with Linux distros like Debian or Ubuntu (yeah, very similar) but I wanted to try Red Hat based - CentOS 6.2 . I have installed it on my Windows 7 host in virtualBox and tried to play with it a little. I have same across a small problem, namely : the default eth0interface is down by default. I use the option with NAT ( the virtual machine is 'behind' the host ). Even if I bring the interface up with ifconfig eth0 upit does not work right away. I get this after bringing the interface up: What should be done more to configure the network on CentOS machine? P.S. Sorry for screenshot but I do not know how to get the text out of the VirtualBox. linux networking centos
| |||||||||||||
|
2 Answers
activeoldestvotesup vote 8 down vote accepted | Edit /etc/sysconfig/network-scripts/ifcfg-eth0. Change the ONBOOTline's value to yes. In your future installs, pay more attention. You blew past an option in the network configuration section that let you tell it to bring the interface up on boot. This on-boot option is off by default in EL6 now, whereas in previous versions, it was on by default. As to why this is, I'd guess security reasons. It gives you a chance to tighten things down a bit from the default setup before bringing up the network interface for the first time.
| |||
up vote 2 down vote | You didn't mention what version of CentOS you are using. If I'm not mistaken, 6.x uses NetworkManager by default. I rarely install X windows on my servers, so NetworkManager is just a pain for me. I disable it and enable the standard 'network' service. chkconfig NetworkManager off chkconfig network on service NetworkManager stop service network start To enable DHCP on the interface, run system-config-network, edit the appropriate device, save, and restart the network service. Alternately, you can edit /etc/sysconfig/network-scripts/ifcfg-eth0and add ONBOOT=yes BOOTPROTO=dhcp Save changes and restart the network service. |
相关文章推荐
- Unskilled in English is looked down on by people(二)
- es进行聚合操作时提示Fielddata is disabled on text fields by default
- Unskilled in English is looked down on by people(一)
- Unskilled in English is looked down on by people (tense)
- Elasticsearch API 统计出错(Fielddata is disabled on text fields by default.)
- 聚合操作错误:Fielddata is disabled on text fields by default. Set fielddata=true
- Unskilled in English is looked down on by people (三)
- Unskilled in English is looked down on by people(四)
- java.lang.IllegalArgumentException: Fielddata is disabled on text fields by default. Set fielddata=t
- es进行聚合操作时提示Fielddata is disabled on text fields by default
- Unskilled in English is looked down on by people(五)
- (转)es进行聚合操作时提示Fielddata is disabled on text fields by default
- Elasticsearch5.X进行聚合操作时提示Fielddata is disabled on text fields by default
- ElasticSearch fielddata is disabled on text fields by default. set fielddata=true on interests
- Fielddata is disabled on text fields by default(keyword 可避免错误)
- es进行聚合操作时提示Fielddata is disabled on text fields by default
- struts异常:Caused by: Parent package is not defined: json-default - [unknown location]解决办法
- What is the "internal" interface and port for on Openvswitch?
- Mysql 升级到 5.7.16,group by 一直报home brew on columns in GROUP BY clause; this is incompatible with sql
- Packet for query is too large (1032 > 1024). You can change this value on the server by setting the