cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
603
Views
5
Helpful
7
Replies

Show Command to Pull Interfaces IPs and Subnet Mask together in Brief

bravealikhan
Level 1
Level 1

Hi All,

I'm trying to pull all interfaces with IPs and subnet masks together, is there anyway we could do that from command line?

e.g. show ip int bri | exclude assi gives me list of interfaces and IPs, but I need to pull subnet mask aganist each IP/Interfaces.

 

Thanks 

2 Accepted Solutions

Accepted Solutions

show ip interface | in line | add

Screenshot (175).png

View solution in original post

For NXOS you will have to use regular regex. For example:

show run | include "(ip address|interface)" 

 

Happy to help! Please mark as helpful/solution if applicable.
Get in touch: https://torbjorn.dev

View solution in original post

7 Replies 7

show ip interface | in line | add

Screenshot (175).png

balaji.bandi
Hall of Fame
Hall of Fame

If one of the output suggested not works for you, then you need to use some kind of Python script to pull the information and join back what you looking to report.

there are many example available in git have a look.

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Hello,

you could also use:

Router#sh run | include interface | ip address
interface GigabitEthernet0/0
ip address 1.1.1.1 255.255.255.0
interface GigabitEthernet0/1
ip address 2.2.2.1 255.255.255.0

Thank you so much, this is really beautiful commands, 

love Cisco community support!

 

 

Hi, 

This commend doesn't work on NXOS: version 9.3

show run | include interface | include ip address
                                                                            ^

show running-config interface | include address  (this command is working fine but it only pull ip with mask, which is good, but not interfaces name)

show run | include interface (this command only brings interfaces not not ips and mask)

show run | include interface | include ip address
                                                                             ^
% Invalid command at '^' marker.

Any suggestions will be apprecaited

 

Thanks

 

For NXOS you will have to use regular regex. For example:

show run | include "(ip address|interface)" 

 

Happy to help! Please mark as helpful/solution if applicable.
Get in touch: https://torbjorn.dev

Perfectly worked! Thank you