阿里云服务器怎么实现绑定多IP地址?

资讯 2024-07-16 阅读:42 评论:0
经常有客户咨询阿里云服务器怎么实现绑定多IP地址? 阿里云服务器多个弹性公网IP是否可以绑定到一台实例上?本文通过实操的方式为大家介绍,步骤相对较多阿里云控制台步骤有所简化,如果有什么不理解可以联系我们。Is it possible to...
美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

经常有客户咨询阿里云服务器怎么实现绑定多IP地址? 阿里云服务器多个弹性公网IP是否可以绑定到一台实例上?本文通过实操的方式为大家介绍,步骤相对较多阿里云控制台步骤有所简化,如果有什么不理解可以联系我们。

Is it possible to bind multiple flexi-net IPs to an example? By doing so, this paper describes the relatively large number of steps that have been simplified, and if there is a lack of understanding, we can be contacted.


配置前须知

pre-configuration

1、参考实例规格族绑定弹性网卡和内网IP的个数限制:https://help.aliyun.com/document_detail/25378.html

1. Number of limitations on elastic net cards and IPs for reference example specification groups:

阿里云服务器支持绑定的IP数(固定Ip和弹性公网IP之和):(弹性网卡-1)*单网卡私有IP+1

Aliyun servers support binding IPs (fixed Ip and elastic public network IP sum): (flexible net card-1)* private Internet card IP+1

以hfc7实例规格“2核4G”为例可绑定的IP数为:(2-1)*6+1=7个;

The number of IPs to be bound by the lfc7 example specification "2 Nuclear 4G " is: (2-1)* 6+1 = 7;

注意:云服务器封顶绑定IP数21个,因为弹性公网IP一个地域仅支持申请20个。

Note: Cloud server tops are tied to 21 IPs, as only 20 applications are supported in one geographic area of the Flexible Net IP.


2、配置弹性网卡:https://help.aliyun.com/document_detail/56955.html 

2. Configure flexi-net cards:  

3、分配辅助私网IP地址:https://help.aliyun.com/document_detail/101180.htm

3. Allocation of assistive IP addresses:

5、建议您服务器创建快照备份。操作流程请参见创建快照

5. It is recommended that your server create a snapshot backup. See .


CPU&内存:1核1 GiB

CPU & Memory: 1 N1 GIB

操作系统:CentOS 7.8 64位

Operating system: CentOS 7.8 64-bit

实例规格:ecs.s6-c1m1.small

Example Specifications: ecs.s6-c1m1.small

实例规格族:ecs.s6

Example family: ecs.s6


2、创建弹性网卡绑定阿里云服务器

2, create flexnet cards to bind the Aliun server


3、创建两个弹性公网ip绑定到,分别绑定到辅助网卡的主私网IP和辅助私网IP上。

3, to create two flexi-net ips to be tied to the backnet IP and backnet IP of the backnet card.

下图已经绑定完成


The following chart has been tied to

br/>br/>br/>

[root@iZ7u1o01onqjo4Z ~]# ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

    inet 127.0.0.1/8 scope host lo

       valid_lft forever preferred_lft forever

    inet6 ::1/128 scope host 

       valid_lft forever preferred_lft forever

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

    link/ether 00:16:3e:02:3b:0b brd ff:ff:ff:ff:ff:ff

    inet 172.19.6.126/24 brd 172.19.6.255 scope global dynamic eth0

       valid_lft 315359681sec preferred_lft 315359681sec

    inet6 fe80::216:3eff:fe02:3b0b/64 scope link 

       valid_lft forever preferred_lft forever

3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000

    link/ether 00:16:3e:26:67:2e brd ff:ff:ff:ff:ff:ff


[root@iZ7u1o01onqjo4Z ~]# wget https://image-offline.oss-cn-hangzhou.aliyuncs.com/multi-nic-util/multi-nic-util-0.6.tgz

--2021-06-16 20:30:44--  https://image-offline.oss-cn-hangzhou.aliyuncs.com/multi-nic-util/multi-nic-util-0.6.tgz

正在解析主机 image-offline.oss-cn-hangzhou.aliyuncs.com (image-offline.oss-cn-hangzhou.aliyuncs.com)... 118.31.232.173

Resolving host Image-offline.oss-cn-hangzhou.aliyuncs.com (image-offline.oss-cn-hangzhou.aliyuncs.com) 118.31.232.173

正在连接 image-offline.oss-cn-hangzhou.aliyuncs.com (image-offline.oss-cn-hangzhou.aliyuncs.com)|118.31.232.173|:443... 已连接。

Connecting Image-offline.oss-cn-hangzhou.aliyuncs.com (image-offline.oss-cn-hangzhou.aliyuncs.com) 118.31.232.173:443 is connected.

已发出 HTTP 请求,正在等待回应... 200 OK

HTTP request sent, awaiting response... 200 OK

长度:9149 (8.9K) [application/x-gzip]

Length: 9149 (8.9K) [application/x-gzip]

正在保存至: “multi-nic-util-0.6.tgz”

Saved to: "multi-nic-util-0.6.tgz"

100%[======================================>] 9,149       --.-K/s 用时 0s      

100% [= = = = = = = = = = = = = = = = = = = = = = = = >] 9,149        & nbsp; --.-K/s uses 0s  & nbsp; & nbsp;

2021-06-16 20:30:44 (52.0 MB/s) - 已保存 “multi-nic-util-0.6.tgz” [9149/9149])

2021-06-16 2030:44 (52.0 MB/s) - saved "multi-nic-util-0.6.tgz" [9149/9149])


[root@iZ7u1o01onqjo4Z ~]# tar -zxvf multi-nic-util-0.6.tgz

multi-nic-util-0.6/

multi-nic-util-0.6/install.sh

multi-nic-util-0.6/src/

multi-nic-util-0.6/src/dhcp/

multi-nic-util-0.6/src/dhcp/dhclient-exit-hooks

multi-nic-util-0.6/src/dhcp/dhclient-exit-hooks-for-debug

multi-nic-util-0.6/src/dhcp/dhclient-down-hooks

multi-nic-util-0.6/src/udev/

multi-nic-util-0.6/src/udev/rule_generator.functions

multi-nic-util-0.6/src/udev/write_net_rules

multi-nic-util-0.6/src/udev-rules/

multi-nic-util-0.6/src/udev-rules/61-eni.rules

multi-nic-util-0.6/src/udev-rules/75-persistent-net-generator.rules

multi-nic-util-0.6/src/udev-rules/60-net.rules

multi-nic-util-0.6/src/eni-utils/

multi-nic-util-0.6/src/eni-utils/eni-hotplug

multi-nic-util-0.6/src/eni-utils/eni-function

multi-nic-util-0.6/src/eni-utils/net.hotplug

multi-nic-util-0.6/src/eni-utils/eni-cleanup

multi-nic-util-0.6/src/eni-utils/eni-ifscan

multi-nic-util-0.6/src/eni-utils/eni-version

multi-nic-util-0.6/src/eni-utils/eni-helper

multi-nic-util-0.6/src/boot/

multi-nic-util-0.6/src/boot/eni.service

multi-nic-util-0.6/src/boot/systemd-udevd.service

multi-nic-util-0.6/src/boot/eni-service

multi-nic-util-0.6/src/lib/

multi-nic-util-0.6/src/lib/distro.sh

[root@iZ7u1o01onqjo4Z ~]# cd multi-nic-util-0.6

[root@iZ7u1o01onqjo4Z multi-nic-util-0.6]# bash install.sh

the file /lib/udev/write_net_rules NOT exist...

the file /lib/udev/rule_generator.functions NOT exist...

delete the file: /etc/udev/rules.d/70-persistent-net.rules

replace the file: /lib/udev/rules.d/60-net.rules

Created symlink from /etc/systemd/system/multi-user.target.wants/eni.service to /usr/lib/systemd/system/eni.service.

ecs_mq.service                                enabled 


[root@iZ7u1o01onqjo4Z multi-nic-util-0.6]# systemctl restart eni.service


[root@iZ7u1o01onqjo4Z multi-nic-util-0.6]# ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

    inet 127.0.0.1/8 scope host lo

       valid_lft forever preferred_lft forever

    inet6 ::1/128 scope host 

       valid_lft forever preferred_lft forever

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

    link/ether 00:16:3e:02:3b:0b brd ff:ff:ff:ff:ff:ff

    inet 172.19.6.126/24 brd 172.19.6.255 scope global dynamic eth0

       valid_lft 315359623sec preferred_lft 315359623sec

    inet6 fe80::216:3eff:fe02:3b0b/64 scope link 

       valid_lft forever preferred_lft forever

3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

    link/ether 00:16:3e:26:67:2e brd ff:ff:ff:ff:ff:ff

    inet6 fe80::216:3eff:fe26:672e/64 scope link tentative 

       valid_lft forever preferred_lft forever


[root@iZ7u1o01onqjo4Z multi-nic-util-0.6]# cat /etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE=eth1

BOOTPROTO=dhcp

ONBOOT=yes

TYPE=Ethernet

USERCTL=yes

PEERDNS=no

IPV6INIT=no

PERSISTENT_DHCLIENT=yes

HWADDR=00:16:3e:26:67:2e

DEFROUTE=no

[root@iZ7u1o01onqjo4Z multi-nic-util-0.6]# 

[root@iZ7u1o01onqjo4Z multi-nic-util-0.6]# vi /etc/sysconfig/network-scripts/ifcfg-eth1

[root@iZ7u1o01onqjo4Z multi-nic-util-0.6]# 

[root@iZ7u1o01onqjo4Z multi-nic-util-0.6]# cat /etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE=eth1

BOOTPROTO=no

ONBOOT=yes

TYPE=Ethernet

USERCTL=yes

PEERDNS=no

IPV6INIT=no

PERSISTENT_DHCLIENT=yes

HWADDR=00:16:3e:26:67:2e

IPADDR0=172.19.6.127

IPADDR1=172.19.6.129

DEFROUTE=no

[root@iZ7u1o01onqjo4Z multi-nic-util-0.6]# 

[root@iZ7u1o01onqjo4Z multi-nic-util-0.6]# service network restart

Restarting network (via systemctl):                        [  OK  ]

[root@iZ7u1o01onqjo4Z multi-nic-util-0.6]# 

[root@iZ7u1o01onqjo4Z multi-nic-util-0.6]# 

[root@iZ7u1o01onqjo4Z multi-nic-util-0.6]# ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

    inet 127.0.0.1/8 scope host lo

       valid_lft forever preferred_lft forever

    inet6 ::1/128 scope host 

       valid_lft forever preferred_lft forever

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

    link/ether 00:16:3e:02:3b:0b brd ff:ff:ff:ff:ff:ff

    inet 172.19.6.126/24 brd 172.19.6.255 scope global dynamic eth0

       valid_lft 315359953sec preferred_lft 315359953sec

    inet6 fe80::216:3eff:fe02:3b0b/64 scope link 

       valid_lft forever preferred_lft forever

3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

    link/ether 00:16:3e:26:67:2e brd ff:ff:ff:ff:ff:ff

    inet 172.19.6.127/16 brd 172.19.255.255 scope global eth1

       valid_lft forever preferred_lft forever

    inet 172.19.6.129/16 brd 172.19.255.255 scope global secondary eth1

       valid_lft forever preferred_lft forever

    inet6 fe80::216:3eff:fe26:672e/64 scope link 

       valid_lft forever preferred_lft forever


分别访问三个公网IP地址,均可以正常访问了,说明配置没问题。

Each of the three IP addresses on the Internet is regularly visited, indicating that the configuration is not a problem.


美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址
文字格式和图片示例

注册有任何问题请添加 微信:MVIP619 拉你进入群

弹窗与图片大小一致 文章转载注明

分享:

扫一扫在手机阅读、分享本文

发表评论
平台列表
美化布局示例

欧易(OKX)

  全球官网 大陆官网

币安(Binance)

  官网

火币(HTX)

  官网

Gate.io

  官网

Bitget

  官网

deepcoin

  官网
热门文章
  • 0.00015693个比特币等于多少人民币/美金

    0.00015693个比特币等于多少人民币/美金
    0.000 15693比特币等于多少人民币?根据比特币对人民币的最新汇率,0.000 15693比特币等于10.6 1678529美元/76.86554996人民币。比特币(BTC)【比特币价格翻倍】美元(USDT)人民币(CNY)0.000/克洛克-0/5693【数字货币矿机】10.6 167852976.8655254996比特币对人民币的最新汇率为:489,807.72 CNY(1比特币= 489,807.72人民币)(1美元=7.24人民币)(0.00015693 U...
  • 0.00003374个比特币等于多少人民币/美金

    0.00003374个比特币等于多少人民币/美金
    0.00003374比特币等于多少人民币?根据比特币对人民币的最新汇率,0.00003374比特币等于2.2826 1222美元/16.5261124728人民币。比特币(BTC)美元(USDT)人民币(CNY)0.00003374克洛克-0/22216.5261124728比特币对人民币的最新汇率为:489807.72 CNY(1比特币=489807.72人民币)(1美元=7.24人民币)(0.00003374USDT=0.0002442776 CNY)。汇率更新于2024...
  • 2000年美国GDP占世界的304%,中国GDP仅占35%,现在呢?

    2000年美国GDP占世界的304%,中国GDP仅占35%,现在呢?
    GDP作为全球公认的实力基准,就像是一个大国实力的代言人,它是布雷顿森林体系下全球团结的声音。它不仅仅是数字的累积,更是大国综合实力的人格化,默默诉说着每个国家的辉煌与荣耀。虽然GDP不是衡量一个国家综合实力的唯一标准,但无疑是最关键的指标之一。作为一面镜子,它反映了国家的经济实力和发展水平,是国家综合实力的重要体现,不容忽视。2000年,中国GDP迈过/克洛克-0/万亿美元的重要门槛,达到/克洛克-0/。2/克洛克-0/万亿美元(折合人民币7。7万亿元)。然而,在全球经济的...
  • A股利好!证监会连开三场座谈会!五部门发文 事关元宇宙…周末影响一周市场的十大消息(新股+点评)

    A股利好!证监会连开三场座谈会!五部门发文 事关元宇宙…周末影响一周市场的十大消息(新股+点评)
    1   证监会连开三场座谈会!将研究出台更多务实、管用的政策举措 The SEC will hold three talks! More practical and practical policy initiatives will be developed.   近日,中国证监会就活跃资本市场、提振投资者信心召开三场座谈会,分别听取专家学者和投资者意...
  • 1929经济大萧条或许即将重演?

    1929经济大萧条或许即将重演?
    人类似乎陷入了一个历史悖论,即我们总是重复同样的错误,无法真正从过去的错误中吸取教训。近年来,我们对世界各地接连不断的挑战和危机深感不安。20 19年突如其来的疫情,乌克兰的战火硝烟,欧洲的天然气供应危机以及全球少数国家的饥荒,所有这些问题都像洪水一样,一个接一个地涌来。如果你今天感到心情沉重,不要失去希望,因为明天可能会带来更严峻的挑战。首先,让我们深入讨论名为1929大萧条的时期。这场大萧条实际上是指从1929到1933的一场影响深远的经济危机。这场危机首先起源于美国,然...
标签列表