Le sam. 28 nov. 2020 à 21:46, Jason McIntyre <[email protected]> a écrit : > > > > +.Bd -literal > > > add "-offset indent" to match the other examples > > Done, although I copied this block from gre example, so there's > > another occurrence here which I didn't touch. > > > > yes, sorry, that's my mistake. i think the width of the gre example > probably caused that. so i think you should keep your original text > (i.e. no indent for the artwork; indent for commands).
There you are. David, does this look sound to you? Index: share/man/man4/gre.4 =================================================================== RCS file: /cvs/src/share/man/man4/gre.4,v retrieving revision 1.79 diff -u -p -u -r1.79 gre.4 --- share/man/man4/gre.4 18 Nov 2020 16:19:54 -0000 1.79 +++ share/man/man4/gre.4 29 Nov 2020 19:26:28 -0000 @@ -455,6 +455,67 @@ In most cases the following should work: .Bd -literal -offset indent pass quick on gre proto gre no state .Ed +.Ss Point-to-Multipoint Layer 3 GRE tunnel interfaces (mgre) example +.Nm mgre +can be used to build a point-to-multipoint tunnel network to several +hosts using a single +.Nm mgre +interface. +.Pp +In this example the host A has an outer IP of 198.51.100.12, host +B has 203.0.113.27, and host C has 203.0.113.254. +.Pp +Addressing within the tunnel is done using 192.0.2.0/24: +.Bd -literal + +--- Host B + / + / +Host A --- tunnel ---+ + \e + \e + +--- Host C +.Ed +.Pp +On Host A: +.Bd -literal -offset indent +# ifconfig mgreN create +# ifconfig mgreN tunneladdr 198.51.100.12 +# ifconfig mgreN inet 192.0.2.1 netmask 0xffffff00 up +.Ed +.Pp +On Host B: +.Bd -literal -offset indent +# ifconfig mgreN create +# ifconfig mgreN tunneladdr 203.0.113.27 +# ifconfig mgreN inet 192.0.2.2 netmask 0xffffff00 up +.Ed +.Pp +On Host C: +.Bd -literal -offset indent +# ifconfig mgreN create +# ifconfig mgreN tunneladdr 203.0.113.254 +# ifconfig mgreN inet 192.0.2.3 netmask 0xffffff00 up +.Ed +.Pp +To reach Host B over the tunnel (from Host A), there has to be a +route on Host A specifying the next-hop: +.Pp +.Dl # route add -host 192.0.2.2 203.0.113.27 -iface -ifp mgreN +.Pp +Similarly, to reach Host A over the tunnel from Host B, a route must +be present on B with A's outer IP as next-hop: +.Pp +.Dl # route add -host 192.0.2.1 198.51.100.12 -iface -ifp mgreN +.Pp +The same tunnel interface can then be used between host B and C by +adding the appropriate routes, making the network any-to-any instead +of hub-and-spoke: +.Pp +On Host B: +.Dl # route add -host 192.0.2.3 203.0.113.254 -iface -ifp mgreN +.Pp +On Host C: +.Dl # route add -host 192.0.2.2 203.0.113.27 -iface -ifp mgreN .Ss Point-to-Point Ethernet over GRE tunnel interfaces (egre) example .Nm egre can be used to carry Ethernet traffic between two endpoints over
