호스트가 처음 시작되면 route
다음이 표시됩니다.
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.0.1 0.0.0.0 UG 0 0 0 enp3s0
192.168.0.0 0.0.0.0 255.255.0.0 U 0 0 0 enp3s0
192.168.0.1 0.0.0.0 255.255.255.255 UH 0 0 0 enp3s0
그리고 ping 8.8.8.8
말했다:
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=55 time=6.40 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=55 time=6.36 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=55 time=6.37 ms
잠시 후(내 KVM 게스트가 시작된 것 같은데?) 다음과 route
같이 표시됩니다.
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 0.0.0.0 255.255.255.255 UH 0 0 0 macvtap1
0.0.0.0 0.0.0.0 255.255.255.255 UH 0 0 0 macvtap0
0.0.0.0 0.0.0.0 255.255.255.255 UH 0 0 0 macvtap2
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 macvtap1
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 macvtap0
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 enp3s0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 macvtap2
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 macvtap0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 macvtap1
192.168.0.0 0.0.0.0 255.255.0.0 U 0 0 0 enp3s0
192.168.0.1 0.0.0.0 255.255.255.255 UH 0 0 0 enp3s0
그리고 ping 8.8.8.8
말했다:
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
From 169.254.245.85 icmp_seq=1 Destination Host Unreachable
From 169.254.245.85 icmp_seq=2 Destination Host Unreachable
From 169.254.245.85 icmp_seq=3 Destination Host Unreachable
그리고 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
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: enp12s0: <NO-CARRIER,BROADCAST,MULTICAST,DYNAMIC,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 38:d5:47:aa:6c:b0 brd ff:ff:ff:ff:ff:ff
3: enp0s31f6: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 38:d5:47:aa:6c:af brd ff:ff:ff:ff:ff:ff
4: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 78:2d:7e:13:f7:d6 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.97/16 brd 192.168.255.255 scope global enp3s0
valid_lft forever preferred_lft forever
inet6 fe80::7a2d:7eff:fe13:f7d6/64 scope link
valid_lft forever preferred_lft forever
5: macvtap0@enp3s0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 500
link/ether 08:00:27:f5:3b:9b brd ff:ff:ff:ff:ff:ff
inet 169.254.161.146/16 brd 169.254.255.255 scope global macvtap0
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fef5:3b9b/64 scope link
valid_lft forever preferred_lft forever
6: macvtap1@enp3s0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 500
link/ether 08:00:27:eb:28:3d brd ff:ff:ff:ff:ff:ff
inet 169.254.245.85/16 brd 169.254.255.255 scope global macvtap1
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:feeb:283d/64 scope link
valid_lft forever preferred_lft forever
7: macvtap2@enp3s0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 500
link/ether 08:00:27:d7:49:ee brd ff:ff:ff:ff:ff:ff
inet 169.254.144.158/16 brd 169.254.255.255 scope global macvtap2
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fed7:49ee/64 scope link
valid_lft forever preferred_lft forever
cat /etc/network/interfaces
설명하다:
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug enp3s0
iface enp3s0 inet dhcp
allow-hotplug enp0s31f6
iface enp0s31f6 inet dhcp
내 안에는 아무것도 없습니다 /etc/network/interfaces.d/
. 저는 데비안 12를 사용하고 있습니다. 일부 LAN 네트워크는 작동하지만 호스트 컴퓨터가 인터넷에 연결되어 있지 않습니다. 투숙객은 인터넷을 이용하실 수 있습니다.
내 구성에 어떤 문제가 있으며 어떻게 해결합니까?