더북(TheBook)

6. service network restart 명령어를 이용해 네트워크 서비스를 재시작합니다. 여기서는 service network restart 명령어를 사용했지만, CentOS 7에서는 systemctl restart network. service 명령어로도 재시작할 수 있습니다.

[root@centos network-scripts]# service network restart
Restarting network (via systemctl):                        [  OK  ]


7. 이번에는 ifconfig 명령어를 이용해 enp0s8의 IP가 잘 설정되어 있는 것을 확인합니다.

[root@centos network-scripts]# ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 08:00:27:31:89:79  txqueuelen 1000  (Ethernet)
        RX packets 337  bytes 30935 (30.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 35  bytes 2706 (2.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.56.102 netmask 255.255.255.0 broadcast 192.168.56.255 inet6 fe80::a00:27ff:fead:b921 prefixlen 64 scopeid 0x20<link> ether 08:00:27:ad:b9:21 txqueuelen 1000 (Ethernet) RX packets 251 bytes 27141 (26.5 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 146 bytes 22409 (21.8 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

enp0s9: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.0.4.15 netmask 255.255.255.0 broadcast 10.0.4.255 inet6 fe80::a00:27ff:fe46:b021 prefixlen 64 scopeid 0x20<link> ether 08:00:27:46:b0:21 txqueuelen 1000 (Ethernet) RX packets 16 bytes 2248 (2.1 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 27 bytes 2284 (2.2 KiB) 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 0 (Local Loopback) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

신간 소식 구독하기
뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.