Display configuration of selected interface

The options provided in this feature allow you to display all the configurations on a specified interface or VLAN with a single command. You can use the options with the startup config command, show config, and the running config command, show running-config.

Running configuration output

You can display the running configuration using this command. An example of this output is shown in the ‘Running Configuration Output for Interfaces A2–A4’ example below.

Syntax

show running-config [interface <port-list | loopback <0-7> | vlan vlan-id-list] [structured]

Displays running configuration information about the selected interface when one is specified. The interfaces can be ports, VLANs, or SVLANs.

Note: For the 5400zl, 3800, and 8200zl switches, when the command is executed in enhanced secure mode the following prompt displays:

Do you want to show sensitive information(y/n)?

If ‘y’ is entered, the normal command output is displayed on the console. If ‘n’ is entered, all the sensitive information is hidden and will be displayed as asterisks (‘*****’). The default option is ‘n’ when interactive mode is disabled. For more information, see the chapter "Secure Mode (5400zl, 3800, and 8200zl)" in the Access Security Guide for your switch.

structured: Groups the config command information output in a logical manner. When the structured option is entered, the output displays the configuration settings, such as spanning-tree, followed by a list of all the switch interfaces showing any configured settings for each interface. The VLAN configuration information is displayed after the interface information.

When the structured option is not entered, the output first displays only the interfaces that have configuration settings. The other settings, such as spanning-tree, are displayed after the interfaces, and then the VLAN configuration information is displayed.


[NOTE: ]

NOTE: Theshow running config interface/vlan/svlan command output cannot be downloaded to the switch; it will not download correctly. Copying and pasting the displayed configuration information into the switch configuration is not supported. This feature only provides a display of all the configuration information for a selected interface or range of interfaces in a single view.


Running configuration output for interfaces A2 - A4

HP Switch(eth-A2-A4)# show running-config

Running configuration:

; J8698A Configuration Editor; Created on release #K.15.10.0001
; Ver #02:0b:ef:e6
hostname "HP Switch"
interface A2
   disable
   name "test1"
   flow-control
   broadcast-limit 80
   speed-duplex 100-full
   unknown-vlans Block 
   qos priority 4 
   lacp Passive
   gvrp join-timer 30
   gvrp leave-timer 60
   gvrp leaveall-timer 700
exit
interface A3
   disable name "test1"
   flow-control
   broadcast-limit 80
   speed-duplex 100-full
   unknown-vlans Block
   qos priority 4
   lacp Passive
   gvrp join-timer 30
   gvrp leave-timer 60
   gvrp leaveall-timer 700
exit
vlan 1
   name "DEFAULT_VLAN"
   untagged A1-A4,C1-C24,F1-F4
   ip address dhcp-bootp
   exit
interface A2
   dhcp-snooping trust
   bandwidth-min output 20 10 10 10 20 10 10 10
   rate-limit bcast in percent 75
   ipv6 access-group "check" in
   exit
interface A3
   dhcp-snooping trust
   bandwidth-min output 20 10 10 10 20 10 10 10
   rate-limit bcast in percent 75
   ipv6 access-group "check" in
   exit

The example below shows an example of the running config for a range of interfaces. The configuration information for interfaces A2 and A3 is now displayed together.

Running config output for a specified interface range

HP Switch(config)# show running-config interface A2-A3

Running configuration:

interface A2
   disable
   name "test1"
   flow-control
   broadcast-limit 80
   speed-duplex 100-full
   unknown-vlans block
   qos priority 4
   gvrp join-timer 30 leave-timer 60 leaveall-timer 700
   dhcp-snooping trust
   lacp passive
   bandwidth-min output 20 10 10 10 20 10 10 10
   rate-limit bcast in percent 75
   ipv6 access-group "check" in
   untagged vlan 1
   exit
interface A3
   disable
   name "test1"
   flow-control
   broadcast-limit 80
   speed-duplex 100-full
   unknown-vlans block
   qos priority 4
   gvrp join-timer 30 leave-timer 60 leaveall-timer 700
   dhcp-snooping trust
   lacp passive
   bandwidth-min output 20 10 10 10 20 10 10 10
   rate-limit bcast in percent 75
   ipv6 access-group "check" in
   untagged vlan 1
   exit

The example below shows an example of the running config file for a range of interfaces after some configuration changes have been made.

Running config output for a range of interfaces

HP Switch(config)# no stack
HP Switch(config)# mesh 2-3
Command will take effect after saving configuration and reboot.

HP Switch(config)# write memory
HP Switch(config)# reload

HP Switch# show running-config interface 2-3

Running configuration:

interface 2
   untagged vlan 1
   mesh
   exit
interface 3
   flow-control
   untagged vlan 1
   mesh
   exit

The example below is an example of the running config output showing VLAN information.

Running config output showing VLAN information

HP Switch(config)# show running-config

Running configuration:
; J8698A Configuration Editor; Created on release #K.15.10.0001
; Ver #02:0b:ef:e6
hostname "HP Switch"
module 1 type J9309A
module 3 type J8702A
module 6 type J8702A
ip routing
vlan 1
   name "DEFAULT_VLAN"
   untagged A1-A4,C1-C24,F1-F24
   ip address dhcp-bootp
   exit
vlan 2
   name "test-vlan-2"
   ip helper-address 4.1.1.1
   ip helper-address 5.1.1.1
   ip address 1.1.1.1 255.255.255.0
   ipv6 address 2001::/64 anycast
   ipv6 enable
   exit
vlan 3
   name "VLAN3"
   ip helper-address 7.1.1.1
   ip forward-protocol udp 7.1.1.1 snmp
   ip forward-protocol udp 11.1.1.2 dns
   no ip address
   exit
vlan 4
   name "VLAN4"
   ip address 5.1.1.1 255.255.255.0
   ip bootp-gateway 5.1.1.1
   exit
logging 10.0.102.90
logging system-module ospf
ip route 5.1.1.0 255.255.255.0 vlan 4 distance 3

In the example below, the configuration information for VLAN 4 is now displayed in one place.

Running config output for a range of VLANs

HP Switch(config)# show running-config vlan 3-4

Running configuration:

vlan 3
   name "VLAN3"
   ip helper-address 7.1.1.1
   ip forward-protocol udp 7.1.1.1 snmp
   ip forward-protocol udp 11.1.1.2 dns
   no ip address
   exit
vlan 4
   name "VLAN4"
   ip address 5.1.1.1 255.255.255.0
   ip bootp-gateway 5.1.1.1
   ip route 5.1.1.0 255.255.255.0 distance 3
   exit

Below is an example of the running config for a range of VLANs after configuration changes have been made to selected VLANs.

Output for running config for a range of VLANs

HP Switch(config)# dhcp-snooping
HP Switch(config)# vlan 14
HP Switch(vlan-14)# exit
HP Switch(config)# vlan 15
HP Switch(vlan-15)# exit
HP Switch(config)# vlan 23
HP Switch(vlan-23)# exit
HP Switch(config)# dhcp-snooping vlan 14-15
HP Switch(config)# static-mac 00:11:22:33:44:55 vlan 23 interface A3
HP Switch(config)# spanning-tree instance 2 vlan 15

HP Switch(config)# show running-config vlan 14-15

Running configuration:

vlan 14
   name "VLAN14"
   no ip address
   dhcp-snooping
   exit
vlan 15
   name "VLAN15"
   no ip address
   dhcp-snooping
   spanning-tree instance 2
   exit

Startup configuration output

You can display the startup configuration using this command. An example of the startup configuration output is shown in the ‘Startup Configuration Output’ example below.

Syntax

show config [interface <port-list | loopback <0-7> | vlan<vlan-id-list> ]

Displays startup configuration information about the selected interface when one is specified. The interfaces can be ports, VLANs, or SVLANs.

Note: For the 5400zl, 3800, and 8200zl switches, when the command is executed in enhanced secure mode the following prompt displays:

Do you want to show sensitive information(y/n)?

If ‘y’ is entered, the normal command output is displayed on the console. If ‘n’ is entered, all the sensitive information is hidden and will be displayed as asterisks (‘*****’). The default option is ‘n’ when interactive mode is disabled. For more information, see the chapter "Secure Mode (5400zl, 3800, and 8200zl)" in the Access Security Guide for your switch.

Startup configuration output

HP Switch(config)# show config

Startup configuration:

; J8698A Configuration Editor; Created on release #K.14.54C
; Ver #02:0b:ef:e6
hostname "HP Switch"
module 1 type J9309A
module 3 type J8702A
module 6 type J8702A
vlan 1
   name "DEFAULT_VLAN"
   untagged A1-A4,C1-C9,C15-C24,F1-F24
   ip address dhcp-bootp
   no untagged C10-C14
   exit
vlan 5
   name "VLAN5"
   untagged C10-C14
   ip address 5.1.1.1 255.255.255.128
   exit
interface loopback 5
   ip address 7.1.1.1
   exit
interface loopback 7
   ip address 12.1.1.1
   exit
snmp-server community "public" unrestricted

Below is an example of the startup config output for a selected VLAN.

Startup config output for a specific VLAN

HP Switch(vlan-5)# show config vlan 5

Startup configuration:

vlan 5
   name "VLAN5"
   untagged C10-C14
   ip address 5.1.1.1 255.255.255.128
   exit

Below shows an example of the startup config output for a range of interfaces for a specific VLAN.

Startup config output for a range of interfaces for a specific VLAN

HP Switch(vlan-5)# show config interface C10-C13

Startup configuration:

interface C10
   untagged vlan 5
   exit
interface C11
   untagged vlan 5
   exit
interface C12
   untagged vlan 5
   exit
interface C13
   untagged vlan 5
   exit