Date: Wed, 22 Dec 2010 14:17:57 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: freebsd-questions@freebsd.org Subject: Re: Port based VLAN Message-ID: <4D120895.2060002@infracaninophile.co.uk> In-Reply-To: <F1893052-E00F-49FC-9E8F-9591B834E1D0@internode.on.net> References: <F1893052-E00F-49FC-9E8F-9591B834E1D0@internode.on.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigCDA259ACC51800C69AD08D5A Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 22/12/2010 11:15, Indexer wrote: > Hi, >=20 > I plan to make a FreeBSD based router sometime soon. I would like to be= able to do port based vlanning on the router, so that a client computer = that plugs into that socket is "dumb" to the vlans' existance. >=20 > IE >=20 > em0 - untagged > em1 - vlan 1 > em2 - vlan 2 >=20 > Is what i want to achieve (as a simple example). This way i can use unm= anaged switches on em2, and all clients behind that are to the router on = vlan2 >=20 > How does one go about this on freebsd. >=20 In /etc/rc.conf: ifconfig_em1=3D"up -vlanhwtag" # You may or may not want hwtag -- try bot= h vlans_em1=3D"vlan1" ifconfig_em2=3D'up -vlanhwtag" vlans_em2=3D"vlan2" create_args_vlan1=3D"vlan 1" ipv4_addrs_vlan1=3D"192.168.12.34/24" create_args_vlan2=3D"vlan 2" ipv4_addrs_vlan2=3D"192.168.56.78/24" The em0 i/f should be configured as usual. This will create virtual interfaces vlan1 and vlan2 which you can apply firewall rules to etc. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enigCDA259ACC51800C69AD08D5A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk0SCJsACgkQ8Mjk52CukIydiQCfVgyrrlsmtpn96xSUwJLBDOtL 0dQAnR42f+S/tMcdNyaFa9ICLS3lmF40 =gfC/ -----END PGP SIGNATURE----- --------------enigCDA259ACC51800C69AD08D5A--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D120895.2060002>