For details about the linux-based router-Linux Enterprise Application-Linux server application, see the following section. Set multiple ip addresses for one network card
The temporary ip address disappears after restart: ifconfig eth0: 0 192.168.0.4 netmask 255.255.255.255.0 broadcast 192.168.0.255 up
If a row cannot be written, it can be separated \.
Ifconfig eth0; ifconfig eth0: 0
Set a fixed ip Address by modifying the configuration file/etc/sysconfig/network-scripts/ifcfg-eth0 or
/Etc/sysconfig/network-scripts/ifcfg-eth0: 0 to implement
Note: The premise for starting eth0: 0 is that eth0 must be started first, and they have the same mac address.
Route addition and Deletion
Route add-net 192.168.0.0 netmask 255.255.255.0 dev eth0
Route del-net 192.168.0.0 netmask 255.255.255.0 dev eth0
You must enable the routing function for multi-network communication between multiple NICs and multiple network segments on a linux host.
Echo 1> specify the gateway for the/proc/sys/net/ipv4/ip_forward client.
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