Article 5Q1E7 Issues with networking in Linux From Scratch virtual machine

Issues with networking in Linux From Scratch virtual machine

by
j87
from LinuxQuestions.org on (#5Q1E7)
I am having issues with networking in a linux from scratch QEMU/KVM VM, managed by virt-manager.
Here is my /etc/sysconfig/ifconfig.eth0:
Code:ONBOOT=yes
IFACE=eth0
SERVICE=ipv4-static
IP=192.168.0.3
GATEWAY=192.168.0.1 # router
PREFIX=24
BROADCAST=192.168.0.255Code:/etc/resolv.conf:
nameserver 8.8.8.8
nameserver 8.8.4.4If I run ifup eth0, it outputs all ok:
Code:Bringing up the eth0 interface [OK]
Adding 192.168.0.3 to eth0 [OK]
Adding gateway 192.168.0.1 to eth0 [OK]But I cannot actually ping anything, and traceroute indicates that newwork is unreachable ( !H ).
I have set up virt-manager to use a virtual network, running through virtio:
Code:Network source: Virtual network "network"
Device model: VirtioI have had other virtual machines using these settings that have run just fine, and, under other settings, the eth0 interface does not even appear ( kernel issue? ). The weird thing is that if I run a Code:ip addr add 192.168.0.1 dev eth0 then I can ping the gateway, but no further, indicating that while it is working, something is going wrong somewhere. My only idea is that it might be a subnet issues, but i have no idea how to ever start diagnosing that kind of thing.

Thanks in advance for any help.latest?d=yIl2AUoC8zA latest?i=jvGxGhTUeTA:S-NF-uyOV3U:F7zBnMy latest?i=jvGxGhTUeTA:S-NF-uyOV3U:V_sGLiP latest?d=qj6IDK7rITs latest?i=jvGxGhTUeTA:S-NF-uyOV3U:gIN9vFwjvGxGhTUeTA
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments