LIBVDEPLUG_SWITCH(1)

πŸ’– LIBVDEPLUG_SWITCH β€” the manual page, bestie edition πŸ’–

okay so this is libvdeplug_switch(1), a General Commands Manual page, and honestly? it's giving multiplexing icon. sit down, grab a strawberry πŸ“, and let's get into it.


✨ NAME ✨

libvdeplug_switch β€” the multiplexing vdeplug module that is, literally, a switch πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

libvdeplug_switch.so

that's it. that's the whole synopsis. no args on the command line, she's a shared object, she doesn't take orders from your shell. periodt πŸ’…


🌸 DESCRIPTION 🌸

so. this is a libvdeplug multiplex module and what it does is implement a vde switch. that's the whole vibe. πŸ‘‘

this lil module of libvdeplug4 can be dropped into any program that supports vde, like vde_plug, kvm, qemu, user-mode-linux and virtualbox. no cap, any of them.

the vde_plug_url syntax of this module goes like this:

switch://[path]
switch://[path][[OPTION][/OPTION][/OPTION]...]

if you ghost the path and just don't include it, the switch path defaults to /tmp/vdenode_$USERNAME β€” so if your username is john, you get /tmp/vdenode_john. cute, right? πŸ™ˆ

now for the ✨ technical slay ✨: this switch supports 801.1Q vlan as a trunk switch, meaning all the VLAN tagged packets get forwarded as such. the forwarding table uses a key that includes both the MAC address and the VLAN id. two keys, one table, main character energy. 🫢


πŸ’… OPTIONS πŸ’…

  • hashsize=NUM β€” sets the size of the forwarding hash table. default value is 256. big table = big vibes ✨
  • expiretime=SECONDS β€” sets the expire time of the forwarding table entries. default value is 120. yes, entries do get ghosted after a while 😭
  • hashseed=NUM β€” sets a hash seed, for when your hash function is generating too many collisions. it's giving drama, so we reseed πŸŽ€
  • mode=MODE β€” defines the permissions for the switch (see chmod). MODE is an octal number. the standard permission mask is 0600, which means only processes owned by the same user can join the network. very exclusive, very VIP πŸ’œ
  • dirmode=DIRMODE β€” defines the permissions for the switch control directory (see chmod). MODE is an octal number. if you omit it, it gets computed from mode. 🧚
  • grp=GROUP β€” defines the group ownership of the switch. πŸ‘‘

🌈 EXAMPLES 🌈

here's where it gets fun, bestie:

switch:///tmp/switch

other virtual machines, namespaces or vde_plug can join this switch using vde:///tmp/switch or simply /tmp/switch. same switch, different doorway. πŸšͺ✨

switch:///tmp/switch[mode=0666/hashsize=1024]

it's the same switch, except now everybody is allowed to connect their processes (yes, 0666, we're being generous today) and the hash table has 1024 entries. she's bigger, she's friendlier. πŸ”₯

the null plug can be used to create a stand-alone vde switch:

vde_plug null:// switch:///tmp/myswitch

and this next command creates a switch connected to a tap virtual interface:

vde_plug tap://mytap switch:///tmp/myswitch

ate. no notes. πŸ’…


🫢 NOTICE 🫢

Virtual Distributed Ethernet is not related in any way with www.vde.com ("Verband der Elektrotechnik, Elektronik und Informationstechnik" β€” i.e. the German "Association for Electrical, Electronic & Information Technologies"). ngl bestie, same acronym, completely different girlies. don't get it twisted. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘


that's the page, bestie!! ✨ this was Virtual Distributed Ethernet, dated April 30, 2017 β€” mwah, love that for us, go build a switch πŸ¦‹πŸ’–πŸŽ€