2

I am trying to setup the network between UML instance running on ubuntu as host.

UML--eth0-(192.168.0.254) ----------------tap0--(192.168.0.253)--VM

But, I am not able to bring the eth0 device in UP state, even after configuring an ip address.

UML :

[root@localhost ~]# ifconfig -a
eth0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
    inet 192.168.0.254  netmask 255.255.255.0  broadcast 192.168.0.255
    ether fa:df:23:a2:22:4b  txqueuelen 1000  (Ethernet)
    RX packets 0  bytes 0 (0.0 B)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 0  bytes 0 (0.0 B)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    device interrupt 5

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
    inet 127.0.0.1  netmask 255.0.0.0
    loop  txqueuelen 1  (Local Loopback)
    RX packets 0  bytes 0 (0.0 B)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 0  bytes 0 (0.0 B)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

As you can see, eth0 status is only broadcast and multicast but not up. However, tap0 on VM side is up and running.

Host VM
vm@vm:/dev/net$ ifconfig tap0
tap0      Link encap:Ethernet  HWaddr 96:e1:8c:c9:09:54
      inet addr:192.168.0.253  Bcast:192.168.0.255  Mask:255.255.255.0
      UP BROADCAST MULTICAST  MTU:1500  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:500
      RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

I am logged in as a root, even then I am not permitted to trigger the command below.

[root@localhost ~]# ifconfig eth0 up
SIOCSIFFLAGS: Operation not permitted

[root@localhost ~]# ip link set eth0 up
RTNETLINK answers: Operation not permitted
Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250

1 Answers1

1

Got the solution, i need to start mu UML process as root, after which configuring ip address will bring the interface up.

Just run the uml as root :

 sudo ./linux ubda=Fedora21-x86-root_fs