全球主机交流论坛
标题:
搞定了
[打印本页]
作者:
_____________Cc
时间:
2013-2-25 00:46
标题:
搞定了
本帖最后由 _____________Cc 于 2013-2-25 01:23 编辑
示例
auto eth0:256
iface eth0:256 inet static
address 10.1.1.1
netmask 255.255.240.0
gateway 10.1.0.1
...
auto eth0:509
iface eth0:509 inet static
address 10.1.1.254
netmask 255.255.240.0
gateway 10.1.0.1
auto eth0:510
iface eth0:510 inet static
address 10.1.1.255
netmask 255.255.240.0
gateway 10.1.0.1
复制代码
给服务器加点了,求帮忙生成代码,手动写也太累了点。。
刚刚发了一帖莫名奇妙被删无任何提醒。蛋疼的
搞定了
#! /bin/bash
for ((han=256,an=1;han<511,an<256;han=han+1,an=an+1))
do
cat >>/root/test/text<<EOF
auto eth0:$han
iface eth0:$han inet static
address 10.1.1.$an
netmask 255.255.240.0
gateway 10.1.0.1
EOF
done
复制代码
作者:
汉陈帝国
时间:
2013-2-25 00:49
被爆菊了
作者:
Host.HowPick
时间:
2013-2-25 00:52
如果是标准的 VLan 分配, 可以到这里。
http://serveryou.com/tools/subnet-calculator
作者:
农民工
时间:
2013-2-25 00:54
不会啊亲
作者:
Ruclinux
时间:
2013-2-25 02:52
我以为又把路由器刷砖了.
作者:
ybs885
时间:
2013-2-25 08:45
额看不到
欢迎光临 全球主机交流论坛 (https://fd.vvwvv.eu.org/)
Powered by Discuz! X3.4