forked from dipsec/Cheatsheets-1
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Vlan Cheetsheet
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Configure an Ethernet interface as a VLAN trunk | ||
--------------------------------------------------- | ||
|
||
Suppose that a host requires access to two VLANs, both carried by a trunk connected to physical interface eth0. The assigned IP addresses for the host are 192.168.2.1/24 on VLAN 2 and 192.168.3.1/24 on VLAN 3. | ||
|
||
[+] First install the vlan package if it is not already present: | ||
|
||
apt-get install vlan | ||
|
||
[+] Configuring interfaces | ||
|
||
vconfig add eth0 <VLAN ID> | ||
ifconfig eth0.<VLAN ID> <IP Address>/24 up | ||
ifconfig eth0.<VLAN ID> | ||
|
||
Note: If any issues run, ifconfig eth0 0.0.0.0 up |