Skip to contentSkip to conversation

New subnet topology feature ready for testing

Openvpn-devel James Yonan 5 participants 9 messages Sep 8, 2005

lore
Share & tools
lore
#0 lore raw

OpenVPN Addressing Topology
---------------------------

OpenVPN addressing topology has been the subject of considerable debate, specifically the /30 addressing scheme, where each tun client is allocated a dynamic /30 subnet, so as to play nicely with the limitations of the TAP-Win32 driver.

Neil Brown suggested back in 2004 that OpenVPN should support the ability to configure tun interfaces as a subnet, i.e. with an IP and netmask, rather than the traditional point-to-point semantics of local endpoint and remote endpoint:

http://openvpn.net/archive/openvpn-devel/2004-07/msg00056.html

While an interested idea, it didn't get much traction at the time because the TAP-Win32 driver didn't support being configured with an IP/netmask in tun mode.

But the discussion continued, and more recently we hit upon the idea to use a proxy-ARP mechanism to allow the TAP-Win32 driver to support tun-mode subnets:

http://openvpn.net/archive/openvpn-devel/2005-06/msg00017.html

The result, which I've just completed, is a patch to 2.0 which supports a new "topology" directive in "dev tun" mode.

"topology net30" is the current default which is supported by the current 2.0.x releases. This tells the OpenVPN server to hand out /30 subnets to connecting clients.

"topology p2p" sets true point-to-point semantics. This was previously known in 2.0.x as "ifconfig-pool-linear". The problem with this option is that it didn't work with Windows clients, so its applicability was limited.

However, now I've put together a brand new topology, called "topology subnet". This topology is very intuitive, like the "dev tap" topology where each client gets a single IP address from a pool, the server gets the .1 address, clients get .2, .3, .4, etc., and all clients and the server can communicate by virtue of possessing a single IP address taken out of the shared VPN subnet. Plus -- a very cool property of this feature is that it works on Windows clients as well as any *nix system which supports tun interfaces being configured by ifconfig with an IP/netmask rather than the usual local and remote endpoint (Linux supports this, I haven't tried any of the BSDs yet).

So far my testing has gone very well, with a Linux server + Linux and Windows XP clients. At this point, I'd like to get more people involved in testing this feature.

Please Test!
------------

Download openvpn-2.0.2_TO1 from http://openvpn.net/beta/to/

Tarball, zip, and Windows installer is provided. In order to use the new topology feature, all clients and servers must be updated to this release.

Testing is quite easy. Simply add this line to your "dev tun" based server config:

topology subnet

If you have an ifconfig-pool-persist file, delete it so that OpenVPN will be free of any previously existing associations.

If your server has a standard "server" directive such as

server 10.8.0.0 255.255.255.0

you will see your server take 10.8.0.1, client #1 will take 10.8.0.2, client #2 will take 10.8.0.3, etc.

Other interesting features
--------------------------

"redirect-gateway bypass-dhcp" gets around the problem of DHCP packets to the local DHCP server being incorrectly routed into the tunnel.

Merging Schedule
----------------

With sufficient testing, this code will be a candidate for inclusion in 2.1 or higher, and will be applicable to the 2.0.x branch via manual merging. While this patch is not huge, it's deep enough that I don't plan on merging it in 2.0.x anytime soon.

Change Log
----------

2005.09.07 -- Version 2.0.2-TO1

* Added --topology directive. See man page.
* Added --redirect-gateway bypass-dhcp option to add a route allowing DHCP packets to bypass the tunnel, when the DHCP server is non-local. Currently only implemented on Windows clients (Developers: to port this feature to other OSes, write a get_dhcp_server_addr function in route.c).
* Modified OpenVPN Service on Windows to declare the DHCP client service as a dependency.
* Extended the plugin interface to allow plugins to declare per-client constructor and destructor functions, to make it simpler for plugins to maintain per-client state.

Excerpts from Man Page
----------------------

--topology mode
Configure virtual addressing topology when running in --dev tun mode. This directive has no meaning in --dev tap mode, which always uses a subnet topology.

If you set this directive on the server, the --server and --server-bridge directives will auto matically push your chosen topology setting to clients as well. This directive can also be manu ally pushed to clients. Like the --dev directive, this directive must always be compatible between client and server.

mode can be one of:

net30 -- Use a point-to-point topology, by allocat ing one /30 subnet per client. This is designed to allow point-to-point semantics when some or all of the connecting clients might be Windows systems. This is the default on OpenVPN 2.0.

p2p -- Use a point-to-point topology where the re mote endpoint of the client's tun interface always points to the local endpoint of the server's tun interface. This mode allocates a single IP address per connecting client. Only use when none of the connecting clients are Windows systems. This mode is functionally equivalent to the --ifconfig-pool- linear directive which is available in OpenVPN 2.0 and is now deprecated.

subnet -- Use a subnet rather than a point-to-point topology by configuring the tun interface with a local IP address and subnet mask, similar to the topology used in --dev tap and ethernet bridging mode. This mode allocates a single IP address per connecting client and works on Windows as well. Only available when server and clients are OpenVPN 2.1 or higher, or OpenVPN 2.0.x which has been man ually patched with the --topology directive code. When used on Windows, requires version 8.2 or high er of the TAP-Win32 driver. When used on *nix, re quires that the tun driver supports an ifconfig(8) command which sets a subnet instead of a remote endpoint IP address.

James

#1 lore raw
Quoted 11 lines · James Yonan

OpenVPN Addressing Topology
---------------------------
However, now I've put together a brand new topology, called "topology
subnet". This topology is very intuitive, like the "dev tap" topology
where each client gets a single IP address from a pool, the server gets
the .1 address, clients get .2, .3, .4, etc., and all clients and the
server can communicate by virtue of possessing a single IP address taken
out of the shared VPN subnet. Plus -- a very cool property of this
feature is that it works on Windows clients as well as any *nix system
which supports tun interfaces being configured by ifconfig with an
IP/netmask rather than the usual local and remote endpoint (Linux supports this, I haven't tried any of the BSDs yet).

it's amazing feature! thanks!!!

Quoted 4 lines

Other interesting features
--------------------------

"redirect-gateway bypass-dhcp" gets around the problem of DHCP packets to the local DHCP server being incorrectly routed into the tunnel.

one quick question without reading the whole docs.
i always like to know my vpn enpoint has a static ip address so if i'd like to access joe's vpn i can simply use joe.vpn.company.com name. is it possible to use this new subnet topology and somehow staticaly define endpoint's ip address? the best would be if i can use a central internal dhcp server which can give ip, subnet, dns and other address to the vpn clients automaticaly. is it possible with linux and windows clients?

Quoted 4 lines

Merging Schedule
----------------

With sufficient testing, this code will be a candidate for inclusion in 2.1 or higher, and will be applicable to the 2.0.x branch via manual merging. While this patch is not huge, it's deep enough that I don't plan on merging it in 2.0.x anytime soon.

i'd like to see some kind of early 2.1 or 2.1rc release since we can create rpm packages this and test it.

Signature · 1 line
  Levente                               "Si vis pacem para bellum!"
#2 lore raw
Quoted 2 lines · Farkas Levente

i always like to know my vpn enpoint has a static ip address so if i'd like to access joe's vpn i can simply use joe.vpn.company.com name.

This doesn't require a static address. I've posted a script to OpenVPN-users for dynamically updating a DNS server when called by the learn-address hook.

#3 lore raw
In reply to James Yonan
Quoted 5 lines · James Yonan

OpenVPN Addressing Topology
---------------------------

Quoted 8 lines

Merging Schedule
----------------

With sufficient testing, this code will be a candidate for inclusion in 2.1 or higher, and will be applicable to the 2.0.x branch via manual merging. While this patch is not huge, it's deep enough that I don't plan on merging it in 2.0.x anytime soon.

I know that I'm putting the cart in front of the horse, but...

(BTW I couldn't find this on the web site either searchong for timeline and roadmap.)

When will 2.1 development start/become publically available? This is a feature that I would love to impliment, but the more the current implimentation grows the harder it gets to change.

Signature · 2 lines
Leonard Isham, CISSP 
Ostendo non ostento.
#4 lore raw
Quoted 15 lines · Leonard Isham
Quoted 5 lines · James Yonan

OpenVPN Addressing Topology
---------------------------

Quoted 8 lines

Merging Schedule
----------------

With sufficient testing, this code will be a candidate for inclusion in 2.1 or higher, and will be applicable to the 2.0.x branch via manual merging. While this patch is not huge, it's deep enough that I don't plan on merging it in 2.0.x anytime soon.

Quoted 8 lines

I know that I'm putting the cart in front of the horse, but...

(BTW I couldn't find this on the web site either searchong for timeline and roadmap.)

When will 2.1 development start/become publically available? This is a feature that I would love to impliment, but the more the current implimentation grows the harder it gets to change.

Probably a few months at least, though some of the new features, such as the topology directive can be used right now by patching to the 2.0.x branch.

The 2.x wishlist is already becoming quite large:

http://openvpn.net/wiki/OpenVPN_2.x_wishlist

While a lot of these items are small patches, the "big-ticket" items I'm focussing on for 2.1 include:

* topology directive
* groups (discussed previously on the list)
* support the ability for one OpenVPN daemon to handle client connections on multiple TCP or UDP ports simultaneously.
* improved IPv6 support

I'd like to wait until we have these three in the bag before starting a 2.1 beta series.

James

#5 lore raw
Quoted 45 lines · James Yonan
Quoted 15 lines · Leonard Isham
Quoted 5 lines · James Yonan

OpenVPN Addressing Topology
---------------------------

Quoted 8 lines

Merging Schedule
----------------

With sufficient testing, this code will be a candidate for inclusion in 2.1 or higher, and will be applicable to the 2.0.x branch via manual merging. While this patch is not huge, it's deep enough that I don't plan on merging it in 2.0.x anytime soon.

Quoted 8 lines

I know that I'm putting the cart in front of the horse, but...

(BTW I couldn't find this on the web site either searchong for timeline and roadmap.)

When will 2.1 development start/become publically available? This is a feature that I would love to impliment, but the more the current implimentation grows the harder it gets to change.

Probably a few months at least, though some of the new features, such as the topology directive can be used right now by patching to the 2.0.x branch.

The 2.x wishlist is already becoming quite large:

http://openvpn.net/wiki/OpenVPN_2.x_wishlist

While a lot of these items are small patches, the "big-ticket" items I'm focussing on for 2.1 include:

* topology directive
* groups (discussed previously on the list)
* support the ability for one OpenVPN daemon to handle client connections on multiple TCP or UDP ports simultaneously.
* improved IPv6 support

Quoted 3 lines

I'd like to wait until we have these three in the bag before starting a 2.1 beta series.

Please bear with a network geek's rambling for a minute.

1. There is a windows install available.
2. the tar file can become an RPM with RPMBuild, correct?

I'd have to deal with:

1. Disabling openvpn updates via yum.
2. This is a branch that will not be "merged" back in until 2.1 beta.
3. 2.0.3 or other updates will not include this unless I figure out how to "merge/diff" the patch in, and that may break it.

I to go with it, but not being a developer fear that not being able to merge patches and even complie for windows...

...or am I incorrect in my understanding?

Signature · 2 lines
Leonard Isham, CISSP 
Ostendo non ostento.
#6 lore raw
Quoted 46 lines · Leonard Isham
Quoted 45 lines · James Yonan
Quoted 15 lines · Leonard Isham
Quoted 5 lines · James Yonan

OpenVPN Addressing Topology
---------------------------

Quoted 8 lines

Merging Schedule
----------------

With sufficient testing, this code will be a candidate for inclusion in 2.1 or higher, and will be applicable to the 2.0.x branch via manual merging. While this patch is not huge, it's deep enough that I don't plan on merging it in 2.0.x anytime soon.

Quoted 8 lines

I know that I'm putting the cart in front of the horse, but...

(BTW I couldn't find this on the web site either searchong for timeline and roadmap.)

When will 2.1 development start/become publically available? This is a feature that I would love to impliment, but the more the current implimentation grows the harder it gets to change.

Probably a few months at least, though some of the new features, such as the topology directive can be used right now by patching to the 2.0.x branch.

The 2.x wishlist is already becoming quite large:

http://openvpn.net/wiki/OpenVPN_2.x_wishlist

While a lot of these items are small patches, the "big-ticket" items I'm focussing on for 2.1 include:

* topology directive
* groups (discussed previously on the list)
* support the ability for one OpenVPN daemon to handle client connections on multiple TCP or UDP ports simultaneously.
* improved IPv6 support

Quoted 7 lines
Quoted 3 lines

I'd like to wait until we have these three in the bag before starting a 2.1 beta series.

Please bear with a network geek's rambling for a minute.

1. There is a windows install available.

Yes.

Quoted 1 line

2. the tar file can become an RPM with RPMBuild, correct?

Yes.

Quoted 9 lines

I'd have to deal with:

1. Disabling openvpn updates via yum.
2. This is a branch that will not be "merged" back in until 2.1 beta.
3. 2.0.3 or other updates will not include this unless I figure out how to "merge/diff" the patch in, and that may break it.

I to go with it, but not being a developer fear that not being able to merge patches and even complie for windows...

I plan to treat the "TO" (topology-supporting) branch as a beta series until the 2.1 beta series formally begins -- that means it will be updated, changes from the 2.0.x branch will get merged in, and when I make releases, there will always be a .tar.gz, .zip, and Windows installer .exe.

James

#7 lore raw
Quoted 8 lines · James Yonan
Quoted 6 lines · Leonard Isham
Quoted 5 lines · James Yonan
Quoted 2 lines · Leonard Isham
Quoted 1 line · James Yonan

[snip]

Quoted 18 lines
Quoted 4 lines

Please bear with a network geek's rambling for a minute.

1. There is a windows install available.

Yes.

Quoted 1 line

2. the tar file can become an RPM with RPMBuild, correct?

Yes.

Quoted 7 lines

I'd have to deal with:

1. Disabling openvpn updates via yum.
2. This is a branch that will not be "merged" back in until 2.1 beta.
3. 2.0.3 or other updates will not include this unless I figure out how to "merge/diff" the patch in, and that may break it.

Quoted 9 lines
Quoted 2 lines

I to go with it, but not being a developer fear that not being able to merge patches and even complie for windows...

I plan to treat the "TO" (topology-supporting) branch as a beta series until the 2.1 beta series formally begins -- that means it will be updated, changes from the 2.0.x branch will get merged in, and when I make releases, there will always be a .tar.gz, .zip, and Windows installer .exe.

OK than I have to decide if I'll use beta in production. Don't get me wrong I respect the quality of your beta releases more than most others. I have OpenVPN RCs in production, but I don't know about beta...

Signature · 2 lines
Leonard Isham, CISSP 
Ostendo non ostento.
#8 lore raw
Quoted 10 lines · Leonard Isham
Quoted 5 lines

I plan to treat the "TO" (topology-supporting) branch as a beta series until the 2.1 beta series formally begins -- that means it will be updated, changes from the 2.0.x branch will get merged in, and when I make releases, there will always be a .tar.gz, .zip, and Windows installer .exe.

OK than I have to decide if I'll use beta in production. Don't get me wrong I respect the quality of your beta releases more than most others. I have OpenVPN RCs in production, but I don't know about beta...

I'd just like to say that I think it's the right decision to leave a rather big new feature like this outside 2.0. A stable release is called "stable" just because new features isn't added.

And a new feature is a "beta" feature regardless how well-written it is before it has been extensivly tested by a lot of people for some time. That's why we have beta releases.

But that won't stop me from putting this new beta into production long before it reaches a stable release. I'll start a new OpenVPN process with this beta release on my production servers as soon as I get time and start testing first on my own, and then in a small group. I recommend you todo the same, then after a few weeks when we are number of people here on the list that have been reporting it working flawless, I'll consider it stable enough to use in my production environments for all my users.

How long you want to wait is up to you, I'm just saying it's not getting more stable just because it changes name from beta->rc->stable, it will get more stable the sooner we start testing it. And here's the great thing with a userspace VPN like OpenVPN - You don't need to setup a whole new box to try it, you can run several diffrent versions of OpenVPN in parallell.

I will also support this beta release by creating Windows installation packages with OpenVPN GUI and the OpenVPN beta.

Cheers and good night // Mathias

Signature · 4 lines
_____________________________________________________________
Mathias Sundman                  (^)   ASCII Ribbon Campaign
OpenVPN GUI for Windows           X    NO HTML/RTF in e-mail
http://openvpn.se/               / \   NO Word docs in e-mail