Sponsored Content
Full Discussion: getting own ip address
Operating Systems Solaris getting own ip address Post 302259127 by System Shock on Monday 17th of November 2008 10:18:32 AM
Old 11-17-2008
No need for the cat. Add a grep-v pipe.
Code:
grep `hostname` /etc/hosts | grep -v 127.0.0.1 | awk '{print $1}'

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

network address and broadcast address?

say I have a IP address which is 10.0.0.12, and subnet mask is 255.255.255.240, what is the network address and what is the broadcast address which host lives on? And could you explain how to get the answer? thanx in advance! (7 Replies)
Discussion started by: pnxi
7 Replies

2. IP Networking

How to Achive IP address through MAC(Ethernet) address

Hi sir, i want to make such programe which takes MAC(Ethernet) address of any host & give me its IP address....... but i'm nt getting that how i can pass the MAC address to Frame........ Please give me an idea for making such program... Thanks & regards Krishna (3 Replies)
Discussion started by: krishnacins
3 Replies

3. Shell Programming and Scripting

ksh - how to list all ip address between 2 ip address

Trying to do a ksh script that needs to list all ip address between ip address a and b .. ie. Ip address A=192.168.1.200 Ip address B=192.168.2.15 So the subnet changes from 1 to 2 but I want to list all possible ip addresses between the 2.. Which would be: 192.168.1.200... (4 Replies)
Discussion started by: frustrated1
4 Replies

4. UNIX for Dummies Questions & Answers

Panic kernal-mode address fault on user address 0x14

:) Firstly Hi all!!, im NEW!! and on here hoping that someone might be able to offer me some help... i have a server that keeps crashing every few days with the error message: PANIC KERNAL-MODE ADDRESS FAULT ON USER ADDRESS 0X14 KERNAL PAGE FAULT FROM (CS:EIP)=(100:EF71B5BD) EAX=EF822000... (10 Replies)
Discussion started by: Twix
10 Replies

5. Solaris

Get ip address from mac address

I have following message in my messages file on solaris 10 WARNING: e1000g3712000:3 has duplicate address 010.022.196.011 (in use by 00:50:56:85:25:ef); disabled Now is there any way i can find which server has 00:50:56:85:25:ef mac address either IP or Hostname ? (6 Replies)
Discussion started by: fugitive
6 Replies

6. UNIX for Dummies Questions & Answers

What would the physical address be for virtual address?

Hi guys, I got one problem which I definetily no idea. What would the physical address be for virtual address? 1) 2ABC 2) 3F4B Here is the page table:see attached Thank you sos sososososso much!! (0 Replies)
Discussion started by: lemon_06
0 Replies

7. IP Networking

Tracing a MAC address to IP address: Solaris

Hi there I lost connectivity to one of our remote systems and when I checked the messages log I found the following: Aug 10 23:42:34 host xntpd: time reset (step) 1.681729 s Aug 16 13:20:51 host ip: WARNING: node "mac address" is using our IP address x.x.x.x on aggr1 Aug 16 13:20:51 host... (9 Replies)
Discussion started by: notreallyhere
9 Replies

8. UNIX for Advanced & Expert Users

C program to detect duplicate ip address if any after assigning ip address to ethernet interface

Hi , Could someone let me know how to detect duplicate ip address after assigning ip address to ethernet interface using c program (3 Replies)
Discussion started by: Gopi Krishna P
3 Replies

9. IP Networking

MAC Address - Four Interfaces with the same MAC Address

four interfaces with ifconfig all interfaces have the same mac. If is not set for unique. but it still works. what difference does it make to have all macs the same or different? (4 Replies)
Discussion started by: rrodgers
4 Replies
ASP(1)								    User Manual 							    ASP(1)

NAME
asp - find an host IP address by its name SYNOPSIS
asp [-uv] [-f | [-d dir] [-e ext]] [-a addresses] [-r repetitions] [-s send_delay] [-w wait_time] [-p port] hostname asp -V DESCRIPTION
Asp finds the IP address of an Internet connected host. In order to find it, the peer hostname (not the FQDN), and the range of its possi- ble IP addresses need to be specified. Those IP addresses could be simple IP addresses as 127.0.0.1 or "metaip" addresses as 127.0.0.1-20 or 127.0.0.*: the former is a simple way to avoid to type a lot of consecutive addresses, the latter is short for 127.0.0.1-254. In order to simplify the management of the associations between hostnames and addresses, asp searches in a specified directory a text file containing the possible IP addresses of the looked for host. The name of the text file has to be formed by the hostname followed by an optional extension of your choice. For example to find the author's dynamic IP address, obviously if I am on line, you can provide my metaip address on standard input with the command: echo "195.31.186.1-62 194.166.58.2-18" | asp -f atomic or you can put my metaip address in a file called atomic in your ~/.asp directory, like this: echo "195.31.186.1-62 194.166.58.2-18" > ~/.asp/atomic and then you can simply do: asp atomic OPTIONS
-u Update the file /etc/hosts with the IP address of hostname or delete the possible old entry if the address is not found. Obviously the file have to by writable by the user. -v Include more verbiage to make output readable by humans. Default consists only of dotted quad IP address, which is intended for output substitution in scripts. -f Force the reading of addresses from standard input instead that from the hostname's file. -d dir Set the directory containing the addresses file referred by hostname to dir. Default is ~/.asp. -e ext Set addresses files extension to ext. Default is no extension. -a addresses Set the number of queries to send before make a pause of send_delay seconds. Default is 12 queries. -r repetitions Set the number of times to try the same address. Default is 3 times. -s send_delay Delay the sending of the next group of addresses send_delay seconds. Default is 2 seconds. -w wait_time Wait the peer reply for wait_time seconds. Default is 5 seconds. -p port Specify an alternative port number. For default the port number is obtained searching the asp entry in /etc/services. -V Show version information. ENVIRONMENT
ASPCMD This variable could be used to store your preferred settings. An option set in this environment variable could be overridden or tog- gled from command line. BUGS
UDP is an unreliable protocol, therefore there is a chance you will not find the host even if it is on line. Anyway, if you are sure that the peer is on line and asp aware, you could adjust the various parameters until you get a reply. At last you will find the correct set- tings for your particular needs. This until the RDM communication style will be implemented under Linux. Obviously the hostname has to be unique among the possible IP addresses: asp will hook to the first correct reply. AUTHOR
Stenio Brunetta <stenio@brunettaeperin.it> Comments and suggestions are welcome. ACKNOWLEDGMENTS
Steven N. Hirsch <shirsch@ibm.net> for v1.3 bug fix and for the verbose option. Colin Phipps <cphipps@doomworld.com> for the tmpnam security issue. SEE ALSO
aspd(8). Linux February 1997 ASP(1)
All times are GMT -4. The time now is 02:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy