Beruflich Dokumente
Kultur Dokumente
************
www.networkworld.com/article/2230638/cisco-subnet/moreuseful-output-modifiers.html
After
BeforeSwitch#sh int status
Switch#sh ip int b | exclude un
sh ip int | i line|/..$
:Show Only Non-Phone CDP NeighborsTEST-sw#sh cdp n | e
SEP178
R2#show running-config interface fastEthernet 1/0
https://rekrowten.wordpress.com/2011/10/26/filtering-showrun/
Filtering after Pipe
Sometimes are outputs too long and we are searching just
only one line or outputs with a common attribute. We can
filter almost everything, when using pipe. If I want to
filter out directly connected interfaces in state down, I
will use:
Router#show ip interface brief | i down
In that case, there is another solution. After you start
paging (hitting the space bar) after issuing a command, you
can issue the / command instead. When you do that, the
router expects you to enter a filter immediately following
the forward slash. After you complete the filter, press
enter. The router will skip forward until a match is found.
It is roughly the equivalent of using the previously
mentioned | begin filter.
MyRTR#show run
<output snip>
no aaa new-model
ip subnet-zero
!
!
!
/vty
filtering
line vty 0 4
password notsecure
login
!
End
MyRTR#show run | sec eigrp
router eigrp 1
network 1.0.0.0
network 2.0.0.0
auto-summary
With any of these filter methods; I can combine two or more
filter strings together.
MyRTR#show run | section interface|eigrp
interface FastEthernet0/0
ip address 1.1.1.1 255.255.255.0
router eigrp 1
network 1.0.0.0
network 2.0.0.0
auto-summary
************************************************************
************
R1# show controllers serial 0/0/0
Interface Serial0/0/0
Hardware is SCC
DCE V.35, clock rate 2000000
10.1.1.1
255.255.255.252
N/A
Central
S0/0/0
10.1.1.2
255.255.255.252
N/A
S0/0/1 (DCE)
10.2.2.2
255.255.255.252
N/A
Lo0
209.165.200.225
255.255.255.224
N/A
Branch3
G0/1
192.168.3.1
255.255.255.0
N/A
S0/0/1
10.2.2.1
255.255.255.252
N/A
PC-A
NIC
192.168.1.3
255.255.255.0
192.168.1.1
PC-C
NIC
192.168.3.3
255.255.255.0
192.168.3.1
************************************************************
************
Router(config)#no ip domain-lookup
Router(config)#line con 0
Router(config-line)#logging synchronous
Router(config-line)#history size 100
Router(config-line)#exec-timeout 0 0
Router(config-line)#exit
Router(config)#int g0/0
Router(config-if)#ip add 192.168.1.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#int s0/0/0
Router(config-if)#DEScription to R2
Router(config-if)#ip add 10.1.1.1 255.255.255.252
Router(config-if)#cloc
Router(config-if)#clock r
Router(config-if)#clock rate 128000
Router(config-if)#no shut
Router(config-if)#int s0/0/1
Router(config-if)#DEScription to R3
Router(config-if)#ip add 10.3.3.1 255.255.255.252
Router(config-if)#no shut
************************************************************
***********
no ip domain-lookup
line con 0
logging synchronous
history size 100
exec-timeout 0 0
exit
BRANCH1
Router(config)#hostname Branch1
Branch1(config)#no ip domain-lookup
Branch1(config)#line con 0
Branch1(config-line)#logging synchronous
Branch1(config-line)#history size 100
Branch1(config-line)#exec-timeout 0 0
Branch1(config-line)#exit
Branch1(config)#int s0/0/0
Pri
State
FULL/
Dead Time
Address
00:00:31
10.1.1.2
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 0, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)
Branch1#sho ip ro o
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O
10.2.2.0 [110/128] via 10.1.1.2, 00:01:58,
Serial0/0/0
O
192.168.3.0 [110/129] via 10.1.1.2, 00:01:58,
Serial0/0/0
IP-Address
GigabitEthernet0/0
down
unassigned
YES unset
GigabitEthernet0/1
up
192.168.1.1
YES manual up
Serial0/0/0
down
10.1.1.1
YES manual up
Serial0/0/1
down
unassigned
YES unset
administratively down
administratively down
Vlan1
down
unassigned
YES unset
administratively down
Branch1(config)#username CENTRAL
password cisco
Branch1(config)#int s0/0/0
Branch1(config-if)#ppp authentication chap
Branch1(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0,
changed state to down
---------------------------------------------------------------------------------------------------------------------------------------------
Central
CENTRAL(config)#no ip domain-lookup
CENTRAL(config)#line con 0
CENTRAL(config-line)#logging synchronous
CENTRAL(config-line)#history size 100
CENTRAL(config-line)#exec-timeout 0 0
CENTRAL(config-line)#exit
CENTRAL(config)#int s0/0/0
CENTRAL(config-if)#ip add 10.1.1.2 255.255.255.252
CENTRAL(config-if)#no shut
CENTRAL(config-if)#ip add 10.2.2.2 255.255.255.252
CENTRAL(config-if)#clock rate 128000
CENTRAL(config-if)#no shut
CENTRAL(config)#int Lo0
CENTRAL(config-if)#ip add 209.165.200.225
255.255.255.224
CENTRAL(config-if)#no shut
CENTRAL(config-router)#default-information
originate
CENTRAL#sho ip ospf n
Neighbor ID
Interface
3.3.3.3
Serial0/0/1
1.1.1.1
Serial0/0/0
Pri
State
FULL/
FULL/
Dead Time
Address
00:00:31
10.2.2.1
00:00:31
10.1.1.1
CENTRAL#sho ip ro o
O
192.168.1.0 [110/65] via 10.1.1.1, 00:04:55,
Serial0/0/0
O
192.168.3.0 [110/65] via 10.2.2.1, 00:05:24,
Serial0/0/1
CENTRAL(config)#int s0/0/0
CENTRAL(config-if)#encapsulation ppp
CENTRAL(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed
state to up
Issue the debug ppp commands to observe the effects of changing the PPP configuration on the
Branch1 router and the Central router.
chap
-----------------------------------------------------------------------
-----------------------------------------------------------------------
BRANCH3
Router(config)#no ip domain-lookup
Router(config)#line con 0
Router(config-line)#logging synchronous
Router(config-line)#history size 100
Router(config-line)#exec-timeout 0 0
Router(config-line)#exit
Router(config)#int s0/0/1
Router(config-if)#ip add 10.2.2.1 255.255.255.252
Router(config-if)#no shut
Router(config-if)#int g0/1
Router(config-if)#ip add 192.168.3.1 255.255.255.0
Router(config-if)#no shut
GigabitEthernet0/1
Branch3(config-router)#
Branch3(config-router)#
Branch3(config-router)#net 10.2.2.0 0.0.0.3 area 0
Branch3(config-router)#
01:36:04: %OSPF-5-ADJCHG: Process 1, Nbr 209.165.200.225 on
Serial0/0/1 from LOADING to FULL, Loading Done
Branch3(config-router)#net 192.168.3.0 0.0.0.255 area 0
Branch3#sho ip ospf n
Neighbor ID
Interface
8.8.8.8
Serial0/0/1
Pri
State
FULL/
Dead Time
Address
00:00:34
10.2.2.2
Branch3#sho ip ro o
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O
10.1.1.0 [110/128] via 10.2.2.2, 00:05:28,
Serial0/0/1
Issue the debug ppp commands on the Branch3 router to observe the process, which is
associated with authentication.
Examine the debug PPP messages on the Branch3 router during the
negotiation with the Central router.
Jun 20 04:25:02.079: Se0/0/1 PPP DISC: Authentication configuration changed
Jun 20 04:25:02.079: %LINEPROTO-5-UPDOWN: Line protocol on Interface
Serial0/0/1, changed state to down
Se0/0/1 PPP: Phase is DOWN
ppp73 PPP: Phase is ESTABLISHING
---------------------------------------------------------------------------------------------------------------------------------------------
Branch1#ping 192.168.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.3, timeout is 2
seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max =
2/15/58 ms
PCA>ping 192.168.3.3
from
from
from
from
192.168.3.3:
192.168.3.3:
192.168.3.3:
192.168.3.3:
bytes=32
bytes=32
bytes=32
bytes=32
time=9ms TTL=125
time=2ms TTL=125
time=10ms TTL=125
time=7ms TTL=125
PCC>ping 192.168.1.3
Pinging 192.168.1.3 with 32 bytes of data:
Reply
Reply
Reply
Reply
from
from
from
from
192.168.1.3:
192.168.1.3:
192.168.1.3:
192.168.1.3:
bytes=32
bytes=32
bytes=32
bytes=32
time=3ms
time=8ms
time=2ms
time=7ms
TTL=125
TTL=125
TTL=125
TTL=125
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------