네트워크 일반네트워크관리사 2급 · 2017년07월16일 · 39/50
39.Linux에서 'ifconfig'를 사용하여 네트워크 인터페이스 카드를 동작시키려고 한다. 명령어에 대한 사용이 올바른 것은?
1
ifconfig 192.168.2.4 down
2
ifconfig eth0 192.168.2.4 up정답
3
ifconfig -up eth0 192.168.2.4
4
ifconfig up eth0 192.168.2.4
해설
사용법 ifconfig [interface] ifconfig [interface] [address] [up/down] [option] [interface] NIC(Network Interface Card)를 말하며, 보통 (LAN) 카드 또는 이더넷(Ethernet) 카드라 부른다. 리눅스에서는 이더넷 카드가 하나인 경우 eth0으로 설정되며 두 개를 장착하면 이더넷 카드는 eth1이 된다. [address] IP를 부여한다 예) ifconfig eth0 192.168.1.100 [up / down] up은 네트워크를 활성화 시키고, down은 비활성화 시킨다. 예) ifconfig eth0 down, ifconfig eth0 up [option] netmask, broadcast등을 설정할 수 있다. 예 ) ifconfig eth0 192.168.1.200 netmask 255.255.255.0 [up/down]