You can try to use something like 'route print'. And get the result of the command. There is your IP Address there.
C:\Documents and Settings\Administrator>route print
======================================================================
+=====
Interface List
0x1 ........................... MS TCP Loopback interface
0x10003 ...00 10 a4 11 4d 60 ...... Intel(R) PRO/100+ MiniPCI
======================================================================
+=====
======================================================================
+=====
Active Routes:
Network Destination Netmask Gateway Interface M
+etric
0.0.0.0 0.0.0.0 192.168.55.1 192.168.55.13
+ 30
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1
+ 1
192.168.55.0 255.255.255.0 192.168.55.13 192.168.55.13
+ 30
192.168.55.13 255.255.255.255 127.0.0.1 127.0.0.1
+ 30
192.168.55.255 255.255.255.255 192.168.55.13 192.168.55.13
+ 30
224.0.0.0 240.0.0.0 192.168.55.13 192.168.55.13
+ 30
255.255.255.255 255.255.255.255 192.168.55.13 192.168.55.13
+ 1
Default Gateway: 192.168.55.1
======================================================================
+=====
Persistent Routes:
None
C:\Documents and Settings\Administrator>
192.168.55.13 is my IP Address
where the netmask is 255.255.255.255 and the gateway is 127.0.0.1.... try to parse the output of this command
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|