Configuring VLAN environments with Vconfig under "VLAN" Linux

Source: Internet
Author: User

Under Linux, you can use Vconfig to manage VLAN virtual appliances as long as the system kernel supports it

1. Check the Environment first
Lsmod grep  290220 14384 1 18542 1 8021q
2, Installation Vconfig
Yum Install -y vconfig
3. Configuring the VLAN interface

For example, configure VLAN 2202 at the eth2 port

22022202 to IF-:eth2:-

Pull the interface up and set the IP

IP link set dev eth2.2202 up207: Eth2.2202@eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> MTU theQdisc noqueue State uplink/ether Fe:fc:fe: the: 1c: +BRD FF:FF:FF:FF:FF:FFIP A add192.168.202.101/ -Dev eth2.2202207: Eth2.2202@eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> MTU theQdisc noqueue State up link/ether Fe:fc:fe: the: 1c: +BRD ff:ff:ff:ff:ff:ff inet192.168.202.101/ -Scope Global eth2.2202Valid_lft Forever Preferred_lft forever Inet6 fe80::fcfc:feff:fe68:1c78/ -scope link tentative valid_lft forever preferred_lft Forever

Of course, you can also use the Ifconfig command, a line command to pull up and set the IP

ifconfig eth2. 2202 192.168. 202.101 255.255. 255.0 192.168. 202.255 up

At this point, the VLAN environment is configured successfully with packets emitted from this interface with vlan2202 tags.

4. Delete VLAN

The delete command is as follows

IP link Set eth2.2202 down

Vconfig REM eth2.2202

Configuring VLAN environments with Vconfig under "VLAN" Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.