Sponsored Content
Top Forums Shell Programming and Scripting Script to get IP addresses of LAN computers Post 85094 by sladuuch on Saturday 1st of October 2005 01:46:24 AM
Old 10-01-2005
Script to get IP addresses of LAN computers

I need a shell script for OS X, one that can find IP addresses of machines connected to my LAN, get the names of the computer associated with those addresses, then display them like so in a list: "Bob's L33T Boxx: #.#.#.#" Something like the network scanner in Apple Remote Desktop is what I'm looking to recreate. Is there a way to do this? Thanks a lot!
 

9 More Discussions You Might Find Interesting

1. IP Networking

Duplicate IP addresses on a LAN

This might be a silly question.... I was wondering what would happen if a user connected on a LAN set up their IP address to match the IP of an existing computer on the LAN. Particularly if both computers were hosting web servers. Is there a way to change the system boot of a comp to make... (2 Replies)
Discussion started by: LilHasher
2 Replies

2. UNIX for Advanced & Expert Users

Wake on Lan script

Im old to Unix but new to scripting I have a MacBook running osx that I want to use as an nfs client. The server will be a linux box with a wake on lan card. Here's the idea. Run a cron command on the mac every minute that checks if I am on my home wireless network (the linux box is wired to... (0 Replies)
Discussion started by: anon0mus
0 Replies

3. Shell Programming and Scripting

Wake on LAN script

m old to Unix but new to scripting I have a MacBook running osx that I want to use as an nfs client. The server will be a linux box with a wake on lan card. Here's the idea. Run a cron command on the mac every minute that checks if I am on my home wireless network (the linux box is wired to... (6 Replies)
Discussion started by: anon0mus
6 Replies

4. Solaris

How to configure private LAN and coporate LAN on the same machine-Solaris10

Hi , I am trying to configure a private LAN and corporate LAN on the same machien on Solaris 10. How can I achieve this? Thanks (1 Reply)
Discussion started by: deedee
1 Replies

5. Shell Programming and Scripting

Shell script to Shutdown Computers on Cluster

Hello all. I have built a cluster of 9 Macs for computational chemistry and I need a shell script that I can use from one computer to all the rest to shutdown. I have modified all of the Macs so that there is pass-wordless ssh. As well, I have modified each "visudo" file on each machine by... (1 Reply)
Discussion started by: marcozd
1 Replies

6. IP Networking

Local Lan, no-ip directed DNS forward, surf within lan

Hi, We have a website running on a local centos 5.4 surfer, static IP. The domain.com uses no-ip.com to take care of the DNS, it forwards all to my server. My router receives the port 80 call, routes it to my server and the world can see domain.com perfectly fine. However, we cannot see... (3 Replies)
Discussion started by: lawstudent
3 Replies

7. Fedora

Script for shutting down 48 computers

Hi All, I am pretty new to unix type languages. At work we have a server room with about 50 windows computers in one system and 50 in a unix system. We sometimes have power outages and I don't like the power slam. I wrote a windows batch file using sysinternals help to shutdown the windows... (4 Replies)
Discussion started by: Jeff Rollins
4 Replies

8. Shell Programming and Scripting

Can i see wich Computers are up in my network with a script

#!/bin/bash for ((n=0 ; n < 254 ; n+=1)) do ip=192.168.0.$n if ping -c 1 -w 1 $ip > /dev/null 2> /dev/null >> /etc/logping.txt; then echo "${ip} is up" # output up # sintax >> /etc/logping.txt log with .txt format else echo "${ip} is down" # output... (4 Replies)
Discussion started by: Roggy
4 Replies

9. Shell Programming and Scripting

Script getting IP's and MAC addresses

Hy over there, Lets make it simple :) Using a bash script, how to grep only the ip address and the mac address and put them in a file:. for example from the dhcp.conf file we got such things: The script will end up with two columns IP's and MAC adresses as it is showed below: ... (9 Replies)
Discussion started by: hermouche
9 Replies
learp(8)						      System Manager's Manual							  learp(8)

NAME
learp - Displays the contents of a LAN-Emulation Address Resolution Protocol (LE-ARP) table SYNOPSIS
/usr/sbin/learp [-u unit_number] -a OPTIONS
Specifies a LE-ARP cache. The unit number is the same as is displayed by the netstat -i command. For example: elan0 is unit 0, elan1 is unit 1, and so on. If the -u option is not specified, the default unit number is 0. Displays all entries in the LAN-Emulation Address Resolution Pro- tocol (LE-ARP) table. DESCRIPTION
Each LAN-Emulation Client interface (displayed as elann in netstat output) has an Address Resolution Protocol (LE-ARP) table that contains mappings of 6-byte medium access control (MAC) addresses to 20-byte Asynchronous Transfer Mode (ATM) addresses. The learp command displays the contents of the LE-ARP table. Each LE-ARP table entry contains the following information: Each MAC address that has been or is being contacted through the ATM-emulated LAN. One of the following state values: AP -- LE-ARP is pending. The ATM address associated with the MAC address is not known. DE -- Delete of the LE-ARP cache entry is pending. When there are no more VCs for a LE-ARP entry, it is marked for deletion. After there is no activity for 5 minutes (age periond), the entry is removed for the cache. FD -- Forward Direct. Packets flowing to the destination are using the data-direct VC. FL -- Flush is pending. A new VC has been established with the remote node and the broadcast channel is being flushed so packets flowing on the new VC will not arrive out of order. VP -- Virtual Channel (VC) setup is pending. The ATM address is known, but no VC is established with the remote node. If known, the 20-byte ATM address associated with the MAC address. One of the fol- lowing flags: R -- Remote entry. The MAC address is on a legacy (that is, Ethernet) network on the back side of an ATM edge device. P -- Permanent entry. The LE-ARP entry is permanent. If known, this is the Virtual Path Identifier (VPI) and the Virtual Channel Identifier (VCI) of the data-direct VC used by packets destined to the MAC address. Many MAC addresses may use the same VC. EXAMPLES
The following example shows the output of a learp -a command in which the LE-ARP cache contains five entries: # learp -a le-arp cache con- tains 5 entries. MAC Address State ATM Address Flags VPI/VCI 08-00-2b-01-01-01 (AP) pending 08-00-2b-01-01-02 (VP) 39000000000000000000000000.08002b010102.00 pending 08-00-2b-01-02-02 (FL) 39000000000000000000000000.08002b010203.00 R 0/65 08-00-2b-01-02-03 (FD) 39000000000000000000000000.08002b010203.00 0/65 SEE ALSO
Commands: atmconfig(8), atmelan(8), atmsig(8) learp(8)
All times are GMT -4. The time now is 09:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy