0

I am developing a kernel feature, using User-Mode-Linux. I compiled 3.12.38 from source and downloaded a Debian fs.
However, I am not able to seet-up networking using following options here.
Are there any good source or info to go with this.
I have internet on wlan0.

EDIT:
I start with eth0=tuntap,,,192.168.0.254

and then inside UML UML# ifconfig eth0 192.168.0.253 up I only get the output as:
modprobe tun
ifconfig tap0 192.168.0.252 netmask 255.255.255.255 up
route add -host 192.168.0.253 dev tap0

As mentioned, output is lacking a bit and more over a ping to 192.168.0.254 doesn't seems to work, with 100% packet loss.

Vikas Raturi
  • 916
  • 2
  • 13
  • 23

1 Answers1

0

Let us follow the steps to establish the following Topology:

VM-tap0(192.168.6.6)-------------(192.168.6.8)eth0-UML1-eth1(192.168.20.1)----------------eth1-(192.168.20.2)UML2

here, UML1 and UML2 are two UML instances running on VM as a host. All uml_console commands are suppose to run on VM host.

Tun/Tap config:

VM <------>UML1 (ley us first establish the connection between VM host and UML1)

@host as root :

chmod 777 /dev/net/tun

tunctl -u vm -t tap0 (here vm is the VM user name)

echo 1 > /proc/sys/net/ipv4/ip_forward

echo 1 > /proc/sys/net/ipv4/conf/tap0/proxy_arp

ifconfig tap0 192.168.6.6 up

./linux ubda=CentOS6.x-x86-root_fs umid=debian1 [separate terminal]

uml_mconsole debian1 config eth0=tuntap,tap0

route add -host 192.168.6.8 dev tap0

route add -net 192.168.20.0 netmask 255.255.255.0 gw 192.168.6.8 dev tap0

@uml1

eth0=tuntap,tap0

ifconfig eth0 192.168.6.8 up

echo 1 > /proc/sys/net/ipv4/ip_forward

echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp

Now UML1<-------------->UML2

./linux ubda=CentOS6.x-x86-root_fs2 umid=debian2 [separate terminal]

uml_mconsole debian1 config eth1=mcast (if these commands fails, it means you have not compile the UML kernel with multicast ineterface enabled in )

uml_mconsole debian2 config eth1=mcast

again @uml1

ifconfig eth1 192.168.20.1 up

@uml2

ifconfig eth1 192.168.20.2 up

route add -net 192.168.6.0 netmask 255.255.255.0 gw 192.168.20.1 dev eth1

echo 1 > /proc/sys/net/ipv4/ip_forward

echo 1 > /proc/sys/net/ipv4/conf/eth1/proxy_arp

Try ping UML2 from VM and vice versa. You should be able to ping in both directions.

Abhishek Sagar
  • 1,189
  • 4
  • 20
  • 44