#Linux
[Linux] 네트워크 설정
여리D
2019. 1. 27. 19:26
네트워크 설정 파일
/etc/hosts
/etc/resolv.conf
/etc/sysconfig/network-scripts
네트워크 시작/중지 스크립트
/etc/init.d/network [start/stop/restart/reload/status]
인터페이스 확인
ifconfig
-a : 모든 인터페이스 출력
ex) ifconfig eth0 : eth0 장치 출력
ifconfig eth0 [up|down] : eth0 up/down
ifconfig eth0 192.168.0.1 : eth0 IP설정
라우팅 확인
route
-n : 숫자로 표시
ex) 호스트 라우팅
route add 1.1.1.1/32 gw 192.168.0.1 eth1
route del 1.1.1.1
네트웤 라우팅
route add -net 1.1.2.0/24 gw 192.168.0.2 eth2
route del -net 1.1.2.0/24