메뉴 건너뛰기

리눅스 관련 모음

본문시작

에러해결
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  -      -       -
   

  1. 리눅스 명령어로 IP 주소 변경하기.

    Date2015.04.06 Category에러해결 By햇빛소년 Views856
    Read More
  2. IPV4 주소 오류 식별되지 않은 네트워크 인식 문제

    Date2015.03.08 Category에러해결 By햇빛소년 Views1053
    Read More
  3. redis 2.8.19 설치하기

    Date2015.02.27 Category설치관련 By햇빛소년 Views1580
    Read More
  4. win8.1 F8 안전모드 부팅하기

    Date2015.02.22 Category에러해결 By햇빛소년 Views739
    Read More
  5. zone_resigninc:dns_journal_open -> unexpected error

    Date2015.02.07 Category에러해결 By햇빛소년 Views0
    Read More
  6. mysql 계정사용자 추가하기.

    Date2015.01.11 Category설치관련 By햇빛소년 Views1216
    Read More
  7. CentOS7 firewall 사용시 spamd: could not create INET socket on 127.0.0.1:783:

    Date2014.11.04 Category에러해결 By햇빛소년 Views3748
    Read More
  8. 네임서버(NameServer) 설정 및 점검 사이트

    Date2014.11.01 Category에러해결 By햇빛소년 Views3459
    Read More
  9. [win8] 호스트된 네트워크를 시작할 수 없습니다.

    Date2014.10.30 Category에러해결 By햇빛소년 Views3682
    Read More
  10. 유동IP(DDNS)+공유기+apache서버1+apache서버2+proxy로 도메인 포워딩.

    Date2014.10.28 Category설치관련 By햇빛소년 Views3480
    Read More
  11. CentOS-7 Network 설정에 관하여....

    Date2014.10.27 Category에러해결 By햇빛소년 Views7707
    Read More
  12. CentOS 7 rc.local 자동실행 boot

    Date2014.10.26 Category에러해결 By햇빛소년 Views23880
    Read More
  13. httpd 서비스는 chkconfig 를 지원하지 않습니다.

    Date2014.10.25 Category에러해결 By햇빛소년 Views4656
    Read More
  14. php5:::configure: error: Cannot find libmysqlclient_r under /usr/local/mysql

    Date2014.10.24 Category에러해결 By햇빛소년 Views7508
    Read More
  15. centos 7 : modsecurity 컴파일 설치시 iconv 찾지 못하는 에러...

    Date2014.10.18 Category에러해결 By햇빛소년 Views3972
    Read More
  16. centos 7 : iconv 컴파일 설치시 에러 해결

    Date2014.10.18 Category설치관련 By햇빛소년 Views8171
    Read More
  17. php 소스컴파일시 - /usr/bin/ld: cannot find -lltdl 에러 날 때.

    Date2014.10.17 Category에러해결 By햇빛소년 Views3814
    Read More
  18. 처음 설치 해 보는 mariadb 소스설치

    Date2014.10.16 Category설치관련 By햇빛소년 Views5627
    Read More
  19. 경영학과의 눈물… 예고된 취업 바늘구멍

    Date2014.10.12 Category설치관련 By햇빛소년 Views4048
    Read More
  20. html코딩 dtd선언 - <!DOCTYPE HTML PUBLIC

    Date2014.07.21 Category설치관련 By햇빛소년 Views4729
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 Next
/ 10