Saket Chawla | 6 Feb 2012 19:24
Picon

[uml-user] UML networking setup

Can someone help me with setting up networking in UML?

   I am running Ubuntu 10.10 over linux 2.6.35.32

   I am compiling from source
           linux-3.2.4.tar.bz2
           Debian-Squeeze-x86-root_fs.bz2

   Source build using commands

   make defconfig ARCH=um
   make mrproper ARCH=um
   make ARCH=um

   the UML is started using
             ./linux ubda=Debian-Squeeze-x86-root_fs  umid=myuml mem=128m

   with this i am able to navigate directories and create files/folders. So  UML begins to work

For networking

   my host networking is at
   wlan0     Link encap:Ethernet  HWaddr 00:16:44:a8:bf:39
             inet addr:172.20.113.136  Bcast:172.20.113.255  Mask:255.255.255.0

   So to set up networking i use the commands at host
          host : uml_mconsole myuml config eth0=tuntap,,,172.20.113.137

   in my UML window i see

   root <at> (none):~# Choosing a random ethernet address for device eth0
   Netdevice 0 (5a:66:7b:a0:86:d9) :
   TUN/TAP backend - IP = 172.20.113.137

and it is stuck at this point......

   my final aim is to be able to access internet using UML.

   Please let me know if you need any other information.
   Any help would be appreciated.

--

Thanks
Regards
Saket Chawla
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
Saket Chawla | 6 Feb 2012 19:22
Picon

[uml-user] UML networking setup

 Can someone help me with setting up networking in UML?
   I am running Ubuntu 10.10 over linux 2.6.35.32
   I am compiling from source
           linux-3.2.4.tar.bz2
           Debian-Squeeze-x86-root_fs.bz2
   Source build using commands
   make defconfig ARCH=um
   make mrproper ARCH=um
   make ARCH=um
   the UML is started using
             ./linux ubda=Debian-Squeeze-x86-root_fs  umid=myuml mem=128m
   with this i am able to navigate directories and create files/folders. So
   UML begins to work
   *For networking*

- Ignored:
   my host networking is at
   wlan0     Link encap:Ethernet  HWaddr 00:16:44:a8:bf:39
             inet addr:172.20.113.136  Bcast:172.20.113.255  Mask:255.255.255.0

   So to set up networking i use the commands at host
          host : uml_mconsole myuml config eth0=tuntap,,,172.20.113.137

   in my UML window i see
   root <at> (none):~# Choosing a random ethernet address for device eth0
   Netdevice 0 (5a:66:7b:a0:86:d9) :
   TUN/TAP backend - IP = 172.20.113.137

   *and it is stuck at this point......*

   my final aim is to be able to access internet using UML.

   Please let me know if you need any other information.
   Any help would be appreciated.

--

Thanks
Regards
Saket Chawla
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
Riccardo Murri | 6 Feb 2012 21:40
Picon
Gravatar

Re: [uml-user] UML networking setup

Hi,

On Mon, Feb 6, 2012 at 19:22, Saket Chawla <chawlasaket <at> gmail.com> wrote:
>  Can someone help me with setting up networking in UML?

There are several different ways of making the UML guest communicate
with the host, each with its own strengths and weaknesses.
The "old site" has a fairly comprehensive review of networking methods
for UML, which explains how they differ:

http://user-mode-linux.sourceforge.net/old/networking.html

Since you're running Ubuntu, IMHO the easiest way to have the UML
guest access the internet as a *client* is by use of the "slirp"
program, which requires no root access.

1. Install the `slirp` package on the Ubuntu *host*:

        sudo apt-get install slirp

2. Run the UML guest with `eth0=slirp,,slirp-fullbolt`, e.g.:

        ./linux ubda=Debian-Squeeze-x86-root_fs  umid=myuml mem=128m
eth0=slirp,,slirp-fullbolt

   (You can also use `mconsole` to configure it in a running UML.)

3. Now configure the network in the Debian UML guest; as root edit the
   `/etc/network/interfaces` file so that it has the following content:

        # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
        # /usr/share/doc/ifupdown/examples for more information.
        auto lo
        iface lo inet loopback

        auto eth0
        iface eth0 inet static
            address 10.0.2.15
            netmask 255.255.0.0
                up route add -net 0.0.0.0 dev eth0
        up route add -net 0.0.0.0 gw 10.0.2.2

    Then you can run the command:

        ifup eth0

    and you should be able to access the net from inside the UML guest.

Best regards,
Riccardo

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
clownix | 6 Feb 2012 21:53

Re: [uml-user] UML networking setup

Hello,

172.20.113.137 for your uml would work, as it is in the same lan as your
host, but you need to bridge your host's interface to the tap you have
just created.

Then if this worked, both your host and your uml would be able to access
to your adsl router, BUT I have never been able to bridge (brctl from
bridge-utils) a wlan interface to a tap.

Last time I tried, the wifi interface could not be put in promiscious mode
and it did not work.

There are 2 alternatives to get the internet in an UML:

1 There should be an old software called slirp that can emulate an ip
interface for your UML:
Each TCP HTTP socket comes into the user world of your host, the data is
extracted and put into emulated IP packets that penetrate into your UML
machine as an IP flow with syn, synack and all TCP stuff.

2 There is cloonix, the slirp software (used also in qemu and in virtual
box) has been rewriten and machines connect to the internet just like qemu
machines.
But cloonix supports UML machines.

>  Can someone help me with setting up networking in UML?
>    I am running Ubuntu 10.10 over linux 2.6.35.32
>    I am compiling from source
>            linux-3.2.4.tar.bz2
>            Debian-Squeeze-x86-root_fs.bz2
>    Source build using commands
>    make defconfig ARCH=um
>    make mrproper ARCH=um
>    make ARCH=um
>    the UML is started using
>              ./linux ubda=Debian-Squeeze-x86-root_fs  umid=myuml mem=128m
>    with this i am able to navigate directories and create files/folders.
> So
>    UML begins to work
>    *For networking*
>
> - Ignored:
>    my host networking is at
>    wlan0     Link encap:Ethernet  HWaddr 00:16:44:a8:bf:39
>              inet addr:172.20.113.136  Bcast:172.20.113.255
>  Mask:255.255.255.0
>
>    So to set up networking i use the commands at host
>           host : uml_mconsole myuml config eth0=tuntap,,,172.20.113.137
>
>    in my UML window i see
>    root <at> (none):~# Choosing a random ethernet address for device eth0
>    Netdevice 0 (5a:66:7b:a0:86:d9) :
>    TUN/TAP backend - IP = 172.20.113.137
>
>    *and it is stuck at this point......*
>
>    my final aim is to be able to access internet using UML.
>
>    Please let me know if you need any other information.
>    Any help would be appreciated.
>
> --
>
> Thanks
> Regards
> Saket Chawla
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2_______________________________________________
> User-mode-linux-user mailing list
> User-mode-linux-user <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
>

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2

Gmane