centos 6 單網絡卡繫結雙ip
os:cnetos 6.8
初始網絡卡配置檔案
[root@localhost /]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
device=eth0
type=ethernet
uuid=d3fde489-9b67-453c-84df-4827f3becf1a
onboot=yes
nm_controlled=yes
bootproto=none
ipaddr=192.168.1.110
prefix=24
gateway=192.168.1.1
dns1=114.114.114.114
defroute=yes
ipv4_failure_fatal=yes
ipv6init=no
name="system eth0"
hwaddr=00:0c:29:f6:f8:a8
last_connect=1489157101
方法一:在原網絡卡配置檔案直接增加新ip
[root@localhost /]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
device=eth0
type=ethernet
uuid=d3fde489-9b67-453c-84df-4827f3becf1a
onboot=yes
nm_controlled=yes
bootproto=none
ipaddr=192.168.1.110
prefix=24
gateway=192.168.1.1
dns1=114.114.114.114
defroute=yes
ipv4_failure_fatal=yes
ipv6init=no
name="system eth0"
ipaddr2=192.168.1.111
prefix2=24
hwaddr=00:0c:29:f6:f8:a8
last_connect=1489129249
方法二:新增網絡卡配置檔案:
[root@localhost /]# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0
[root@localhost /]# vim /etc/sysconfig/network-scripts/ifcfg-eth0:0
device=eth0:0
type=ethernet
uuid=d3fde489-9b67-453c-84df-4827f3becf1a
onboot=yes
nm_controlled=yes
bootproto=none
ipaddr=192.168.1.111
prefix=24
gateway=192.168.1.1
dns1=114.114.114.114
defroute=yes
ipv4_failure_fatal=yes
ipv6init=no
name="system eth0"
hwaddr=00:0c:29:f6:f8:a8
last_connect=1489130355
修改網絡卡配置檔案後,需要重啟網路服務才會生效:
[root@localhost /]# service network restart
centos6實現雙網絡卡繫結
首先確保主機上已經有涼快網絡卡並且網絡卡都已生效 然後分別編寫eth0 eth1的網絡卡配置檔案,如下圖所示 在 etc sysconfig network scripts目錄下新建ifcfg bond0檔案,檔案內容如下圖 在 etc modprobe.d目錄下新建modprobe.conf檔案,...
CentOS6網絡卡靜態IP設定
centos網絡卡配置原始檔如下 device eth0 hwaddr 00 0c 29 a8 67 46 type ethernet uuid 4103d7a8 d073 4e93 ac68 e6f8496f35f0 onboot no nm controlled yes bootproto dh...
linux系統單網絡卡繫結雙IP的方法
linux系統單網絡卡繫結雙ip的方法 1.進入目錄 cd etc sysconfig network scripts advanced micro devices amd 79c970 pcnet32 lance device eth0 bootproto static broadcast 192...