Skip to contentSkip to conversation

explain effect of --topology subnet on --ifconfig

PATCH In review Gert Doering 2 participants 3 messages Apr 28, 2015 – Apr 30, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 explain effect of --topology subnet on --ifconfig

The fact that the second parameter of --ifconfig is no longer a "remote address" but a "netmask" when using --dev tun and --topology subnet was not documented clearly enough.

Trac #370

---
 doc/openvpn.8 | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)
doc/openvpn.8 +18 -5
index 8b3e1a2..587b769 100644
@@ -798,6 +798,12 @@ driver supports an
 command which sets a subnet instead of a remote endpoint IP address.
 
 This option exists in OpenVPN 2.1 or higher.
+
+Note: Using
+.B \-\-topology subnet
+changes the interpretation of the arguments of
+.B \-\-ifconfig
+to mean "address netmask", no longer "local remote".
 .\"*********************************************************
 .TP
 .B \-\-tun-ipv6
@@ -861,16 +867,21 @@ May be used in order to execute OpenVPN in unprivileged environment.
 Set TUN/TAP adapter parameters. 
 .B l
 is the IP address of the local VPN endpoint.
-For TUN devices,
+For TUN devices in point-to-point mode,
 .B rn
 is the IP address of the remote VPN endpoint.
-For TAP devices,
+For TAP devices, or TUN devices used with
+.B \-\-topology subnet,
 .B rn
-is the subnet mask of the virtual ethernet segment
+is the subnet mask of the virtual network segment
 which is being created or connected to.
 
 For TUN devices, which facilitate virtual
-point-to-point IP connections,
+point-to-point IP connections (when used in
+.B \-\-topology net30
+or
+.B p2p
+mode),
 the proper usage of
 .B \-\-ifconfig
 is to use two private IP addresses
@@ -885,7 +896,9 @@ you will be pinging across the VPN.
 
 For TAP devices, which provide
 the ability to create virtual
-ethernet segments,
+ethernet segments, or TUN devices in
+.B --topology subnet
+mode (which create virtual "multipoint networks"),
 .B \-\-ifconfig
 is used to set an IP address and
 subnet mask just as a physical
Signature · 1 line
2.0.5
#1 lore raw
Quoted 56 lines · Gert Doering

The fact that the second parameter of --ifconfig is no longer a "remote address" but a "netmask" when using --dev tun and --topology subnet was not documented clearly enough.

Trac #370

---
  doc/openvpn.8 | 23 ++++++++++++++++++-----
  1 file changed, 18 insertions(+), 5 deletions(-)
doc/openvpn.8 +15 -4
index 8b3e1a2..587b769 100644
@@ -798,6 +798,12 @@ driver supports an
  command which sets a subnet instead of a remote endpoint IP address.
 
  This option exists in OpenVPN 2.1 or higher.
+
+Note: Using
+.B \-\-topology subnet
+changes the interpretation of the arguments of
+.B \-\-ifconfig
+to mean "address netmask", no longer "local remote".
  .\"*********************************************************
  .TP
  .B \-\-tun-ipv6
@@ -861,16 +867,21 @@ May be used in order to execute OpenVPN in unprivileged environment.
  Set TUN/TAP adapter parameters.
  .B l
  is the IP address of the local VPN endpoint.
-For TUN devices,
+For TUN devices in point-to-point mode,
  .B rn
  is the IP address of the remote VPN endpoint.
-For TAP devices,
+For TAP devices, or TUN devices used with
+.B \-\-topology subnet,
  .B rn
-is the subnet mask of the virtual ethernet segment
+is the subnet mask of the virtual network segment
  which is being created or connected to.
 
  For TUN devices, which facilitate virtual
-point-to-point IP connections,
+point-to-point IP connections (when used in
+.B \-\-topology net30
+or
+.B p2p
+mode),
  the proper usage of
  .B \-\-ifconfig
  is to use two private IP addresses

doc/openvpn.8 you will be pinging across the VPN. · line 904

Quoted 10 lines
doc/openvpn.8 +3 -1
@@ -885,7 +896,9 @@ you will be pinging across the VPN.
 
  For TAP devices, which provide
  the ability to create virtual
-ethernet segments,
+ethernet segments, or TUN devices in
+.B --topology subnet
+mode (which create virtual "multipoint networks"),
  .B \-\-ifconfig
  is used to set an IP address and
  subnet mask just as a physical

ACK

-Steffan

#2 lore raw
In reply to Gert Doering

Patch has been applied to the master and release/2.3 branch.

commit 3a840739e43acc5ea15814be08debb9dbb7ba67c (master) commit 3a840739e43acc5ea15814be08debb9dbb7ba67c (release/2.3)

Author: Gert Doering
Date:   Tue Apr 28 12:20:19 2015 +0200
     explain effect of --topology subnet on --ifconfig

     Signed-off-by: Gert Doering <[email protected]...>
     Acked-by: Steffan Karger <[email protected]...>
     Message-Id: <[email protected]...>
     URL: http://article.gmane.org/gmane.network.openvpn.devel/9616

--
kind regards,

Gert Doering