在vxWorks中怎么为一个物理网口绑定多个IP地址
答案:1 悬赏:0 手机版
解决时间 2021-04-01 01:26
- 提问者网友:niaiwoma
- 2021-03-31 20:36
在vxWorks中怎么为一个物理网口绑定多个IP地址
最佳答案
- 五星知识达人网友:撞了怀
- 2021-03-31 20:41
也可以叫共用一个IP吧。。我想
cat "/etc/modules.conf" 中加上
alias bond0 bonding
options bond0 miimon=100 mode=0
其中mode=0为负载平衡,
mode=1为备份时。。我试过把网线拨掉一根也完全正常。。因为另外一台一直在ping
[root@shlinux root]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
IPADDR=192.168.7.112
[root@shlinux root]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
IPADDR=192.168.7.112
[root@shlinux root]# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=static
IPADDR=192.168.7.112
NETMASK=255.255.255.0
NETWORK=192.168.7.0
BROADCAST=192.168.7.255
ONBOOT=yes
在"/etc/rc.d/rc.local"中加如下两句
ifenslave bond0 eth0 eth1
service network restart别忘了这句,否则eth1就会启动不了,兄弟们可能会发现在启动的时候会有eth1失败的提示,不过有了这句之後会发现後OK了。
cat "/etc/modules.conf" 中加上
alias bond0 bonding
options bond0 miimon=100 mode=0
其中mode=0为负载平衡,
mode=1为备份时。。我试过把网线拨掉一根也完全正常。。因为另外一台一直在ping
[root@shlinux root]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
IPADDR=192.168.7.112
[root@shlinux root]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
IPADDR=192.168.7.112
[root@shlinux root]# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=static
IPADDR=192.168.7.112
NETMASK=255.255.255.0
NETWORK=192.168.7.0
BROADCAST=192.168.7.255
ONBOOT=yes
在"/etc/rc.d/rc.local"中加如下两句
ifenslave bond0 eth0 eth1
service network restart别忘了这句,否则eth1就会启动不了,兄弟们可能会发现在启动的时候会有eth1失败的提示,不过有了这句之後会发现後OK了。
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯