<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Retreiving IP Address in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058062#M55264</link>
    <description>After more testing...&lt;BR /&gt;&lt;BR /&gt;Volker - your idea does work - I needed to add the "-N" option to NETSTAT so it wouldn't try to do a reverse lookup for each of the 6000 connections.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Good news &amp;amp; bad news:&lt;BR /&gt;&lt;BR /&gt;GN: with multiple Telnet sessions from a Windows box, I can tell which host IP address they've connected to.&lt;BR /&gt;&lt;BR /&gt;BN: I need to search the NETSTAT output for both a remote host addr &amp;amp; its port number (I found a situation where there was a Telnet session and another type of connection, both using the same Port #!)  This works for PC connections.&lt;BR /&gt;&lt;BR /&gt;When I telnet from another VMS host, in that session a SHOW TERM or F$GETDVI w/TT_ACCPORNAM, instead of returning a Port #, returns a "Location" with the remote VMS system's terminal-device name followed by the userid on that box.  I can't figure out how to get the Port # in this situation.&lt;BR /&gt;&lt;BR /&gt;Any suggestions?</description>
    <pubDate>Mon, 16 Jul 2007 17:22:51 GMT</pubDate>
    <dc:creator>Jack Trachtman</dc:creator>
    <dc:date>2007-07-16T17:22:51Z</dc:date>
    <item>
      <title>Retreiving IP Address</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058055#M55257</link>
      <description>TCPIP V5.4&lt;BR /&gt;&lt;BR /&gt;We have a VMS host w/two IP addresses.  Users can telnet to the host using either address.&lt;BR /&gt;&lt;BR /&gt;From within a DCL script, how can I find out which IP address is being used?&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Fri, 13 Jul 2007 21:56:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058055#M55257</guid>
      <dc:creator>Jack Trachtman</dc:creator>
      <dc:date>2007-07-13T21:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Retreiving IP Address</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058056#M55258</link>
      <description>&lt;!--!*#--&gt;Crude, but potentially effective (details&lt;BR /&gt;left as an exercise):&lt;BR /&gt;&lt;BR /&gt;alp $ write sys$output f$getdvi( "tt", "TT_ACCPORNAM")&lt;BR /&gt;Host: 207.90.215.17 Port: 49293&lt;BR /&gt;&lt;BR /&gt;Extract the "Port:" number, and feed it into:&lt;BR /&gt;&lt;BR /&gt;ALP $ tcpip show devi /full /port = 49293                                      &lt;BR /&gt;Device_socket:  bg6627      Type: STREAM&lt;BR /&gt;                      LOCAL                          REMOTE&lt;BR /&gt;         Port:           23                           49293&lt;BR /&gt;         Host:  10.0.0.9                        207.90.215.17&lt;BR /&gt;      Service:  TELNET         &lt;BR /&gt;[...]                  &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I'm assuming that "Host:  10.0.0.9" would&lt;BR /&gt;have been different if I had been coming in&lt;BR /&gt;through a different address.</description>
      <pubDate>Fri, 13 Jul 2007 22:24:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058056#M55258</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-07-13T22:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: Retreiving IP Address</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058057#M55259</link>
      <description>Jack,&lt;BR /&gt;&lt;BR /&gt;$ TCPIP SHO DEV/PORT=xxx does not tell you, over which local IP address the session has been established.&lt;BR /&gt;&lt;BR /&gt;But you can use the NETSTAT command (invoke @SYS$MANAGER:TCPIP$DEFINE_COMMANDS first):&lt;BR /&gt;&lt;BR /&gt;The Local Address column shows the IP address, to which the session has been established (tested on TCPIP V5.6 ECO 1):&lt;BR /&gt;&lt;BR /&gt;$ NETSTAT&lt;BR /&gt;...&lt;BR /&gt;tcp 0 0 nodec.23 10.20.30.150.1145 ESTABLISHED&lt;BR /&gt;tcp 0 0 node2.23 10.20.30.150.1146 ESTABLISHED&lt;BR /&gt;&lt;BR /&gt;You for a given port number (p) use:&lt;BR /&gt;&lt;BR /&gt;$ PIPE netstat | search sys$pipe .p&lt;BR /&gt;&lt;BR /&gt;Volker.</description>
      <pubDate>Sat, 14 Jul 2007 01:06:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058057#M55259</guid>
      <dc:creator>Volker Halle</dc:creator>
      <dc:date>2007-07-14T01:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Retreiving IP Address</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058058#M55260</link>
      <description>Jack,&lt;BR /&gt;&lt;BR /&gt;Does "From within a DCL script" mean from within the logged in process, or from an external process.&lt;BR /&gt;&lt;BR /&gt;Within the process F$GETDVI (for completeness the GETDVI function also available through the system service) with the TT_ACCPORNAM parameter will get that information.&lt;BR /&gt;&lt;BR /&gt;A quick check on an 8.2 system verifies that that solution also works from outside the process.&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter, &lt;A href="http://www.rlgsc.com" target="_blank"&gt;http://www.rlgsc.com&lt;/A&gt;</description>
      <pubDate>Sat, 14 Jul 2007 03:35:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058058#M55260</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2007-07-14T03:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Retreiving IP Address</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058059#M55261</link>
      <description>Re Bob;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&lt;BR /&gt;Within the process F$GETDVI (for completeness the GETDVI &lt;BR /&gt;&amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;I suspect you mean GETJPI ??&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;jpe&lt;BR /&gt;</description>
      <pubDate>Sat, 14 Jul 2007 04:18:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058059#M55261</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2007-07-14T04:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Retreiving IP Address</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058060#M55262</link>
      <description>Jan,&lt;BR /&gt;&lt;BR /&gt;No, I did mean F$GETDVI. When I wrote the post, I was thinking of not working from the process ID. I used the logical name TT to get the terminals device name. Admittedly, there are other ways of doing this.&lt;BR /&gt;&lt;BR /&gt;However, you are correct that F$GETJPI also accepts a TT_ACCPORNAM parameter, which can be used to find the name of the terminal.&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter, &lt;A href="http://www.rlgsc.com" target="_blank"&gt;http://www.rlgsc.com&lt;/A&gt;</description>
      <pubDate>Sat, 14 Jul 2007 06:40:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058060#M55262</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2007-07-14T06:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Retreiving IP Address</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058061#M55263</link>
      <description>Bob, Jan,&lt;BR /&gt;&lt;BR /&gt;You misread my question - I'm not trying to get the *remote* IP address, but determine which of 2 host addresses have been used to connect via Telnet.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Volker,&lt;BR /&gt;&lt;BR /&gt;Your idea works, but...&lt;BR /&gt;&lt;BR /&gt;I've got a GS1280 w/about 6000 IP connections.  When I use a Pipe cmd to Search the Netstat output, it takes nearly 60 seconds!!!  Since I need code to use within a LOGIN.COM script, this takes far too long.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Steven,&lt;BR /&gt;&lt;BR /&gt;Looks like your idea, though as you say "crude", will do what I need.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Any additional ideas would be appreciated.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you</description>
      <pubDate>Mon, 16 Jul 2007 10:44:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058061#M55263</guid>
      <dc:creator>Jack Trachtman</dc:creator>
      <dc:date>2007-07-16T10:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Retreiving IP Address</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058062#M55264</link>
      <description>After more testing...&lt;BR /&gt;&lt;BR /&gt;Volker - your idea does work - I needed to add the "-N" option to NETSTAT so it wouldn't try to do a reverse lookup for each of the 6000 connections.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Good news &amp;amp; bad news:&lt;BR /&gt;&lt;BR /&gt;GN: with multiple Telnet sessions from a Windows box, I can tell which host IP address they've connected to.&lt;BR /&gt;&lt;BR /&gt;BN: I need to search the NETSTAT output for both a remote host addr &amp;amp; its port number (I found a situation where there was a Telnet session and another type of connection, both using the same Port #!)  This works for PC connections.&lt;BR /&gt;&lt;BR /&gt;When I telnet from another VMS host, in that session a SHOW TERM or F$GETDVI w/TT_ACCPORNAM, instead of returning a Port #, returns a "Location" with the remote VMS system's terminal-device name followed by the userid on that box.  I can't figure out how to get the Port # in this situation.&lt;BR /&gt;&lt;BR /&gt;Any suggestions?</description>
      <pubDate>Mon, 16 Jul 2007 17:22:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058062#M55264</guid>
      <dc:creator>Jack Trachtman</dc:creator>
      <dc:date>2007-07-16T17:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: Retreiving IP Address</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058063#M55265</link>
      <description>Jack,&lt;BR /&gt;&lt;BR /&gt;If you are working from within LOGIN.COM (or the SYLOGIN file), the F$GETDVI will work.&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter, &lt;A href="http://www.rlgsc.com" target="_blank"&gt;http://www.rlgsc.com&lt;/A&gt;</description>
      <pubDate>Mon, 16 Jul 2007 17:38:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058063#M55265</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2007-07-16T17:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: Retreiving IP Address</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058064#M55266</link>
      <description>I understand the immediate question around the IP address and others have addressed that, but I might ask for some background on what you are up to here.&lt;BR /&gt;&lt;BR /&gt;If you're looking to map the network, for instance, there are ways and tools to approach that.&lt;BR /&gt;&lt;BR /&gt;There are other potential triggers for added complexity, as well: existing IP features such as failSAFE IP and IP cluster aliases can add more "interest" to this discussion.  You can also have multiple IP addresses per NIC, as well.  And incoming addresses can be different than outgoing addresses; packets arriving via one of the alias addresses of a NIC will be sent with the primary address of the NIC.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Jul 2007 06:57:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058064#M55266</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2007-07-19T06:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: Retreiving IP Address</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058065#M55267</link>
      <description>Re: Hoff's comment "packets arriving via one of the alias addresses of a NIC will be sent with the primary address of the NIC."&lt;BR /&gt;&lt;BR /&gt;We aren't using the multi-IP address per NIC feature, but if it works as Hoff says, I cannot see how it would possibly work. How would a TCP connection ever be established to one of the secondary addresses?&lt;BR /&gt;&lt;BR /&gt;I would expect it to work in a similar way to a secondary address on a Cisco router.  Packets sent in response to connections established by other nodes would use the IP address that was connected to.&lt;BR /&gt;&lt;BR /&gt;I am not sure what Jack's intentions are, but I wanted to do the same thing a long time ago, before it was possible to have multiple IP addresses on a single NIC.&lt;BR /&gt;&lt;BR /&gt;Here's the scenario we wanted to address.  We had an Executive Information System on the cluster. We wanted people to be able to connect to "EIS" and have sys$sylogin detect that they wanted to enter the executive friendly menu.  With LAT we were able to do this with multiple service names.  sys$sylogin had a program that could detect the LAT service that was connected to, and if it was EIS, they never see a DCL prompt.  When we migrated off LAT, there was nothing that corresponded to that functionality.  We thought of two possible workarounds, but were not able to get either to work (this was 15 years ago at another job).  First thought was to somehow allow for telnet connections to multiple TCP ports in addition to the standard port 23, with the idea that we would determine the port, and therefore the "service" they were connecting to.  The second was to allow multiple IP addresses, one for each service on each node, and to use DNS to forward to one of the proper addresses for that service.  We would have then needed to be able to determine the IP address connected to, and determine the "service" by reverse DNS lookup.&lt;BR /&gt;&lt;BR /&gt;In the end we just let login.com do different things for different users.&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Jul 2007 12:43:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058065#M55267</guid>
      <dc:creator>Jon Pinkley</dc:creator>
      <dc:date>2007-07-19T12:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Retreiving IP Address</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058066#M55268</link>
      <description>&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;We aren't using the multi-IP address per NIC feature, but if it works as Hoff says, I cannot see how it would possibly work. How would a TCP connection ever be established to one of the secondary addresses?&amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;&lt;BR /&gt;I'd expect this is a feature of TCP connections and routing; numbers of IP hosts and addresses can be involved in a TCP connection, after all.  Intermediate nodes don't care where a packet goes.&lt;BR /&gt;&lt;BR /&gt;BTW, the IP address behavior with alias IP addresses is directly out of the TCP docs.&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Jul 2007 13:05:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058066#M55268</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2007-07-19T13:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Retreiving IP Address</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058067#M55269</link>
      <description>Jack,&lt;BR /&gt;&lt;BR /&gt;I am not sure if our solution is possible in your situation, but anyway, here it is:&lt;BR /&gt;&lt;BR /&gt;For one application (further details graciously left out, but is implemented as a VERY simple screen-scraper) we absolutely NEED a strict sequence of a&lt;BR /&gt;Uername:    &lt;BR /&gt;prompt, an answer, &lt;CR&gt; and a &lt;BR /&gt;Password:&lt;BR /&gt;prompt, an answer, &lt;CR&gt;, and then the application announcement text.  &lt;BR /&gt;(all system output also at fixed positions).&lt;BR /&gt;&lt;BR /&gt;Fancy that with thousends of incomimg sessions, only a tiny fraction for this app.&lt;BR /&gt;&lt;BR /&gt;We implemented it by directing this app at a specific service in the firewall, and NATing this service back at the VMS cluster, but "spoofing" the source address to be something specific.&lt;BR /&gt;Now in SYS$SYLOGIN if the source node was this special dummy source, AND the user held he appropiate identifier, then we would directly jump to the app.&lt;BR /&gt;We DID have to educate the users of this app, that if it did not work, they first enter any other VMS app; and change their password, or read all their new mail, or resolve ANY issue that would interfere with the "EXPECTed" sequence....&lt;BR /&gt;&lt;BR /&gt;Hoping to have been of some use,&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;jpe&lt;/CR&gt;&lt;/CR&gt;</description>
      <pubDate>Thu, 19 Jul 2007 14:06:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058067#M55269</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2007-07-19T14:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Retreiving IP Address</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058068#M55270</link>
      <description>&lt;!--!*#--&gt;&lt;QUOTE jon="" pinkley=""&gt;&lt;BR /&gt;In the end we just let login.com do different things for different users.&lt;BR /&gt;&lt;/QUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;In the past I've used the UIC group to segregate user groups, and had something like this in sylogin.com:&lt;BR /&gt;&lt;BR /&gt;$ GRP = F$GETJPI ("","GRP")&lt;BR /&gt;$ GROUP_LOGIN = "LOGINGRP" + F$STRING(GRP) + ".COM"&lt;BR /&gt;$ if f$search(GROUP_LOGIN) .NES. "" THEN @'GROUP_LOGIN'&lt;BR /&gt;&lt;BR /&gt;to define various special logicals and symbols. An individual user could have even more specific def's in his/her login. Also had an option in the menu system that would allow users with higher priv's to get to the $ but keep everyone else captive.&lt;BR /&gt;&lt;BR /&gt;I've used rights ID's in a similar way; usually presenting a default UI if the user doesn't hold a right, and some special UI if s/he does.&lt;BR /&gt;&lt;BR /&gt;If the problem is to identify which network a user is on to segregate the users, then maybe using a similar method would work better than hard-coding IP's and having to worry about changing the code if a NIC gets replaced.&lt;BR /&gt;&lt;BR /&gt;Another benefit to making things more "user" rather than "site" specific, is if a person goes to the other site and logs in he'll get  a familiar UI. Of course, there could be a security down side to this, too.&lt;BR /&gt;&lt;BR /&gt;Not knowing the goals, YMMV&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Jul 2007 19:16:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058068#M55270</guid>
      <dc:creator>Doug Phillips</dc:creator>
      <dc:date>2007-07-19T19:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Retreiving IP Address</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058069#M55271</link>
      <description>After unsuccessfully trying to find the documentation about behavior of alias addresses, I did configure a several alias ip address on one of our nodes, and they appear to me to work like a secondary address on a Cisco router.&lt;BR /&gt;&lt;BR /&gt;The following examples are from my testing.&lt;BR /&gt;&lt;BR /&gt;Configuration tested on.&lt;BR /&gt;&lt;BR /&gt;$ tcpip show version&lt;BR /&gt;&lt;BR /&gt;  HP TCP/IP Services for OpenVMS Alpha Version V5.4&lt;BR /&gt;  on a AlphaServer 2000 4/233 running OpenVMS V7.3-2  &lt;BR /&gt;&lt;BR /&gt;$ tcpip sho interface&lt;BR /&gt;                                                           Packets&lt;BR /&gt;Interface   IP_Addr         Network mask          Receive          Send     MTU&lt;BR /&gt; &lt;BR /&gt; LO0        127.0.0.1       255.0.0.0                1179          1179    4096&lt;BR /&gt; WE0        206.157.122.24  255.255.255.0         5152457         34676    1500&lt;BR /&gt;$ netstat -n "-I" we0&lt;BR /&gt;Name  Mtu   Network     Address               Ipkts Ierrs    Opkts Oerrs  Coll&lt;BR /&gt;WE0   1500  &lt;LINK /&gt;      aa:0:4:0:17:4       5152522     0    34685     0     0&lt;BR /&gt;WE0   1500  206.157.122/24 206.157.122.24      5152522     0    34685     0     0&lt;BR /&gt;WE0   1500  172.30.200/21 172.30.200.24       5152522     0    34685     0     0&lt;BR /&gt;WE0   1500  172.30.200/21 172.30.207.24       5152522     0    34685     0     0&lt;BR /&gt;WE0   1500  172.30.200/21 172.30.207.23       5152522     0    34685     0     0&lt;BR /&gt;WE0   1500  206.157.122/24 206.157.122.23      5152522     0    34685     0     0&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;Specifically, output packets in response to a connection to an alias use the alias address as the source.  This is true even if the alias is in the same network as the the primary.&lt;BR /&gt;&lt;BR /&gt;Specific examples using telnet from ohter hosts to connect to system with telnet.(packets sent in response by local system)&lt;BR /&gt;&lt;BR /&gt;Dst Address          Src Address used.&lt;BR /&gt;206.157.123.74       172.30.207.23  (response to telnet client at 206.157.123.74 connecting to 172.30.207.23)&lt;BR /&gt;206.157.123.74       172.30.207.24  (response to telnet client at 206.157.123.74 connecting to 172.30.207.24)&lt;BR /&gt;206.157.123.74       172.30.200.24  (response to telnet client at 206.157.123.74 connecting to 172.30.200.24)&lt;BR /&gt;206.157.123.74       206.157.122.24 (response to telnet client at 206.157.123.74 connecting to 206.157.122.24)&lt;BR /&gt;206.157.123.74       206.157.122.23 (response to telnet client at 206.157.123.74 connecting to 206.157.122.23)&lt;BR /&gt;&lt;BR /&gt;Note in every case the NIC uses the IP address that was connected to.  This is a requirement for a tcp connection establishment three-way-handshake to work.  Otherwise the node attempting the connection will receive a response from a different ip address than was connected to, and it will be ignored.  NAT in between systems can make the addresses different, but from the perspective of the node establishing the connection, the IP address that sends the SYN,ACK must he identical to the IP address that the SYN packet was sent to.&lt;BR /&gt;&lt;BR /&gt;Google "tcp connection handshake" and you will find plenty of info about how this all works.&lt;BR /&gt;&lt;BR /&gt;The following is an example showing what the local system displays when a telnet connection from 206.157.123.74 was made to the alias address 172.30.207.23.&lt;BR /&gt;&lt;BR /&gt;The following is output extracted from SDA&amp;gt; tcpip show dev tna31/full&lt;BR /&gt;&lt;BR /&gt;Terminal TNA31: service type None, protocol Telnet&lt;BR /&gt;    Network Device:  (not connected)&lt;BR /&gt;    Accessportname:  Host: B24RTR1L Locn: &lt;BR /&gt;    Remote address:  206.157.123.74 port 24082&lt;BR /&gt;    Local  address:  172.30.207.23 port 23&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;For outbound connections, the source address used appears to be the one of the following:&lt;BR /&gt;&lt;BR /&gt;1. To a connected network (one for which the NIC has at least one address in) the ip address will be the IP address from that network that was the first one configured on the interface.  Note that this can be an alias address.&lt;BR /&gt;&lt;BR /&gt;Specific examples&lt;BR /&gt;&lt;BR /&gt;Dst Address          Src Address used.&lt;BR /&gt;&lt;BR /&gt;206.157.122.1        206.157.122.24 (Connected network, network 206.157.122.0/24, primary IP used)&lt;BR /&gt;172.30.200.1         172.30.200.24  (Connected network. network 172.30.200.0/21, first configured in network used)&lt;BR /&gt;&lt;BR /&gt;2. To an address that is not on a connected network, the primary address will be used as the source.&lt;BR /&gt;&lt;BR /&gt;Specific examples follow, using telnet from system.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Dst Address          Src Address used.&lt;BR /&gt;&lt;BR /&gt;172.30.24.1          206.157.122.24 (non-connected network, primary IP used)&lt;BR /&gt;&lt;BR /&gt;I am attaching a logfile with the traces captured using ethereal showing the three-way-handshake with the primary address and one of the alias addresses.</description>
      <pubDate>Fri, 20 Jul 2007 23:33:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058069#M55271</guid>
      <dc:creator>Jon Pinkley</dc:creator>
      <dc:date>2007-07-20T23:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Retreiving IP Address</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058070#M55272</link>
      <description>Thanks for all the input.&lt;BR /&gt;&lt;BR /&gt;I contacted HP and found out two things:&lt;BR /&gt;&lt;BR /&gt;1) The reason that Location is returned instead of Port# sometimes is that VMS requests it from clients and if that info is returned it is displayed to help locate the client for security issues&lt;BR /&gt;&lt;BR /&gt;2) Other people besides myself have requested this info, so someone at HP has written a pgm just to get the info.  Below is an example of usage in case anyone else would find it useful:&lt;BR /&gt;&lt;BR /&gt;$ getipinfo:==$home:TCPIP$TN_SHOW.EXE_AXP;1&lt;BR /&gt;$ getipinfo tna1185:&lt;BR /&gt;Local address: 172.20.66.43, port: 23&lt;BR /&gt;Remote address: 172.20.69.184, port: 1821&lt;BR /&gt;$ sho sym tcpip$tn*&lt;BR /&gt;  TCPIP$TN_LOCAL_ADDRESS = "172.20.66.43"&lt;BR /&gt;  TCPIP$TN_LOCAL_PORT = "23"&lt;BR /&gt;  TCPIP$TN_REMOTE_ADDRESS = "172.20.69.184"&lt;BR /&gt;  TCPIP$TN_REMOTE_PORT = "1821"&lt;BR /&gt;</description>
      <pubDate>Mon, 23 Jul 2007 16:52:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058070#M55272</guid>
      <dc:creator>Jack Trachtman</dc:creator>
      <dc:date>2007-07-23T16:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: Retreiving IP Address</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058071#M55273</link>
      <description>Jack,&lt;BR /&gt;&lt;BR /&gt;Is there a case number to reference if someone else with a support contract wants to request the TCPIP$TN_SHOW program?&lt;BR /&gt;&lt;BR /&gt;Jon</description>
      <pubDate>Tue, 24 Jul 2007 22:56:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/retreiving-ip-address/m-p/5058071#M55273</guid>
      <dc:creator>Jon Pinkley</dc:creator>
      <dc:date>2007-07-24T22:56:59Z</dc:date>
    </item>
  </channel>
</rss>

