Linux下設定網路卡繫結 (final)
eth0 及eth2 繫結為 bond0
eth1 及eth3 繫結為 bond1
[root@wsjrac03 network-scripts]# cp ifcfg-eth0 ifcfg-bond0
[root@wsjrac03 network-scripts]# cat ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
IPADDR=10.109.196.155
NETMASK=255.255.255.0
NETWORK=10.109.196.0
BROADCAST=10.109.196.255
GATEWAY=10.109.196.1
ONBOOT=yes
USERCTL=no
TYPE=Ethernet
[root@wsjrac03 network-scripts]# cp ifcfg-eth1 ifcfg-bond1
[root@wsjrac03 network-scripts]# cat ifcfg-bond1
DEVICE=bond1
BOOTPROTO=none
IPADDR=10.1.1.155
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
[root@wsjrac03 network-scripts]# cat ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
HWADDR=A4:BA:DB:35:1B:AA
ONBOOT=yes
TYPE=Ethernet
MASTER=bond0
USERCTL=no
slave=yes
[root@wsjrac03 network-scripts]# cat ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
HWADDR=A4:BA:DB:35:1B:AC
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
MASTER=bond1
slave=yes
[root@wsjrac03 network-scripts]# cat ifcfg-eth2
DEVICE=eth2
BOOTPROTO=none
HWADDR=A4:BA:DB:35:1B:AE
ONBOOT=yes
TYPE=Ethernet
MASTER=bond0
USERCTL=no
slave=yes
[root@wsjrac03 network-scripts]# cat ifcfg-eth3
DEVICE=eth3
BOOTPROTO=none
HWADDR=A4:BA:DB:35:1B:B0
ONBOOT=yes
TYPE=Ethernet
MASTER=bond1
USERCTL=no
slave=yes
[root@wsjrac03 etc]# cat modprobe.conf
alias bond0 bonding
options bond0 miimon=100 mode=1 primary=eth0
alias bond1 bonding
options bond1 miimon=100 mode=1 primary=eth1
[root@wsjrac03 etc]# vi /etc/rc.local
touch /var/lock/subsys/local
ifenslave bond0 eth0 eth2
ifenslave bond1 eth1 eth3
重新啟動後檢視 :
下面bond0對應線只有一個接了網線,所以狀態是一個up, 一個down .
[root@wsjrac01 oracle]# more /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.2.4 (January 28, 2008)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: eth0
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: a4:ba:db:34:8e:70
Slave Interface: eth2
MII Status: down
Link Failure Count: 0
Permanent HW addr: a4:ba:db:34:8e:74
下面心跳線都接了網線,所以狀態都是UP
[root@wsjrac01 oracle]# more /proc/net/bonding/bond1
Ethernet Channel Bonding Driver: v3.2.4 (January 28, 2008)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth3
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth1
MII Status: up
Link Failure Count: 1
Permanent HW addr: a4:ba:db:34:8e:72
Slave Interface: eth3
MII Status: up
Link Failure Count: 0
Permanent HW addr: a4:ba:db:34:8e:76
[root@wsjrac01 oracle]#
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-700060/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- linux 網路卡繫結Linux
- Linux網路卡繫結Linux
- Linux(09):網路卡繫結Linux
- 深度分析Linux下雙網路卡繫結七種模式 多網路卡的7種bond模式原理Linux模式
- Linux雙網路卡繫結單個IP之(team)Linux
- 剖析網路卡繫結模式模式
- Oracle 11gR2 RAC 單網路卡轉雙網路卡繫結配置Oracle
- 一個網路卡下設定兩個ip地址
- win10待機網路卡不休怎麼設定 win10待機網路卡不斷網設定方法Win10
- linux下打滿網路卡的頻寬和影響打滿網路卡的原因Linux
- 虛擬網路卡介面VETH(Virtual Ethernet )建立使用和繫結關係
- 基於nodejs的阿里雲DDNS服務,支援多網路卡繫結NodeJS阿里DNS
- Linux網路設定Linux
- WiFi 6無線網路卡最佳化設定WiFi
- Linux系統自定義網路卡並更改網路卡介面Linux
- Mac Linux 重啟網路卡MacLinux
- Linux 7 配置網路卡(nmcli)Linux
- LINUX下手工新增網路卡Linux
- Linux Ubuntu 修改網路卡名字LinuxUbuntu
- Linux修改網路卡的名字Linux
- 合理設定作業系統網路卡的MTU值作業系統
- Linux系統新增自定義網路卡並更改網路卡介面Linux
- Linux下chrony對時設定Linux
- linux下把程式繫結到特定cpu核上執行Linux
- linux檢視網路卡型號Linux
- rocky linux 重啟網路卡命令Linux
- Linux 雙網路卡雙IP配置Linux
- js 定時器 繫結classJS定時器
- PbootCMS授權碼設定,PbootCMS如何繫結多個域名boot
- linux udev裸裝置繫結Linuxdev
- win10如何修改虛擬網路卡ip_win10虛擬網路卡怎麼設定ip地址Win10
- 軟體測試學習教程——CentOS 7 修改網路卡設定CentOS
- Linux 虛擬網路卡技術:MacvlanLinuxMac
- Linux虛擬網路卡TUN和TAPLinux
- linux網路卡配置檔案詳解Linux
- Linux下設定redis訪問密碼LinuxRedis密碼
- Random 專案總結 -12 定義定時器,繫結事件random定時器事件
- 檢視Linux網路卡UUID和MAC地址---Linux命令LinuxUIMac
- linux繫結多個ip(轉載)Linux