November 4, 20169 yr Need to figure out how many IP Addresses are being used on the Public Internet side of the company (so our DMZ LTM). Anyone do this on a regular basis?
November 4, 20169 yr Author This is what I'm doing First I run a command to identify what partitions are on the LTM tmsh -c "cd /;list sys folder" sys folder / { device-group Common/device-group-failover-DMZ inherited-devicegroup false inherited-traffic-group false traffic-group Common/traffic-group-1 } sys folder Citrix { device-group Common/device-group-failover-DMZ inherited-devicegroup true inherited-traffic-group true traffic-group Common/traffic-group-1 } sys folder Common { device-group Common/device-group-failover-DMZ inherited-devicegroup true inherited-traffic-group true traffic-group Common/traffic-group-1 } sys folder Production { device-group Common/device-group-failover-DMZ inherited-devicegroup true inherited-traffic-group true traffic-group Common/traffic-group-1 } I then run the following command which looks at all virtual servers in the Production partition and show me only the virtual server name and the destination IP info [root@usfnt1slbdz01:Active:In Sync] ~ # tmsh list ltm virtual /Production/* | egrep 'ltm|destination' | grep -B1 'destination' ltm virtual /Production/vip.ce.api-prd.thezah.com.http { destination /Production/198.124.81.29:80 I copy the results and paste into Komodo so I can make the information more useful (like comma separated so an import into Excel will be nicer) First I replace (turn regular expression on) with a single comma {\n Next I find the below and replace with nothing destination \/Production\/ Finally I find and replace with nothing ltm virtual \/Production\/ Save file as a .csv and open it in Excel and its all pretty
November 4, 20169 yr Author Even a slightly better way would be to use the show command which will tell you if the virtual server is available, offline, unknown Run the following command to get a list of the virtual servers and Availability and Destination IP Address tmsh show ltm virtual /Integration/* | egrep 'Ltm|Destination|Availability' | grep -B2 'Destination' Copy the results to Komodo (or your text editor) and its the same principal as above. Find the following and replace with nothing Ltm::Virtual Server: Next find the following and replace with Integration, /Integration/ Next find the following and replace with a single comma .http\n Then find the following and replace with a single comma .https\n Then find the following and replace with a single comma Availability : \n
Create an account or sign in to comment