Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sorry if my explanation is confusing. I need to get all the ip addresses of a Juniper Switch and Router (different models). On Cisco IOS I can get that with show ip interface brief | exclude unassigned:

cisco_device>show ip interface brief | exclude unassigned
Interface               IP-Address     OK? Method Status     Protocol
TenGigabitEthernet1/30  10.1.1.24      YES NVRAM  up         up      
Loopback0               10.1.95.2      YES NVRAM  up         up      
Port-channel15          10.1.1.150     YES NVRAM  up         up      
Port-channel39          10.2.1.4       YES NVRAM  up         up      
Port-channel100         10.3.1.2       YES NVRAM  up         up      
Vlan49                  10.4.1.40      YES NVRAM  up         up      

Is there something similar on Junos? Thanks!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You probably want show interfaces:

> show interfaces terse

If you want to exclude interfaces without an IP you can match on inet:

> show interfaces terse | match inet
share|improve this answer
    
That's it! Thanks! –  Megaslav Feb 19 '13 at 19:30
    
Is there a way to add the mac address to your command too? –  Megaslav Feb 19 '13 at 19:39
    
@Megaslav You'd have to use the non-terse output which outputs the information on multiple lines, which is more difficult to filter. –  mgorven Feb 19 '13 at 19:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.