Le Mon, Apr 04, 2022 at 01:02:53PM +0200, Denis Fondras a écrit :
> Le Mon, Apr 04, 2022 at 08:23:35PM +1000, David Gwynne a écrit :
> > 
> > 
> > > On 3 Apr 2022, at 21:46, Denis Fondras <open...@ledeuns.net> wrote:
> > > 
> > > Hi,
> > > 
> > > In vxlan(4) manual, we have :
> > > ----
> > > endpoint mode
> > >   When configured without a tunnel destination address, vxlan operates as
> > >   a bridge, but with learning disabled.
> > > ----
> > > 
> > > The question is : is it possible to set tunnel source address without a
> > > destination ?
> > 
> > ifconfig vxlan0 tunneladdr 10.20.30.1
> > 
> > that should work.
> 
> Thank you David. I will prepare a patch to the manual :)

Here is a tentative to document the tunneladdr option.

Index: ifconfig.8
===================================================================
RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
retrieving revision 1.381
diff -u -p -r1.381 ifconfig.8
--- ifconfig.8  29 Dec 2021 21:41:28 -0000      1.381
+++ ifconfig.8  2 May 2022 09:46:10 -0000
@@ -1809,6 +1809,7 @@ for a complete list of the available pro
 .Op Oo Fl Oc Ns Cm tunneldf
 .Op Oo Fl Oc Ns Cm tunneldomain Ar rtable
 .Op Cm tunnelttl Ar ttl
+.Op Cm tunneladdr Ar src_address
 .Op Cm txprio Ar prio
 .Op Oo Fl Oc Ns Cm vnetflowid
 .Op Oo Fl Oc Ns Cm vnetid Ar network-id
@@ -1864,6 +1865,8 @@ Both addresses must be of the same famil
 The optional destination port can be specified for interfaces such as
 .Xr vxlan 4 ,
 which further encapsulate the packets in UDP datagrams.
+This directive is incompatible with
+.Cm tunneladdr .
 .It Cm -tunnel
 Remove the source and destination tunnel addresses.
 .It Cm tunneldf
@@ -1888,6 +1891,16 @@ the value can also be set to
 .Ar copy
 to have the TTL copied between the encapsulated protocol headers
 and the tunnel protocol headers.
+.It Cm tunneladdr Ar src_address
+Set the outer IP address of the tunnel.
+This is useful for point-to-multipoint tunnels where peers are in different
+subnets like
+.Xr vxlan 4
+endpoint mode or
+.Xr mgre 4 .
+It is incompatible with the
+.Cm tunnel
+directive.
 .It Cm txprio Ar prio
 Configure the value used for the priority field in the tunnel
 protocol headers.

Reply via email to