linux ip 別名

https://www.youtube.com/watch?v=O8dZ7c-E7ng

ethtool -i enp5s0

systemctl disable NetowrkManager –now
ip addr add 192.168.1.10/24 dev enp5s0 eth5s0:1

加入 固定ip
vi /etc/syconfig-scripts ifcfg-ehp5s0:0

DEVICE=enp5s0:0
IPADDR=192.168.1.99
PREFIX=24
ONPARENT=yes

systemctl restart network
———————————–
模式0:平衡 (2張網卡一起走)
模式1:主動被備份 (網卡故障備用)
模式3:廣播

示範 bonding 1
/etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0
IPADDR=192.168.1.200
PREFIX=24
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
BONDING_OPTS="mode=1 miimon=50″

vim ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=YES
MASTER=bond0
SLAVE=yes
TYPE=Ethernet
UUDID="SDFSDFA-ASDFSDGFDS-FSDAFDAS"
USERCTL=no

vim ifcfg-eth2
DEVICE=eth2
BOOTPROTO=none
ONBOOT=YES
MASTER=bond0
SLAVE=yes
TYPE=Ethernet
UUDID="SDFSDFA-ASDFSDGFDS-FSDAFDAS"
USERCTL=no

然後給 bond 網卡添加驅動
/etc/modprobe.d/bonding.conf
alias bond0 bonding

本篇發表於 linux。將永久鍊結加入書籤。

發表迴響

您的電子郵件位址並不會被公開。 必要欄位標記為 *

*

您可以使用這些 HTML 標籤與屬性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>