메뉴 건너뛰기

리눅스 관련 모음

본문시작

에러해결
2014.10.27 20:00

CentOS-7 Network 설정에 관하여....

조회 수 7707 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

국산 통나무 수공예 남원제기, 남원목기

자료가 도움이 되셨다면
혼수용품제수용품 필요시
남원제기 공식 홈페이지 http://남원제기.kr
남원목기 공식 홈페이지 http://otchil.kr
에서 구매 해 주세요
정성껏 모시겠습니다.
 

Questions about CentOS-7

1. I used to use the boot.iso image to do network installations. Where has it gone?

Starting with EL6, upstream decided to remove boot.iso from the images/ directory and ship it as a separate, stand alone media. Due to the large size of this image, we have decided to do the same. The network installation disk image is named netinstall.iso and can now be found only in the isos/ directory, together with all other installation images.

2. Why does my Ethernet not work unless I log in and explicitly enable it?

.. and why are the interface names all "messed up" compared to prior practice? This violates the Unix rule of "not breaking expectations".

Upstream has changed the default configuration to use NetworkManager and interfaces are (somewhat inexplicably in the case of Ethernet) not enabled by default. This can be worked around at install time where you have the possibility to enable your network card at the main installer screen, where the installer asks for your language/keyboard/storage devices/software installation. On this screen is a button labeled "Network & Hostname". Click that button, select the Ethernet connection you want to edit and click the "Off"-Button on the top right corner. Assuming DHCP is available you will see the connection in question getting a network address. If you have to configure your network settings by hand, press the "Configure" button, enter the desired values and save them. You probably have to disable and re-enable the just configured NIC for the changes to take affect. Now press "Done" and that's it. You can also make these changes with NetworkManager (System; Preferences; Network Connections or right click on the little network icon in the notification area and Edit Connections...) after the installation is complete.

If you are not using NetworkManager, the same result can be obtained by editing the configuration file for the network interface ( normally /etc/sysconfig/network-scripts/ifcfg-eth0 ) and changing: ONBOOT=no to ONBOOT=yes Some setups seem to also require the addition of a line: BOOTPROTO=dhcp where a DHCP setup is in play; Static IP setups would take: BOOTPROTO=static of course

The ONBOOT edit may be performed (as root) and assuming the relevant device is eth0:

# cd /etc/sysconfig/network-scripts/ 
# sed -i -e 's@^ONBOOT="no@ONBOOT="yes@' ifcfg-eth0

As to "breaking expectations": The foregoing example uses a 'traditionally' named network device of: eth0 Other device names are also possible, including for example: em1 or p3p1 and such. Like it or not, this change in approach in interface naming is the future path for Linux. It was previewed in in the upstream's "testing distribution". See also the materials at: Dell's writeup and a blog post from an insider there.

3. And what if I want the old naming back?

These are the necessary steps:

  • Add "net.ifnames=0" and "biosdevname=0" as kernel arguments to grub
  • In '/etc/sysconfig/network-scripts/' Change your configured NIC config file to 'ifcfg-ethX'
  • If you have multiple interfaces and want to control naming of each device rather than letting the kernel do in its own way, /etc/udev/rules.d/60-net.rules seems necessary to override /usr/lib/udev/rules.d/60-net.rules.

4. But I just want it to work and to hand-edit the configuration files.

Many installations do not require the complexity of the NetworkManager tool, and use hand-edited configuration files instead. Here is a sample non NetworkManager DHCP interface configuration:

[root@example ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO=dhcp
NM_CONTROLLED="no"
PERSISTENT_DHCLIENT=1
ONBOOT="yes"
TYPE=Ethernet
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME="eth0"
[root@none ~]#

and a sample 'static assignment' configuration file:

[username@hostname]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
HWADDR="00:21:70:10:7E:CD"
NM_CONTROLLED="no"
ONBOOT="yes"
BOOTPROTO=static
# BOOTPROTO=dhcp
IPADDR=10.16.1.106
NETMASK=255.255.255.0
#
#   the GATEWAY is sometimes in: /etc/sysconfig/network
GATEWAY=10.16.1.1

and then common items such as hostname and DNS servers may optionally be placed in:

[username@hostname]$ cat /etc/sysconfig/network
HOSTNAME=acme.example.com
DNS1=10.16.1.112
DNS2=8.8.8.8
## DNS2=76.242.0.28
SEARCH=example.com

The information there is 'optional' because a DHCP server can hand out these values. The initscripts are able to figure out hostname and so forth when a well-populated DNS environment exists, from PTR records and such, but some users need to manage such details manually. For more information, the full initscripts documentation files may be listed thus:

rpm -qd initscripts 

even in a environment lacking the man manual reading package and its dependencies.

5. How do I disable IPv6?

Upstream employee Daniel Walsh recommends not disabling the ipv6 module, as that can cause issues with SELinux and other components, but adding the following to /etc/sysctl.conf:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

To disable in the running system:

echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6

or

sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1

Additional note #1: If problems with X forwarding are encountered on systems with IPv6 disabled, edit /etc/ssh/sshd_config and make either of the following changes:

(1) Change the line

#AddressFamily any

to

AddressFamily inet

(inet is ipv4 only; inet6 is ipv6 only)

or

(2) Remove the hash mark (#) in front of the line

#ListenAddress 0.0.0.0

Then restart ssh.

Additional note #2: If problems with starting postfix are encountered on systems with IPv6 disabled, either

(1) edit /etc/postfix/main.cf and comment out the localhost part of the config and use ipv4 loopback.

#inet_interfaces = localhost
inet_interfaces = 127.0.0.1

or

(2) take out the ipv6 localhost from /etc/hosts .

Additional Note #3 : To disable RPCBIND ipv6 (rpcbind, rpc.mountd, prc.statd) remark out the udp6 and tcp6 lines in /etc/netconfig:

udp        tpi_clts      v     inet     udp     -       -
tcp        tpi_cots_ord  v     inet     tcp     -       -
#udp6       tpi_clts      v     inet6    udp     -       -
#tcp6       tpi_cots_ord  v     inet6    tcp     -       -
rawip      tpi_raw       -     inet      -      -       -
local      tpi_cots_ord  -     loopback  -      -       -
unix       tpi_cots_ord  -     loopback  -      -       -
   

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
29 에러해결 PHP COMPILE - error: wrong mysql library version or lib not found. 햇빛소년 2014.03.15 4129
28 에러해결 error: wrong mysql library version or lib not found. 햇빛소년 2014.03.16 16581
27 에러해결 sql_mode = NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION 햇빛소년 2014.03.22 4855
26 에러해결 abrt 에러 메세지 /var/log/messages 햇빛소년 2014.05.16 8516
25 에러해결 php 소스컴파일시 - /usr/bin/ld: cannot find -lltdl 에러 날 때. 햇빛소년 2014.10.17 3814
24 에러해결 centos 7 : modsecurity 컴파일 설치시 iconv 찾지 못하는 에러... 햇빛소년 2014.10.18 3972
23 에러해결 php5:::configure: error: Cannot find libmysqlclient_r under /usr/local/mysql 햇빛소년 2014.10.24 7508
22 에러해결 httpd 서비스는 chkconfig 를 지원하지 않습니다. 햇빛소년 2014.10.25 4656
21 에러해결 CentOS 7 rc.local 자동실행 boot 햇빛소년 2014.10.26 23880
» 에러해결 CentOS-7 Network 설정에 관하여.... 햇빛소년 2014.10.27 7707
19 에러해결 [win8] 호스트된 네트워크를 시작할 수 없습니다. 햇빛소년 2014.10.30 3682
18 에러해결 네임서버(NameServer) 설정 및 점검 사이트 햇빛소년 2014.11.01 3459
17 에러해결 CentOS7 firewall 사용시 spamd: could not create INET socket on 127.0.0.1:783: 햇빛소년 2014.11.04 3748
16 에러해결 zone_resigninc:dns_journal_open -> unexpected error secret 햇빛소년 2015.02.07 0
15 에러해결 win8.1 F8 안전모드 부팅하기 햇빛소년 2015.02.22 739
14 에러해결 IPV4 주소 오류 식별되지 않은 네트워크 인식 문제 햇빛소년 2015.03.08 1054
13 에러해결 리눅스 명령어로 IP 주소 변경하기. 햇빛소년 2015.04.06 856
12 에러해결 named error -> dumping master file: tmp-6bFrQDtE5l: open: permission denied 햇빛소년 2015.05.06 1058
11 에러해결 mysql root 및 사용자 계정 password(비밀번호) 변경 및 에러 대처. 햇빛소년 2015.08.11 3232
10 에러해결 푸시 앱 연동과 카카오톡 링크 에러 해결을 마무리 하면서.. 햇빛소년 2015.09.18 1660
Board Pagination Prev 1 2 3 4 Next
/ 4