OS환경 : Oracle Linux 7.6 (64bit)
방법 : 리눅스에서 ifconfig 명령 시 나오는 virbr0, lo 란?
ifconfig 명령으로 조회
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # ifconfig ens161: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.10.241 netmask 255.255.255.0 broadcast 192.168.10.255 inet6 fe80::7853:114b:7aa1:b135 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:7b:b2:32 txqueuelen 1000 (Ethernet) RX packets 2762 bytes 303178 (296.0 KiB) RX errors 0 dropped 79 overruns 0 frame 0 TX packets 1606 bytes 296010 (289.0 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ens224: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.10.10.10 netmask 255.255.255.255 broadcast 10.10.10.10 inet6 fe80::1c49:b64a:503c:8c9 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:7b:b2:1e txqueuelen 1000 (Ethernet) RX packets 3 bytes 180 (180.0 B) RX errors 0 dropped 38 overruns 0 frame 0 TX packets 22 bytes 3617 (3.5 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 1000 (Local Loopback) RX packets 180 bytes 15300 (14.9 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 180 bytes 15300 (14.9 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255 ether 52:54:00:62:cb:6d txqueuelen 1000 (Ethernet) 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 |
실제 사용하는 ens161과 ens224
그리고 lo와 virbr0(또는 lxcbr0) 이 존재함
ens161과 ens224는 NIC카드에 연결되어있고 MAC 주소도 가지고 있음
virbr0(또는 lxcbr0) 이란?
Oracle Linux 시스템에서 가상 네트워크 스위치는 네트워크 인터페이스(ifconfig)로 나타남
libvirt 데몬이 처음 설치되고 시작될 때 생성되는 기본 인터페이스는 virbr0 로 표시됨
이는 게스트 VM (가상 머신)의 트래픽을 라우팅하는 게이트웨이 역할을 함
libvirtd는 게스트 VM 네트워크 패킷의 적절한 라우팅 및 NAT 설정을 위해 iptable 구성에 iptables 규칙도 삽입함
lxcbr0는 - LXC 컨테이너 LXC 패키지가 설치 될 때 생성 된 가상의 다리임
어떤 LXC 컨테이너를 실행하지 않을 경우 인터페이스는 삭제 될 수 있음
virbr0 삭제 방법
brctl 명령으로 확인
1 2 3 | # brctl show bridge name bridge id STP enabled interfaces virbr0 8000.52540062cb6d yes virbr0-nic |
virbr0 down 후 확인
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # ip link set virbr0 down # ifconfig ens161: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.10.241 netmask 255.255.255.0 broadcast 192.168.10.255 inet6 fe80::7853:114b:7aa1:b135 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:7b:b2:32 txqueuelen 1000 (Ethernet) RX packets 3272 bytes 359788 (351.3 KiB) RX errors 0 dropped 79 overruns 0 frame 0 TX packets 1905 bytes 345591 (337.4 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ens224: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.10.10.10 netmask 255.255.255.255 broadcast 10.10.10.10 inet6 fe80::1c49:b64a:503c:8c9 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:7b:b2:1e txqueuelen 1000 (Ethernet) RX packets 34 bytes 3754 (3.6 KiB) RX errors 0 dropped 38 overruns 0 frame 0 TX packets 35 bytes 4215 (4.1 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 1000 (Local Loopback) RX packets 192 bytes 16320 (15.9 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 192 bytes 16320 (15.9 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
virbr0 삭제 후 확인
1 2 3 | # brctl delbr virbr0 # brctl show bridge name bridge id STP enabled interfaces |
libvirt 삭제 방법
Oracle Linux 5, Oracle Linux 6
1 2 3 | # chkconfig --list |grep libvirtd # chkconfig libvirtd off # /etc/init.d/libvirtd stop |
Oracle Linux 7
libvirtd 서비스 상태 확인
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # systemctl status libvirtd.service ?? libvirtd.service - Virtualization daemon Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2020-08-22 21:12:49 KST; 11min ago Docs: man:libvirtd(8) https://libvirt.org Main PID: 15067 (libvirtd) Tasks: 19 (limit: 32768) CGroup: /system.slice/libvirtd.service ??? 1867 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper ??? 1868 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper ???15067 /usr/sbin/libvirtd Aug 22 21:12:49 ora19db1 systemd[1]: Starting Virtualization daemon... Aug 22 21:12:49 ora19db1 systemd[1]: Started Virtualization daemon. Aug 22 21:12:50 ora19db1 dnsmasq[1867]: read /etc/hosts - 9 addresses Aug 22 21:12:50 ora19db1 dnsmasq[1867]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses Aug 22 21:12:50 ora19db1 dnsmasq-dhcp[1867]: read /var/lib/libvirt/dnsmasq/default.hostsfile Aug 22 21:12:50 ora19db1 libvirtd[15067]: 2020-08-22 12:12:50.531+0000: 15083: info : libvirt version: 4.5.0, package: 23.el7 (Red Hat, Inc. <htt...dhat.com) Aug 22 21:12:50 ora19db1 libvirtd[15067]: 2020-08-22 12:12:50.531+0000: 15083: info : hostname: ora19db1 Aug 22 21:12:50 ora19db1 libvirtd[15067]: 2020-08-22 12:12:50.531+0000: 15083: error : virHostCPUGetTscInfo:1389 : Unable to open /dev/kvm: No su...directory Aug 22 21:12:50 ora19db1 libvirtd[15067]: 2020-08-22 12:12:50.540+0000: 15083: error : virHostCPUGetTscInfo:1389 : Unable to open /dev/kvm: No su...directory Aug 22 21:12:50 ora19db1 libvirtd[15067]: 2020-08-22 12:12:50.541+0000: 15083: error : virHostCPUGetTscInfo:1389 : Unable to open /dev/kvm: No su...directory Hint: Some lines were ellipsized, use -l to show in full. |
libvirtd 서비스 중지 후 상태 확인
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # systemctl stop libvirtd.service # systemctl status libvirtd.service ?? libvirtd.service - Virtualization daemon Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled) Active: inactive (dead) since Sat 2020-08-22 21:24:28 KST; 3s ago Docs: man:libvirtd(8) https://libvirt.org Process: 15067 ExecStart=/usr/sbin/libvirtd $LIBVIRTD_ARGS (code=exited, status=0/SUCCESS) Main PID: 15067 (code=exited, status=0/SUCCESS) Tasks: 2 (limit: 32768) CGroup: /system.slice/libvirtd.service ???1867 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper ???1868 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper Aug 22 21:12:50 ora19db1 dnsmasq[1867]: read /etc/hosts - 9 addresses Aug 22 21:12:50 ora19db1 dnsmasq[1867]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses Aug 22 21:12:50 ora19db1 dnsmasq-dhcp[1867]: read /var/lib/libvirt/dnsmasq/default.hostsfile Aug 22 21:12:50 ora19db1 libvirtd[15067]: 2020-08-22 12:12:50.531+0000: 15083: info : libvirt version: 4.5.0, package: 23.el7 (Red Hat, Inc. <htt...dhat.com) Aug 22 21:12:50 ora19db1 libvirtd[15067]: 2020-08-22 12:12:50.531+0000: 15083: info : hostname: ora19db1 Aug 22 21:12:50 ora19db1 libvirtd[15067]: 2020-08-22 12:12:50.531+0000: 15083: error : virHostCPUGetTscInfo:1389 : Unable to open /dev/kvm: No su...directory Aug 22 21:12:50 ora19db1 libvirtd[15067]: 2020-08-22 12:12:50.540+0000: 15083: error : virHostCPUGetTscInfo:1389 : Unable to open /dev/kvm: No su...directory Aug 22 21:12:50 ora19db1 libvirtd[15067]: 2020-08-22 12:12:50.541+0000: 15083: error : virHostCPUGetTscInfo:1389 : Unable to open /dev/kvm: No su...directory Aug 22 21:24:28 ora19db1 systemd[1]: Stopping Virtualization daemon... Aug 22 21:24:28 ora19db1 systemd[1]: Stopped Virtualization daemon. Hint: Some lines were ellipsized, use -l to show in full. |
libvirtd 서비스 비활성화
1 2 3 4 | # systemctl disable libvirtd.service Removed symlink /etc/systemd/system/multi-user.target.wants/libvirtd.service. Removed symlink /etc/systemd/system/sockets.target.wants/virtlogd.socket. Removed symlink /etc/systemd/system/sockets.target.wants/virtlockd.socket. |
lo 란?
lo 는 시스템이 자기 자신과의 통신을 하기 위한 가상 이더넷장치임
lo는 loop back 을 의미하며 자기 자신에게 보내는 데이터를 처리하기 위한 가상 인터페이스 장치명임
참조 : Doc. 2197674.1
https://wiki.libvirt.org/page/VirtualNetworking
https://zitto15.tistory.com/25
'Linux, Unix > Tip' 카테고리의 다른 글
Oracle Linux 7 새로넣은 디스크 mount 시키기 (0) | 2020.09.25 |
---|---|
Oracle Linux 7 네트워크 설정 (0) | 2020.08.22 |
Oracle Linux 7 NTP 설정 (0) | 2020.07.07 |
find 명령에서 제외하고 검색 (0) | 2020.06.04 |
Ubuntu Linux 20.04 최초 접속 시 root 패스워드 초기화 (2) | 2020.06.03 |