From d201cf92b966e6c5a6b3e904469f659130f23da4 Mon Sep 17 00:00:00 2001 From: dlg Date: Sat, 31 Aug 2024 04:21:45 +0000 Subject: [PATCH] rport(4) for p2p l3 connectivity between route domains. --- share/man/man4/Makefile | 4 +- share/man/man4/rport.4 | 85 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 share/man/man4/rport.4 diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index ffe5333705a..3d3ed3c5169 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.849 2024/08/04 14:21:09 kettenis Exp $ +# $OpenBSD: Makefile,v 1.850 2024/08/31 04:21:45 dlg Exp $ MAN= aac.4 abcrtc.4 abl.4 ac97.4 acphy.4 acrtc.4 \ acpi.4 acpiac.4 acpials.4 acpiasus.4 acpibat.4 \ @@ -83,7 +83,7 @@ MAN= aac.4 abcrtc.4 abl.4 ac97.4 acphy.4 acrtc.4 \ rkemmcphy.4 rkgpio.4 rkgrf.4 rkiic.4 rkiis.4 rkiovd.4 \ rkpcie.4 rkpciephy.4 rkpinctrl.4 rkpmic.4 rkpwm.4 \ rkrng.4 rkspi.4 rktcphy.4 rktemp.4 rkusbphy.4 rkvop.4 \ - rl.4 rlphy.4 route.4 rsu.4 rtsx.4 rum.4 run.4 rtw.4 rtwn.4 \ + rl.4 rlphy.4 route.4 rport.4 rsu.4 rtsx.4 rum.4 run.4 rtw.4 rtwn.4 \ safte.4 sbus.4 schsio.4 scmi.4 scsi.4 sd.4 \ sdmmc.4 sdhc.4 se.4 sec.4 ses.4 sf.4 sili.4 \ simpleamp.4 simpleaudio.4 simplefb.4 simplepanel.4 siop.4 sis.4 sk.4 \ diff --git a/share/man/man4/rport.4 b/share/man/man4/rport.4 new file mode 100644 index 00000000000..92b8f6ff9e0 --- /dev/null +++ b/share/man/man4/rport.4 @@ -0,0 +1,85 @@ +.\" $OpenBSD: rport.4,v 1.1 2024/08/31 04:21:45 dlg Exp $ +.\" +.\" Copyright (c) 2024 David Gwynne +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd $Mdocdate: August 31 2024 $ +.Dt RPORT 4 +.Os +.Sh NAME +.Nm rport +.Nd rdomain port interface pseudo-device +.Sh SYNOPSIS +.Cd "pseudo-device rport" +.Sh DESCRIPTION +The +.Nm +driver provides point-to-point interfaces for layer 3 connectivity +between +.Xr rdomain 4 +instances. +.Pp +Layer 3 connectivity between a pair of rdomains can be established +by creating a +.Nm +interface in each rdomain, and connecting them together by configuring +one of these interfaces as the parent of the other. +.Pp +.Nm +interfaces can be created at runtime using the +.Ic ifconfig rport Ns Ar N Ic create +command or by setting up a +.Xr hostname.if 5 +configuration file for +.Xr netstart 8 . +The interface itself can be configured with +.Xr ifconfig 8 ; +see its manual page for more information. +.Sh EXAMPLES +Create two +.Nm +interfaces in separate +.Xr rdomain 4 Ns s +and connect them together: +.Bd -literal -offset indent +# ifconfig rport0 create rdomain 0 up +# ifconfig rport1 create rdomain 1 parent rport0 up +# ifconfig rport0 inet 192.168.0.0/32 192.168.0.1 +# ifconfig rport1 inet 192.168.0.1/32 192.168.0.0 +.Ed +.Sh SEE ALSO +.Xr netintro 4 , +.Xr veb 4 , +.Xr hostname.if 5 , +.Xr pf.conf 5 , +.Xr ifconfig 8 , +.Xr netstart 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Ox 7.6 . +.Sh AUTHORS +.An David Gwynne Aq Mt dlg@openbsd.org . +.Sh CAVEATS +A pair of +.Nm +interfaces must be created for each connection between a pair of rdomains. +Alternatively, if peering between multiple +.Xr rdomain 4 +instances is required, a single +.Xr veb 4 +interface with a +.Xr vport 4 +interface for each rdomain can be used instead. -- 2.20.1