0
I got a virtual machine image for my course (there is a development env setup) and I can't create a same setup, so I need to use this. It's an older Arch Linux (uname -a
says 2013) with 3.8.4 kernel and very limited command set. I have a problem setting up networking to this machine (needed for the development). I am able to ping the virtual machine from my laptop, but I can't reach anything (not even localhost) from the virtual machine - the output is always Bad address
.
My ip a
output:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 52:54:00:1a:d0:53 brd ff:ff:ff:ff:ff:ff
inet 192.168.100.223/24 brd 192.168.100.255 scope global eth0
inet6 fe80::5054:ff:fe1a:d053/64 scope link
valid_lft forever preferred_lft forever
route
output:
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.100.1 0.0.0.0 UG 600 0 0 eth0
192.168.100.0 * 255.255.255.0 U 0 0 0 eth0
192.168.100.1
is the IP of virbr1 of my laptop. The output of ping 127.0.0.1
is:
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
ping: sendmsg: Bad address
If I try to ping anything (my laptop as 192.168.100.1
, Google 8.8.8.8
, localhost) the answer is still same. There is no traceroute
, but if I run tracepath 8.8.8.8
or tracepath google.com
, it works as expected. There is no policy set up in iptables
. I have tried copying example file for eth0 and adjusting it to /etc/network.d/interfaces
, but it didn't change anything.
What I really need is to make this machine available to the outer world (I need to be able to connect to it from machine in the home network, which is not in the 192.168.100.*
, but is in the same network as my laptop). However, when I'm unable to ping localhost, I suspect there is something completely wrong with the network and my google-fu doesn't help.
EDIT for clarity: I'm not searching for how to make the machine available to others, that's just so you know the background. I'm searching for a cause of Bad address
message that makes zero sense to me.
What virtualization platform are you using? Are you using bridged or nat networking? What is the local ip of the host machine? Do you have a firewall? Seems like host-only network enabled. – codemonk113 – 2016-04-26T19:43:07.420
@codemonk113 Linux (Fedora 22 on the laptop) with Virtual Machine Manager (uses QEMU, KVM), I tried both with firewalld on and off, I'm not aware of any firewall on the virtual machine (nothing from
ps
seems like a firewall). Network interface set in the VMM is as Virtual network: NAT to wlp3s0 (laptop's connection to wifi) - other options are macvtap which I have no idea what it is. If you really need the local IP, currently it's10.0.1.24
, but I think it's irrelevant – Adalee – 2016-04-26T19:55:46.787For what you want you need bridged networking, otherwise you have to set up router-host-client port forwards(and possibly static routes). – codemonk113 – 2016-04-26T20:04:50.367
There is no option for bridged networking, and my second virtual machine (my own installation of Fedora 23, not connected with this problem) has the same network setup in the VMM and everything is working there. If there is a need for bridged, why is it working? Also this virtual machine is obviously communicating with world - see the
tracepath
mentions in the question, which work correctly (go through the laptop, router and further). – Adalee – 2016-04-26T20:23:18.783Bridged networking is the "most simple" in terms of management; you don't really need it - just a possible quick fix. The fact that bridged networking is not available is bizzarre, and may indicate a systemic problem. Is bridged networking available in your working VM(F23)? For any further analysis of this problem the outputs of
route
ipconfig
iptables -n -L
would be helpful(from all machines). – codemonk113 – 2016-04-26T20:34:09.457No, bridged networking is not available in the VMM - so it's not available to any VM, and I never had any issue. Also, why would any networking be needed to ping loopback successfully?
route
andiptables
are already in the question, there is noipconfig
on any machine. Theiptables
on the F23 is basically accepting everything (generated by a network manager or another program) androute
contains only the192.168.100.0
line. If I remove the192.168.100.1
line from the Arch route, I getNetwork is unreachable
, so that line is definitely correct – Adalee – 2016-04-26T21:08:10.043ipconfig
was a typo, I meantifconfig
. As an aside, your VM seems to have problems in and of itself, although this may may be by design. If it is a dev VM, perhaps this functionality is desired? i.e. only accessible/pushable from host. I would check with whomever provided the image for more details. – codemonk113 – 2016-04-26T21:43:25.843