长表
我正在管理一个带有两个ISP链路的OpenBSD和到远程路由节点的VPN隧道.
最初我们使用了多个具有不同指标的默认路由 – 通过静态IP地址的首选路由NAT路由器,而NAT路由器又具有动态分配的地址(它基本上是电缆调制解调器).
在实践中,这不是理想的,但它运作良好.从网关建立的新连接(以下简称为“gw”)将选择更高速度,更低延迟的路由(如果它已启动);如果链路断开,请通过电缆调制解调器出去.入站连接只能通过更好的路由,因为其他IP地址在NAT后面(不能从外部路由).
现在,我们需要通过“在云端”中的其他代理/ VPN路由器节点路由流量,以降低我们的静态IP地址上的DDoS风险.
那些通过隧道连接到网关.
第一.然后我们发现我们的管理员访问会偶尔掉线.
更复杂的是,此网关具有到特定VLAN的附加活动接口.他们与这个问题无关,但不能被打扰.
可能的方案
我的印象是我们应该使用基于策略的路由,rdomains.我想这意味着我为我的三个相关接口中的每一个创建路由表,并且任何这些接口上的任何连接(包括tun0隧道接口)都应该通过表格路由到该域(因此每个域都可以有自己的默认路由).
我是在正确的轨道上吗?
如果是界面设置,这是一个图表和一个清理列表:
________ | tunnel | _______ ~~~+~~~~ | GW |======++ | ~+~+~+~ || | _________ | | | || +-----| prefISP |-------------+ | | __||____ ......... ~~~~~~~w~ | +-----| Switch |-----( Cluster ) | ~~~~~~~~ ^^^^^^^^^ _________ .....|...... || | fallISP |---------( LAN / WiFi )===++ ~~~~~~~~~ ^^^^^^^^^^^^ Diagram: I want to avoid asymmetric routing when accessing GW through the tunnel, through the preferred ISP, and when accessing GW or the cluster (through the GW or from the LAN). Sanitized interface info: em3: inet 123.45.67.118 netmask 0xfffffff8 broadcast 123.45.67.119 description: prefISP em0: inet 10.1.1.100 netmask 0xffffff00 broadcast 10.1.1.255 description: fallISP tun0: inet 192.168.2.2 --> 192.168.2.1 netmask 0xffffff00 description: tunnel em1: VLAN_TRUNK vlan1000: inet 172.29.1.1 netmask 0xffffff00 broadcast
如上所述:em3是我们与首选(更快)ISP的链接; tun0经历了它; em0与办公室LAN / Wifi位于同一网段,并作为我们的后备ISP;并且GW具有到群集和交换机的附加链接.
欢迎来到负载均衡的梦想.这是可行的,但您最好的路由和无痛模式是使用BGP路由协议并使用策略管理下游和上游流量.
为了成功,您必须与两个ISP协商,它们将您包含为内部iBGP节点,以便您可以将路径路径推送到Internet.
正确的方法是请求您自己的自治系统编号.并管理您拥有的所有IP.由于要求,这有点复杂.
http://teamarin.net/2014/01/31/how-to-request-an-asn-from-arin/
If you are qualifying under the multihomed policy you will need to
provide the exterior gateway protocol to be used, the IP addresses currently in use on your network, the AS number and name of each of your upstream providers and/or peers along with contractual verification of service with at least two of them.If you are qualifying under the unique routing policy, you must
demonstrate the AS’s routing policy will differ from the routing policies of its border peers.No matter which policy you qualify under, if this is not your first
time requesting an ASN, you will also need to show us how the network you are requesting an ASN for is autonomous from all existing ASes in your network as well.
这是一篇关于使用BGP的多宿主的一篇很好的论文:http://aspath.net/BGP-MHing-HOWTO-whitepaper.pdf
如果您不愿意,无法与ISP建立BGP会话,那么另一种解决方案是购买基于硬件的负载均衡器. (从技术上讲,大多数硬件运行一些经过修改的BSD来实现产品功能.所以如果你有这方面的知识,可以在运行BSD的服务器上进行设置.但是你永远不会得到带有专用硬件的硬件设备的trhoguput用于网络处理,但如果你的负载不大(我会说超过50 Mbps),你可以这样做)
精彩评论