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
cmmodnet(1m)															      cmmodnet(1m)

NAME
cmmodnet - add or remove an address or check whether an address can be added to a subnet or enable or disable a LAN interface in a high availability cluster SYNOPSIS
cmmodnet [-v] {-a|-r|-t} -i { IPv4_address IPv4_subnet | IPv6_address IPv6_subnet} cmmodnet [-v] {-d|-e} LAN_name DESCRIPTION
cmmodnet is used in certain high availability utilities, such as package control scripts and SGeRAC utility scripts for VIP management, to add or remove an IPv4 or IPv6 address to or from network interface connected to the subnet identified by subnet_name. In addition, cmmod- net can be used to check if an IPv4 or IPv6 address can be added to the given subnet identified by subnet_name. cmmodnet can also be used to disable or enable a LAN interface currently configured in a cluster. HP-UX examples of LAN_name can be lan0, lan1; Linux examples of LAN_name can be eth0, bond0. This command simulates a LAN interface failure or recovery in the cluster without changing the physical status of the interface. cmmodnet requires the user be a superuser(UID=0) or have an access policy of FULL_ADMIN allowed in the cluster configuration file. Non- superusers may only use this command to remove IP addresses. See access policy in cmquerycl(1m) or cmmakepkg(1m). Extreme caution should be exercised when executing this command (for puposes other than checking) outside the context of a package control script or SGeRAC utility script. In this capacity it should only be used to remove the relocatable IPv4 or IPv6 addresses of packages which have failed and are in the "halted" state or to disable and enable a LAN interface when absolutely necessary. Using it while the package is running could lead to loss of client connectivity. The user needs to make sure that an IPv6 subnet must be either site-local or global and must not be link-local. Options cmmodnet supports the following options: -v Verbose output will be displayed. -a Add the IPv4_address to the IPv4_subnet or add the IPv6_address to the IPv6_subnet -r Remove the IPv4_address from the IPv4_subnet or remove the IPv6_address from the IPv6_subnet -t Check only. Checks if the IPv4_address can be added to the IPv4_subnet or checks if the IPv6_address can be added to the IPv6_subnet -i IPv4_Address or IPv6_address Use the IP address given for the operation. This is a required parameter. -d Disable LAN interface configured in the cluster. This option simulates the LAN interface failure without actually bringing the interface down. There is no immediate effect if the LAN interface is already disabled or physically down. This option allows failover of IP addresses configured in this LAN interface to an available standby interface (HP-UX only). If no standby is available (HP-UX and Linux), the subnet(s) on this interface will virtually go down and packages monitoring the subnet(s) will be brought down or switched to another node; in the worst case a TOC could result if this is a failfast package. This option also implies that there is no effect on recovery of IP addresses and subnet(s) on this LAN interface if the physical status of the interface changes at later time. -e Enable LAN interface configured in the cluster. This option simulates a LAN interface recovery from previously disabled state. There is no immediate effect if the LAN interface is already enabled or physically down. RETURN VALUE
cmmodnet returns the following values: 0 Successful completion. 1 Command failed. AUTHOR
cmmodnet was developed by HP. SEE ALSO
cmhaltserv(1m), cmmakepkg(1m), cmquerycl(1m), cmrunserv(1m). Requires Optional Serviceguard Software cmmodnet(1m)
All times are GMT -4. The time now is 03:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy