How to configure dual IP cross-CIDR block access for a single NIC in Linux

Source: Internet
Author: User
How to configure dual-IP cross-CIDR block access for a single network card in Linux (using Ubuntu as an example) 1. add the following code to the interface in the system/etc/network/Directory (the operation must be performed as root): autoeth0auto...
How to configure dual-IP cross-CIDR block for a single NIC in Linux = how to configure dual-IP cross-CIDR block for a single NIC in Linux (for example, Ubuntu) = 1. add the following code to the interface in the system/etc/network/Directory (the operation must be performed as root): auto eth0auto eth0: 0 # configure the virtual network card www.2cto.com iface eth0 inet staticaddress 192.168.1.38netmask 255.255.255.0broadcast 192.168.1.255gateway 192.168.1.1 # configure the virtual network card without configuring the Gateway Information iface eth0: 0 inet staticaddress 192.168.100.38netmask 255.255.255.0network 192.168.10020.broadcast 192.168.100.255 www.2cto.com 2. restart the Nic service and run the following code (the operation must be performed as root ):
/Etc/init. d/networking restart can achieve cross-network access of networks separated from the intranet and internet. the configuration fields of the preceding configuration details are slightly different on different systems. if you have any questions, please leave a message.
Related Article

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.