듀얼 10GbE 카드와 Ubuntu 20.04가 설치된 오래된 Dell R620이 있습니다. Cockpit 및 Cockpit-Machine이 설치되었습니다(qeum-kvm 설치). 네트워크는 netplan을 사용하여 설정됩니다. 저는 우분투를 처음 사용합니다.
내 현재 설정은 다음과 같습니다
Router (192.168.1.1) - [Ubuntu Server 20.04] KVM Host (192.168.1.110)
- [Ubuntu Server 20.04] VM1 (191.168.1.103)
수많은 가이드를 따른 끝에 마침내 브리지된 바인딩 인터페이스를 갖게 되었습니다. KVM 호스트와 VM은 라우터로부터 IP를 얻을 수 있지만 VM은 해당 이름을 사용하여 외부에서 ping을 할 수 없습니다(DNS 문제). KVM 호스트는 "google.ca" 및 "8.8.8.8"을 ping할 수 있습니다. 가상 기기할 수 없다ping 'google.ca' 하지만할 수 있는핑 "8.8.8.8". netplan 파일에서 다른 내용이 누락되었습니까? 브리지 및 본드 인터페이스를 통해 DNS가 제대로 작동하지 않습니까?
다음은 KVM 호스트의 네트워크 계획입니다.
# This is the network config written by 'subiquity'
network:
renderer: NetworkManager
ethernets:
eno1:
dhcp4: false
dhcp6: false
eno2:
dhcp4: false
dhcp6: false
eno3:
dhcp4: false
dhcp6: false
eno4:
dhcp4: false
dhcp6: false
enp66s0f0:
dhcp4: false
dhcp6: false
enp66s0f1:
dhcp4: false
dhcp6: false
bonds:
bond0:
interfaces: [enp66s0f0,enp66s0f1]
dhcp4: false
dhcp6: false
parameters:
mode: balance-tlb
bridges:
br0:
interfaces: [bond0]
dhcp4: true
dhcp6: false
parameters:
stp: false
forward-delay: 0
version: 2
KVM 호스트의 "ip a"에 대한 출력:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eno1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether b8:ca:3a:f7:2f:96 brd ff:ff:ff:ff:ff:ff
3: enp66s0f0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
link/ether 00:0e:1e:9e:2c:82 brd ff:ff:ff:ff:ff:ff
4: enp66s0f1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
link/ether 00:0e:1e:9e:2c:80 brd ff:ff:ff:ff:ff:ff
5: eno2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether b8:ca:3a:f7:2f:97 brd ff:ff:ff:ff:ff:ff
6: eno3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether b8:ca:3a:f7:2f:98 brd ff:ff:ff:ff:ff:ff
7: eno4: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether b8:ca:3a:f7:2f:99 brd ff:ff:ff:ff:ff:ff
9: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:0e:1e:9e:2c:80 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.110/24 brd 192.168.1.255 scope global dynamic noprefixroute br0
valid_lft 52933sec preferred_lft 52933sec
10: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0 state UP group default qlen 1000
link/ether 00:0e:1e:9e:2c:80 brd ff:ff:ff:ff:ff:ff
KVM 호스트에서 VM으로 ping:
PING 192.168.1.103 (192.168.1.103) 56(84) bytes of data.
64 bytes from 192.168.1.103: icmp_seq=1 ttl=64 time=0.322 ms
64 bytes from 192.168.1.103: icmp_seq=2 ttl=64 time=0.294 ms
64 bytes from 192.168.1.103: icmp_seq=3 ttl=64 time=0.285 ms
64 bytes from 192.168.1.103: icmp_seq=4 ttl=64 time=0.294 ms
^C
--- 192.168.1.103 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3067ms
rtt min/avg/max/mdev = 0.285/0.298/0.322/0.013 ms
KVM 호스트에서 외부(이름)로 Ping:
PING google.ca (142.251.33.67) 56(84) bytes of data.
64 bytes from sea09s28-in-f3.1e100.net (142.251.33.67): icmp_seq=1 ttl=118 time=19.7 ms
64 bytes from sea09s28-in-f3.1e100.net (142.251.33.67): icmp_seq=2 ttl=118 time=20.3 ms
64 bytes from sea09s28-in-f3.1e100.net (142.251.33.67): icmp_seq=3 ttl=118 time=20.1 ms
64 bytes from sea09s28-in-f3.1e100.net (142.251.33.67): icmp_seq=4 ttl=118 time=19.9 ms
^C
--- google.ca ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 19.726/20.003/20.281/0.218 ms
KVM 호스트에서 외부(IP)로 ping:
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=119 time=22.7 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=119 time=22.8 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=119 time=22.9 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=119 time=22.9 ms
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3006ms
rtt min/avg/max/mdev = 22.712/22.811/22.890/0.072 ms
다음은 VM의 netplan 출력입니다.
# This is the network config written by 'subiquity'
network:
ethernets:
enp1s0:
dhcp4: true
version: 2
다음은 가상 머신에서 "ip a"의 출력입니다.
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:ad:6a:d4 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.103/24 brd 192.168.1.255 scope global dynamic enp1s0
valid_lft 86357sec preferred_lft 86357sec
inet6 fe80::5054:ff:fead:6ad4/64 scope link
valid_lft forever preferred_lft forever
VM에서 KVM 호스트로 ping:
PING 192.168.1.110 (192.168.1.110) 56(84) bytes of data.
64 bytes from 192.168.1.110: icmp_seq=1 ttl=64 time=0.215 ms
64 bytes from 192.168.1.110: icmp_seq=2 ttl=64 time=0.249 ms
64 bytes from 192.168.1.110: icmp_seq=3 ttl=64 time=0.242 ms
64 bytes from 192.168.1.110: icmp_seq=4 ttl=64 time=0.241 ms
^C
--- 192.168.1.110 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3053ms
rtt min/avg/max/mdev = 0.215/0.236/0.249/0.012 ms
가상 머신에서 라우터로 ping을 수행합니다.
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=1.79 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.938 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.874 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=0.866 ms
^C
--- 192.168.1.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 0.866/1.118/1.794/0.391 ms
VM에서 외부(이름)로 Ping:
ping: google.ca: Temporary failure in name resolution
가상 머신에서 외부(IP)로 ping:
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=119 time=23.2 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=119 time=22.9 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=119 time=23.5 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=119 time=22.5 ms
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 22.544/23.008/23.468/0.344 ms