Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Bill_Ng
Collaborator

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
Nick_Doropoulos
Advisor

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
Bill_Ng
Collaborator

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.

Bill_Ng
Collaborator

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
Nick_Doropoulos
Advisor

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
Daniel_Taney
Advisor

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
Bill_Ng
Collaborator

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'

Maarten_Sjouw
Champion
Champion

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

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.

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events