'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
GRE(4)							   BSD Kernel Interfaces Manual 						    GRE(4)

NAME
gre -- encapsulating network device SYNOPSIS
To compile the driver into the kernel, place the following line in the kernel configuration file: device gre Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): if_gre_load="YES" DESCRIPTION
The gre network interface pseudo device encapsulates datagrams into IP. These encapsulated datagrams are routed to a destination host, where they are decapsulated and further routed to their final destination. The ``tunnel'' appears to the inner datagrams as one hop. gre interfaces are dynamically created and destroyed with the ifconfig(8) create and destroy subcommands. This driver corresponds to RFC 2784. Encapsulated datagrams are prepended an outer datagram and a GRE header. The GRE header specifies the type of the encapsulated datagram and thus allows for tunneling other protocols than IP. GRE mode is also the default tunnel mode on Cisco routers. gre also supports Cisco WCCP protocol, both version 1 and version 2. The gre interfaces support a number of additional parameters to the ifconfig(8): grekey Set the GRE key used for outgoing packets. A value of 0 disables the key option. enable_csum Enables checksum calculation for outgoing packets. enable_seq Enables use of sequence number field in the GRE header for outgoing packets. EXAMPLES
192.168.1.* --- Router A -------tunnel-------- Router B --- 192.168.2.* / / +------ the Internet ------+ Assuming router A has the (external) IP address A and the internal address 192.168.1.1, while router B has external address B and internal address 192.168.2.1, the following commands will configure the tunnel: On router A: ifconfig greN create ifconfig greN inet 192.168.1.1 192.168.2.1 ifconfig greN inet tunnel A B route add -net 192.168.2 -netmask 255.255.255.0 192.168.2.1 On router B: ifconfig greN create ifconfig greN inet 192.168.2.1 192.168.1.1 ifconfig greN inet tunnel B A route add -net 192.168.1 -netmask 255.255.255.0 192.168.1.1 NOTES
The MTU of gre interfaces is set to 1476 by default, to match the value used by Cisco routers. This may not be an optimal value, depending on the link between the two tunnel endpoints. It can be adjusted via ifconfig(8). For correct operation, the gre device needs a route to the decapsulating host that does not run over the tunnel, as this would be a loop. The kernel must be set to forward datagrams by setting the net.inet.ip.forwarding sysctl(8) variable to non-zero. SEE ALSO
gif(4), inet(4), ip(4), me(4), netintro(4), protocols(5), ifconfig(8), sysctl(8) A description of GRE encapsulation can be found in RFC 2784 and RFC 2890. AUTHORS
Andrey V. Elsukov <ae@FreeBSD.org> Heiko W.Rupp <hwr@pilhuhn.de> BUGS
The current implementation uses the key only for outgoing packets. Incoming packets with a different key or without a key will be treated as if they would belong to this interface. The sequence number field also used only for outgoing packets. BSD
November 7, 2014 BSD