Linux VLAN Trunking: Difference between revisions
Jump to navigation
Jump to search
(→Step 4) |
No edit summary |
||
Line 22: | Line 22: | ||
==Step 3== | ==Step 3== | ||
Use vconfig to add | Use vconfig to add VLANS | ||
:vconfig add | :vconfig add "''interface''.''vlan''" | ||
:[[File:Vconfig.jpg|middle]] | :[[File:Vconfig.jpg|middle]] | ||
Line 32: | Line 29: | ||
==Step 4== | ==Step 4== | ||
Configure IP Addresses on the sub-interfaces. | Configure IP Addresses on the sub-interfaces. | ||
:ifconfig ''interface''.''sub-interface'' ''ip address'' netmask ''subnet mask'' | :ifconfig "''interface''.''sub-interface''" "''ip address''" netmask "''subnet mask''" | ||
:[[File:Configvlanip.jpg|middle]] | :[[File:Configvlanip.jpg|middle]] | ||
Line 39: | Line 36: | ||
Configure the default gateway for each sub-interface / VLAN | Configure the default gateway for each sub-interface / VLAN | ||
:route add -net ''ip address'' netmask ''subnet mask'' gw ''default gateway'' | :route add -net "''ip address''" netmask "''subnet mask''" gw "''default gateway''" | ||
:[[File:Defaultroute.jpg|middle]] | :[[File:Defaultroute.jpg|middle]] | ||
;The server should now be trunking VLANS 10,20,30, and 40 on eth0 | ;The server should now be trunking VLANS 10,20,30, and 40 on eth0 |
Revision as of 04:58, 7 May 2010
Basic VLAN Trunking in Debian based Linux.
Goal of Lab
- Create sub-interfaces with VLAN tagging enabled
Scenario
Step 1
The first thing you'll want to do is install the VLAN package using aptitude.
Note: if aptitude can't find the package, use the command "aptitude update" before trying to install the package.
Step 2
Load the 802.1Q module into the kernel
- sudo modprobe 8021q
Then verify the module has been loaded into the kernel
- lsmod | grep 8021q
The output on your screen should look similar:
Step 3
Use vconfig to add VLANS
- vconfig add "interface.vlan"
Step 4
Configure IP Addresses on the sub-interfaces.
- ifconfig "interface.sub-interface" "ip address" netmask "subnet mask"
Step 5
Configure the default gateway for each sub-interface / VLAN
- route add -net "ip address" netmask "subnet mask" gw "default gateway"
- The server should now be trunking VLANS 10,20,30, and 40 on eth0