Forum Discussion

myfive_65296's avatar
myfive_65296
Icon for Nimbostratus rankNimbostratus
Jun 07, 2009

How to view IP/Interface List - LTM

Hi,

 

 

Is there any way to view the interface to IP mapping on the GUI console of F5 LTM.

 

 

On clicking interaces, only interface names can be seen and on clicking self-ip, only IPs can be seen.

 

 

Thanks.

6 Replies

  • You'll need two commands, b self list and b vlan list. I don't think there is a direct map of self to interface.
  • Might be tricky in environments where a vlan is multiple interfaces, though. Maybe a console perl script to take care of this mapping for you?
  • In that specific case it would be valid to say that the self-ip is mapped to all interfaces in that vlan, so you should be covered there as well, no?
  • Try this:

        
     !/usr/bin/perl 
     use strict; 
     my ($vlan); 
     my (%int); 
     my (%trunk); 
      
     $b = '/bin/bigpipe'; 
      
     open cmd, "$b trunk list |" || die "error: $b trunk list"; 
     while (  ) { 
             $vlan=$1 if (/^trunk\s+([^\s]+)\s+\{/i); 
             $trunk{$vlan}=$1 if (/^\s+interface\s+(.+)/i); 
     } close cmd; 
      
     open cmd, "$b vlan list |" || die "error: $b vlan list"; 
     while (  ) { 
             $vlan = $1 if (/^vlan\s+([^\s]+)\s+\{/i); 
             $int{$vlan}=$1 if (/^\s+interfaces\s+(.+)/i); 
             $int{$vlan}= "$1: $trunk{$1}" if (/^\s+trunks\s+(.+)/i); 
     } close cmd; 
      
     open cmd, "$b self list |" || die "error: $b self list"; 
     while (  ) { 
             print "$1 = " if (/^self\s+([^\s]+)\s+\{/i); 
             print "$1 ($int{$1})\n" if (/^\s+vlan\s+([^\s]+)/i); 
     } close cmd; 
     

    Sample:

         
     [root@ltm:Active] ~  perl hum     
     10.10.10.10 = ext (1.3)     
     11.0.0.40 = int (1.6)     
     20.1.1.1 = tagged_vlan (tagged 1.2)     
     1.1.1.2 = trunk_vlan (tr_test: 1.10 1.11)     
     1:1:1:1:ffff:ffff:ffff:eeee = vlan6 (1.1)     
     

    Is that what you need?
  • Nice work, Hum! That's where I was going, just didn't get there fast enough...