반응형
/********************************************************************************************
-- Title : [Lnx] CentOS 네트워크 설정
-- Reference : 웹검색
-- Key word : 이더넷 ethernet 랜카드 network
********************************************************************************************/
-- 기본 네트워크 정보 출력
# vi /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=TestOra
GATEWAY=172.20.20.254
NETWORKING_IPV6=no
HOSTNAME=TestOra
GATEWAY=172.20.20.254
# vi /etc/resolv.conf
nameserver 168.126.63.1
nameserver 168.126.63.2
nameserver 168.126.63.2
-- 네트워크 카드 정보
# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet
DEVICE=eth0
BOOTPROTO=none
BROADCAST=172.20.20.255
HWADDR=00:14:78:50:A3:D3
IPADDR=172.20.20.93
NETMASK=255.255.255.0
NETWORK=172.20.20.0
ONBOOT=yes
GATEWAY=172.20.20.254
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
DEVICE=eth0
BOOTPROTO=none
BROADCAST=172.20.20.255
HWADDR=00:14:78:50:A3:D3
IPADDR=172.20.20.93
NETMASK=255.255.255.0
NETWORK=172.20.20.0
ONBOOT=yes
GATEWAY=172.20.20.254
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
-- 네트워크 추가 정보
-- lo 루프백이 사라지거나 하면 확인 하람.
# cat /etc/sysconfig/network-scripts/ifcfg-lo
DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback
-- 네트워크 정보 변경 후 재시작
# /etc/rc.d/init.d/network restart
인터페이스 eth0 (을)를 종료 중: [ OK ]
loopback 인터페이스를 종료 중: [ OK ]
loopback 인터페이스를 활성화 중: [ OK ]
eth0 인터페이스 활성화 중: [ OK ]
loopback 인터페이스를 종료 중: [ OK ]
loopback 인터페이스를 활성화 중: [ OK ]
eth0 인터페이스 활성화 중: [ OK ]
반응형