如何从MS Dos命令获取路由表信息? [英] How to get Route Table Information from MS Dos command?

查看:70
本文介绍了如何从MS Dos命令获取路由表信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从MS-Dos命令获取路由表信息.
我有一个命令:netstat
netstat -r给了我几个字段.但我还需要一些其他字段,例如
下一跳
路由端口
路线年龄
路线信息和
MAC地址.

请帮我....

注意:
我可以从WMI获取路由表信息.但是我想从DOS命令或LDAP中读取信息.

I would like to get the Route Table Information from MS-Dos command.
I have a command called: netstat
netstat -r gives me few fields. But I need few more fields like
Next Hop
Route Port
Route Age
Route Info and
MAC address.

Please help me ....

Note:
I can get the Route table information from WMI. But I want to read the information from DOS command or LDAP.

推荐答案

我假设MS-DOS命令的意思是Windows命令外壳(cmd).路由信息使用route 命令公开.

I assume by MS-DOS command you mean the Windows command shell (cmd). Routing information is exposed using the route command.

C:\>route print
===========================================================================
Interface List
 11...a4 ba db 02 44 3e ......Broadcom NetLink (TM) Gigabit Ethernet
  1...........................Software Loopback Interface 1
 12...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
 13...00 00 00 00 00 00 00 e0 Microsoft 6to4 Adapter
 14...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0     192.168.69.1    192.168.69.15     20
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
     192.168.69.0    255.255.255.0         On-link     192.168.69.15    276
    192.168.69.15  255.255.255.255         On-link     192.168.69.15    276
   192.168.69.255  255.255.255.255         On-link     192.168.69.15    276
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
        224.0.0.0        240.0.0.0         On-link     192.168.69.15    276
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link     192.168.69.15    276
===========================================================================
Persistent Routes:
  None

IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Destination      Gateway
  1    306 ::1/128                  On-link
 11    276 fe80::/64                On-link
 11    276 fe80::b1a9:1c79:f945:9da9/128
                                    On-link
  1    306 ff00::/8                 On-link
 11    276 ff00::/8                 On-link
===========================================================================
Persistent Routes:
  None


这篇关于如何从MS Dos命令获取路由表信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆