htps://boubakr92.wordpress. htps://boubakr92. wordpress.com/2013/09/16/ccna-chea-shee com/2013/09/16/ccna-chea-shee-par-1/ -par-1/
[CCNA] [CC NA] Cis Cisco co Comm Command ands s Che Cheat at Shee Sheett #1 In this serie of 4-5 posts, we’ll try to create a simple Cisco Commands Cheat Sheet as a reference for CCNA students.
Router odes!
Router>!! "ser mode # $imited to %asic monitorin& commands Router>
Router#!! 'ri(ile&ed mode )e*ec-le(el mode+ # 'ro(ides access to all other router commands Router#
Router(config)#!! &lo%al confi&uration mode # Commands that affect the entire system Router(config)#
Router(config-if)#!! interface mode # Commands that affect interfaces Router(config-if)#
Router(config-subif)#!! su%interface mode # Commands that affect su%interfaces Router(config-subif)#
Router(config-line)#!! line mode # Commands that affect in lines modes )console, (ty, au*+ Router(config-line)#
Router(config-router)#!! router confi&uration mode Router(config-router)#
Chan&in& switch hostname! 1
Switch(config)# hostname SW1
Confi&urin& passwords! 1
SW1(config)# enable secret cisco
2
SW1(config)# enable password notcisco
! MD5 hash ! Clear text
Securin& console port! 1
SW1(config)# line con
2
SW1(configline)# password cisco
3
SW1(configline)# login
Securin& terminal lines! 1
SW1(config)# line "t $
2
SW1(configline)# password cisco
3
SW1(configline)# login
1
ncryptin& passwords! 1
SW1(config)# ser"ice passwordencrption
Confi&urin& %anners! 1
SW1(config)# banner motd %
2
&&&&&&&&&&&&&&&&
3
''*+,-./0D CC0SS .S -,+.2.*0D
4
&&&&&&&&&&&&&&&&
5
%
i(in& the switch an I' address! a ddress! 1
SW1(config)# interface "lan 1
2
SW1(configif)# ip address 13416111 455455455
3
SW1(configif)# no sh7tdown
! or D+C
Settin& the default &ateway! 1
SW1(config)# ip defa7ltgatewa 1341611
Sa(in& confi&uration! 1
SW1# cop r7nningconfig start7pconfig
2
Destination filename 8start7pconfig9: name
3 4
! ress enter to confirm file
27ilding config7ration; 8,<9
5 6
! Short for write memor
7
SW1# wr
8
27ilding config7ration;
9
8,<9
2
/or0in& en(ironment! name loo0up, history, e*ec-timeout and lo&&in& %eha(ior, also (alid for line con 1.
1
SW1(config)# no ip domainloo=7p
2
SW1(config)# line "t $
3
SW1(configline)# histor si>e 15
4
SW1(configline)# exectimeo7t 1 ?
5
SW1(configline)# logging snchrono7s
Confi&urin& switch to use SS2! Confi&ure 3NS domain name! SW1(config)# ip domainname examplecom
1
Confi&ure a username and password! SW1(config)# 7sername admin password cisco
1
enerate encryption 0eys!
he sie of the 0ey modulus in the ran&e of 671 to 81 49
1
SW1(config)# crpto =e generate rsa
2
+ow man bits in the mod7l7s 85149@ 14$
3efine SS2 (ersion to use! SW1(config)# ip ssh "ersion 4
1
na%le (ty lines to use SS2! SW1(config)# line "t $
1 2
SW1(configline)# login local
3
! Ao7 can set "t lines to 7se onl telnet or onl ssh or both as in the example
4
SW1(configline)# transport inp7t telnet ssh
Aliases! "sed to create shortcuts for lon& commands.
3
1
SW1(config)# alias exec c config7re terminal
2
SW1(config)# alias exec s show ip interface brief
3
SW1(config)# alias exec sr show r7nningconfig
3escription, speed and duple*! 1
SW1(config)# interface fast0thernet B1
2
SW1(configif)# description .< *, .*0-0* -,'*0-
3
SW1(configif)# speed 1
4
! *he range =eword 7sed to set a gro7p of interfaces at once
5
SW1(config)# interface range fast0thernet B5 E 1
6
! ,ptions@ 1 1 a7to
SW1(configifrange)# d7plex f7ll (options@ half f7ll a7to)
:erify ;asic Confi&uration! Shows information a%out the switch and its interfaces, RA, N:RA, flash, I
1
Shows the current confi&uration file stored in 3RA. SW1# show r7nningconfig
1
Shows the confi&uration file stored in N:RA which is used at first %oot process. SW1# show start7pconfig
1
$ists the commands currently held in the history %uffer. SW1# show histor
1
Shows an o(er(iew of all interfaces, their physical status, protocol status and ip address if assi&ned. SW1# show ip interface brief
1
1
Shows detailed information a%out the specified interface, its status, protocol, duple*, speed, encapsulation, last 5
min traffic. SW1# show interface "lan 1 Shows the description of all interfaces SW1# show interfaces description
1
Shows the status of all interfaces li0e connected or not, speed, duple*, trun0 or access (lan. SW1# show interfaces stat7s
1
4
Shows the pu%lic encryption 0ey used for SS2. SW1# show crpto =e mp7b=e rsa
1
1
Shows information a%out the leased I' address )when an interface is confi&ured to &et I' address (ia a dhcp
ser(er+ SW1# show dhcp lease
[CCNA] Cisco Commands Cheat Sheet # Confi&urin& port security! a0e the switch interface as access port! SW1(configif)# switchport mode access
1
na%le port security on the interface! SW1(configif)# switchport portsec7rit
1
Specify the ma*imum num%er of allowed AC addresses! SW1(configif)# switchport portsec7rit maxim7m 1
1
3efine the action to ta0e when (iolation occurs! SW1(configif)# switchport portsec7rit "iolation sh7tdown protect restrict
1
! options@ sh7tdown
Specify the allowed AC addresses!
he stic0y 0eyword is used to let the interface dynamically learns and confi&ures the AC addresses of the currently connected hosts.
1
SW1(configif)# switchport portsec7rit macaddress 6Fb5GG6511G5 +++ stic=
! options@
:erify and trou%leshoot port security! Shows the entries of the mac address ta%le! SW1# show macaddresstable
1
<(er(iew of port security of all interfaces! SW1# show portsec7rit
1
Shows detailed information a%out port security on the specified interface!
5
1
SW1# show portsec7rit interface faB5
Confi&urin& :$ANs!
Create a new :$AN and &i(e it a name!
1
SW1(config)# "lan 1
2
SW1(config"lan)# name S0S
Assi&n an access interface to access a specific :$AN!
1
SW1(config)# interface fast0thernet B5
2
SW1(configif)# switchport mode access
3
SW1(configif)# switchport access "lan 1
Confi&urin& an au*iliary :$AN for cisco I' phones! 1
SW1(config)# interface fast0thernet B5
2
! accessing "lan 1 (data) and 14 (Ho.)
3
SW1(configif) #switchport access "lan 1
4
SW1(configif) #switchport "oice "lan 14
Confi&urin& run0s! SW1(config)# interface fast0thernet B1
1 2 3
SW1(configif)# switchport mode tr7n= desirable
! options@ access tr7n= dnamic a7to dnamic
SW1(configif)# switchport tr7n= allowed "lan add 1 except
! options@ add remo"e all
Securin& :$ANs and run0in&! Administrati(ely disa%le unused interfaces! SW1(configif)# sh7tdown
1
're(ent trun0in& %y disa%lin& auto ne&otiation on the interface!
1
SW1(configif)# nonegotiate
2
SW1(configif)# switchport mode access
! or hardcode the port asan access port
6
Assi&n the port to an unused :$AN! SW1(configif)# switchport access "lan 444
1
Confi&urin& :'!
Confi&ure :' mode!
he transparent :' mode is used when an en&ineer wants to deacti(ate :' on a particular switch
1
SW1(config)# "tp mode ser"er
! options@ ser"er client transparent
Confi&ure :' domain name! SW1(config)# "tp domain 0IM0
! casesensiti"e
Confi&ure :' password )optional+! SW1(config)# "tp password cisco
! casesensiti"e
1
1
Confi&ure :' prunin& )optional+! SW1(config)# "tp pr7ning ! onl wor=s on H* ser"ers
1
na%le :' (ersion 8 )optional+! SW1(config)# "tp "ersion 4
1
:erify and trou%leshoot :$ANs and :'! $ists information a%out administrati(e settin& and operation status of interface! SW1# show interfaces if switchport
1
$ists all the trun0 ports on a switch includin& the trun0 allowed :$ANs! SW1# show interfaces tr7n=
1
$ists information a%out the :$ANs! SW1# show "lan Jbrief K id K name K s7mmarL
1
$ists :' confi&uration )mode, domain-name, (ersion, etc+ and re(ision num%er! SW1# show "tp stat7s
1
Shows the :' password! SW1# show "tp password
1
S' optimiation! 7
2ard codin& the root %rid&e )chan&in& %rid&e priority+!
1
SW1(config)# spanningtree "lan 1 root primar
2
SW1(config)# spanningtree "lan 1 root secondar
3
! riorit m7st be a m7ltipl of $G6
4
SW1(config)# spanningtree 8"lan 19priorit F1G4
Chan&in& the S' mode! SW1(config)# spanningtree mode rapidp"st rapidp"st
1
! options@ mst p"st
na%lin& portfast and ;'3" &uard on an interface!
'ortfast and ;'3" &uard are ena%led only on interfaces connected to end user hosts
1
SW1(configif)# spanningtree portfast
2
SW1(configif)# spanningtree bpd7g7ard enable
Chan&in& port cost! SW1(configif)# spanningtree 8"lan 19 cost 45
1
;undlin& interfaces into an etherchannel! SW1(configif)# channelgro7p 1 mode on on
1
! options@ a7to desirable
S' (erification and trou%leshootin&! Shows detailed info a%out S' state! SW1# show spanningtree
1
Shows S' info only on a specific port! SW1# show spanningtree interface faB4
1
Shows S' info only for a specific :$AN! SW1# show spanningtree "lan 1
1
Shows info a%out the root switch! SW1# show spanningtree 8"lan 19 root
1
Shows info a%out the local switch! SW1# show spanningtree 8"lan 19 bridge
1
Show the state of the etherchannels!
8
1
SW1# show etherchannel 1
'ro(ides informational messa&es a%out the chan&es in the S' topolo&y! SW1# deb7g spanningtree e"ents
1
na%lin& or disa%lin& C3'! na%lin& C3' &lo%ally on a switch! SW1(config)# cdp r7n
1
3isa%lin& C3' on a &i(en interface! SW1(configif)# no cdp enable
1
"sin& C3' for networ0 (erification and trou%leshootin&! Shows &lo%al information a%out C3' itself! SW1# show cdp
1
Shows information a%out C3' on a specific interface! SW1# show cdp interface faB4
1
Shows information a%out the directly connected cisco de(ices includin& interfaces names capa%ilities! SW1# show cdp neighbors
1
Shows detailed information a%out the nei&h%orin& cisco de(ices includin& de(ice address and (ersion of I
1
SW1# show cdp neighbors detail
2
! ,-
3
SW1# show cdp entr
Shows detailed information a%out the specified entry only! SW1# show cdp entr SW4
1
[CCNA] Cisco Commands Cheat Sheet #! Router %asic confi&uration! his section includes I
9
1
-o7ter(config)# hostname -1
2
-1(config)# enable secret cisco
3 4
-1(config)# line con -1(configline)# password cisco -1(configline)# login
5 -1(configline)# logging snchrono7s
6 7
-1(configline)# exectimeo7t ? -1(configline)# exit
8
-1(config)# line "t $
9
-1(configline)# password cisco
10
-1(configline)# login
11
-1(configline)# logging snchrono7s
12
-1(configline)# exectimeo7t ?
13 14
-1(configline)# exit -1(config)# line a7x -1(configline)# password cisco
15 -1(configline)# login
16 17
-1(configline)# logging snchrono7s -1(configline)# exectimeo7t ?
18
-1(configline)# exit
19
-1(config)# banner motd %
20
&&&&&&&&&&&&&&&&
21
''*+,-./0D CC0SS .S -,+.2.*0D
22 23
&&&&&&&&&&&&&&&& % -1(config)# alias exec c config7re terminal
24 -1(config)# alias exec s show ip interface brief
25 -1(config)# alias exec sr show r7nningconfig
26 27
-1(config)# no ip domainloo=7p -1(config)# ser"ice passwordencrption
10
28 29 30 31 32
-1(config)# ip domainname examplecom -1(config)# 7sername admin password cisco -1(config)# crpto =e generate rsa +ow man bits in the mod7l7s 85149@ 14$
33 -1(config)# ip ssh "ersion 4
34 35 36
-1(config)# line "t $ -1(configline)# login local -1(configline)# transport inp7t telnet ssh
37 38
Confi&urin& router interfaces! Cloc0 rate is set only on the 3C side, typically the IS' side.
1 -1(config)# interface fast0thernet B
2 3
-1(configif)# description .< *, ,C *+-,'N+ SW1 -1(configif)# ip address 1341611 455455455
4
-1(configif)# no sh7tdown
5
-1(configif)# exit
6
-1(config)# interface serial B1B
7
-1(configif)# description W C,0C*., *, -4
8 9
-1(configif)# ip address 1111 455455455454 -1(configif)# cloc= rate 14F -1(configif)# no sh7tdown
10
Confi&urin& Router-
-1(config)# interface fast0thernet B
11
2
-1(configif)# no sh7tdown
3
-1(config)# interface fast0thernet B1
4
-1(configs7bif)# encaps7lation dot1O 1
5
-1(configs7bif)# ip address 1G416F11 455455455
6
-1(configs7bif)# interface fast0thernet B4
7 8
-1(configs7bif)# encaps7lation dot1O 4 -1(configs7bif)# ip address 1G416F41 455455455
Static route! "sin& ne*t hop! -1(config)# ip ro7te 114 455455455 1114F1
1
"sin& e*it interface!
1
-1(config)# ip ro7te 114 455455455 Serial B
2
ote@ 0xit interface can be 7sed in pointtopoint serial lin=s
3efault Route! 1
-1(config)# ip ro7te 1GG111
RI'(8 Confi&uration! 1
-1(config)# ro7ter rip
2
-1(configro7ter)# "ersion 4
3
-1(configro7ter)# networ= 1
4
-1(configro7ter)# no a7tos7mmar
5
! written as an original class
-1(configro7ter)# passi"einterface serial B
RI'(8 :erification! Shows information a%out the runnin& routin& protocol process! -1# show ip protocols
1
Shows the entire routin& ta%le!
12
1
-1# show ip ro7te
Shows routes learned (ia RI' only! -1# show ip ro7te rip
1
Shows detailed information a%out the route to the specified destination networ0! -1# show ip ro7te 1111
1
1
Confi&ure one or more networ0 commands to identify which interfaces will run
1
-1(configro7ter)# networ= 1 455455455 area
2
-1(configro7ter)# networ= 13416F 3455 area
3
-1(configro7ter)# networ= 1G416F145$ area 1
Confi&ure router I3 either )
"sing router-id osf subcommand$
1
-1(configro7ter)# ro7terid 1111
Configuring an %& address on a loobac' interface$
1
-1(config)# interface loopbac=
2
-1(configif)# ip address 1111 455455455455
Chan&e 2ello and 3ead inter(als per interface )
1
-1(configif)# ip ospf hellointer"al 4
2
-1(configif)# ip ospf deadinter"al 6
Impact routin& choices %y tunin& interface cost usin& one of the followin& ways )
Changing interface cost$
1
-1(configif)# ip ospf cost 55
Changing interface bandidth$
13
1
-1(configif)# bandwidth 14F
! in
Changing the reference bandidth that used b *S&+ to calculate the cost$
1
-1(configro7ter)# a7tocost referencebandwidth 1
! in Mbps
3isa%lin&
1
Confi&urin&
,e authentication (none)$
1
-1(configif)# ip ospf a7thentication n7ll
,e 1 authentication (clear te.t)$
1
-1(configif)# ip ospf a7thentication
2
-1(configif)# ip ospf a7thentication=e cisco
,e authentication (md/)$
1
-1(configif)# ip ospf a7thentication messagedigest
2
-1(configif)# ip ospf messagedigest=e 1 md5 cisco
Confi&ure ma*imum e>ual-cost paths )
1
1
Shows the entire routin& ta%le! -1# show ip ro7te
1
Shows routes learned (ia
1
Shows all nei&h%orin& routers alon& with their respecti(e ad?acency state! -1# show ip ospf neighbors
1
14
Shows all the information contained in the $S3;! -1# show ip ospf database
1
Shows detailed information a%out
1
IR' Confi&uration! nter IR' confi&uration mode and define AS num%er! -1(config)# ro7ter eigrp 141 ! 141 & S n7mber
1
Confi&ure one or more networ0 commands to ena%le IR' on the specified interfaces!
1
-1(configro7ter)# networ= 1
2
-1(configro7ter)# networ= 13416 ?455
3
-1(configro7ter)# networ= 1G416F11
4
-1(configro7ter)# networ= 455455455455
3isa%le auto summariation )
1
3isa%le IR' on a specific interface )
1
Confi&ure load %alancin& parameters )
1
-1(configro7ter)# maxim7mpaths 6
2
-1(configro7ter)# "ariance $
Chan&e interface 2ello and 2old timers )
1
-1(configif)# ip hellointer"al eigrp 141 ?
2
-1(configif)# ip holdtime eigrp 141 1
Impactin& metric calculations %y tunin& ;/ and delay of the interface )
1
-1(configif)# bandwidth 465
2
-1(configif)# dela 14
! in
! tens of microseconds
IR' Authentication! he 0ey-strin& (alue and the mode must %e the same on %oth routers. $ifetime options of the 0eys re>uires the cloc0 of the routers to %e set correctly, %etter use N', or it can cause pro%lems
15
Create an authentication 0ey chain as follows!
Create a 'e chain and gi0e it a name$
1
-1(config)# =e chain MAP<0AS
Create one or more 'es gi0ing them numbers$
1
-1(config=echain)# =e 1
efine the 'e 0alue$
1
-1(config=echain=e)# =estring1st<0A
efine the life time of the 'es (otional)$
1
-1(config=echain=e)# sendlifetime 8start time9 8end time9
2
-1(config=echain=e)# acceptlifetime 8start time9 8end time9
na%le md5 authentication mode for IR' on the interface! -1(configif)# ip a7thentication mode eigrp141 md5
1
Refer to the correct 0ey chain to %e used on the interface! -1(configif)# ip a7thentication =echain eigrp141 MAP<0AS
1
IR' :erification! Shows routes learned (ia IR' only! -1# show ip ro7te eigrp
1
Shows IR' nei&h%ors and status! -1# show ip eigrp neighbors
1
Shows IR' topolo&y ta%le, includin& successor and feasi%le successor! -1# show ip eigrp topolog
1
Shows interfaces that run IR'! -1# show ip eigrp interfaces
1
$ists statistics on num%ers of IR' messa&es sent and recei(ed %y the router! -1# show ip eigrp traffic
1
16
[CCNA] Cisco Commands Cheat Sheet #2 Access Control $ists! Standard AC$! @ BB and @611 @BBB "se a remar0 to descri%e the AC$ )
1
Create the AC$, 0eepin& the followin& in mind! o AC$ uses first-match lo&ic. o
here is an implicit deny anyat the end of the AC$.
1
-1(config)# accesslist 4 den 1G416F133
2
-1(config)# accesslist 4 den 1G416F16$ ?1
3
-1(config)# accesslist 4 permit 11 455455
4
-1(config)# accesslist 4 den 1 455455455
5
-1(config)# accesslist 4 permit an
na%le the AC$ on the chosen router interface in the correct direction )in or out+! -1(configif)# ip accessgro7p 4 o7t
1
"sin& standard AC$ to limit telnet and SS2 access to a router!
Create the AC3 that defines the ermitted telnet clients$
1
-1(config)# accesslist GG remar= ,W0D *00* C.0*S
2
-1(config)# accesslist GG permit 1G416F114F 15
Al the AC3 inbound the 0t lines
1
-1(config)# line "t $
2
-1(configline)# accessclass GG in
*tended AC$! @11 @BB and 8111 87BB
1
*tended AC$ should %e placed as close as possi%le to the source of the pac0et.
*tended AC$ matches pac0ets %ased on source des.I' addresses, protocol, source des. 'ort num%ers
andother criteria as well -1(config)# accesslist 11 remar= MAPCC0SSP.S*
17
2 3
-1(config)# accesslist 11 den iphost 1111 host 1444 -1(config)# accesslist 11 den tcp 111 455 an eO 4?
4
-1(config)# accesslist 11 den icmp 1111 an
5
-1(config)# accesslist 11 den tcphost 111 host 11 eO F
6
-1(config)# accesslist 11 den 7dphost 1113 eO 5? an
7
-1(config)# accesslist 11 permit ip an an
8 9
-1(config)# interface fast0thernet B -1(configif)# ip accessgro7p 11 in
Named AC$!
Named AC$s use names to identify AC$s rather than num%ers, and commands that permit or deny traffic are written in a su% mode called named AC$ mode )nacl+.
Named AC$ ena%les the editin& of the AC$ )deletin& or insertin& statements+ %y se>uencin& statements of the AC$.
1
Named standard AC$!
-1(config)# ip accesslist standard MAPS*D-DPC
2
-1(configstdnacl)# permit 111 455
3
-1(configstdnacl)# den 1444
4
-1(configstdnacl)# permit an
5
-1(config)# interface fast0thernet B1
6
-1(configif)# ip accessgro7p MAPS*D-DPC o7t
1
Named e*tended AC$!
-1(config)# ip accesslist extended MAP0I*0D0DPC
2
-1(configextnacl)# den icmp 1111 an
3
-1(configextnacl)# den tcphost 111 host 11 eO F
4
-1(configextnacl)# permit ip an an
5
-1(config)# interface fast0thernet B1
6
-1(configif)# ip accessgro7p MAP0I*0D0DPC in
ditin& AC$ usin& se>uence num%ers! -1(config)# ip accesslist extended MAP0I*0D0DPC
1
18
2
-1(configextnacl)# no 4 n7mber 4
! Deletes the statement of seO7ence
3 -1(config)# ip accesslist standard GG
4 -1(configstdnacl)# 5 den 1111 seO7ence 5
! inserts a statement with
:erifyin& AC$s!
Shows all AC$s confi&ured on a router with counters at the end of each statement!
1
-1# show accesslists
2
! ,-
3
-1# show ip accesslist
Shows only the specified AC$! -1# show ip accesslist 11
1
Includes a reference to the AC$s ena%led on that interface either in or out! -1# show ip interface fB
1
32C' Ser(er 3efine a 32C' pool and &i(e it a name! -1(config)# ip dhcp pool MAP,,
1
3efine networ0 and mas0 to use in this pool and the default &ateway!
1
-1(dhcpconfig)# networ= 1G416F1 455455455
2
-1(dhcpconfig)# defa7ltro7ter 1G416F11
3efine one or more 3NS ser(er )<'I
1
Confine the lease time )<'I
1
3efine one or more scopes of e*cluded )reser(ed+ addresses )<'I
1
-1(config)# ip dhcp excl7dedaddress 1G416F11 1G416F11
2
-1(config)# ip dhcp excl7dedaddress 1G416F14 1G416F145$
19
32C' :erification and rou%leshootin&! Shows the status of the specified pool and the leased addresses from that pool! -1# show ip dhcp pool ,,P1
1
Shows all the leased ip addresses from all confi&ured 32C' pools! -1# show ip dhcp binding
1
Shows any conflicts that occurred! -1# show ip dhcp conflict
1
[CCNA] Cisco Commands Cheat Sheet #/ ''' Confi&uration! 1
-1(config)# interface serial B
2
-1(configif)# encaps7lation ppp
''' Authentication! C2A'! Confi&ure the hostname! -1(config)# hostname +
1
Confi&ure the name of the other end router and the shared password! ! *he password 7sed is shared password that means it m7st be the same on both ro7ters
1 2
+(config)# 7sername 20* password IA/
na%le C2A' authentication on the interface!
1
+(config)# interface serial B
2
+(configif)# ppp a7thentication chap
'A'! Confi&ure the hostname! -1(config)# hostname +
1
Confi&ure the name of the other end router and the shared password! +(config)# 7sername 20* password IA/
1
20
na%le 'A' authentication on the interface and define the username and password to %e sent %y 'A'!
1
+(config)# interface serial B
2
+(configif)# ppp a7thentication pap
3
+(configif)# ppp pap sent7sername + password IA/
''' :erification and trou%leshoot! Shows the encapsulation type and the control protocols of '''! -1# show interface sB
1
"seful for (iewin& the confi&uration of usernames and passwords used to authenticate '''! -1# show r7nningconfig
1
3isplays the authentication process of ''' in real time! -1# deb7g ppp a7thentication
1
=rame Relay!
ultipoint )one su%net+
i(e the interface an ip address and ena%le =rame Relay encapsulation!
1
-1(config)# interface serial B
2
-1(configif)# ip address 1111 455455455
3
-1(configif)# encaps7lation framerela (ietf)
Confi&ure $I si&nalin& type! )
1
Confi&ure =rame Relay mappin&!
21
1 -1(configif)# framerela map ip 1114 14 broadcast (ietf)
2 -1(configif)# framerela map ip 111? 1? broadcast
3
-4(config)# interface serial B
4
-4(configif)# ip address 1114 455455455
5
-4(configif)# encaps7lation framerela
6
-4(configif)# framerela map ip 1111 41 broadcast
7
-4(configif)# framerela map ip 111? 41 broadcast
8
-?(config)# interface serial B -?(configif)# ip address 111? 455455455
9
-?(configif)# encaps7lation framerela
10
-?(configif)# framerela map ip 1111 ?1 broadcast
11 -?(configif)# framerela map ip 1114 ?1 broadcast
12
'oint-to-point )different su%netsD one su%net per su%interface+
na%le =rame Relay encapsulation!
1
-1(config)# interface serial B
2
-1(configif)# encaps7lation framerela
1
i(e an ip address to a su%interface and confi&ure its 3$CI! -1(config)# interface serial B14 pointtopoint
2
-1(configs7bif)# ip address 1111 455455455
3 4
-1(configs7bif)# framerela interfacedlci 14 -1(config)# interface serial B1? pointtopoint -1(configs7bif)# ip address 4441 455455455
5 -1(configs7bif)# framerela interfacedlci 1?
6 7
-4(config)# interface serial B -4(configif)# encaps7lation framerela
8
-4(config)# interface serial B41 pointtopoint
9
-4(configs7bif)# ip address 1114 455455455
10
-4(configs7bif)# framerela interfacedlci 41
22
11 -?(config)# interface serial B
12
-?(configif)# encaps7lation framerela
13 -?(config)# interface serial B?1 pointtopoint
14 -?(configs7bif)# ip address 4444 455455455
15
-?(configs7bif)# framerela interfacedlci ?1
16
=rame Relay :erification and trou%leshoot! Shows the encapsulation type! -1# show interfaces serial B
1
$ists ':C status information! -1# show framerela p"c
1
$ists 3$CI to I' mappin&! -1# show framerela map
1
$ists $I status information! -1# show framerela lmi
1
3isplays the content of $I messa&es! -1# deb7g framerela lmi
1
$ists messa&es a%out certain =rame Relay e(ents, includin& In(erse AR' messae&es! -1# deb7g framerela e"ents
1
Networ0 Address ranslation )NA+! Static NA4!
3efine the outside and inside interfaces!
1
-1(config)# interface serial B
2
-1(configif)# ip nat o7tside
3
-1(config)# interface Qast0thernet 1B1
4
-1(configif)# ip nat inside
Confi&ure static NA statement! -1(config)# ip nat inside so7rce static 1G416F11 4111
1
23
3ynamic NA4!
3efine the outside and inside interfaces
Create an AC$ that determines the I' addresses thatare allowed to %e translated! -1(config)# accesslist ? permit 1G416F1 455
1
Create a pool of pu%lic I' addresses! -1(config)# ip nat pool '2 4111 4116 netmas= 4554554554$F
1
1
Confi&ure NA statement! -1(config)# ip nat inside so7rce list ? pool '2RBpre
2
Rh$* ,"erload (*)@RBh$
3
R7l
4
Rli*he same as dnamic * with the 7se of the o"erload =eword at the end of * statement@RBli
5
RB7l
6
Rpre
7 8
-1(config)# ip nat inside so7rce list ? pool '2 o"erload
NA (erification and trou%leshoot! "seful in (iewin& the confi&uration of NA pool and the inside and outside interfaces! -1# show r7nningconfig
1
3isplays access lists, includin& the one used for NA! -1# show accesslists
1
Shows counters for pac0ets and NA ta%le entries, as well as %asic confi&uration information! -1# show ip nat stasitics
1
3isplays the NA ta%le! -1# show ip nat translations
1
Clears all the dynamic entries in the NA ta%le! -1# clear ip nat translations
1
Issues a lo& messa&e descri%in& each pac0et whose ip address is translated with NA!
24
1
-1# deb7g ip nat
n?oy E
Wildcard masks vs subnet masks ? The intention of subnet mask and wil d card masks is same. They are used to tell the router which bits needed a match and which doesn't. The only difference is the way of reperesentation. In general: In subnet mask: 1-> Represents that there should be a match. ->!ays no need to bother about the match "ild#ard $ask: It is %ust the re&erse of the subnet mask: ->Represents that there should be a match. 1->!ays no need to bother about the match. g: (et's take the network: 1)*.1+,.1.*. $asks In binary: !ubnet: 11111111 . 11111111 . 11111111 . "ild:
. . . 11111111
/ow if you wanna tell the router that a route e0ists for the network 1)*.1+,.1.* you will use subnet mask. g: ip route 1)*.1+,.1. *.*.*. 2ne0t hope0it int> /ow if you wanna tell the route to block this rangenetwork using acl3 you would use wildcard mask. g: access-list 1 deny 1)*.1+,.1. ...* To get the wildcard mask from a subnet mask3 you %ust need to subtract each octet of the subnet mask with *. g4 !ubnet mask: * "ildcard
.
*
.
1*,
.
: *-* . *-* . *-1*, . *- 5 ...*
Regards3 #handu
25