How to add a virtual network card in Ubuntu

Source: Internet
Author: User
To add a virtual network card to Ubuntu, you need to set multiple ip addresses for one server but do not want to add multiple network cards. here we will introduce two methods to add a virtual Nic to ubuntu. we add a virtual network card to eth0: The first method: Express creation \ delete virtual network...
To add a virtual network card to Ubuntu, you need to set multiple ip addresses for one server but do not want to add multiple network cards. here we will introduce two methods to add a virtual Nic to ubuntu. we can add a virtual network card to eth0: The first method is to create or delete a virtual network card sudo ifconfig eth0: 0 192.168.10.10 up or above. then we can create an eth0: the IP address of the virtual network card 0 is 192.168.1.63 www.2cto.com. if you do not want this virtual network card, run the following command to delete it: sudo ifconfig eth0: 0 after restarting the server or network, the virtual network card is gone. method 2: modify the Nic configuration file in ubuntu. The Nic configuration file is/etc/network/interfaces, so we modify it: sudo vim/etc/network/interfaces add the following content to this file and save it: www.2cto.com auto eth0: 0 iface eth0: 0 inet staticaddress 192.168.10.10netmask 255.255.255.0 # network 192.168.10.1 # broadcast 192.168.1.255
After saving, we need to restart the NIC (reload the configuration file) to take effect. run the following command to restart: sudo/etc/init. d/networking restart is not afraid of restarting the server or network card, but it is troublesome.

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.