

Which is nicer to use and read in scripts. The output would be a clean IP address like this: 123.456.789.1 If you know the interface name of the connection you need an IP address from you can just run this command let’s assume you want en0 which is the main Ethernet port on my Mac Mini: ipconfig getifaddr en0 The first address of 127.0.0.1 is the localhost loopback address, 123.456.789.1 is the address connected to en0 on my Mac Mini (aka: the main Ethernet port) and the 192.168.56.1 is vboxnet0 which is connected to my local install of VirtualBox.īut that can be confusing if you definitely just want a clean IP address. I downloaded the script twice in case a download had produced a corrupted file.While your question implies the usage of a mouse in a GUI to get the IP address, an easy way from the terminal/command line is to use a combo of ifconfig and grep like this note I am showing my actual output but changing IP addresses connected to me to 123.456.789.1 for this example: ifconfig | grep "inet "Īnd that would return something like this: inet 127.0.0.1 netmask 0xff000000 Interface is of type show configuration interfaces ge-0/0/0 [edit interfaces run show ethernet-switching table interface ge-0/0/4 | display xmlġ unicast problem here (not sure, if I have to call the sript with the '0' or '0.0' - so I tried op show-if-ips interface ge-0/0/0.0Įrror: Failed to evaluate the 'select' op show-if-ips interface ge-0/0/0Įrror: Failed to evaluate the 'select' expression Also the configuration and slax attached. Please find the following capture on my ex4200 again.


Root#show ethernet-switching table interface ge-0/0/4 | display xmlįamily ethernet-switching not configured on ge-0/0/4.0 Root# run show ethernet-switching interfaces ge-0/0/4 | display xml Root# run op show-if-ips interface fe-0/0/4Įrror: Failed to evaluate the 'select' expression. I used another SRX100 for testing, please find the following recapture logging: Please find the following op show-if-ips interface ge-0/0/0Įrror: runtime error: file /var/db/scripts/op/show-if-ips.slax element for-eachĮrror: Failed to evaluate the 'select' show arp | display show ethernet-switching interfaces ge-0/0/0 | display xml
