public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
From: Mateusz Viste <mateusz@viste-family.net>
To: linux-msdos@vger.kernel.org
Subject: Re: DOSemu networking made easy
Date: Mon, 24 Jun 2013 15:50:44 +0200	[thread overview]
Message-ID: <51C84EB4.3070000@viste-family.net> (raw)
In-Reply-To: <51C84847.60903@list.ru>

Hi Stas!

No, it's not naive at all :). And my descriptions are probably lacking a 
fair amount of clarity.

 > actually solve? I can see some advantage of this over
 > the bridging tap0 with eth0 solution,

Bridging tap0 with eth0 requires that:
  - there is a DHCP server somewhere in the network
  - you are actually using always eth0 (and not wlan0 for instance when 
on the road, and eth0 when at home, etc)
  - you need to have the right to use more than 1 IP

All the conditions above are often unrealistic on a laptop, moving from 
home/office/hotel on the road, etc.

 > but what advantage
 > does it give over the static route with masquerading solution?

Technically - very little. BUT:
  - it's probably much easier to use taprouter
  - you don't need to play with NAT on your own PC
  - you don't need to enable ipforward=1 on your PC (which I am usually 
relunctant to do when being on a foreign network)

 > You seem to be saying that the dosemu's networking
 > configuration tends to change when you relocate your
 > laptop - I can agree with this if we talk about bridging,
 > but is it still true for the routing case?

No, it is not indeed. The only differences are points above.
basically taprouter makes it possible to use DOSemu with networking 
without reconfiguring your host PC to act as a router with NAT & 
possibly DHCP. Plus, taprouter works in usermode (no need to play with 
commands that look obscure to many people using the root account).

in fact, taprouter provides exactly the same service than most 
hypervisors do nowadays (like virtualbox, qemu, bochs..). ie. a 'net 
user' networking mode, where the user don't have to care about 
networking configuration, because as long as his host PC have internet 
access, the virtual machine (or DOSemu in this case) will, too.

 > I think I can just install a generic DHCP server and dosemu
 > will be able to reach it.

Sure. You are also one step away from spoofing any possible DHCP servers 
on whatever network you connect to, if you don't take extra care about 
how you configure your DHCP server. ;)
The solutions you describe are perfectly valid, but they are targeted to 
people that know exactly what they are doing, and why (and able to adapt 
the configuration when needed).
taprouter is targetted to people that don't have in-depth networking 
knowledge, and just want 'internet to work in DOSemu', or simply don't 
have time to wonder if their DOSemu setup will brake whenever they move 
from one network to another.

 > Also, if tap0 is bridged with eth0,
 > dosemu will be able to reach an outer DHCP server.
 > Is this not true?

Totally true. But again, it applies to the situation when there is a 
DHCP server out there, AND you are allowed to use more than 1 IP address 
at a time.

 > I am not sure what does this mean:
 > ---
 > taprouter expects you to use the IP address 10.0.2.1 as a default gateway
 > ---
 > you mean default gateway for dosemu or what?

Yes, that's exactly what I meant. From the point of view of DOSemu, 
DOSemu thinks it's in a 10.0.2.0/24 LAN with a single gateway, and a 
single DNS server - and these won't change, no matter how the 'real' 
network situation of the host looks like.

 > Why your tool itself need a tap device?

because it acts like a tap client. You'd have to imagine that the bridge 
is a L2 switch, and tap interfaces are RJ45 sockets :). You connect both 
your DOSemu and the router to the switch, so they can speak to each 
other. I think this needs to be explained with a drawing - a will do 
such schema and post it on my website.

 > Never used dosemu with DHCP, but I haven't expected there
 > are any problems that need an extra tool to solve.

Because in fact, technically there is no need - you can just as well 
obtain the same result with pure bridging or tap routing + masquerading, 
with optionally a DHCP server running on your PC, and maybe a DNS relay. 
But it's far from being trivial to set up, and additionally you have to 
keep in mind that you need to adapt the whole thing when your network 
settings change, and make sure that nobody can use your machine now as a 
DNS server and/or anonymous router and/or DHCP server.

I hope it's a bit clearer now :) Let me know.

cheers,
Mateusz







On 06/24/2013 03:23 PM, Stas Sergeev wrote:
> 24.06.2013 15:36, Mateusz Viste пишет:
>> Hi all,
>>
>> I'm happily using DOSemu since a long time now, and the one thing that
>> has always been bothering me is the complicated networking settings.
>> Playing with bridging and masquerading and transforming the host into
>> a routing machine is usually fine on a home desktop PC, but it becomes
>> a real pain on a laptop which, by nature, often change it's network
>> settings and physical locations.
>>
>> This is why I wrote a tool to make DOSemu networking much easier (at
>> least from my POV): taprouter.
> Hi!
>
> Maybe a naive question, but, what problem does it
> actually solve? I can see some advantage of this over
> the bridging tap0 with eth0 solution, but what advantage
> does it give over the static route with masquerading solution?
>
> You seem to be saying that the dosemu's networking
> configuration tends to change when you relocate your
> laptop - I can agree with this if we talk about bridging,
> but is it still true for the routing case?
>
> I think I can just install a generic DHCP server and dosemu
> will be able to reach it. Also, if tap0 is bridged with eth0,
> dosemu will be able to reach an outer DHCP server.
> Is this not true?
>
> I am not sure what does this mean:
> ---
> taprouter expects you to use the IP address 10.0.2.1 as a default gateway
> ---
> you mean default gateway for dosemu or what?
>
> Why your tool itself need a tap device?
>
> Sorry, I am just a bit lost. :)
> Never used dosemu with DHCP, but I haven't expected there
> are any problems that need an extra tool to solve.
>

--
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2013-06-24 13:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-24 11:36 DOSemu networking made easy Mateusz Viste
2013-06-24 13:23 ` Stas Sergeev
2013-06-24 13:50   ` Mateusz Viste [this message]
2013-06-24 15:00     ` Stas Sergeev
2013-06-24 15:38       ` Mateusz Viste
2013-06-24 16:12         ` Stas Sergeev
2013-06-24 19:58           ` Eric W. Biederman
2013-06-24 20:42             ` Stas Sergeev
2013-06-24 22:04               ` Mateusz Viste
2013-06-25  7:03                 ` Stas Sergeev
2013-06-25  7:33                   ` Mateusz Viste
2013-06-25  8:27                     ` Eric W. Biederman
     [not found]                       ` <87zjue8ujo.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2013-06-25 11:43                         ` Stas Sergeev
2013-06-25  9:48                     ` Stas Sergeev
2013-06-25 11:16                       ` Eric W. Biederman
2013-06-25 13:30                       ` Mateusz Viste
2013-06-24 21:47             ` Mateusz Viste
2013-06-24 23:43               ` Eric W. Biederman
2013-06-25  6:49                 ` Mateusz Viste
     [not found]                   ` <8fbd00db-16cc-4fd2-8135-0c3c99fcc3a6-2ueSQiBKiTY7tOexoI0I+QC/G2K4zDHf@public.gmane.org>
2013-06-25  7:47                     ` Eric W. Biederman
2013-06-25  7:13                 ` Stas Sergeev
2013-06-25  7:57                   ` Eric W. Biederman
2013-06-25  9:45                     ` Stas Sergeev
2013-06-24 14:40   ` Mateusz Viste

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51C84EB4.3070000@viste-family.net \
    --to=mateusz@viste-family.net \
    --cc=linux-msdos@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox