centos 新增IP
具體命令如下:
ifconfig team0:1 10.50.61.17 netmask 255.255.255.0 up
team0 為新增的網路卡
關閉的時候 up--> down
ifconfig team0:1 10.50.61.17 netmask 255.255.255.0 down
[root@YW-TR-DB]:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0c:29:d0:fa:f7 brd ff:ff:ff:ff:ff:ff
inet 10.50.28.78/24 brd 10.50.28.255 scope global eth0
[root@YW-TR-DB]:~# ifc
ifcfg ifconfig
[root@YW-TR-DB]:~# ifconfig eth0:1 10.50.28.115 netmask 255.255.255.0 up
[root@YW-TR-DB]:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0c:29:d0:fa:f7 brd ff:ff:ff:ff:ff:ff
inet 10.50.28.78/24 brd 10.50.28.255 scope global eth0
inet 10.50.28.115/24 brd 10.50.28.255 scope global secondary eth0:1
[root@YW-TR-DB]:~# ifconfig eth0:1 10.50.28.115 netmask 255.255.255.0 down
[root@YW-TR-DB]:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0c:29:d0:fa:f7 brd ff:ff:ff:ff:ff:ff
inet 10.50.28.78/24 brd 10.50.28.255 scope global eth0
這個IP地址並不是虛擬IP,只是在 team0 網路卡上新增了一個IP 地址,要實現新增能夠進行漂移的虛擬IP是要通過keepalived 來實現的
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29291882/viewspace-2125572/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Centos 7 新增ip地址和閘道器CentOS
- linux centos7新增ip黑名單禁止某個ip訪問LinuxCentOS
- 如何在Centos8中新增附加的IPCentOS
- 新增SCAN IP
- Centos 7 新增dnsCentOSDNS
- centos7新增bridge-nf-call-ip6tables出現No such file or directoryCentOS
- 修改CentOS的IP地址CentOS
- Centos 6.5設定IPCentOS
- CentOS配置靜態IPCentOS
- Centos 7 檢視本機IP 編輯IP 修改ipCentOS
- centos7 配置固定ipCentOS
- CentOS8修改IP地址CentOS
- Linux CentOS 7.6 遮蔽 IPLinuxCentOS
- Linux(CentOS)修改IP地址LinuxCentOS
- centos 7.4 新增新網路卡CentOS
- centos7IP地址問題CentOS
- centos 7 設定靜態ipCentOS
- centos7 新增lvm磁碟CentOSLVM
- CentOS7配置靜態IP地址CentOS
- rac 新增第二public ip 和 vip
- CentOS 下重新編譯 nginx 新增模組CentOS編譯Nginx
- CentOS新增、刪除環境變數CentOS變數
- Centos(RHEL) 6 新增網路卡的方法CentOS
- 第三天-centos配置靜態IPCentOS
- centos8 中 如何配置靜態IPCentOS
- centos下為php新增gd擴充套件CentOSPHP套件
- Centos7 防火牆firewall新增例外埠CentOS防火牆
- RHEL8&CentOS8配置IP地址和DNSCentOSDNS
- Centos7網路配置——設定固定ipCentOS
- VMware配置centos虛擬機器靜態ipCentOS虛擬機
- Centos7設定IP為固定值CentOS
- Centos中IP與DNS手動設定方法CentOSDNS
- 如何在伺服器上新增虛擬IP?伺服器
- CentOS7 系統下如何新增 swap?CentOS
- CentOS7 sftp 配置與新增使用者CentOSFTP
- CentOS7使用systemctl新增自定義服務CentOS
- Centos下給PHP7新增Xhprof效能分析CentOSPHP
- VirtualBox配置centos7靜態ip(詳解)CentOS