In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Server: add IP to network card in batch under Centos system
Add IP to the network card one by one under the Centos system
Create similar ifcfg-eth0:x files under / etc/sysconfig/network-scripts/, for example:
DEVICE=eth0:0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.100
NETMASK=255.255.255.0
NETWORK=192.168.1.1
BROADCAST=192.168.0.255
TYPE=Ethernet
Batch method can be used if it is a large number of continuous IP.
1. Establish / etc/sysconfig/network-scripts/ifcfg-eth0-range0
two。 Add the following to ifcfg-eth0-range0:
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR_START=192.168.1.100
IPADDR_END=192.168.1.200
CLONENUM_START=0
GATEWAY= Gateway address
NETMASK= subnet mask
NO_ALIASROUTING=yes
The above content will add the IP range segment from IPADDR_START (192.168.1.100) to IPADDR_END (192.168.1.200). The value of CLONENUM_START is the network card of the previous IP alias. You can view the number after the last eth0: by ifconfig. The above example is the corresponding eth0:0.
To add multiple IP range, just set up ifcfg-eth0-range1, ifcfg-eth0-range2 in sequence.
Restarting the network after modification is complete:
/ sbin/service network restart
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.