메뉴 건너뛰기

리눅스 관련 모음

본문시작

에러해결
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
번호 분류 제목 글쓴이 날짜 조회 수
190 한국에 맞는 스팸어쎄신 설정하여 스팸 95% 줄여보기 햇빛소년 2011.03.18 50196
189 에러해결 푸시 앱 연동과 카카오톡 링크 에러 해결을 마무리 하면서.. 햇빛소년 2015.09.18 1660
188 설치관련 페도라 epel-release 업데이트 햇빛소년 2014.03.04 3544
187 파이프, 필터, 리다이렉션 햇빛소년 2011.04.16 48491
186 에러해결 특정 디렉토리에 있는 파일 또는 디렉토리의 퍼미션 변경 햇빛소년 2013.01.11 24938
185 커널 컴파일 후 모듈 추가하기... 햇빛소년 2012.07.06 26524
184 설치관련 처음 설치 해 보는 mariadb 소스설치 햇빛소년 2014.10.16 5627
183 참고로 보기 위한 좋은 글 -- q메일 및 스팸서버 구축에 관한 글 [펌] 햇빛소년 2012.06.19 39508
182 유동아이피를 고정아이피로 만들기 햇빛소년 2011.06.20 38319
181 설치관련 유동IP(DDNS)+공유기+apache서버1+apache서버2+proxy로 도메인 포워딩. secret 햇빛소년 2014.10.28 3480
180 윈도우에서 내 컴퓨터 ip주소 확인하기 햇빛소년 2011.06.20 38099
179 설치관련 원격 서버에 파일 올리거나 가져오기... 1 햇빛소년 2014.02.22 9159
178 요긴하게 사용되는 리눅스 명령 모음. 햇빛소년 2011.04.07 44156
177 실제 예(passwd명령어)로 SetUID, SetGID 이해하기 햇빛소년 2011.05.12 50478
176 설치관련 스팸어쎄신(spamassassin)은 설치 후 service등록과 업데이트를 한번 더 해 줘야 한다. 햇빛소년 2012.05.10 29484
175 센드메일(sendmail) RBL 이용하여 해외, 국내 스팸 차단하는 법. 햇빛소년 2012.12.06 21173
174 서버설치후 해야할 일 file 햇빛소년 2011.05.12 44096
173 보안 관련하여 한번쯤 읽어 볼 거리.... 햇빛소년 2012.07.12 35165
172 설치관련 메일계정 관련 명령어... secret 햇빛소년 2013.08.19 0
171 설정 및 사용법 메일(mail) 인증 설정 및 발송 확인 테스트 햇빛소년 2016.05.26 1099
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 Next
/ 10