您好!欢迎光临工博士商城

研华科技服务商

   产品:813    

咨询热线:18516020802

QQ QQ
您当前的位置:首页 » 新闻中心 » Debian下一个网卡绑定多个ip的方法
产品分类
新闻中心
Debian下一个网卡绑定多个ip的方法
发布时间:2020-08-04        浏览次数:245        返回列表
   修改/etc/network/interfaces
    auto eth0
    iface eth0 inet static
    address 172.16.3.123
    netmask 255.255.255.0
    network 172.16.3.0
    broadcast 172.16.3.255
    gateway 172.16.3.1
    auto eth0:1
    iface eth0:1 inet static
    address 10.16.3.123
   netmask 255.255.0.0
   network 10.16.0.0
   broadcast 10.16.255.255
   修改/etc/network/ifstate
   lo=lo
   eth0=eth0
   eth0:1=eth0:1
   没有文件/etc/network/ifstate,手工创建之
   #/etc/init.d/networking restart

  注意,eth0:0没有gateway
  然后使用ifup eth0:0就可以了。
  不要使用/etc/init.d/network restart的方法

  在debian中,启用和停止接口用ifup 和 ifdown的方法

分享到: 


 

联系热线:18516020802   联系人:普程艳 联系地址:北京市朝阳区东土城路甲6号金泰腾达B座5层

技术和报价服务:星期一至星期六8:00-22:00 研华科技服务商  |