FreeBSD,Debian、CentOS,网卡绑定多个IP
审查:1。FreeBSD:配置 / / rc.conf等
ifconfig_interface =INET 192.168.1.5 255.255.255.0
ifconfig_interface_alias0 =INET 192.168.1.6 255.255.255.0
请注意,接口是网卡设备的名称。
2。Debian
//网络接口
1。FreeBSD:
配置 / / rc.conf等
ifconfig_interface =INET 192.168.1.5 255.255.255.0
ifconfig_interface_alias0 =INET 192.168.1.6 255.255.255.0
请注意,接口是网卡设备的名称。
2。Debian
//网络接口
汽车eth0
iFace eth0 inet静态
地址192.168.1.145
子网掩码255.255.255.0
网络192.168.1.0
网关192.168.1.1
另一个IP
汽车eth0:1
iFace eth0:1 INET静态
地址192.168.1.146
子网掩码255.255.255.0
网络192.168.1.0
网关192.168.1.1
3.centos:
/ / / sysconfig等网络脚本/ ifcfg-eth0
eth0设备=
onboot =是的
hwaddr = 00:0c:29:16:39:5f
子网掩码为255.255.255.0
ipaddr = 192.168.1.147
网关为192.168.1.1
类型:以太网
结合另一个IP,创建另一个文件,ifcfg-eth0
设备 / / =eth0和/或eth0,表明结合eth0的IP
onboot =是的
hwaddr = 00:0c:29:16:39:5f
子网掩码为255.255.255.0
ipaddr = 192.168.1.148
网关为192.168.1.1
类型:以太网