Difference between revisions of "Configuring ethernet port in trunk mode"
From Notes_Wiki
(Created page with "=Configuring ethernet port in trunk mode= Assuming eth0 is to configured in trunk mode and VLAN 127 has to be used using 802.1q over eth0, follow these steps: (Note that devi...") |
m |
||
Line 1: | Line 1: | ||
=Configuring ethernet port in trunk mode= | <yambe:breadcrumb self="Trunk ethernet port">Network interface configuration|Interface configuration</yambe:breadcrumb> | ||
Configuring ethernet port in trunk mode= | |||
Assuming eth0 is to configured in trunk mode and VLAN 127 has to be used using 802.1q over eth0, follow these steps: (Note that device can be changed to eth1, eth2, etc. and vlan number can also be changed from 127. 127 is used just for illustration) | Assuming eth0 is to configured in trunk mode and VLAN 127 has to be used using 802.1q over eth0, follow these steps: (Note that device can be changed to eth1, eth2, etc. and vlan number can also be changed from 127. 127 is used just for illustration) |
Revision as of 11:51, 2 December 2012
<yambe:breadcrumb self="Trunk ethernet port">Network interface configuration|Interface configuration</yambe:breadcrumb> Configuring ethernet port in trunk mode=
Assuming eth0 is to configured in trunk mode and VLAN 127 has to be used using 802.1q over eth0, follow these steps: (Note that device can be changed to eth1, eth2, etc. and vlan number can also be changed from 127. 127 is used just for illustration)
- Go to /etc/sysconfig/network-scripts
- Copy file 'ifcfg-eth0' to 'ifcfg-eth0.127'
- Set 'BOOTPROTO=none' in ifcfg-eth0
- Set 'DEVICE=eth0.127' and 'VLAN=yes' in ifcfg-eth0.127. You can also do normal interface configuration like
- BOOTPROTO=static
- ONBOOT=yes
- IPADDR=
- NETMASK=
- GATEWAY=
- DNS1=
- DNS2=
- and so on.
- Run service network restart. In case you do not see device eth0.127 up and working then try command 'vconfig eth0 add 127' and then again restart network.
Note that it is not same as aliasing where both eth0 and eth0:1 has same device name in routing. Using above procedure a different device with name eth0.127 gets created and we can use it in routing tables.