跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • centos7 怎么添加多IP段 IP啊
未分類
3 4 月 2020

centos7 怎么添加多IP段 IP啊

wermnb 大佬有话说 : 2020-3-26 22:50:11

centos7 怎么添加多IP段 IP啊

centos7 怎么添加多IP段 IP啊

大屌MJJ们
求个教程啊

一个不知名网友 大佬有话说 : 2020-3-26 22:50:53

https://www.fanayun.com/helpview.asp?id=6不用谢我是雷锋啊

cquyf 大佬有话说 : 2020-3-26 22:52:35

大佬玩的有点高端

aming 大佬有话说 : 2020-3-26 23:00:26

本帖最后由 aming 于 2020-3-26 23:02 编辑

编辑 /etc/network/interfaces 添加上你的新IP,
假设你原有IP为 11.11.11.11,想要添加 22.22.22.22 和 33.33.33.33 新IP,按以下样例修改:

auto lo iface lo inet loopback
auto eth0 iface eth0 inet static address 11.11.11.11 netmask 255.255.255.0 gateway 11.11.11.1
auto eth0:0 iface eth0:0 inet static address 22.22.22.22 netmask 255.255.255.0
auto eth0:1 iface eth0:1 inet static address 33.33.33.33 netmask 255.255.255.0

就是只要按着顺序添加 eth0:0 , eth0:1 , eth0:X 一直加下去

修改之后,/etc/init.d/networking restart 重启网络,
另需要将新IP上线,ifup eth0:0 有多个IP,就按顺序 ifup eth0:1 ifup eth0:2 ifup eth0:3 ifup eth0:x ……

pccv 大佬有话说 : 2020-3-27 03:55:53

参考:https://www.pccv.com/tech/115.html

HostSailor 大佬有话说 : 2020-4-1 15:50:59

如果你拥有一台我们的独服,我们的技术支持可以帮你,当然你也可以自己来。:loveliness:

https://clients.hostsailor.com/index.php?rp=/knowledgebase/229/Adding-bulk-amount-of-additional-IPandsharp039s-in-CentOS.html

大神-80 大佬有话说 : 2020-4-1 15:54:05

兄弟 亲测不懂的加我
(1)Win系统 添加ip
FOR /L %i IN (2,1,254) DO netsh interface ip add address "Your_interface" 127.255.255.%i 255.0.0.0注意的地方是需要改动网卡名字
(2)Centos
for I in $(seq 2 254);
do nmcli con mod Your_interface +ipv4.addresses 127.255.255.${I}; done; nmcli con up Your_interface
脚本命令

wenwei7532 大佬有话说 : 2020-4-1 16:04:10

centos7下载:http://mirrors.aliyun.com/centos/7/isos/x86_64/
安装教程:https://blog.csdn.net/qq_30764991/article/details/81843626

centos7配置ip地址:https://blog.csdn.net/whatday/article/details/96272620

VI模式退出:
ESC
Ctrl c 然后 Shift z z 保存退出
Ctrl z 直接退出不保存

关机命令:https://**blogs.com/chen1970/p/11084799.html

环境安装:https://www.appnode.com/install

字数补丁

Conan 大佬有话说 : 2020-4-1 16:05:39

本帖最后由 Conan 于 2020-4-1 16:07 编辑

修改if-cfg的配置文件

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具