12.07.2015 Views

download

download

download

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Network Configuration—BasicsConfiguring VLANsFreeBSD supports IEEE 802.1Q VLAN protocol. This means that you can configureVLAN tagging on network interfaces.In order to configure VLANs, you must create VLAN pseudo-interfaces first asshown here:# ifconfig vlan0 createThis will create a virtual interface called vlan0. Note that the interface nameshould begin with the vlan keyword and should have an arbitrary number attached.If you do not specify the interface number, the ifconfig will create a VLANdevice, automatically assigns first free device number and prints the name of thecreated device.Once the VLAN pseudo-interface is created, you should assign two parameters to theinterface at the same time—VLAN number and Parent Interface.VLAN number is actually the VLAN ID that will be inserted into the 802.1q frameheader. Parent Interface is the name of the physical interface that is supposed to actas the trunk port. This is shown in the following command:# ifconfig vlan0 vlan 10 vlandev fxp0Then you should configure layer3 parameters on the VLAN configuration, just like anormal physical interface, as shown here:# ifconfig vlan0 10.0.2.1/24Since you do not assign IP address to the physical trunk interface (parent interface),the system does not bring the interface up and you should do this step manually:# ifconfig fxp0 upThe above example configures the vlan0 device with vlan tag 10 and assigns it tothe fxp0 interface. Since the VLAN interface is a virtual interface, it makes a copy ofthe parent interface's attribute, including hardware address and device capabilitiesas shown here:# ifconfig vlan0vlan0: flags=8842 metric0 mtu 1500ether 00:01:02:ae:13:57media: Ethernet 100baseTX status: activevlan: 10 parent interface: fxp0[ 112 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!