Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
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.
Posted
Comments
Member 10445018 18-Dec-13 8:54am    
hey you can get get the Route table information from WMI.Can you give me this project.? i'll really need it.thanks so much

1 solution

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
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900