デュアル10GbEカードとUbuntu 20.04を搭載した古いDell R620があります。 CockpitとCockpit-Machineがインストールされました(qeum-kvmのインストール)。ネットワークはnetplanを使用して設定されます。私はUbuntuを初めて使います。
私の現在の設定は次のとおりです
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'ができるping "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