Configuring VLANs with Vconfig under Linux

Source: Internet
Author: User

Original intention:

I built a DHCP server on top of CentOS, because the DHCP request sent by the client was tagged, in order for DHCP server to properly response the IP of the client one address pool.

DHCP ETH port is eth0

Realize:

Add in/etc/rc.local

Vconfig Add eth0 1002

Ifconfig eth0.1002 90.0.0.1 up

Description

Linux boot, load the kernel, and then load the Inittab file, Inittab file has an entry Si::sysinit:/etc/rc.d/rc.sysinit specify the next file to be loaded Rc.sysinit, after the file is loaded, load /ETC/RC.D/RC. RUNLEVEL.D the startup script in the directory, and finally loads the/etc/rc.d/rc.local file.
In RC. RUNLEVEL.D folder, the storage is a soft link, linked to the/etc/rc.d/init.d script file, and/etc/rc.d/init.d folder and/etc/init.d folder is the same,/ETC/INIT.D is actually soft link to/ The Etc/rc.d/init.d folder.
Suppose you have a script, you need it to boot, there are 2 methods, the first is to register it as a system service, that is, put it in the/ETC/INIT.D directory, and in the script, add a line # chkconfig:345 85 35, then you can use the Chkconfig command to start the boot.   Because in the/ETC/INIT.D directory, you can also control the script with service commands. The second is that in the/etc/rc.d/rc.local file, the path of the script is written directly, and when the Rc.local file is loaded on the boot, it will naturally start the script. This script cannot be controlled with Chkconfig and service commands.

Configuring VLANs with Vconfig under 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.