Windows Server 2012 R2,空路由

Windows Server 2012 R2,空路由

我正在尝试添加一条空路由,将发往特定资源的流量发送到不存在的地址,以模拟故障。

PS C:\Users\Owner> route print
===========================================================================
Interface List
 10...00 05 9a 3c 7a 00 ......Cisco AnyConnect Secure Mobility Client Virtual Miniport Adapter for Windows x64
 29...02 00 4c 4f 4f 50 ......Npcap Loopback Adapter
 25...00 ff d9 46 d7 15 ......VMware SSL VPN-Plus Client Adapter
 23...34 02 86 ef 17 3e ......Bluetooth Device (Personal Area Network) #2
 22...34 02 86 ef 17 3b ......Microsoft Wi-Fi Direct Virtual Adapter #2
 21...36 02 86 ef 17 3a ......Microsoft Hosted Network Virtual Adapter #2
 19...34 02 86 ef 17 3a ......Intel(R) Dual Band Wireless-AC 7265 #2
 18...34 e6 d7 83 b2 be ......Intel(R) Ethernet Connection (3) I218-LM #2
 15...00 05 9a 3c 78 00 ......Cisco Systems VPN Adapter for 64-bit Windows
 16...00 50 56 c0 00 01 ......VMware Virtual Ethernet Adapter for VMnet1
 17...00 50 56 c0 00 08 ......VMware Virtual Ethernet Adapter for VMnet8
  1...........................Software Loopback Interface 1
 13...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
  7...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
 12...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
 11...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #4
 14...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #6
 26...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #7
 30...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #10
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      192.168.1.1      192.168.1.9     10
      172.24.16.0    255.255.252.0    192.168.237.1    192.168.237.8      2
      172.24.32.0    255.255.252.0    192.168.237.1    192.168.237.8      2
      172.24.48.0    255.255.252.0    192.168.237.1    192.168.237.8      2
      172.24.64.0    255.255.252.0    192.168.237.1    192.168.237.8      2
      172.24.96.0    255.255.252.0    192.168.237.1    192.168.237.8      2
     172.24.112.0    255.255.252.0    192.168.237.1    192.168.237.8      2
     172.24.120.0    255.255.252.0    192.168.237.1    192.168.237.8      2
     172.24.128.0    255.255.252.0    192.168.237.1    192.168.237.8      2
      192.168.1.1  255.255.255.255         On-link       192.168.1.9     11
   212.64.157.210  255.255.255.255      192.168.1.1      192.168.1.9     11
===========================================================================
Persistent Routes:
  None

IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Destination      Gateway
 10     11 ::/0                     On-link
 10    266 fe80::/64                On-link
===========================================================================
Persistent Routes:
  None

我现在正在添加一条路由,将发往 172.24.48.10/32 网络的流量重定向到我们本地网络上不存在的 IP

PS C:\Windows\system32> route add 172.24.48.10 mask 255.255.255.255 
192.168.100.245 metric 1
 OK!

这似乎不起作用,因为我仍然可以 ping 上面的特定地址并接收来自 ip 的回复。你能帮我实现我在这里尝试做的事情吗?这种方法哪里出了问题?谢谢。

答案1

此链接有用吗?

基本上,它说使用不存在的 IP 是 Server 2003 中的解决方案,但对于称为“死网关检测”的功能,它不再起作用。

我正在使用环回接口。尝试指定此接口(通常是索引=1)。

从上面的链接,命令:

route add X.X.X.X mask Y.Y.Y.Y Z.Z.Z.Z if 1 -p

顺便说一句,在链接中他们建议尽可能使用防火墙

相关内容