浮动IP地址(Float IP)与 ARP欺骗技术
浮动IP地址:
一个网卡是可以添加多个IP的。
就是多个主机工作在 同一个集群中,即两台主机以上。每台机器除了自己的实IP外,会设置一个浮动IP,浮动IP与主机的服务(HTTP服务/邮箱服务)绑在一起的。即应用服务在哪台机器上启动,浮动IP也在这台机器上激活,这台机器看上去就有两个IP地址。对于客户端它只需访问浮动IP即可。
即使主机端的机器由于故障发生切换,客户端只要连接上浮动IP,就可以找到主机端的服务。
好处就是一旦其中一台机器不能工作了,可以很快的将服务切换到另外一台主机上。提高系统的冗余性。
当业务比较繁忙时候,可以通过float IP在主机之间实现负载均衡。
实际实现可能会用到ARP欺骗技术来解决MAC地址的问题。
--------------------------------------------------
在做双机的时候,设定的一个IP,通过访问这个IP,具体到后台哪台机器,由系统指定。浮动IP是随资源一起走的。
其实就是由软件根据具体情况把该IP设置在某一台机器上,对外提供服务为了避免因为一台机器宕机而导致不能对外提供服务,致使业务中断,使用两台机器进行提供服务,但是用户怎么知道自己使用哪个IP进行连接呢?使用其中的一个,如果这个宕机了,就仍然会中断服务。于是就使用一个ha软件,其根据主机情况,指定一个IP在两台主机中的任何一个,如果一台主机宕掉了,就把这个IP自动切换到另外一台机器上,这样用户仍然只需要使用这个IP,任何一台主机挂掉了,都不会导致服务中断.说白了,就是这个IP可以根据具体情况,自动的在不同的N台机器间进行设置。
浮动IP,顾名思义就是飘渺不定的IP,这个IP地址可以漂浮在任一一台主机上,但是IP地址本身数字不会发生变化!一般的集群软件都会使用浮动IP对外服务,对用户也是透明的。
---------------------
作者:雁城布衣
来源:CSDN
原文:https://blog.csdn.net/xtank_nie/article/details/47000537
版权声明:本文为博主原创文章,转载请附上博文链接!
=============================
源地址:https://www.1and1.com/digitalguide/server/know-how/what-is-a-floating-ip/
What is a floating IP?
什么是浮动IP
The internet – plainly put – consists of many computers connected by cables, fiber optic cables, and wireless receivers. They exchange data based on a common ‘language'. This common standard is known as the Internet Protocol (IP). Data is arranged in such a way that computers, which understand the common protocol, can interpret it.
因特网简单来说说是许多计算机由电缆、光纤、无线接收器连接组成的网络。网络中设备间数据交互是通过IP协议进行,数据以IP封装其他计算根据协议才能解析数据。
An IP address, also referred to as an 'IP', makes digital devices detectable in a network. It is a crucial prerequisite so that electronic data packets can be delivered reliably. The devices communicate with one another, for example, over the internet. The IP address ensures that data from the sender reaches the correct recipient – for example, from a web browser to a web server or vice versa. An IP address can be assigned to both single and multiple devices at the same time. Likewise, a single device can have multiple IP addresses at the same time.
IP地址简称IP,数字设备以此作为身份标识,才能被其他设备发现和识别。IP地址是设备间交互数据的先决条件。IP地址保证数据的发送者发出的数据能正确到相应的接收者,反之也是如此。一个IP地址可分配多个设备,一个设备也可拥有多个IP。
However, in order to be able to understand exactly what a floating IP is, you first need to know the difference between dynamic and static IP addresses.
为了更好的弄明白什么是浮动IP,首先需要搞明静态IP和动态IP之间的区别。
Contents
1. Dynamic IP
2. Static IP
3. Floating IP – definition
4. How is a floating IP generated?
5. When are floating IPs used?
6. Failover and switchover
7. What advantages does a floating IP offer?
Dynamic IP
动态IP
When a computer connects to the internet, in most cases the Internet Service Provider (ISP) assigns a dynamic IP address to it. Dynamic IP addresses are the most cost-effective standard for users and providers. They are characterized by the fact that they are only assigned temporarily and change after a certain time, which is either fixed (e.g. for 24 hours), or is irregular. The user then receives a new dynamic IP address for their computer from the respective internet service provider and the previous address will then be signed to a different user.
当一个计算机接入到互联网,网络服务接入商会分配一个动态IP给这台计算机。动态IP对用户和接入商来说都是最经济的。动态IP是不固定的,过一段时间会变。过一段时间用户的电脑会收到一个新的IP地址,原来的IP地址有可以已经分配给了别的电脑。
Static IP
静态IP
A static IP, on the other hand, is a fixed address and is permanently assigned to a device. Static IP addresses are found mainly in the web server or e-mail server area, or wherever offers or website content must be accessible via a fixed URL , so that users or processes can (re)find them without any problems. Computers in a network or peripheral devices (such as printers) have fixed IPs, so that the individual devices within the network can easily communicate with one another.
从一个方面来说,静态IP是 一个固定的IP地址,被永久的分配给一个设备。静态IP多用于Web服务器或者电子邮件服务器或者一个网站。这些网站通过一个固定的URL进行访问,用户可以通过URL找到IP地址。在一个网络中的计算机或者外围设备都有固定的IP,这样设备间才能很容易的交互数据。
So that users don’t have to remember complex numbers, it’s possible to assign a domain name to a static IP address e.g. www.example.org. The numerical IP, the 'connection number' of a device in the network, is therefore translated into a name that can easily be remembered. This is generally only reserved for static IPs. It doesn’t make much sense for dynamic IPs since the user changes so frequently.
给一个静态IP分配域名后,用户就不需要记住复杂的IP地址。使用域名IP地址被转成了容易记忆的名字。域名一般只用于静态IP,因动态IP频繁变动使用域名意义不大。
Floating IP – definition
浮动IP
A floating IP is usually a public, routable IP address that is not automatically assigned to an entity. Instead, a project owner assigns them to one or more entities temporarily. The respective entity has an automatically assigned, static IP for communication between instances in a private, non-routable network area, as well as via a manually assigned floating IP. This makes the entity’s services outside a cloud or network recognizable and therefore achievable.
一个浮动IP通常是一个公开的、可以路由到的IP地址,并且不会自动分配给实体设备。项目管理者临时分配动态IP到一个或者多个实体设备。这个实体设备有自动分配的静态IP用于内部网间设备的通讯。这个内部网使用私有地址,这些私有地址不能被路由到。通过浮动IP内网实体的服务才能被外网识别和访问。
In appropriately configured failover scenarios, an IP 'floats' to another active unit in the network so that it can take on the function of a dormant entity without a time delay, and can then answer incoming requests.
在一个配置好浮点IP的切换场景是,IP地址飘到网络中的另一台设备。新设备无延迟的接替当掉的设备,并对外提供服务。
How is a floating IP generated?
浮点IP是如何产生的?
Users obtain floating IPs for their projects from different pools that the system administrator configures and provides as server resources. As soon as a user receives a floating IP, they become the 'owner'. They can assign it to an entity, remove it, and then assign it to another at any time. Even if an entity is terminated, the user does not 'lose' the associated floating IP. It remains as a resource and can still be assigned to another entity when needed.
用户从系统管理员配置的资源池中为他们的项目获取IP地址。一旦用户获取一个浮动IP,就拥有了这个IP。他可以分配这个IP到一个计算实体,或者在任一时间移除分配给其他设备。就算设备关机,用户还拥有他属于他的浮动IP。浮动IP就像一种资源,当需要时可以分配给其他设备。
A major reason for using several parallel floating IP pools is that each pool can be operated by another internet service provider or can also be assigned by other external networks. This ensures that the connectivity or availability is maintainable even if an internet service provider should fail due to a malfunction.
使用多个平行的浮动IP主要是为了防止当其中的一个不可能用时使用其他地址以保证服务的正常可用。
When are floating IPs used?
什么时候会用浮动IP
Maximum availability is one of the key factors in every production environment. In the communication network, however, a single error can cause applications to fail. Developers do sleep better knowing that their applications are designed to withstand any conceivable error scenarios. The goal is to provide a highly available piece of infrastructure with minimal downtime.
最大的可用性是浮动IP在生产环境中使用的一个关键因素。在网络中,单个错误可能会导致应用的不可用。如果系统能成功应对任何可以想到的应用场景,开发人员就可以安枕无忧。浮动IP的目标就最小当机下提供高可用的基础设施。
A floating IP can serve as a flexible load balancing address, helping to balance peak loads by distributing incoming network traffic to different network nodes. Network nodes are devices which connect two (or more) transmission paths of a telecommunication network. As with a computer that distributes workflows across multiple processors, load balancing also handles large amounts of simultaneous requests or more complex calculations by splitting the load across multiple parallel systems.
浮动IP可以用于灵活的负载均衡地址,用于高峰时的负载均衡,分流访问流量到不同的网络节点。网络节点是连接到两个或者多个通讯网络。就像一台电脑分配工作流到不同的处理器,负载均衡大量并发的请求或者复杂的计算分配到并行系统中。
Failover and switchover
故障恢复和地址切换
If a primary load balancer or a central application server in a cluster fails on one side, a floating IP can be immediately assigned a redundant application server or a secondary load balancer in a correspondingly configured system. The IP 'floats' to the active unit, which immediately carries out the desired processes. An unplanned change between network services is referred to as 'failover'. This kind of protection is especially recommended for critical applications.
如果一个主要的负载均衡器或者集群中一个主要的业务服务器当掉,浮动IP立即被分配到冗余的应用器或者备用的负载均衡器,这些都需要提前配置好。当浮动IP飘到一个活动单元,活动单元立即承担相应的业务。故障恢复指的是非计划的网络服务切换。这种特别的保护推荐用于关键应用。
A planned change from a primary to a secondary system is referred to as a 'switchover'. The targeted transmission of services is not triggered by errors, but is usually controlled by a system administrator. A classic reason for a switchover is, for example, routine maintenance of the primary or secondary systems where a parallel instance temporarily takes over its function.
一个有计划的从主切换到从,通常被称为切换。切换不是由故障或者错误引起,而是系统管理员操作完成。切换的典型应用场景时,当对一个系统时行例常的维护时,由另一服务接替他的功能。
What advantages does a floating IP offer?
浮动IP优点
One of the main advantages of floating IPs is their flexibility – the free and needs-oriented assignability. Floating IPs are therefore suitable for use in both failover and switchover environments – for example, for performing upgrades of applications or entire sites with minimal downtime. While an upgrade is applied to one entity, another one takes on the traffic. Once the upgrade has been successfully completed, the traffic is redirected to the updated unit.
浮动IP的主要优点是灵活,自由的根据需要分配。浮动IP即适用于故障恢复又适用于服务切换。比如对某个应用或者整个站点的升级,并能保证对业务有最小的影响。当对一个应用升级时,另一个应用分配输入流量。一旦升级完成,流量会被重新导入到升级节点。
Another advantage: even if several or even many different entities are concealed behind a service being offered, the floating IP appears on the surface to users (who make use of the service) rather than the server’s IP that offers the respective service.
另一个优点是:浮动IP对外提供统一的IP,而不是实际对外提供服务的IP地址。
=============================
ARP欺骗(英语:ARP spoofing)
又称ARP毒化(ARP poisoning,网上上多译为ARP病毒)或ARP攻击,是针对以太网地址解析协议(ARP)的一种攻击技术。此种攻击可让攻击者获取局域网上的数据包甚至可篡改数据包,且可让网上上特定计算机或所有计算机无法正常连线。最早探讨ARP欺骗的文章是由Yuri Volobuev所写的《ARP与ICMP转向游戏》(ARP and ICMP redirection games)。
原理:
- 攻击者聆听局域网上的MAC地址。它只要收到两台主机洪泛的ARP Request,就可以进行欺骗活动。
- 主机A、B都洪泛了ARP Request.攻击者现在有了两台主机的IP、MAC地址,开始攻击。
- 攻击者发送一个ARP Reply给主机B,把此包protocol header里的sender IP设为A的IP地址,sender mac设为攻击者自己的MAC地址。
- 主机B收到ARP Reply后,更新它的ARP表,把主机A的MAC地址(IP_A, MAC_A)改为(IP_A, MAC_C)。
- 当主机B要发送数据包给主机A时,它根据ARP表来封装数据包的Link报头,把目的MAC地址设为MAC_C,而非MAC_A。
- 当交换机收到B发送给A的数据包时,根据此包的目的MAC地址(MAC_C)而把数据包转发给攻击者C。
- 攻击者收到数据包后,可以把它存起来后再发送给A,达到偷听效果。攻击者也可以篡改数据后才发送数据包给A,造成伤害。
防制方法
正当用途
浮动IP地址(Float IP)与 ARP欺骗技术的更多相关文章
- 获取IP地址 & 伪装IP地址发送请求
//获取请求客户端IP地址 public final static String getIpAddress(HttpServletRequest request) throws IOExcepti ...
- Windows:查看IP地址,IP地址对应的机器名,占用的端口,以及占用该端口的应用程
Windows 服务器系列: Windows:查看IP地址,IP地址对应的机器名,占用的端口,以及占用该端口的应用程 Windows:使用Dos命令管理服务(Services) Windows:任务调 ...
- arp欺骗技术
ARP欺骗技术-获取内网目标IP访问图片! 简介: ARP(Address Resolution Protocol,地址解析协议)是一个位于TCP/IP协议栈中的网络层,负责将某个IP地址解析 ...
- 浮动IP(FLOAT IP)
主要谈一谈关于浮动IP的东西,介绍下浮动IP是什么 1.为什么要有浮动IP这个东西 现在有一个场景,在一台Linux上部署一个web应用,应用跑在tomcat里面,linux网卡上的ip是 ...
- 根据IP地址获取IP的详细信息
<?php header('Content-Type:text/html; charset=utf-8'); function ip_data() { $ip = GetIP(); $url = ...
- linux修改主机名,关闭图形化界面,绑定ip地址,修改ip地址
1关闭图形化界面 vi /etc/inittab 改成id:3:initdefault: 注意:不要选0或6 2.修改主机名 vi /etc/sysconfig/network 修改即可 3,修改ip ...
- 获取ip地址&&测试ip地址
# request# 动态页面加载 Selenium# request# 响应类型为 json# import json # json.loads(str) # 将str转化为dict# json.d ...
- TC命令流量控制测试(针对具体IP地址和IP协议)
这里测试系统为Linux操作系统,通过简单的TC命令来实现对带宽的控制. 1对具体IP地址的流量控制 这里采用iperf来进行带宽的测试,首先在服务器和客户端都安装上iperf软件,通过该软件下的命令 ...
- IP地址分类/IP地址10开头和172开头和192开头的区别/判断是否同一网段(A、B、C三类地址)【转】
简单来说在公司或企业内部看到的就基本都是内网IP,ABC三类IP地址里的常见IP段. 每个IP地址都包含两部分,即网络号和主机号. InterNIC将IP地址分为五类:A类保留给ZF或大型企业,B类分 ...
随机推荐
- jenkins使用--安装文档
添加Jenkins的源(repository): #sudo wget -O /etc/yum.repos.d/jenkins.repo http://jenkins-ci.org/redhat/je ...
- Spring实现多数据源配置
一.前言 对于小型项目,服务器与数据库是可以在同一台机子上的,但随着业务的庞大与负责,数据库和服务器就会分离开来.同时随着数据量的增大,数据库也要分开部署到多台机子上. 二.Spring配置文件修改 ...
- noscript 标签介绍
noscript 标签介绍 一.总结 一句话总结: noscript 标签在不支持JavaScript 的浏览器中显示替代的内容. 1.noscript标签使用实例? html标签直接放在noscri ...
- Unity2D游戏开发之保卫萝卜
保卫萝卜是2D塔防游戏里边的一个经典案例,这次去开发这个游戏,我们会尽力去实现和原版一样的功能,做好我们可以处理好的每一个游戏细节(比如塔攻击的集火目标优先攻击,与自动搜索,格子的三种处理逻辑,UI的 ...
- java ali支付服务端对接
引入SDK: <!-- https://mvnrepository.com/artifact/com.aliyun/aliyun-java-sdk-core --><dependen ...
- FreeSWITCH视频直播
大家都知道,如今,视频直播比较火啊. 今天,在FreeSWITCH精英群里分享了FreeSWITCH做视频直播相关的技术. 首先,要做直播就得有好机器.笔者买了一台阿里云的主机,买的是按量付费的,4核 ...
- 【视频开发】opencv不能读取MP4格式文件
用OpenCV对视频进行处理时,不能打开.mp4格式的文件.后来解决办法是用ffmpeg.exe将mp4文件转码为avi文件,然后再进行处理.但是转码过程比较慢.后来查看opencv源代码,发现它也是 ...
- 【Python】解决使用pyinstaller打包Tkinker程序报错问题
问题描述 使用pyinstaller打包使用Tkinter编写的控制台程序,出现报错 15793 INFO: Adding Microsoft.Windows.Common-Controls to d ...
- JVM中的逃逸分析
逃逸分析(Escape Analysis)是目前Java虚拟机中比较前沿的优化技术. 逃逸分析的基本行为就是分析对象动态作用域:当一个对象在方法中被定义后,它可能被外部方法所引用,例如作为调用参数传递 ...
- 18 SpringMVC 文件上传和异常处理
1.文件上传的必要前提 (1)form 表单的 enctype 取值必须是:multipart/form-data(默认值是:application/x-www-form-urlencoded) en ...