IBM Cloud 2019 - Portable IP 例子A/S 切换

场景,2台机器(都已有staich public/private IP), 提供冗余性做Active/Standby架构,需要购买portable public 并进行配置和演练。

步骤,分2步,A. 事先配置Portable IP,   B,分别在2台机器上配置,并演练。

  • A 事先配置Portable IP

step

名称

描述

0

环境

eth0是private network, eth1 是public network

 

1

查看原来公网ip

cat /etc/sysconfig/network-scripts/ifcfg-eth1

 

 

 

2

查看portable ip和gateway

Network -->ip managerment-->VLANS

 

菜单 network, IP management, VLAN 可以看到 fcr01.tok01的VLAN名称

点击VLAN,显示详细信息,最下面subnet 部分,有type = primary, portable 的subnet, 点开

弹出 portal IP address pool, 注意有3个被系统预留(network, gateway,broadcast), 你只有一个可用IP。

此外 gateway portable IP就是你在GuestOS配置网卡设置的gateway

 

3

新建网络文件,增加一个portable ip

cp /etc/sysconfig/network-scripts/ifcfg-eth1  /etc/sysconfig/network-scripts/ifcfg-eth0-1

IPADDR=portable ip

GATEWAY=portable gateway

Portable ip=119.81.129.190

Portable gateway = 119.81.129.189

 

4

重启网络

service network restart

 

5

重启VM

shutdown -r now  // 这一步应该不用, 网卡重启,虚机可以不用重启 todo need verify

 

6

检查网络连通性

 

 ping public ip

 ping portable ip

 

7

检查应用端口

枚举应用各端口

 

8

检查业务流程能否跑通

 

 

  • B 切换Portable IP

step

名称

描述

0

环境

A/S 2台机器

A机

Public Portal IP = xxxx 用于切换

Public static IP = xxx.xx.xx.xx 不用修改

Private static IP = xx.xx.xx.xx 不用修改

 

B机

Public Portal IP = xxxx 用于切换

Public static IP = xxx.xx.xx.xx 不用修改

Private static IP = xx.xx.xx.xx 不用修改

 

 

 

1

切换

机器portable IP

先做A机,然后B机

 

Todo: 按照本项目实际配置的IP,修改下面操作步骤

A机

Cp /etc/sysconfig/network-scripts/ifcfg-eth1  /etc/sysconfig/network-scripts/ifcfg-eth0-1

IPADDR=portable ip

GATEWAY=portable gateway

Portable ip=119.81.129.190

Portable gateway = 119.81.129.189

 

 

重启网络            service network restart

重启VM              shutdown -r now  // 这一步应该不用, 网卡重启,虚机可以不用重启 (todo need verify)

检查网络连通性

ping public ip

ping portable ip

检查应用端口,枚举应用各端口

检查业务流程能否跑通

A机

Cp /etc/sysconfig/network-scripts/ifcfg-eth1  /etc/sysconfig/network-scripts/ifcfg-eth0-1

IPADDR=portable ip

GATEWAY=portable gateway

Portable ip=119.81.129.190

Portable gateway = 119.81.129.189

 

 

重启网络            service network restart

重启VM              shutdown -r now  // 这一步应该不用, 网卡重启,虚机可以不用重启 (todo need verify)

检查网络连通性

ping public ip

ping portable ip

检查应用端口,枚举应用各端口

检查业务流程能否跑通

B机

Public Portal IP = xxxx 用于切换

Public static IP = xxx.xx.xx.xx 不用修改

Private static IP = xx.xx.xx.xx 不用修改

 

 

 

2

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值