Re: Fwd: gre(4): mgre
On Fri, Jan 08, 2021 at 10:01:02PM +0100, Pierre Emeriaud wrote: > anyone wanting to commit this? Done, thank you.
Re: Fwd: gre(4): mgre
ping Le lun. 28 déc. 2020 à 12:21, David Gwynne a écrit : > > yes, ok by me. anyone wanting to commit this? thanks :)
Re: Fwd: gre(4): mgre
On Sun, Nov 29, 2020 at 08:30:23PM +0100, Pierre Emeriaud wrote: > Le sam. 28 nov. 2020 ?? 21:46, Jason McIntyre 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? yes, ok by me. > 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.418 Nov 2020 16:19:54 - 1.79 > +++ share/man/man4/gre.429 Nov 2020 19:26:28 - > @@ -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 0xff00 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 0xff00 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 0xff00 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
Re: Fwd: gre(4): mgre
Le sam. 28 nov. 2020 à 21:46, Jason McIntyre 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.418 Nov 2020 16:19:54 - 1.79 +++ share/man/man4/gre.429 Nov 2020 19:26:28 - @@ -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 0xff00 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 0xff00 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 0xff00 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
Re: Fwd: gre(4): mgre
On Sat, Nov 28, 2020 at 09:09:19PM +0100, Pierre Emeriaud wrote: > Le sam. 28 nov. 2020 ?? 17:54, Jason McIntyre a ??crit : > > an mgre example seems conspicuous by its absence, so i'd say adding one > > seems helpful. some comments inline: > > Thanks Jason for reviewing this patch. > > > > +.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. Adressing within > > > > new sentence, new line > > s/Adressing/Addressing/ > Done > > > > +the tunnel is done using 192.0.2.0/24. > > > > s/./:/ > Done > > > > +.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). > > > +The same tunnel interface can be then used between host B and C by > > s/be then/then be/ > Done > > > finally: > > $ mandoc -Tlint gre.4 > > make sure the diff doesn;t add any issues! > four whitespaces removed. > grand. ok as far as i'm concerned. jmc > 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.418 Nov 2020 16:19:54 - 1.79 > +++ share/man/man4/gre.428 Nov 2020 20:01:16 - > @@ -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 -offset indent > ++--- 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 0xff00 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 0xff00 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 0xff00 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 >
Re: Fwd: gre(4): mgre
Le sam. 28 nov. 2020 à 17:54, Jason McIntyre a écrit : > an mgre example seems conspicuous by its absence, so i'd say adding one > seems helpful. some comments inline: Thanks Jason for reviewing this patch. > > +.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. Adressing within > > new sentence, new line > s/Adressing/Addressing/ Done > > +the tunnel is done using 192.0.2.0/24. > > s/./:/ Done > > +.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. > > +The same tunnel interface can be then used between host B and C by > s/be then/then be/ Done > finally: > $ mandoc -Tlint gre.4 > make sure the diff doesn;t add any issues! four whitespaces removed. 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.418 Nov 2020 16:19:54 - 1.79 +++ share/man/man4/gre.428 Nov 2020 20:01:16 - @@ -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 -offset indent ++--- 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 0xff00 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 0xff00 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 0xff00 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
Re: Fwd: gre(4): mgre
On Sat, Nov 28, 2020 at 12:18:26PM +0100, Pierre Emeriaud wrote: > Hi, > > mgre(4) does not appear to be documented well, I had to find David's > "mgre(4): point-to-multipoint gre tunnels" mail to understand how gre > endpoints are found. > > hi. an mgre example seems conspicuous by its absence, so i'd say adding one seems helpful. some comments inline: > > 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.418 Nov 2020 16:19:54 - 1.79 > +++ share/man/man4/gre.427 Nov 2020 23:29:39 - > @@ -455,6 +455,66 @@ 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. Adressing within new sentence, new line s/Adressing/Addressing/ > +the tunnel is done using 192.0.2.0/24. s/./:/ > +.Bd -literal add "-offset indent" to match the other examples > ++--- 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 0xff00 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 0xff00 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 0xff00 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 be then used between host B and C by s/be then/then be/ > +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 > finally: $ mandoc -Tlint gre.4 make sure the diff doesn;t add any issues! jmc
Fwd: gre(4): mgre
Hi, mgre(4) does not appear to be documented well, I had to find David's "mgre(4): point-to-multipoint gre tunnels" mail to understand how gre endpoints are found. 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.418 Nov 2020 16:19:54 - 1.79 +++ share/man/man4/gre.427 Nov 2020 23:29:39 - @@ -455,6 +455,66 @@ 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. Adressing 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 0xff00 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 0xff00 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 0xff00 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 be then 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