On Mon, Sep 30, 2019 at 10:28:50AM +1000, David Gwynne wrote:
> i got an email recently asking how to configure the tunnel identifier
> on an eoip(4) interface, and initially wanted to point the sender
> at the manpage. unfortunately, the manpage is written for programmers
> who have spent a lot of time in network drivers, ie, me. everyone
> else who just wants to configure an interface with ifconfig(8) or
> netstart(8) loses.
> 
> this adds a subsection to the eoip manpage on how to administer the
> interfaces, and very slightly tweaks the example to show how the tunnel
> id lines up between openbsd and whatever mikrotik calls their os.
> 
> so ok?
> 
> i actually like this change as it makes the documentation more useful
> for what people do with an interface, which is operate it. if this goes
> in i would like to update the other pseudo interface driver manpages so
> they're more like this.
> 

morning.

i'm not against this addition, but it does seem like we're
setting up issues for the future: we'll be moving from having this info
in one place to many. when it changes, it's easier to get it wrong.

what's the thinking? i mean, the stuff is already there in ifconfig(8).
is it not clear enough? can we make it clearer? or are people just not
working out where to look?

we kind of farmed all this info into ifconfig(8). i'm not sure whether
we want to move it out again. or if we do, do we try to reduce the
content in ifconfig.8?

jmc

> Index: eoip.4
> ===================================================================
> RCS file: /cvs/src/share/man/man4/eoip.4,v
> retrieving revision 1.4
> diff -u -p -r1.4 eoip.4
> --- eoip.4    29 May 2019 19:37:06 -0000      1.4
> +++ eoip.4    30 Sep 2019 00:11:55 -0000
> @@ -83,12 +83,68 @@ route to the tunnel destination than the
>  via the tunnel interface.
>  Alternatively, the tunnel traffic may be configured in a separate
>  routing table to the encapsulated traffic.
> +.Ss Network Interface Administration
> +.Nm
> +interfaces may be configured by
> +.Xr ifconfig 8
> +or
> +.Xr netstart 8
> +using the following options:
> +.Bl -tag -width indent
> +.It Cm tunnel Ar src_address dest_address
> +Set the unicast IPv4 or IPv6 addresses for the encapsulating IP packets.
> +The addresses may only be configured while the interface is down.
> +.It Fl Ns Cm tunnel
> +Clear the addresses used for the encapsulating IP packets.
> +The addresses may only be cleared while the interface is down.
> +.It Cm vnetid Ar tunnel-identifier
> +Configure the virtual network identifier to use as the Tunnel Identifier.
> +The virtual network identifier may only be configured while the
> +interface is down.
> +The Tunnel Identifier is a 16-bit value between 0 and 65535 inclusive.
> +.It Cm tunneldomain Ar rdomain
> +Set the routing table the tunnel traffic operates in.
> +The routing table may only be configured while the interface is down.
> +.It Cm tunnelttl Ar ttl
> +Set the Time-To-Live field in IPv4 encapsulation headers, or the
> +Hop Limit field in IPv6 encapsulation headers.
> +.It Cm tunneldf
> +Disable fragmentation of tunnel traffic by the interface.
> +This sets the Don't Fragment (DF) bit on IPv4 packets,
> +and disables fragmentation of IPv6 packets.
> +.It Fl Ns Cm tunneldf
> +Allow fragmentation of tunnel traffic.
> +.\" This clears the Don't Fragment (DF) bit on IPv4 packets,
> +.\" and allows fragmentation of IPv6 packets.
> +.It Cm rxprio Ar prio
> +Configure how the interface sets the priority of incoming packets.
> +.Ar packet
> +maintains the existing priority of the packet.
> +Priority may be hardcoded with a number from 0 to 7.
> +.Ar outer
> +uses the Type of Service field in IPv4 encapsulation headers, or
> +the Traffic Class field in IPv6 encapsulation headers to set the
> +packet priority.
> +.It Cm txprio Ar prio
> +Configure which value is used in the Type of Service field in IPv4
> +encapsulation headers, or the Traffic Class field in IPv6 encapsulation
> +headers.
> +Values may be hardcoded with a number from 0 to 7, or
> +.Ar packet
> +to specify that the current priority of a packet should be used.
> +.It Cm keepalive Ar period count
> +Enable the transmission of keepalive packets to detect tunnel failure.
> +Keepalives may only be configured while the interface is down.
> +.It Fl Ns Cm keepalive
> +Disable the transmission of keepalive packets to detect tunnel failure.
> +Keepalives may only be disabled while the interface is down.
> +.El
>  .Ss Programming Interface
>  .Nm
>  interfaces support the following
>  .Xr ioctl 2
>  calls for configuring tunnel options:
> -.Bl -tag -width indent -offset 3n
> +.Bl -tag -width indent
>  .It Dv SIOCSLIFPHYADDR Fa "struct if_laddrreq *"
>  Set the unicast IPv4 or IPv6 addresses for the encapsulating IP packets.
>  The addresses may only be configured while the interface is down.
> @@ -101,7 +157,7 @@ The addresses may only be cleared while 
>  Configure a virtual network identifier for use as the Tunnel Identifier.
>  The virtual network identifier may only be configured while the
>  interface is down.
> -The Tunnel Identifier is a 16-bit value.
> +The Tunnel Identifier is a 16-bit value between 0 and 65535 inclusive.
>  .It Dv SIOCGVNETID Fa "struct ifreq *"
>  Get the virtual network identifer used in the GRE Key header.
>  .It Dv SIOCSLIFPHYRTABLE Fa "struct ifreq *"
> @@ -173,6 +229,7 @@ On Host A
>  # route add default B
>  # ifconfig eoipN create
>  # ifconfig eoipN tunnel A D
> +# ifconfig eoipN vnetid T
>  # ifconfig eoipN up
>  # route add E D
>  .Ed
> @@ -181,7 +238,7 @@ On Host D (MikroTik):
>  .Bd -literal -offset indent
>  [admin@MikroTik] > interface eoip
>  [admin@MikroTik] /interface eoip> add name="eoipN" \e
> -\e... local-address=D remote-address=A
> +\e... tunnel-id=T local-address=D remote-address=A
>  [admin@MikroTik] /interface eoip> enable eoipN
>  .Ed
>  .Sh SEE ALSO
> 

Reply via email to