2.3.1 ifconfig, 네트워크 인터페이스 및 정보 확인

    리눅스에서 서버 간 통신은 네트워크 인터페이스를 이용해 수행한다. ifconfig 명령어는 네트워크 인터페이스의 상태와 IP 정보를 확인할 수 있다. 주요 옵션은 -a(전체 인터페이스 정보 출력)가 있고 ifconfig <네트워크 이름> <up/down> 명령으로 네트워크 장치를 활성화 또는 비활성화할 수 있다.

    secu@secu-VirtualBox:~$ ifconfig
    enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500    ← enps0s3 네트워크 인터페이스의 상태 정보 출력(IP, 네트마스크, MAC 주소 등)
            inet 192.168.100.11  netmask 255.255.255.0  broadcast 192.168.100.255
            inet6 fe80::ac0e:341e:1ef7:3f8  prefixlen 64  scopeid 0x20<link>
            ether 08:00:27:bd:08:a7  txqueuelen 1000  (Ethernet)
            RX packets 5814  bytes 7860009 (7.8 MB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 2997  bytes 227055 (227.0 KB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 314  bytes 27490 (27.4 KB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 314  bytes 27490 (27.4 KB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    
    
    신간 소식 구독하기
    뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.