When is a switch not a switch?

Patrick M. Hausen hausen at punkt.de
Tue Oct 20 12:35:29 UTC 2020


Hi!

> Am 20.10.2020 um 14:10 schrieb D'Arcy Cain <darcy at druid.net>:
> 
> On 10/20/20 7:39 AM, Patrick M. Hausen wrote:
>>> When I started I thought of a switch as analogous to a physical switch.  If I am in an office with one ethernet jack but I have multiple devices I might connect a switch (or hub) to the jack and plug my devices into the switch. I don't need to create a separate network for my office.  All of my devices are on the company network.
>> OK, the "switch" interface in FreeBSD is bridge(4).
> 
> Understood.
> 
>> Or to cite Radia Perlman:
>> A bridge is a network device making forwarding decisions based on layer 2 addresses.
>> A router is a network device making forwarding decisions based on layer 3 addresses.
>> "Switch" is a marketing term meaning "faster or cheaper than the competition".
> 
> I always thought that a switch was a hub with packet switching to avoid collisions.

That is a bridge. A switch simply is a multiport bridge. And a layer 3 switch is a router.

> Or else rename the bridges to "public" and "private".

Yep, probably.

>> ifconfig_inet0="addm igb0 up"
> ifconfig_public="addm bge0 up"
> ifconfig_private="addm bge1 up"
> 
>> ifconfig_inet0_alias0="inet 1.2.3.4/24"
> ifconfig_public_alias0="inet 1.2.3.4/24"
> ifconfig_private_alias0="192.168.151.4/14"
> 
> So why alias?  Wouldn't "ifconfig_public=" work?

We already have

	ifconfig_public="addm bge0 up"

Adding

	ifconfig_public="inet 1.2.3.4/24"

on another line would overwrite the first one. These are just
variable assignments not executable code. You cannot have
more than one

	ifconfig_public

line. If you need more than one they have to be named

	ifconfig_public
	ifconfig_public_alias0
	ifconfig_public_alias1
	...

Execution stops at the first undefined one, so no gaps, either.

> Not sure I need this as long as arp works as it should.  Do I really care what the MAC is?

Well, the ARP timeouts specifically of Cisco gear can be enervatingly long so hosts
are not reachable after reboot for minutes ... these settings fix that.

HTH,
Patrick
--
punkt.de GmbH
Patrick M. Hausen
.infrastructure

Kaiserallee 13a
76133 Karlsruhe

Tel. +49 721 9109500

https://infrastructure.punkt.de
info at punkt.de

AG Mannheim 108285
Geschäftsführer: Jürgen Egeling, Daniel Lienert, Fabian Stein

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freebsd.org/pipermail/freebsd-virtualization/attachments/20201020/a2dbd2d6/attachment.sig>


More information about the freebsd-virtualization mailing list