Wildcard Characters in Interface Names
With the
show interfacesandclear interfacescommands, you can use wildcard characters when specifying interface names (in theinterface-nameoption) to refer to groups of interface names without having to type each name individually. Table 3 lists the available wildcard characters.You must enclose all wildcard characters except the asterisk in quotation marks (" ").
Examples: Use Wildcard Characters in Interface Names
Sample Output: List only SONET/SDH interfaces:
user@host>show interfaces terse so*Interface Admin Link Proto Local Remoteso-1/0/0 up upso-1/0/0.0 up up inet 192.168.8.192 --> 192.168.2.250isoso-1/1/0 up downso-1/1/0.0 up down inet 192.168.8.109/30isoso-1/1/1 up upso-1/1/1.0 up down inet 192.168.8.113/30isompls...so-1/3/3 up downso-5/0/0 up upso-5/0/0.0 up down inet 192.168.8.208 --> 192.168.8.209isomplsso-5/0/1 down downso-5/0/2 up down...Sample Output: List only SONET/SDH interfaces in slot 1:
user@host>show interfaces terse so-"[1]"*Interface Admin Link Proto Local Remoteso-1/0/0 up upso-1/0/0.0 up up inet 192.168.2.125 --> 192.168.2.250isoso-1/1/0 up downso-1/1/0.0 up down inet 192.168.2.150/30isoso-1/1/1 up upso-1/1/1.0 up down inet 192.168.2.175/30isomplsso-1/1/2 up upso-1/1/2.0 up down inet 192.168.2.110/30isoso-1/2/0 up downso-1/2/1 up downso-1/3/0 up downSample Output: List all interfaces whose type starts with "s" or "g":
user@host>show interfaces terse "[sg]"*Interface Admin Link Proto Local Remoteso-1/0/0 up upso-1/0/0.0 up up inet 192.168.2.125 --> 192.168.2.250isoso-1/1/0 up downso-1/1/0.0 up down inet 192.168.2.150/30isoso-1/1/1 up upso-1/1/1.0 up down inet 192.168.2.175/30isomplsso-1/1/2 up up...so-5/1/3 up downgre up up