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.