OS/2, eCS & ArcaOS - Technical > Programming
[Classic REXX] Network Map
Remy:
--- Quote from: Dave Yeo on March 25, 2025, 03:55:06 pm ---
--- Quote from: Jan-Erik Lärka on March 25, 2025, 06:33:46 am ---It is supposed to find all machines on the network, and here it does!
My hosts file on this newlt installed ArcaOS 5.0.7, read
127.0.0.1 localhost
and nothing else.
My router thus provide my machines with the information and ip-number through dhcp as the vacuum cleaner was introduced just days ago... and when the script run again it update the info (and icons, if SET NET=1 is active) and show that 2 devices has gone offline over the night.
So the question remain... why host command behave the way it does.
"DHCP Monitor" of course list the ip-address on LAN0 for you?
( Desktop\Computer\System Setup\Network\TCP/IP\DHCP Monitor )
--- End quote ---
DHCP Monitor shows my address as 192.168.0.106. My router doesn't show this. Possibly due the weird router/web thingy. I'm on a LTE connection and the router thing has a sim card and mostly uses WiFi for the local connections. MY OS/2 computer is plugged into the one lan port on the router thing.
I see the router doesn't list this computer on the device page. Later I should dig out my T42 and test with it as it does connect through wireless.
I can ping most of the machines on my net, perhaps the broadcast ping that Greg mentioned gets filtered.
--- End quote ---
Hi!
What is the name returned from a nslookup 192.168.0.106 ?
Is it the one under nostname from config.sys ?
Dave Yeo:
--- Quote from: Remy on March 26, 2025, 07:58:57 am ---Hi!
What is the name returned from a nslookup 192.168.0.106 ?
Is it the one under nostname from config.sys ?
--- End quote ---
Today, my machines address is 192.168.0.104,
--- Code: ---H:\tmp>nslookup 192.168.0.104
*** Can't find server name for address 192.168.0.1: Non-existent host/domain
*** Default servers are not available
--- End code ---
config.sys has,
--- Code: ---SET HOSTNAME=ARCAOS-44454C4
--- End code ---
Jan-Erik Lärka:
--- Quote from: Remy on March 26, 2025, 07:21:13 am ---Seen.
I have a specific ARCAOS host_name under config.sys
Into my box and because my PC can be booted OS/2 or Windows using same interface, I have set a name to the corresponding @ip / macaddr
Using nslookup on my PC @ip I could see that my computer_name set into the box differs from the config.sys and after updating config.sys, it works
With WOL=0 and NET=0, it display all local equipments.
When I set WOL=1, I have all equipment but also many
(icoplte (icoplte (icoplte (icoplte (icoplte (icoplte ....
--- End quote ---
Remy, I've only been able to test with English version, is it possible that the parsing has to be adjusted somewhat?
--- Quote from: Remy on March 26, 2025, 07:21:13 am ---With NET=1, I have the folder created as well all found equipment but none have an icon !
Where are icon found ?
--- End quote ---
That also mean that I need help to create the artwork for it. ;)
But see the icons I use here.
--- Quote from: Remy on March 26, 2025, 07:21:13 am ---I would suggest a change into the rexx which could prevent this kind of no returned result.
Check the interface used and look for its @ip followed by a nslookup on the @ip which will return the hostname and then run into the process like if the
the host_name was found into os2env variables....
--- End quote ---
That's something to fall back on, as several of you seem to not be able to get "host" to return proper info
Jan-Erik Lärka:
I would say that that explain the problems.
*** Can't find server name for address 192.168.0.1: Non-existent host/domain
then no script can help until it's configured to reply with something useful.
--- Quote from: Dave Yeo on March 26, 2025, 04:39:10 pm ---
--- Quote from: Remy on March 26, 2025, 07:58:57 am ---Hi!
What is the name returned from a nslookup 192.168.0.106 ?
Is it the one under nostname from config.sys ?
--- End quote ---
Today, my machines address is 192.168.0.104,
--- Code: ---H:\tmp>nslookup 192.168.0.104
*** Can't find server name for address 192.168.0.1: Non-existent host/domain
*** Default servers are not available
--- End code ---
config.sys has,
--- Code: ---SET HOSTNAME=ARCAOS-44454C4
--- End code ---
--- End quote ---
Andi B.:
My limited understanding of all of these is as following -
nslookup needs a DNS server for a useful reply. There's usually no DNS server on your home network so it will not work with most small private LANs. And the official DNS servers on the internet don't know anything about your private network members of course. At least they shouldn't.
If you wanna have a private DNS server in your network you've to setup one. But most of the time it's not worth the effort to make this for a private LAN. If you've a router which run's a DHCP server it might work as local DNS server too. But then it probably don't know very much about your devices with static IPs.
I'm puzzling what you're all talking about here. In my limited understanding you need to ping every address on your subnet if you wanna have a list of all your devices on your LAN (with IP support. There maybe devices on the LAN communication without IP protocol). Even then it may be possible that a devices do not respond to an ping request. And so you don't 'see' it either. Although I don't think much devices will really hide them self when called with a ping.
If all your devices uses dynamic IP addresses then look at the leases file of your DHCP server. It has the IP <-> MAC list in the dhcpd.leases file. And sometimes there's also a hostname there for the device. But that's not mandatory. Also in a LAN with static IPs or a mixed LAN (I think that is very common) you only get the subset of devices with dynamic IPs. So pinging every IP is IMHO the only way to get a (nearly) complete list of all devices.
If you wanna have a 'network map' of devices with SMB shares you've to use the samba tools to get one. And similar tools for NFS shares or ....?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version