메뉴 건너뛰기

리눅스 관련 모음

본문시작

에러해결
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
번호 분류 제목 글쓴이 날짜 조회 수
69 에러해결 pcre최신버전 소스설치 후 modsecurity-apache 컴파일시 에러 햇빛소년 2013.01.19 76567
68 에러해결 phpmyadmin 4.0 로그인시 에러.. 햇빛소년 2013.06.18 59734
67 에러해결 named 에러 (/var/log/massages) 가 있을 때 해결 방법 햇빛소년 2013.06.12 33931
66 에러해결 unable to include potential exec "include/top.html" in parsed file 에러 해결!!! 햇빛소년 2013.01.11 30285
65 에러해결 ZendGuardLoader.so: undefined symbol: compiler_globals 햇빛소년 2013.01.19 25859
64 에러해결 Starting Dovecot Imap: Error: service(pop3-login): listen(*, 110) failed: Address already in use 햇빛소년 2013.06.29 25213
63 에러해결 특정 디렉토리에 있는 파일 또는 디렉토리의 퍼미션 변경 햇빛소년 2013.01.11 24938
62 에러해결 ZendGuardLoader 설치 에러 햇빛소년 2013.01.10 24646
61 에러해결 CentOS 7 rc.local 자동실행 boot 햇빛소년 2014.10.26 23880
60 에러해결 squirrelmail에서 메일 삭제시 Error: file_dotlock_create... 에러에 대하여. 햇빛소년 2013.06.30 20664
59 에러해결 BIND 9: "Warning: 'empty-zones-enable/disable-empty-zone' not set: disabling RFC 1918 empty zones" 햇빛소년 2013.06.13 19740
58 에러해결 php-5.4.16 컴파일시 checking for db4 major version... Header contains different version 에러 햇빛소년 2013.06.18 19301
57 에러해결 dovecot 설치 후 squirrelmail 가동하면 /.imap/INBOX, group=12(mail)) failed: Operation not permitted 햇빛소년 2013.06.30 19277
56 에러해결 mc(미드나잇 커맨드) 종료시 처음 PWD로 바뀌는 문제 해결 햇빛소년 2013.06.09 17543
55 에러해결 [MySQL] Incorrect integer value: '' for column '컬럼명' 오류 발생시 햇빛소년 2013.06.19 17444
54 에러해결 TIFF 설피시 /usr/local/include/jmorecfg.h:263:16: error: expected identifier before numeric constant 에러 햇빛소년 2013.06.04 17422
53 에러해결 [sendmail: clamav-milter error] Milter: data, reject=451 4.3.2 Please try again later 햇빛소년 2013.06.27 16906
52 에러해결 error: wrong mysql library version or lib not found. 햇빛소년 2014.03.16 16581
51 에러해결 php.ini설정 에러 모음. 햇빛소년 2013.06.18 16248
50 에러해결 spamassassin 에러 Can't locate Mail/SpamAssassin/CompiledRegexps/body 0.pm in @INC 햇빛소년 2013.06.24 16044
Board Pagination Prev 1 2 3 4 Next
/ 4