Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to add new IP to Linux command line interface

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the knowledge of "how to add IP to the Linux command line interface". Many people will encounter this dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

After SSH connection is logged in:

Enter cd / etc/sysconfig/network-scripts

Generally, the first one is the default IP editing file. Some systems will have multiple connections. For the newly opened VPS on X36, there will be four connections, that is, five files with the beginning of ifcfg, and ifcfg-lo is a loopback. It is best for VI to enter the file editing to see which file has the initial default Ip, and modify it right there!

Vi ifcfg-7i24NIC

Enter the profile

New Ip configuration command:

IPADDR2=103.255.177.88

PREFIX2=24

IPADDR3=103.255.177.89

PREFIX3=24

IPADDR4=103.255.177.90

PREFIX4=24

IPADDR5=103.255.177.91

PREFIX5=24

IPADDR6=103.255.177.92

PREFIX6=24

IPADDR7=103.255.177.93

PREFIX7=24

Rules:

Add the nth IP

Command:

IPADDRn=xxx.xxx.xxx.xxx

PREFIXn=24

Save exit

: wq!

Restart the network card

Service network restart

At this point, all new Ip can be connected with ping. Other tutorials on the Internet are basically new connection configurations, and this tutorial is a new IP under the same link!

This is the end of the introduction of "how to add a new IP to the Linux command line interface". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report