Strony

Junos script - get interfaces and security zones

I have wrote simple junos script based on idea from juniper forum. Script shows zones and its interfaces with network address. Additional information is routing table in which interface is assign. It is very important information in case of multi VRs SRX configuration when we will set up security policy between virtual router instances.

Script is shown bellow. You must put it into /var/db/scripts/op/ directory on your SRX and add script to configuration.
set system scripts op file get-interfaces.slax

Example output:
reth0.19            xx.x.x/24           srv-app             core.inet.0         
reth0.10            xx.x.x/24           srv-db              core.inet.0         
reth0.15            xx.xx.x.xx/30       core                core.inet.0         
reth0.25            xx.xx.xx.xxx/29     logserver           inet.0                      
reth0.910           xxx.xxx.xxx.xxx/28  untrust             inet.0              
reth0.911           xx.xxx.xx.xxx/28    bh-untrust          bh.inet.0           
reth0.922           xxx.xx.xxx.xxx/28   op-internet         op.inet.0         
reth0.973           xx.xx.x/24          bh-f5-dmz           bh.inet.0           
reth0.944           xx.xx.x/24          bh-dmz-www          bh.inet.0   

Brak komentarzy:

Prześlij komentarz