::cisco black belt::

July 22, 2008

IOS Commands: do

Filed under: IOS Commands — ccxx4488 @ 3:36 pm

This is an incredibly useful command, don’t want to exit or ctrl z etc, just do it!

·    Example 1:

R1(config)#do show run
Building configuration…

Current configuration : 1294 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption

·    Example 2:

R1(config)#ip access-list standard 10
R1(config-std-nacl)#permit 10.0.0.0 0.255.255.255
R1(config-std-nacl)#permit 20.1.0.0 0.0.255.255
R1(config-std-nacl)#permit 100.0.0.0 0.255.255.255
R1(config-std-nacl)#deny any

R1(config-std-nacl)#do show access-list 10
Standard IP access list 10
10 permit 10.0.0.0, wildcard bits 0.255.255.255
20 permit 20.1.0.0, wildcard bits 0.0.255.255
30 permit 100.0.0.0, wildcard bits 0.255.255.255
40 deny   any

IOS Commands: default interface

Filed under: IOS Commands — ccxx4488 @ 3:29 pm

This has to be one of the coolest commands for a lab environment. Need to quickly reset an interface to default, bang!

Example:

·    Current config of fa0/1:

R1#show run | begin FastEthernet0/1
ip address 20.0.0.1 255.255.255.0 secondary
ip address 10.0.0.1 255.255.255.0
ip access-group 10 in
ip access-group 20 out
speed 100
full-duplex

·    R1(config)#default interface fa0/1

Building configuration…

Interface FastEthernet0/1 set to default configuration
R1(config)#do show run | begin FastEthernet0/1
interface FastEthernet0/1
no ip address
duplex auto
speed auto

Create a free website or blog at WordPress.com.