cancel
Showing results for 
Search instead for 
Did you mean: 

Show entire port configuration for a specific port

Show entire port configuration for a specific port

Mike_Rodriguez
New Contributor
I would like to have the entire configuration for a specific port > output in the same way you can view the entire configuration for a vlan with the pipe command.

as an example:
switch.name # show config | i V123
create vlan "V123-x_x" vr vr-xxx-xxx
configure vlan V123-x_x tag 123
configure vlan V123-x_x add ports 2:21, 4:7 tagged
configure vlan V123-x_x ipaddress 1.2.3.4 255.255.255.255
enable ipforwarding V123-x_x
enable bootprelay ipv4 V123-x_x
configure ospf add vlan V123-x_x area x.x.x.x passive
configure ospf vlan V123-x_x priority x
enable stpd S123-x_x auto-bind vlan V123-x_x
create vrrp vlan V123-x_x vrid x
configure vrrp vlan V123-x_x vrid x priority xxx
configure vrrp vlan V123-x_x vrid x preempt delay xx
configure vrrp vlan V123-x_x vrid 1 track-mode any
configure vrrp vlan V123-x_x vrid 1 accept-mode on
configure vrrp vlan V123-x_x vrid 1 add 1.2.3.4
enable vrrp vlan V123-x_x vrid x

!outputs the entire configuration for vlan 123

I would like to do the same thing for a specific port.
Some of the options to output the configuration for a port are:

sh port 1 information detail
show config | i 1 > where 1 is a port #. but 1 doesn't work because there are a lot of other instances where the # 1 is used in a configuration string.

you could do:
show config | i 45 > and the output is fine. but it won't work with the lower port #'s.

What i want output is all of the config and create commands that are applied to the port in question.

Ideally it would like it look something like this:

switch.name # show config | i Port 1 > but you can't do this because you cannot have a space between the word Port and 1. I have tried "Port 1" 'Port 1' Port-1 Port*1 and a few others. But none seem to work.

So... is there a way to have just the configuration commands output for a specific port doing something like this:

switch.name # show config | i Port 1
or
switch.name # show port config | i config

For some context, it would be the same thing in Cisco IOS when doing this:
switch#sh run int gi1/1
!outputs the configuration for int gi1/1

Any output (pun intended) would be Appreciated 🙂

Thanks,

~Mike



1 ACCEPTED SOLUTION

Michael_Andreas
Extreme Employee
i played a bit and figured out that :

show configuration | include "(port |ports |ports all|ports .-.])"
will show you icluding ( all) rages.

not sure if this is parcticable .

View solution in original post

9 REPLIES 9

Leviodjos
New Contributor
Have tried this? switch.name # show port config port-numb | I 2 (or 1:2)

This is the output:

Slot-1 switch_name.3 # sho ports configuration port-number | i 1:2
1:2 VR-Default E A ON AUTO 1000 AUTO FULL NONE UTP
%% Refresh display exited by output filter. Use "no-refresh" if applicable.

Eric_Burke
New Contributor III
Okay - maybe...

sho config | i (port 1$|ports 1$)

Eric_Burke
New Contributor III
Gave it a few trys myself (not very strong in regex). I was able to get at it using two variables:

i port.1$
i ports.1$

this looks for port or ports and caps the end of the query after the first "1".

It's two lines instead of one, but I'm still experimenting to see if EXOS allows any type of grouping (which regex seems to support, but I can't get working on EXOS).

Eric

UPDATE: Scratch that post - not reliable (and not sure why). Still working on it...

Michael_Andreas
Extreme Employee
Hi Mike,

you could try show config detail | include "port 3"
followed by show config detail | include "ports 3"

this should show you the port configuration

Regards

Michael

Hello, Michael!

You right, this output show you only config lines where clearly written "port 3"
BUT
if in config present line with port-list, like
configure vlan Default add ports 1-6
this configuration isn't visible


Thank you!
GTM-P2G8KFN