Prefix all the vxlan ifconfig commands so they are unique
And rehook ifvxlan back into the build.
This commit is contained in:
parent
e64c5af3f8
commit
c6e32006e1
@ -30,7 +30,7 @@ SRCS+= ifmac.c # MAC support
|
||||
SRCS+= ifmedia.c # SIOC[GS]IFMEDIA support
|
||||
SRCS+= iffib.c # non-default FIB support
|
||||
SRCS+= ifvlan.c # SIOC[GS]ETVLAN support
|
||||
#SRCS+= ifvxlan.c # VXLAN support
|
||||
SRCS+= ifvxlan.c # VXLAN support
|
||||
SRCS+= ifgre.c # GRE keys etc
|
||||
SRCS+= ifgif.c # GIF reversed header workaround
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
.\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd October 20, 2014
|
||||
.Dd December 16, 2014
|
||||
.Dt IFCONFIG 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -2544,33 +2544,33 @@ The following parameters are used to configure
|
||||
.Xr vxlan 4
|
||||
interfaces.
|
||||
.Bl -tag -width indent
|
||||
.It Cm vni Ar identifier
|
||||
.It Cm vxlanid Ar identifier
|
||||
This value is a 24-bit VXLAN Network Identifier (VNI) that identifies the
|
||||
virtual network segment membership of the interface.
|
||||
.It Cm local Ar address
|
||||
.It Cm vxlanlocal Ar address
|
||||
The source address used in the encapsulating IPv4/IPv6 header.
|
||||
The address should already be assigned to an existing interface.
|
||||
When the interface is configured in unicast mode, the listening socket
|
||||
is bound to this address.
|
||||
.It Cm remote Ar address
|
||||
.It Cm vxlanremote Ar address
|
||||
The interface can be configured in a unicast, or point-to-point, mode
|
||||
to create a tunnel between two hosts.
|
||||
This is the IP address of the remote end of the tunnel.
|
||||
.It Cm group Ar address
|
||||
.It Cm vxlangroup Ar address
|
||||
The interface can be configured in a multicast mode
|
||||
to create a virtual network of hosts.
|
||||
This is the IP multicast group address the interface will join.
|
||||
.It Cm localport Ar port
|
||||
.It Cm vxlanlocalport Ar port
|
||||
The port number the interface will listen on.
|
||||
The default port number is 4789.
|
||||
.It Cm remoteport Ar port
|
||||
.It Cm vxlanremoteport Ar port
|
||||
The destination port number used in the encapsulating IPv4/IPv6 header.
|
||||
The remote host should be listening on this port.
|
||||
The default port number is 4789.
|
||||
Note some other implementations, such as Linux,
|
||||
do not default to the IANA assigned port,
|
||||
but instead listen on port 8472.
|
||||
.It Cm portrange Ar low high
|
||||
.It Cm vxlanportrange Ar low high
|
||||
The range of source ports used in the encapsulating IPv4/IPv6 header.
|
||||
The port selected within the range is based on a hash of the inner frame.
|
||||
A range is useful to provide entropy within the outer IP header
|
||||
@ -2581,32 +2581,32 @@ variables
|
||||
.Va net.inet.ip.portrange.first
|
||||
and
|
||||
.Va net.inet.ip.portrange.last
|
||||
.It Cm timeout Ar timeout
|
||||
.It Cm vxlantimeout Ar timeout
|
||||
The maximum time, in seconds, before an entry in the forwarding table
|
||||
is pruned.
|
||||
The default is 1200 seconds (20 minutes).
|
||||
.It Cm maxaddr Ar max
|
||||
.It Cm vxlanmaxaddr Ar max
|
||||
The maximum number of entries in the forwarding table.
|
||||
The default is 2000.
|
||||
.It Cm vxlandev Ar dev
|
||||
When the interface is configured in multicast mode, the
|
||||
.Cm dev
|
||||
interface is used to transmit IP multicast packets.
|
||||
.It Cm ttl Ar ttl
|
||||
.It Cm vxlanttl Ar ttl
|
||||
The TTL used in the encapsulating IPv4/IPv6 header.
|
||||
The default is 64.
|
||||
.It Cm learn
|
||||
.It Cm vxlanlearn
|
||||
The source IP address and inner source Ethernet MAC address of
|
||||
received packets are used to dynamically populate the forwarding table.
|
||||
When in multicast mode, an entry in the forwarding table allows the
|
||||
interface to send the frame directly to the remote host instead of
|
||||
broadcasting the frame to the multicast group.
|
||||
This is the default.
|
||||
.It Fl learn
|
||||
.It Fl vxlanlearn
|
||||
The forwarding table is not populated by recevied packets.
|
||||
.It Cm flush
|
||||
.It Cm vxlanflush
|
||||
Delete all dynamically-learned addresses from the forwarding table.
|
||||
.It Cm flushall
|
||||
.It Cm vxlanflushall
|
||||
Delete all addresses, including static addresses, from the forwarding table.
|
||||
.El
|
||||
.Pp
|
||||
|
@ -595,36 +595,36 @@ setvxlan_flush(const char *val, int d, int s, const struct afswtch *afp)
|
||||
|
||||
static struct cmd vxlan_cmds[] = {
|
||||
|
||||
DEF_CLONE_CMD_ARG("vni", setvxlan_vni),
|
||||
DEF_CLONE_CMD_ARG("local", setvxlan_local),
|
||||
DEF_CLONE_CMD_ARG("remote", setvxlan_remote),
|
||||
DEF_CLONE_CMD_ARG("group", setvxlan_group),
|
||||
DEF_CLONE_CMD_ARG("localport", setvxlan_local_port),
|
||||
DEF_CLONE_CMD_ARG("remoteport", setvxlan_remote_port),
|
||||
DEF_CLONE_CMD_ARG2("portrange", setvxlan_port_range),
|
||||
DEF_CLONE_CMD_ARG("timeout", setvxlan_timeout),
|
||||
DEF_CLONE_CMD_ARG("maxaddr", setvxlan_maxaddr),
|
||||
DEF_CLONE_CMD_ARG("vxlanid", setvxlan_vni),
|
||||
DEF_CLONE_CMD_ARG("vxlanlocal", setvxlan_local),
|
||||
DEF_CLONE_CMD_ARG("vxlanremote", setvxlan_remote),
|
||||
DEF_CLONE_CMD_ARG("vxlangroup", setvxlan_group),
|
||||
DEF_CLONE_CMD_ARG("vxlanlocalport", setvxlan_local_port),
|
||||
DEF_CLONE_CMD_ARG("vxlanremoteport", setvxlan_remote_port),
|
||||
DEF_CLONE_CMD_ARG2("vxlanportrange", setvxlan_port_range),
|
||||
DEF_CLONE_CMD_ARG("vxlantimeout", setvxlan_timeout),
|
||||
DEF_CLONE_CMD_ARG("vxlanmaxaddr", setvxlan_maxaddr),
|
||||
DEF_CLONE_CMD_ARG("vxlandev", setvxlan_dev),
|
||||
DEF_CLONE_CMD_ARG("ttl", setvxlan_ttl),
|
||||
DEF_CLONE_CMD("learn", 1, setvxlan_learn),
|
||||
DEF_CLONE_CMD("-learn", 0, setvxlan_learn),
|
||||
DEF_CLONE_CMD_ARG("vxlanttl", setvxlan_ttl),
|
||||
DEF_CLONE_CMD("vxlanlearn", 1, setvxlan_learn),
|
||||
DEF_CLONE_CMD("-vxlanlearn", 0, setvxlan_learn),
|
||||
|
||||
DEF_CMD_ARG("vni", setvxlan_vni),
|
||||
DEF_CMD_ARG("local", setvxlan_local),
|
||||
DEF_CMD_ARG("remote", setvxlan_remote),
|
||||
DEF_CMD_ARG("group", setvxlan_group),
|
||||
DEF_CMD_ARG("localport", setvxlan_local_port),
|
||||
DEF_CMD_ARG("remoteport", setvxlan_remote_port),
|
||||
DEF_CMD_ARG2("portrange", setvxlan_port_range),
|
||||
DEF_CMD_ARG("timeout", setvxlan_timeout),
|
||||
DEF_CMD_ARG("maxaddr", setvxlan_maxaddr),
|
||||
DEF_CMD_ARG("vxlanvni", setvxlan_vni),
|
||||
DEF_CMD_ARG("vxlanlocal", setvxlan_local),
|
||||
DEF_CMD_ARG("vxlanremote", setvxlan_remote),
|
||||
DEF_CMD_ARG("vxlangroup", setvxlan_group),
|
||||
DEF_CMD_ARG("vxlanlocalport", setvxlan_local_port),
|
||||
DEF_CMD_ARG("vxlanremoteport", setvxlan_remote_port),
|
||||
DEF_CMD_ARG2("vxlanportrange", setvxlan_port_range),
|
||||
DEF_CMD_ARG("vxlantimeout", setvxlan_timeout),
|
||||
DEF_CMD_ARG("vxlanmaxaddr", setvxlan_maxaddr),
|
||||
DEF_CMD_ARG("vxlandev", setvxlan_dev),
|
||||
DEF_CMD_ARG("ttl", setvxlan_ttl),
|
||||
DEF_CMD("learn", 1, setvxlan_learn),
|
||||
DEF_CMD("-learn", 0, setvxlan_learn),
|
||||
DEF_CMD_ARG("vxlanttl", setvxlan_ttl),
|
||||
DEF_CMD("vxlanlearn", 1, setvxlan_learn),
|
||||
DEF_CMD("-vxlanlearn", 0, setvxlan_learn),
|
||||
|
||||
DEF_CMD("flush", 0, setvxlan_flush),
|
||||
DEF_CMD("flushall", 1, setvxlan_flush),
|
||||
DEF_CMD("vxlanflush", 0, setvxlan_flush),
|
||||
DEF_CMD("vxlanflushall", 1, setvxlan_flush),
|
||||
};
|
||||
|
||||
static struct afswtch af_vxlan = {
|
||||
|
@ -24,7 +24,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd October 20, 2014
|
||||
.Dd December 16, 2014
|
||||
.Dt VXLAN 4
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -140,7 +140,7 @@ or VNI.
|
||||
.Pp
|
||||
When configured with the
|
||||
.Xr ifconfig 8
|
||||
.Cm learn
|
||||
.Cm vxlanlearn
|
||||
parameter, the interface dynamically creates forwarding table entries
|
||||
from received packets.
|
||||
An entry in the forwarding table maps the inner source MAC address
|
||||
@ -153,16 +153,16 @@ Otherwise, when configured in multicast mode,
|
||||
the interface must flood the frame to all hosts in the group.
|
||||
The maximum number of entries in the table is configurable with the
|
||||
.Xr ifconfig 8
|
||||
.Cm maxaddr
|
||||
.Cm vxlanmaxaddr
|
||||
command.
|
||||
Stale entries in the table periodically pruned.
|
||||
The timeout is configurable with the
|
||||
.Xr ifconfig 8
|
||||
.Cm timeout
|
||||
.Cm vxlantimeout
|
||||
command.
|
||||
The table may be viewed with the
|
||||
.Xr sysctl 8
|
||||
.Cm net.link.vlxan.N.ftable.dump
|
||||
.Cm net.link.vxlan.N.ftable.dump
|
||||
command.
|
||||
.Sh MTU
|
||||
Since the
|
||||
@ -187,13 +187,13 @@ Create a
|
||||
.Nm
|
||||
interface in unicast mode
|
||||
with the
|
||||
.Cm local
|
||||
.Cm vxlanlocal
|
||||
tunnel address of 192.168.100.1,
|
||||
and the
|
||||
.Cm remote
|
||||
.Cm vxlanremote
|
||||
tunnel address of 192.168.100.2.
|
||||
.Bd -literal -offset indent
|
||||
ifconfig vxlan create vni 108 local 192.168.100.1 remote 192.168.100.2
|
||||
ifconfig vxlan create vxlanid 108 vxlanlocal 192.168.100.1 vxlanremote 192.168.100.2
|
||||
.Ed
|
||||
.Pp
|
||||
Create a
|
||||
@ -207,7 +207,7 @@ and the
|
||||
address of 224.0.2.6.
|
||||
The em0 interface will be used to transmit multicast packets.
|
||||
.Bd -literal -offset indent
|
||||
ifconfig vxlan create vni 42 local 192.168.10.95 group 224.0.2.6 vxlandev em0
|
||||
ifconfig vxlan create vxlanid 42 vxlanlocal 192.168.10.95 vxlangroup 224.0.2.6 vxlandev em0
|
||||
.Ed
|
||||
.Pp
|
||||
Once created, the
|
||||
|
Loading…
Reference in New Issue
Block a user