Upload
ramzi-hicham-erreur
View
213
Download
0
Embed Size (px)
Citation preview
7/21/2019 Comands for Ccna
1/5
CCNA COURSE 8/2012 Mokhtar Ahmed
CCNA COURSE
Router Commands
N: Command Description
1 Router> Enable Enable mode for advanced monitoring Router! s"o# run $o s"o# t"e run configuration on t"e ram
% Router! s"o# start $o s"o# t"e start up configuration t"at saved
on t"e NvRam & flas" '
( Router! s"o# ip interface brief $o s"o# a brief of all interfaces
) Router! s"o# ip interface $o s"o# all t"e details of t"e interfaces on t"e
router
* Router! s"o# ip route $o s"o# t"e route in t"e routing tables
+ Router! s"o# cdp neig"bors $o s"o# t"e neig"bors t"at directl, connected
* Router! s"o# ip eigrp neig"bors $o s"o# neig"bors t"at use t"e same routing
protocol+ Router! s"o# ip eigrp neig"bors $o s"o# details of neig"bors
- Router! s"o# ip eigrp topolog, $o s"o# t"e routing table and t"e bac.up pat"
for t"e eigrp routing protocol
/ Router! s"o# ip protocols $o s"o# t"e routing protocol t"at it0s #or. and
give t"e active protocol active interface
routing information source admin distance
routing for net#or.
12 Router! s"o# controllers interface $o c"ec. if ,our #ic. is dte or dce in line % andt"e cloc. rate and connection t,pe
11 Router! s"o# ip ospf neig"bors $o s"o# neig"bors t"at understand ospf
1 Router! s"o# ip ospf interface $o s"o# t"e interfaces t"at run on ospf1% Router! s"o# arp $o s"o# t"e arp cac"e
1( Router ! s"o# ip rip database $o s"o# database of rip
1) Router! ping ip $o c"ec. if t"ere is a connection oriented
1* Router! ping 1+323231 $o c"ec. tcp4ip model on ,our pc
1+ Router! $race route $o troubles"ooting t"e connection from end to
end
1- Router! configuration5terminal 6lobal configuration mode
1/ Router &config'! "ostname name $o rename t"e router
2 Router &config'! banner motd 7 $o ma.e a banner message to be s"o#ing in
start up t"e 7 ,ou can c"ange it as ,ou #antand u must end ,our message #it" t"is signs
1 Router &config'! line console 2
Router &config5line'! pass#ord pass#ord
Router &config5line'! login
$o configure login pass#ord
Router &config'! line vt, 2 (
Router &Config5line' ! pass#ord pass#ord
Router &config5line' ! login
$o configure vt, used for telnet and ss" from 2
to 1)
% Router &config'! enable secret $o configure enable pass#ord and it0s
encr,pted b, md)
( Router &config'! service pass#ord5encr,ption $o encr,pts all current and future pass#ord
) Router &config'! interface serial 2 $o configure interface serial* Router &config'! interface Et"ernet 2 $o configure Et"ernet interface
+ Router &config'! interface 8ast Et"ernet 2 $o configure fast Et"ernet interface
CCNA COURSE Mokhtar Ahmed
7/21/2019 Comands for Ccna
2/5
CCNA COURSE 8/2012 Mokhtar Ahmed
- Router &config5if'! ip address 99ip99 999mas.99 $o configure ipv( address to interface and
mas.
/ Router &config5if'! no s"utdo#n $o configure interface to turn on & all interface
are in s"utdo#n mode b, default'
%2 Router &config5if'! cloc. rate *(222 $o configure cloc. rate and s,nc"roniation forDCE #e use it on null modem configuration
&bac.bone'
%1 Router &config'! ip route net#or.address mas.vector or ip of ne;t "op
Used to configure static route #e use t"e e;itinterface or vector if #e are direct connected to
t"e ot"er router and #e use t"e ip of ne;t "op if
#e connected from point to multi point
% Router &config' ! ip route 2323232 2323232 s 242 $"is configuration used for summariation of
all ipv( net#or.s
%% Router &config' ! ip classless $o activate default route and t"e classless ip
and it0s enabled b, default
%( Router &config' ! Router Rip $o enable rip ver 1 routing protocol
%) Router &config5router'! net#or. direct connected
net#or.
$o c"ose t"e interface t"at use t"is net#or.
%* Router &config'! Router Rip
Router &config5router'! version
$o enable rip ver routing protocol
%+ Router &config'! no commands $o negate certain protocol or command
%- Router &Config'! Router igrp AS! $o enable igrp routing protocol and #e "ave to
c"ose t"e autonomous s,stem number
%/ Router &config'! Router eigrp AS! $o enable eigrp routing protocol and #e "ave to
#rite t"e as number
(2 Router &config'! passive5interface interface $o ma.e a certain interface passive
(1 Router ! debug ip rip $o monitoring t"e processing of rip in t"e
bac.ground( Router ! debug ip eigrp pac.ets $o s"o# t"e processing of eigrp pac.ets
(% Router ! debug routing $o s"o# routing table processing
(( Router ! debug ip ospf events to s"o# processing of ospf events
() Router ! undebug all $o terminate all opened debugs
(* Router &config' ! Router ospf processid
Router &config5router'! net#or. net#or. #3c3m area
id
$o run ospf routing protocol #it" process id to
separate t"e database and area id to separate
t"e processing in different routers
(+ Router &config'! ip Nat pool poolname startip endip
netmas. subnetmas.
Router &config'! ip Nat inside source list acl! or name
pool poolname
Router &config'! interface e2
Router &config'! ip nat inside
Router &config'! ip nat outside
Enable nat
And enable it on interface inside and outside
(- Router &config'! access5list no permit4den, ip mas. $o configure access list
(/ Router &config'! ip nat pool poolname startip endip
netmas.
Router &config'! ip nat inside source list acl! pool
poolname overload
$o enable pat
)2 Router &config'! int e2
Router &config5if'! no ip addressRouter &config5if'! no s"utdo#n
Router &config'! int e231
Router &config5subif'! ip address ip mas.
$o divide t"e p",sical interface to sub
interfaces ,ou can divide t"em to ( milliard subinterface #e use it for enable routing bet#een
vlans
7/21/2019 Comands for Ccna
3/5
CCNA COURSE 8/2012 Mokhtar Ahmed
Router &config5subif' ! encapsulation dot1= vlan! tagging #e "ave to assign t"e encapsulation
t,pe for eac" sub interface
)1 Router! cop, running5configuration start5
configuration
$o save t"e configuration from t"e RA to t"e
flas" memor, &N?ram'
) Router ! erase start5configuration $o erase saved configuration from t"e flas"
memor, &N?RA'
)% Router ! s"o# version $o s"o# soft#are and "ard#are features
)( Router po#er on4off
C$R@ BREA "ile router restarting'
Rommon > confreg 1(
Rommon > reset
Router ! cop, start run
After c"anging pass#ord ,ou must save ,our #or.
Router ! cop, run start
Do not forget to c"ange t"e value of 1( to t"e
default value to run in normal seuencing
Router &config'! configure5register 12
$o reset enable pass#ord
$"is steps must be done #it" console cable onl,
Router #ill restart and open t"e dialog
configuration also #e #ill sa, no and t"en go on
into enable mode
After last step ,ou can c"ange t"e pass#ord to
ma.e sure t"at all t"e configuration is still alive
)) Router &Config' ! ip d"cp pool nameRouter &config5d"cp'! net#or. net#or. mas.
Router &config5d"cp' ! default5router ip of router
Router &config5d"cp' ! dns server ip of dns
Router &config' ! ip d"cp e;cluded5address startip endip
$o configure DCF service on a router and
assign a pool
)* Router ! s"o# d"cp binding $o s"o# assigned ip address to #itc" "ost
)+ Router &config' ! access5list no 15>// premit4den, src
ip #3c3m
$o create standard access list it0s used to filter
traffic
)- Router &config' ! access5list standard4e;tended
aclname
Router &Config5std5nacl'! permit4den, srcip #3c3m
$o create standard named access list
)/ Router &config' ! interface serial 2
Router &config5if' ! ip access5group no!4name in4out
$o activate access list on a interface
*2 Router &config' access5list 1225>1// permit4den,
protocol srcip src #3c3m operator src port protocol dst
ip dst #3c3m operator dst port protocol
$o create numbered e;tended access list t"at
#e can den, a certain pc to a certain protocol
suc" as "ttp or ftp or "ttps or certain dst ip*1 Router &config' ! ip access5list standard4e;tended
name
Router &config5e;t5nacl' ! permit4den, protocol srcip
src#3c3m operator src port protocol dstip dst #3c3m
operator dst port protocol
$o create e;tended named access list
* Router &config5if'! ip access5group no!4name in4out $o activate e;tended named access list on
certain interface
*% Router &config' ! line vt, 2 (
Router & Config5line' ! access5class aclno!4name in
$o activate acl on line vt, for telnet uses it0s
increase securit, for t"e telnet
*( Router ! s"o# access5list
Router ! s"o# ip access5list no!4number
$o s"o# all acl of all routed protocol or specific
acl
CCNA COURSE Mokhtar Ahmed
7/21/2019 Comands for Ccna
4/5
CCNA COURSE 8/2012 Mokhtar Ahmed
S#itc" Commands
1 S#itc" > enable $o open enable mode Frivilege mode for advanced
monitoring
S#itc" ! s"o# running5configuration $o s"o# t"e running configuration on t"e RA% S#itc" ! s"o# vlan $o s"o# vlan3dat file & vlan database and #"at is stored
on it '
( S#itc" ! s"o# vtp status $o s"o# t"e status of t"e vtp domain and t"e revision
number
) S#itc" ! s"o# vtp pass#ord $o s"o# vtp pass#ord
* S#itc" ! s"o# startup configuration $o s"o# start up configuration file t"at saved on t"e
flas"
+ S#itc" ! s"o# interface trun. $o s"o# details of all trun. interfaces
- S#itc" ! s"o# dtp $o s"o# d,namic trun. protocol information
/ S#itc" ! s"o# arp $o s"o# arp table
12 S#itc" ! s"o# cdp neig"bors $o s"o# details of neig"bors Cisco onl,
11 S#itc" !s"o# ac address5table $o s"o# ac address table
1 S#itc" ! s"o# port5securit, $o s"o# #itc" port are secured
1% S#itc" ! s"o# spanning5tree $o s"o# spanning tree information
1( S#itc" ! s"o# version $o s"o# version of GOS soft#are and "ard#are
1) S#itc" ! configure terminal $o enter t"e global configuration mode
1) S#itc" &config' ! banner motd 7 $o configure a banner message to displa, on s#itc"
booting
1* S#itc" &config' ! "ostname name $o c"ange t"e displa, name for t"e device
1+ S#itc" &config' ! vlan ! $o create a ne# vlan
1- S#itc" &config5vlan'! name name $o create a name for t"e vlan1/ S#itc" &config5if'! s#itc"port mode access $o c"ange port mode from d,namic to access #e use
port access for end devices onl,
2 S#itc" &config5if'! s#itc"port mode trun. $o c"ange port mode from d,namic to trun. mode
Gn Cisco s#itc" it0s done automaticall,
1 S#itc" &config5if' ! s#itc" port access vlan
!
$o assign vlan in certain port on t"e s#itc"
S#itc" &config' ! vtp domain name $o configure vlan trun.ing protocol ?$F DOAGN
&CGSCO FROFERGA$ERH '
% S#itc" &config' ! vtp pass#ord pass#ord $o assign a pass#ord for t"e vtp domain
( S#itc" &config' ! line vt, 2 1) $o mange s#itc"es remotel,
) S#itc" &config5line'! pass#ord pass#ord $o assign a pass#ord for t"e vt,
* S#itc" &config5line'! login $o assign t"is pass#ord #"ile logging to s#itc"
remotel,
+ S#itc" &config'! interface vlan 1
S#itc" &config5if' ! ip address ip mas.
S#itc" &config5if' ! no s"utdo#n
S#itc" &config' ! ip default gate#a, ip of
router
$o assign ip address for s#itc" processor to use it in
telnet connection
Assign ip address and mas.
Add default gate#a, &router ip '
- S#itc" &config' ! cop, running5
configuration start configuration
$o save configuration from RA to flas" memor,
&N?RA '
/ S#itc" &config5if'! s#itc"port port5securit, ma; 2 I 12(
$o activate port securit,C"ose number of allo#ed mac address t"at can run on
t"is port
%2 S#itc" &config5if' ! s#itc"port port5 $o assign mac address staticall,
CCNA COURSE Mokhtar Ahmed
7/21/2019 Comands for Ccna
5/5
CCNA COURSE 8/2012 Mokhtar Ahmed
securit, mac mac address
%1 S#itc" & config5if' ! s#itc"port port5
securit, stic.,
$o ma.e t"e first mac saved is t"e onl, mac t"at can
use t"is port and drop ot"er data from an, ot"er mac
% S#itc" &config5if' ! s#itc" port port5
securit, violation
s"utdo#n4restrict4protect
$o c"ange t"e action from s"utdo#n to restrict or
protect if ot"er mac address not assign in securit,
CCNA COURSE Mokhtar Ahmed