'ifconfig' to skip loopback IPs


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users 'ifconfig' to skip loopback IPs
# 8  
Old 03-22-2010
Bug

thanks jlliagre ..!!

that is what i wanted ....!!


FYI/U
here is what i use to skip loopback interfaces and extract a list :

Code:
/usr/sbin/ifconfig -a | nawk '$1 ~ /:$/ && $1 !~ /^lo/ {sub(":$", "", $1); print $1}'

thanks everyone...!!

Regards
Abhi
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

NAT Loopback and iptables

Hello, please can you help and explain me. I have two servers. Both are RHEL6. I use the first one like router and the second one for apache. Router forwards 80 port on the second server and I can open that from the internet (mysite.com, for example). But I can not open mysite.com if i try to... (0 Replies)
Discussion started by: 6765656755
0 Replies

2. UNIX Desktop Questions & Answers

Loopback

clear echo "vans, Rolland" echo "Press in Your Keyboard to Quit" echo -e "Please Enter Your Choice : \c" read option case $option in I have created the corresponding information for each input on the display so... My question is... How do I display the corresponding information... (6 Replies)
Discussion started by: thriveforana
6 Replies

3. UNIX for Dummies Questions & Answers

How to Loopback?

This is in the beginning of the program: clear tput cup 1 20 echo "Welcome to UNIX I Final Assignment" tput cup 4 3 echo -e "Who would you like to look up? \c" tput cup 6 5 echo "vans, Rolland" tput cup 8 5 echo "ones, Mildred" tput cup 10 5 echo "mith, Julie" tput cup 12 5 echo... (0 Replies)
Discussion started by: thriveforana
0 Replies

4. Linux

Loopback interface doen't appear

Hi all, i have a problem with (Network in Linux) .. my issue with a HW appliance has openfiler 2.3 and is used for File Sharing using samba .. the problem is when i try to list all configured network interfaces using ifconfig -a .. i can't see the loopback interface, Although the file... (3 Replies)
Discussion started by: mabdelmageid
3 Replies

5. Solaris

Adding Loopback Interface

Hello, I have a SunOS (5.5.1) system that I need to migrate to a new IP address. I would like to have any requests destined for the old IP to be forwarded to this server. One suggestion I had was to add a route on my router that would point the old IP to the new IP. How do I add another... (2 Replies)
Discussion started by: reiklen
2 Replies

6. Filesystems, Disks and Memory

Can a Loopback Filesystem be Partitioned?

I have a disk image file created for use with the Linux version of the QEMU emulator. It's partitioned. I opened it with fdisk and the partitions show up with some extra messages about physical/logical endings: Disk knoppix.img: 0 MB, 0 bytes 16 heads, 63 sectors/track, 0 cylinders Units =... (3 Replies)
Discussion started by: deckard
3 Replies

7. AIX

loopback in 4.1.4.0 AIX server

Hi: I´ve a problem in a 4.1.4.0 AIX server because is generating a loopback in its own ip address and this are consuming all the bandwidth. I did many things trying to solve the problem but it doesn´t help. 1. Flush Routing tables 2. Get Up/Down Network interface 3. Add/remove Network... (0 Replies)
Discussion started by: terron79
0 Replies

8. Filesystems, Disks and Memory

Can I Use Loopback Devices with LVM?

I've got a RedHat 9 box with LVM support in a 2.4.22 kernel. What I would like to do is take a set of empty files created with 'dd' and concatenate them into a volume group. I've done a good deal of googling, and it seems that this is something that can be done. But when I try to use 'pvcreate'... (3 Replies)
Discussion started by: deckard
3 Replies

9. Filesystems, Disks and Memory

Using loopback devices in RAID?

Hopefully I am posting this silly question in the right place... I was wondering about the possibility of using loopback files on a physical disk to create virtual disks that could shrink or grow as needed. Something like RAID 0, but instead of using block devices, just using files. If I need... (0 Replies)
Discussion started by: deckard
0 Replies

10. UNIX for Advanced & Expert Users

Loopback Interface...Vanished???

Recently I noticed that my internet connection would not work correctly-although connected domain names could not be resolved. My resolv.conf file was fine since it is configured every time I dial up. a closer inspection showed that my loopback interface had disappearerd! Any ideas why would this... (1 Reply)
Discussion started by: silvaman
1 Replies
Login or Register to Ask a Question
ifparse(1M)						  System Administration Commands					       ifparse(1M)

NAME
ifparse - parse ifconfig command line SYNOPSIS
/sbin/ifparse [-fs] addr_family commands DESCRIPTION
Use the ifparse command to parse the ifconfig(1M) command line options and output substrings, one per line, as appropriate. If no options are specified, ifparse returns the entire ifconfig command line as a series of substrings, one per line. OPTIONS
The ifparse command supports the following options: -f Lists only substrings of the ifconfig command line that are relevant to IP network multipath failover -s Lists only substrings of the ifconfig command line that are not relevant to IP network multipath failover OPERANDS
The ifparse command does not support the interface operand of the ifconfig command. EXAMPLES
Example 1: Parsing Command Line Options Relevant to Failover The following example shows the use of the ifparse command to parse the command line options relevant to IP network multipath failover: example# ifparse -f inet 1.2.3.4 up group one addif 1.2.3.5 -failover up set 1.2.3.4 up Example 2: Parsing Command Line Options That Are Not Relevant to Failover The following example shows the use of the ifparse command to parse the command line options that are not relevant to IP network multipath failover: example# ifparse -s inet 1.2.3.4 up group one addif 1.2.3.5 -failover up group one addif 1.2.3.5 -failover up Example 3: Parsing the Command Line For All Options The following example shows the use of the ifparse command to parse the command line for all ifconfig options: example# ifparse inet 1.2.3.4 up group one addif 1.2.3.5 -failover up group one set 1.2.3.4 up addif 1.2.3.5 -failover up ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsr | +-----------------------------+-----------------------------+ |Stability Level |Obsolete | +-----------------------------+-----------------------------+ SEE ALSO
ifconfig(1M), attributes(5) DIAGNOSTICS
usage: -fs <addr_family> <commands> This message indicates an invalid command line. ifparse: Not enough space This message indicates insufficient memory. ifparse: dhcp not supported for inet6 DHCP operations are not supported for the inet6 address family. ifparse: Operation <operation> not supported for <addr_family> Most operations cannot be used with all address families. For example, the broadcast operation is not supported on the inet6 address fam- ily. ifparse: no argument for <operation> Some operations, for example broadcast, require an argument. NOTES
The ifparse command is classified as an obsolete interface. It will likely be removed in a future release. You should not develop applica- tions that depend upon this interface. SunOS 5.10 9 May 2001 ifparse(1M)