排行榜 统计
  • 文章总数:1057 篇
  • 评论总数:10 条
  • 分类总数:7 个
  • 最后更新:1月2日

virmach DD后设置双IP教程

本文阅读 1 分钟
首页 技巧杂烩 正文

用系统后台面板重装的系统,2IP都能正常使用,但是自己DD系统后,只有一个IP,我们需要修改/etc/network/interfaces的内容,让系统能够正常识别到2IP

后台面板重装 interfaces 参数

# Generated by SolusVM

 auto lo
  iface lo inet loopback

 auto eth0
  iface eth0 inet static
   address 194.33.39.1
   gateway 194.33.39.1
   netmask 255.255.255.0
   dns-nameservers 8.8.8.8 8.8.4.4

 auto eth0:0
  iface eth0:0 inet static
   address 194.33.39.2
   gateway 194.33.39.1
   netmask 255.255.255.0
   dns-nameservers 8.8.8.8 8.8.4.4

自己DD系统 interfaces 参数

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug ens3
iface ens3 inet static
    address 194.33.39.1/24
    gateway 194.33.39.1
    # dns-* options are implemented by the resolvconf package, if installed
    dns-nameservers 8.8.8.8
    dns-search skulljargon.com

我们只需要把allow-hotplug改成auto,并新增加一个网卡:0就可以。

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto ens3
iface ens3 inet static
    address 194.33.39.1/24
    gateway 194.33.39.1
    # dns-* options are implemented by the resolvconf package, if installed
    dns-nameservers 8.8.8.8
    dns-search skulljargon.com

auto ens3:0
iface ens3:0 inet static
    address 194.33.39.2/24
    gateway 194.33.39.1
    # dns-* options are implemented by the resolvconf package, if installed
    dns-nameservers 8.8.8.8
    dns-search skulljargon.com
本文来自投稿,不代表本站立场,如若转载,请注明出处:
-- 展开阅读全文 --
猪云 - 香港CIE 1核1G 流量200G 带宽60M 月付19元
« 上一篇 05-12
腾讯云函数校园优惠调整
下一篇 » 05-31

发表评论

发表评论

作者信息

云外科技
打破技术壁垒,体验云上服务,云外科技致力于本地上云转型升级,大数据、多渠道为您的业务增添色彩!
TA的最新作品

动态快讯

    请配置好页面缩略名选项

热门文章

最多点赞

标签TAG

热评文章