cancel
Showing results for 
Search instead for 
Did you mean: 
Create a Post
Highlighted
Nickel

Network interface / topology information

Any one know of a good way to get gateway (physical and vsx) interface and IP information into a report.  Would like to have a quick reference guide for this information instead of having to click into each gateway and jotting it down.  Basically a script or something to be run to gather the info.

8 Replies
Highlighted

Re: Network interface / topology information

Hi Bill,

I'm not sure what report you have in mind but you should be able to obtain a quick, straightforward list with the following commands:

- fw ctl iflist

- fw getifs

Let us know if neither of the above achieves the intended result.

 

0 Kudos
Highlighted
Nickel

Re: Network interface / topology information

Hi Nick,

I am basically looking for interface name, IP address, and mask.  'fw getifs' looked promising except when using it on a VSX instance then it gave me the 192.168.196.x IPs instead of the real IP.  We are running R80.10.

Highlighted
Nickel

Re: Network interface / topology information

Also I have tried 'cpstat -f ifconfig os' and  'cpstat -f interfaces fw' they give me the 192.168.196.x ips as well in vsx.

0 Kudos
Highlighted

Re: Network interface / topology information

Hi Bill,

At the risk of suggesting the obvious, have you tried ifconfig by any chance? It is meant to display the interfaces in VSX context as per sk115238.

Thanks.

0 Kudos
Highlighted

Re: Network interface / topology information

For VSX, you could use the VSX provisioning tool from your management server to dump a config of each VS. This would give you Interfaces and Routes. You could script this up to run regularly and pipe all the output to a txt file

vsx_provisioning_tool -s <SMS IP> -u <USERNAME> -p <PASSWORD> -o show vd name <NAME OF VS GW>

 

 

R80 CCSA / CCSE
Highlighted
Nickel

Re: Network interface / topology information

Thanks.  I just ended up using command to get the info I needed.

clish -c "show interfaces all" | grep -E 'Interface|ipv4-address'| grep -Ev 'Not'

Highlighted

Re: Network interface / topology information

Quick and dirty: ifconfig | grep addr
On VSX cluster use: cphaprob -a if
Regards, Maarten
0 Kudos
Highlighted

Re: Network interface / topology information

Hello,

You could also do the following in expert mode if you like so that each interface is listed clearly:

for i in `ls /etc/sysconfig/network-scripts/ifcfg-*`;
do
echo "==========" && cat $i | egrep "DEVICE|IPADDR|NETMASK"
done

The outcome would be something like this:

 

Capture.PNG

 

I hope this helps.