How shall I understand the usage of the routing tables of a guest OS and its host OS?












-2















How shall I understand the routing tables of a guest OS and a host OS via KVM?



When a packet reaches the guest OS





  1. If the packet is destined for the loop back address (127.0.0.1) of the guest OS,




    • will it be transmitted to ent3 (192.168.122.202) and then to gateway (192.168.122.1), according to the first rule in the routing
      table of the guest OS? Isn't that wrong, since the intended destination (127.0.0.1) is in the guest OS?




  2. if the packet is destined for a private IP address (192.168.122.2) in the virtual machine's private network




    • is the packet delivered to ent3 (192.168.122.202) as the final destination, according to the second entry in the routing table of
      the guest OS? Isn't that wrong, because the intened destination
      192.168.122.2 isn't in the guest OS, and the packet should be transmitted to gateway 192.168.122.1, and then to 192.168.122.2?




  3. If the packet is destined for a private address (192.168.1.100) in the LAN of the host,




    • will it be transmitted to ent3 (192.168.122.202) and then to gateway (192.168.122.1), according to the first rule in the routing
      table of the guest OS?


    • when the packet reaches the host OS, will it be transmitted to wlx801f02b5c389 (192.168.1.97), according to the third rule in the
      routing table of the guest OS? If yes, isn't that wrong, because
      wlx801f02b5c389 (192.168.1.97) isn't the intended destination
      192.168.1.100?





  4. if the packet is destined for a public IP address (e.g. the one for
    www.google.com),




    • is the packet transmitted to ent3 (192.168.122.202) and then to gateway (192.168.122.1), according to the first rule in the routing
      table of the guest OS?


    • when the packet arrives at the host OS, is it transmitted to wlx801f02b5c389 (192.168.1.97), and then to gateway (192.168.1.1),
      according to the first entry in the routing table of the host OS?


    • will gateway (192.168.1.1) transmit the packet to www.google.com?





Thanks.



On the guest OS:



$ /sbin/route -n 
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.122.1 0.0.0.0 UG 0 0 0 ens3
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 ens3


and



$ /sbin/ifconfig
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.122.202 netmask 255.255.255.0 broadcast 192.168.122.255
inet6 fe80::5054:ff:fe99:5eee prefixlen 64 scopeid 0x20<link>
ether 52:54:00:99:5e:ee txqueuelen 1000 (Ethernet)
RX packets 14906 bytes 18020195 (17.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7390 bytes 786783 (768.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 35568

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 1 (Local Loopback)
RX packets 496 bytes 39840 (38.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 496 bytes 39840 (38.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


On the host OS:



$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 600 0 0 wlx801f02b5c389
192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0 wlx801f02b5c389
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0


and



$ ifconfig 

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 3119811 bytes 177332278 (177.3 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3119811 bytes 177332278 (177.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

virbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:b1:aa:1f txqueuelen 1000 (Ethernet)
RX packets 7865 bytes 728783 (728.7 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 14988 bytes 18248805 (18.2 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

vnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::fc54:ff:fe99:5eee prefixlen 64 scopeid 0x20<link>
ether fe:54:00:99:5e:ee txqueuelen 1000 (Ethernet)
RX packets 7414 bytes 789007 (789.0 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 54379 bytes 20281975 (20.2 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlx801f02b5c389: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.97 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 prefixlen 64 scopeid 0x20<link>
ether 80:1f:02:b5:c3:89 txqueuelen 1000 (Ethernet)
RX packets 115011 bytes 102852430 (102.8 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 80310 bytes 14401568 (14.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0









share|improve this question




















  • 1





    Tim, with all due respect, I think you need to research the networking issues as is without trying to complicate them by adding virtualization into the mix. You are conflating specific points in the technical details. For example: with two real computer systems, how could you ping the lo interface on another computer? Answer that question, then try to do it with a VM.

    – 0xSheepdog
    2 hours ago











  • If you try to understand my first part of questions, you will realize that I am not sure why the routing table doesn't have a nondefault entry for a loopback address. If you realize that, you might clarify my confusion by something like a routing table doesn't apply to a loopback address (if that is true). That is just what I need to connect the dots into line. Also with all due respect.

    – Tim
    2 hours ago













  • You might have fun playing with the ip route get command. eg ip route get 127.0.0.1 and ip route get 8.8.8.8

    – Stephen Harris
    1 hour ago
















-2















How shall I understand the routing tables of a guest OS and a host OS via KVM?



When a packet reaches the guest OS





  1. If the packet is destined for the loop back address (127.0.0.1) of the guest OS,




    • will it be transmitted to ent3 (192.168.122.202) and then to gateway (192.168.122.1), according to the first rule in the routing
      table of the guest OS? Isn't that wrong, since the intended destination (127.0.0.1) is in the guest OS?




  2. if the packet is destined for a private IP address (192.168.122.2) in the virtual machine's private network




    • is the packet delivered to ent3 (192.168.122.202) as the final destination, according to the second entry in the routing table of
      the guest OS? Isn't that wrong, because the intened destination
      192.168.122.2 isn't in the guest OS, and the packet should be transmitted to gateway 192.168.122.1, and then to 192.168.122.2?




  3. If the packet is destined for a private address (192.168.1.100) in the LAN of the host,




    • will it be transmitted to ent3 (192.168.122.202) and then to gateway (192.168.122.1), according to the first rule in the routing
      table of the guest OS?


    • when the packet reaches the host OS, will it be transmitted to wlx801f02b5c389 (192.168.1.97), according to the third rule in the
      routing table of the guest OS? If yes, isn't that wrong, because
      wlx801f02b5c389 (192.168.1.97) isn't the intended destination
      192.168.1.100?





  4. if the packet is destined for a public IP address (e.g. the one for
    www.google.com),




    • is the packet transmitted to ent3 (192.168.122.202) and then to gateway (192.168.122.1), according to the first rule in the routing
      table of the guest OS?


    • when the packet arrives at the host OS, is it transmitted to wlx801f02b5c389 (192.168.1.97), and then to gateway (192.168.1.1),
      according to the first entry in the routing table of the host OS?


    • will gateway (192.168.1.1) transmit the packet to www.google.com?





Thanks.



On the guest OS:



$ /sbin/route -n 
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.122.1 0.0.0.0 UG 0 0 0 ens3
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 ens3


and



$ /sbin/ifconfig
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.122.202 netmask 255.255.255.0 broadcast 192.168.122.255
inet6 fe80::5054:ff:fe99:5eee prefixlen 64 scopeid 0x20<link>
ether 52:54:00:99:5e:ee txqueuelen 1000 (Ethernet)
RX packets 14906 bytes 18020195 (17.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7390 bytes 786783 (768.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 35568

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 1 (Local Loopback)
RX packets 496 bytes 39840 (38.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 496 bytes 39840 (38.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


On the host OS:



$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 600 0 0 wlx801f02b5c389
192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0 wlx801f02b5c389
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0


and



$ ifconfig 

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 3119811 bytes 177332278 (177.3 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3119811 bytes 177332278 (177.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

virbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:b1:aa:1f txqueuelen 1000 (Ethernet)
RX packets 7865 bytes 728783 (728.7 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 14988 bytes 18248805 (18.2 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

vnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::fc54:ff:fe99:5eee prefixlen 64 scopeid 0x20<link>
ether fe:54:00:99:5e:ee txqueuelen 1000 (Ethernet)
RX packets 7414 bytes 789007 (789.0 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 54379 bytes 20281975 (20.2 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlx801f02b5c389: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.97 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 prefixlen 64 scopeid 0x20<link>
ether 80:1f:02:b5:c3:89 txqueuelen 1000 (Ethernet)
RX packets 115011 bytes 102852430 (102.8 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 80310 bytes 14401568 (14.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0









share|improve this question




















  • 1





    Tim, with all due respect, I think you need to research the networking issues as is without trying to complicate them by adding virtualization into the mix. You are conflating specific points in the technical details. For example: with two real computer systems, how could you ping the lo interface on another computer? Answer that question, then try to do it with a VM.

    – 0xSheepdog
    2 hours ago











  • If you try to understand my first part of questions, you will realize that I am not sure why the routing table doesn't have a nondefault entry for a loopback address. If you realize that, you might clarify my confusion by something like a routing table doesn't apply to a loopback address (if that is true). That is just what I need to connect the dots into line. Also with all due respect.

    – Tim
    2 hours ago













  • You might have fun playing with the ip route get command. eg ip route get 127.0.0.1 and ip route get 8.8.8.8

    – Stephen Harris
    1 hour ago














-2












-2








-2








How shall I understand the routing tables of a guest OS and a host OS via KVM?



When a packet reaches the guest OS





  1. If the packet is destined for the loop back address (127.0.0.1) of the guest OS,




    • will it be transmitted to ent3 (192.168.122.202) and then to gateway (192.168.122.1), according to the first rule in the routing
      table of the guest OS? Isn't that wrong, since the intended destination (127.0.0.1) is in the guest OS?




  2. if the packet is destined for a private IP address (192.168.122.2) in the virtual machine's private network




    • is the packet delivered to ent3 (192.168.122.202) as the final destination, according to the second entry in the routing table of
      the guest OS? Isn't that wrong, because the intened destination
      192.168.122.2 isn't in the guest OS, and the packet should be transmitted to gateway 192.168.122.1, and then to 192.168.122.2?




  3. If the packet is destined for a private address (192.168.1.100) in the LAN of the host,




    • will it be transmitted to ent3 (192.168.122.202) and then to gateway (192.168.122.1), according to the first rule in the routing
      table of the guest OS?


    • when the packet reaches the host OS, will it be transmitted to wlx801f02b5c389 (192.168.1.97), according to the third rule in the
      routing table of the guest OS? If yes, isn't that wrong, because
      wlx801f02b5c389 (192.168.1.97) isn't the intended destination
      192.168.1.100?





  4. if the packet is destined for a public IP address (e.g. the one for
    www.google.com),




    • is the packet transmitted to ent3 (192.168.122.202) and then to gateway (192.168.122.1), according to the first rule in the routing
      table of the guest OS?


    • when the packet arrives at the host OS, is it transmitted to wlx801f02b5c389 (192.168.1.97), and then to gateway (192.168.1.1),
      according to the first entry in the routing table of the host OS?


    • will gateway (192.168.1.1) transmit the packet to www.google.com?





Thanks.



On the guest OS:



$ /sbin/route -n 
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.122.1 0.0.0.0 UG 0 0 0 ens3
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 ens3


and



$ /sbin/ifconfig
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.122.202 netmask 255.255.255.0 broadcast 192.168.122.255
inet6 fe80::5054:ff:fe99:5eee prefixlen 64 scopeid 0x20<link>
ether 52:54:00:99:5e:ee txqueuelen 1000 (Ethernet)
RX packets 14906 bytes 18020195 (17.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7390 bytes 786783 (768.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 35568

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 1 (Local Loopback)
RX packets 496 bytes 39840 (38.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 496 bytes 39840 (38.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


On the host OS:



$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 600 0 0 wlx801f02b5c389
192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0 wlx801f02b5c389
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0


and



$ ifconfig 

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 3119811 bytes 177332278 (177.3 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3119811 bytes 177332278 (177.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

virbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:b1:aa:1f txqueuelen 1000 (Ethernet)
RX packets 7865 bytes 728783 (728.7 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 14988 bytes 18248805 (18.2 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

vnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::fc54:ff:fe99:5eee prefixlen 64 scopeid 0x20<link>
ether fe:54:00:99:5e:ee txqueuelen 1000 (Ethernet)
RX packets 7414 bytes 789007 (789.0 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 54379 bytes 20281975 (20.2 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlx801f02b5c389: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.97 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 prefixlen 64 scopeid 0x20<link>
ether 80:1f:02:b5:c3:89 txqueuelen 1000 (Ethernet)
RX packets 115011 bytes 102852430 (102.8 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 80310 bytes 14401568 (14.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0









share|improve this question
















How shall I understand the routing tables of a guest OS and a host OS via KVM?



When a packet reaches the guest OS





  1. If the packet is destined for the loop back address (127.0.0.1) of the guest OS,




    • will it be transmitted to ent3 (192.168.122.202) and then to gateway (192.168.122.1), according to the first rule in the routing
      table of the guest OS? Isn't that wrong, since the intended destination (127.0.0.1) is in the guest OS?




  2. if the packet is destined for a private IP address (192.168.122.2) in the virtual machine's private network




    • is the packet delivered to ent3 (192.168.122.202) as the final destination, according to the second entry in the routing table of
      the guest OS? Isn't that wrong, because the intened destination
      192.168.122.2 isn't in the guest OS, and the packet should be transmitted to gateway 192.168.122.1, and then to 192.168.122.2?




  3. If the packet is destined for a private address (192.168.1.100) in the LAN of the host,




    • will it be transmitted to ent3 (192.168.122.202) and then to gateway (192.168.122.1), according to the first rule in the routing
      table of the guest OS?


    • when the packet reaches the host OS, will it be transmitted to wlx801f02b5c389 (192.168.1.97), according to the third rule in the
      routing table of the guest OS? If yes, isn't that wrong, because
      wlx801f02b5c389 (192.168.1.97) isn't the intended destination
      192.168.1.100?





  4. if the packet is destined for a public IP address (e.g. the one for
    www.google.com),




    • is the packet transmitted to ent3 (192.168.122.202) and then to gateway (192.168.122.1), according to the first rule in the routing
      table of the guest OS?


    • when the packet arrives at the host OS, is it transmitted to wlx801f02b5c389 (192.168.1.97), and then to gateway (192.168.1.1),
      according to the first entry in the routing table of the host OS?


    • will gateway (192.168.1.1) transmit the packet to www.google.com?





Thanks.



On the guest OS:



$ /sbin/route -n 
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.122.1 0.0.0.0 UG 0 0 0 ens3
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 ens3


and



$ /sbin/ifconfig
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.122.202 netmask 255.255.255.0 broadcast 192.168.122.255
inet6 fe80::5054:ff:fe99:5eee prefixlen 64 scopeid 0x20<link>
ether 52:54:00:99:5e:ee txqueuelen 1000 (Ethernet)
RX packets 14906 bytes 18020195 (17.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7390 bytes 786783 (768.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 35568

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 1 (Local Loopback)
RX packets 496 bytes 39840 (38.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 496 bytes 39840 (38.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


On the host OS:



$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 600 0 0 wlx801f02b5c389
192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0 wlx801f02b5c389
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0


and



$ ifconfig 

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 3119811 bytes 177332278 (177.3 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3119811 bytes 177332278 (177.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

virbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:b1:aa:1f txqueuelen 1000 (Ethernet)
RX packets 7865 bytes 728783 (728.7 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 14988 bytes 18248805 (18.2 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

vnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::fc54:ff:fe99:5eee prefixlen 64 scopeid 0x20<link>
ether fe:54:00:99:5e:ee txqueuelen 1000 (Ethernet)
RX packets 7414 bytes 789007 (789.0 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 54379 bytes 20281975 (20.2 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlx801f02b5c389: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.97 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 prefixlen 64 scopeid 0x20<link>
ether 80:1f:02:b5:c3:89 txqueuelen 1000 (Ethernet)
RX packets 115011 bytes 102852430 (102.8 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 80310 bytes 14401568 (14.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0






virtual-machine routing kvm






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 1 hour ago









Stephen Harris

26.9k35181




26.9k35181










asked 3 hours ago









TimTim

28.1k78269490




28.1k78269490








  • 1





    Tim, with all due respect, I think you need to research the networking issues as is without trying to complicate them by adding virtualization into the mix. You are conflating specific points in the technical details. For example: with two real computer systems, how could you ping the lo interface on another computer? Answer that question, then try to do it with a VM.

    – 0xSheepdog
    2 hours ago











  • If you try to understand my first part of questions, you will realize that I am not sure why the routing table doesn't have a nondefault entry for a loopback address. If you realize that, you might clarify my confusion by something like a routing table doesn't apply to a loopback address (if that is true). That is just what I need to connect the dots into line. Also with all due respect.

    – Tim
    2 hours ago













  • You might have fun playing with the ip route get command. eg ip route get 127.0.0.1 and ip route get 8.8.8.8

    – Stephen Harris
    1 hour ago














  • 1





    Tim, with all due respect, I think you need to research the networking issues as is without trying to complicate them by adding virtualization into the mix. You are conflating specific points in the technical details. For example: with two real computer systems, how could you ping the lo interface on another computer? Answer that question, then try to do it with a VM.

    – 0xSheepdog
    2 hours ago











  • If you try to understand my first part of questions, you will realize that I am not sure why the routing table doesn't have a nondefault entry for a loopback address. If you realize that, you might clarify my confusion by something like a routing table doesn't apply to a loopback address (if that is true). That is just what I need to connect the dots into line. Also with all due respect.

    – Tim
    2 hours ago













  • You might have fun playing with the ip route get command. eg ip route get 127.0.0.1 and ip route get 8.8.8.8

    – Stephen Harris
    1 hour ago








1




1





Tim, with all due respect, I think you need to research the networking issues as is without trying to complicate them by adding virtualization into the mix. You are conflating specific points in the technical details. For example: with two real computer systems, how could you ping the lo interface on another computer? Answer that question, then try to do it with a VM.

– 0xSheepdog
2 hours ago





Tim, with all due respect, I think you need to research the networking issues as is without trying to complicate them by adding virtualization into the mix. You are conflating specific points in the technical details. For example: with two real computer systems, how could you ping the lo interface on another computer? Answer that question, then try to do it with a VM.

– 0xSheepdog
2 hours ago













If you try to understand my first part of questions, you will realize that I am not sure why the routing table doesn't have a nondefault entry for a loopback address. If you realize that, you might clarify my confusion by something like a routing table doesn't apply to a loopback address (if that is true). That is just what I need to connect the dots into line. Also with all due respect.

– Tim
2 hours ago







If you try to understand my first part of questions, you will realize that I am not sure why the routing table doesn't have a nondefault entry for a loopback address. If you realize that, you might clarify my confusion by something like a routing table doesn't apply to a loopback address (if that is true). That is just what I need to connect the dots into line. Also with all due respect.

– Tim
2 hours ago















You might have fun playing with the ip route get command. eg ip route get 127.0.0.1 and ip route get 8.8.8.8

– Stephen Harris
1 hour ago





You might have fun playing with the ip route get command. eg ip route get 127.0.0.1 and ip route get 8.8.8.8

– Stephen Harris
1 hour ago










1 Answer
1






active

oldest

votes


















0














The host and the guest systems are -- in the case of a virtual machine running via KVM, virtualbox, VMware, etc. -- completely separate computer systems.



They will route traffic the same as two physical computers configured in each particular manner.



There is no special configuration, that I know of or have seen evidence of, on the host OR the guest with the network configuration.



All of the network functionality on the host that the libvirt/KVM packages and applications provide (such as providing DHCPd, NAT, etc.) can be provided via other packages and utilized over a physical network connection to other computers on a physical network.






share|improve this answer
























  • Thanks. I am trying to understand how the routing table works. I have read several articles found on the Internet, but still not clear about that. I used guest OS and host OS via KVM as an example. I might have used a simpler example just a regular OS, but with guest OS and host OS, I could ask more. If you could explain how the routing tables work in each case, that will clarify most of my confusions that I have now.

    – Tim
    2 hours ago













Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f508615%2fhow-shall-i-understand-the-usage-of-the-routing-tables-of-a-guest-os-and-its-hos%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














The host and the guest systems are -- in the case of a virtual machine running via KVM, virtualbox, VMware, etc. -- completely separate computer systems.



They will route traffic the same as two physical computers configured in each particular manner.



There is no special configuration, that I know of or have seen evidence of, on the host OR the guest with the network configuration.



All of the network functionality on the host that the libvirt/KVM packages and applications provide (such as providing DHCPd, NAT, etc.) can be provided via other packages and utilized over a physical network connection to other computers on a physical network.






share|improve this answer
























  • Thanks. I am trying to understand how the routing table works. I have read several articles found on the Internet, but still not clear about that. I used guest OS and host OS via KVM as an example. I might have used a simpler example just a regular OS, but with guest OS and host OS, I could ask more. If you could explain how the routing tables work in each case, that will clarify most of my confusions that I have now.

    – Tim
    2 hours ago


















0














The host and the guest systems are -- in the case of a virtual machine running via KVM, virtualbox, VMware, etc. -- completely separate computer systems.



They will route traffic the same as two physical computers configured in each particular manner.



There is no special configuration, that I know of or have seen evidence of, on the host OR the guest with the network configuration.



All of the network functionality on the host that the libvirt/KVM packages and applications provide (such as providing DHCPd, NAT, etc.) can be provided via other packages and utilized over a physical network connection to other computers on a physical network.






share|improve this answer
























  • Thanks. I am trying to understand how the routing table works. I have read several articles found on the Internet, but still not clear about that. I used guest OS and host OS via KVM as an example. I might have used a simpler example just a regular OS, but with guest OS and host OS, I could ask more. If you could explain how the routing tables work in each case, that will clarify most of my confusions that I have now.

    – Tim
    2 hours ago
















0












0








0







The host and the guest systems are -- in the case of a virtual machine running via KVM, virtualbox, VMware, etc. -- completely separate computer systems.



They will route traffic the same as two physical computers configured in each particular manner.



There is no special configuration, that I know of or have seen evidence of, on the host OR the guest with the network configuration.



All of the network functionality on the host that the libvirt/KVM packages and applications provide (such as providing DHCPd, NAT, etc.) can be provided via other packages and utilized over a physical network connection to other computers on a physical network.






share|improve this answer













The host and the guest systems are -- in the case of a virtual machine running via KVM, virtualbox, VMware, etc. -- completely separate computer systems.



They will route traffic the same as two physical computers configured in each particular manner.



There is no special configuration, that I know of or have seen evidence of, on the host OR the guest with the network configuration.



All of the network functionality on the host that the libvirt/KVM packages and applications provide (such as providing DHCPd, NAT, etc.) can be provided via other packages and utilized over a physical network connection to other computers on a physical network.







share|improve this answer












share|improve this answer



share|improve this answer










answered 2 hours ago









0xSheepdog0xSheepdog

1,5621924




1,5621924













  • Thanks. I am trying to understand how the routing table works. I have read several articles found on the Internet, but still not clear about that. I used guest OS and host OS via KVM as an example. I might have used a simpler example just a regular OS, but with guest OS and host OS, I could ask more. If you could explain how the routing tables work in each case, that will clarify most of my confusions that I have now.

    – Tim
    2 hours ago





















  • Thanks. I am trying to understand how the routing table works. I have read several articles found on the Internet, but still not clear about that. I used guest OS and host OS via KVM as an example. I might have used a simpler example just a regular OS, but with guest OS and host OS, I could ask more. If you could explain how the routing tables work in each case, that will clarify most of my confusions that I have now.

    – Tim
    2 hours ago



















Thanks. I am trying to understand how the routing table works. I have read several articles found on the Internet, but still not clear about that. I used guest OS and host OS via KVM as an example. I might have used a simpler example just a regular OS, but with guest OS and host OS, I could ask more. If you could explain how the routing tables work in each case, that will clarify most of my confusions that I have now.

– Tim
2 hours ago







Thanks. I am trying to understand how the routing table works. I have read several articles found on the Internet, but still not clear about that. I used guest OS and host OS via KVM as an example. I might have used a simpler example just a regular OS, but with guest OS and host OS, I could ask more. If you could explain how the routing tables work in each case, that will clarify most of my confusions that I have now.

– Tim
2 hours ago




















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f508615%2fhow-shall-i-understand-the-usage-of-the-routing-tables-of-a-guest-os-and-its-hos%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

濃尾地震

How to rewrite equation of hyperbola in standard form

No ethernet ip address in my vocore2