简体   繁体   English

同一 ISP 接口上的多个公共 IP

[英]Multiple public IPs on same ISP interface

I'm looking to build a 4 public IPs NAT.我正在寻找构建一个 4 个公共 IP NAT。 I've been told that MikroTik routers are capabile of assigning public IPs for each LAN port you configure.我听说 MikroTik 路由器能够为您配置的每个 LAN 端口分配公共 IP。

My ISP provides 2 static IPs but I need two more.我的 ISP 提供了 2 个 static IP,但我还需要两个。 I would buy any MikroTik router that is able to make that happen through VIP...我会购买任何能够通过 VIP 实现这一目标的 MikroTik 路由器……

Any recommendation for an affordable model?有没有买得起的 model 推荐?

If your ISP provides only 2 IPs, you cannot pull 2 more just because of some "magic router".如果您的 ISP 仅提供 2 个 IP,则您不能仅仅因为某些“魔术路由器”而再拉 2 个。 All MikroTik routers have the same functionality, so any model you like will do what you configure on it.所有 MikroTik 路由器都具有相同的功能,因此您喜欢的任何 model 都会执行您在其上配置的操作。

There are no "LAN ports" in them, every port can be LAN, WAN or whatever you call it - functionality depends on configuration.其中没有“LAN 端口”,每个端口都可以是 LAN、WAN 或任何您称之为的端口 - 功能取决于配置。

There can be any number of statically configured IPs on any interface of the router if your ISP provides them.如果您的 ISP 提供,则路由器的任何接口上都可以有任意数量的静态配置 IP。

Example eth1 IP Address: 10.201.0.2/28, ~ gateway: 10.201.0.1示例 eth1 IP 地址:10.201.0.2/28,~网关:10.201.0.1

eth2 IP address: 10.200.0.112/24, ~ gateway: 10.200.0.1 eth2 IP 地址:10.200.0.112/24,~网关:10.200.0.1

eth3 IP Address: 192.168.51.1/24 //gateway Client ISP 1 eth3 IP 地址:192.168.51.1/24 //网关客户端ISP 1

eth4 IP Address: 192.168.52.1/24 //gateway Client ISP 2 eth4 IP 地址:192.168.52.1/24 //网关客户端ISP 2

/ip firewall nat /ip 防火墙 nat

add chain=srcnat action=masquerade src-address=192.168.51.0/24添加 chain=srcnat action=masquerade src-address=192.168.51.0/24

add chain=srcnat action=masquerade src-address=192.168.52.0/24添加 chain=srcnat action=masquerade src-address=192.168.52.0/24

/ip firewall mangle /ip 防火墙破坏

add chain=prerouting action=mark-routing new-routing-mark=isp1 passthrough=no src-address=192.168.51.0/24 in-interface=eth3添加 chain=prerouting action=mark-routing new-routing-mark=isp1 passthrough=no src-address=192.168.51.0/24 in-interface=eth3

add chain=prerouting action=mark-routing new-routing-mark=isp2 passthrough=no src-address=192.168.52.0/24 in-interface=eth4添加 chain=prerouting action=mark-routing new-routing-mark=isp2 passthrough=no src-address=192.168.52.0/24 in-interface=eth4

/ip route rule /ip 路由规则

add dst-address=10.200.0.0/28 action=lookup table=main添加 dst-address=10.200.0.0/28 action=lookup table=main

add dst-address=10.201.0.0/28 action=lookup table=main添加 dst-address=10.201.0.0/28 action=lookup table=main

add dst-address=192.168.51.0/24 action=lookup table=main添加 dst-address=192.168.51.0/24 action=lookup table=main

add dst-address=192.168.52.0/24 action=lookup table=main添加 dst-address=192.168.52.0/24 action=lookup table=main

add src-address=10.201.0.0/28 action=lookup table=isp1添加 src-address=10.201.0.0/28 action=lookup table=isp1

add src-address=10.200.0.0/28 action=lookup table=isp2添加 src-address=10.200.0.0/28 action=lookup table=isp2

add routing-mark=isp1 action=lookup table=isp1添加路由标记=isp1 操作=查找表=isp1

add routing-mark=isp2 action=lookup table=isp2添加路由标记=isp2 操作=查找表=isp2

/ip route /ip 路由

add gateway=10.201.0.1 check-gateway=ping distance=1 scope=30 target-scope=10 routing-mark=isp1添加网关=10.201.0.1 检查网关=ping 距离=1 范围=30 目标范围=10 路由标记=isp1

add gateway=10.200.0.1 check-gateway=ping distance=1 scope=30 target-scope=10 routing-mark=isp1添加网关=10.200.0.1 检查网关=ping 距离=1 范围=30 目标范围=10 路由标记=isp1

add gateway=10.201.0.1 check-gateway=ping distance=1 scope=30 target-scope=10 routing-mark=isp2添加网关=10.201.0.1 检查网关=ping 距离=1 范围=30 目标范围=10 路由标记=isp2

add gateway=10.200.0.1 check-gateway=ping distance=1 scope=30 target-scope=10 routing-mark=isp2添加网关=10.200.0.1 检查网关=ping 距离=1 范围=30 目标范围=10 路由标记=isp2

add gateway=10.201.0.1 check-gateway=ping distance=1 scope=30 target-scope=10 add gateway=10.200.0.1 check-gateway=ping distance=1 scope=30 target-scope=10添加网关=10.201.0.1 检查网关=ping 距离=1 范围=30 目标范围=10 添加网关=10.200.0.1 检查网关=ping 距离=1 范围=30 目标范围=10

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM