100% found this document useful (1 vote)
284 views4 pages

Cisco Cheat Sheet Komande #1

The document discusses the different modes on a router including user mode, privileged mode, global configuration mode, interface mode, and others. It then provides instructions on basic switch/router configuration tasks such as changing the hostname, configuring passwords, interfaces, IP addresses, SSH access, and commands for verifying the configuration.

Uploaded by

Merima Begic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
284 views4 pages

Cisco Cheat Sheet Komande #1

The document discusses the different modes on a router including user mode, privileged mode, global configuration mode, interface mode, and others. It then provides instructions on basic switch/router configuration tasks such as changing the hostname, configuring passwords, interfaces, IP addresses, SSH access, and commands for verifying the configuration.

Uploaded by

Merima Begic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Router Modovi:

 Router>: User mode = Limitirane osnovne komande


 Router#: Privileged mode (exec-level mode) = Omogućava pristup svim ostalim
komandama na ruteru. Iz ovog moda se najcesce koriste show komande.
Router(config)#: global configuration mode = Komande u ovom mode-u uticu na
citav sistem. Iz ovog mode-a se vecina stvari konfigurise
 Router(config-if)#: interface mode = Komande u ovom mode-u uticu samo na
interface.
 Router(config-subif)#: subinterface mode = Komande u ovom mode-u uticu samo na
subinterface.

 Router(config-line)#: line mode = Komande u ovom mode-u uticu samo na samo na
konfiguraciju konzolnog pristupa i vty remote pristupa
 Router(config-router)#: Mode gdje se konfigurisu routing protokoli.

Promjena hostname-a uredjaja:

1Switch(config)# hostname SW1

Konfiguracija passworda:

1SW1(config)# enable secret cisco ! MD5 hash


2 SW1(config)# enable password notcisco ! Clear text

Sigurnost konzolnog porta:

1SW1(config)# line con 0


2SW1(config-line)# password cisco
3SW1(config-line)# login

Sigurnost udaljenog pristupa telnet/ssh:

1SW1(config)# line vty 0 4


2SW1(config-line)# password cisco
3SW1(config-line)# login

Enkripcija passworda:

1SW1(config)# service password-encryption

Konfiguracija bannera:

1SW1(config)# banner motd $


2-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
3UNAUTHORIZED ACCESS IS PROHIBITED
4-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
5$
Dodjela IP adrese switchu:

1SW1(config)# interface vlan 1


2SW1(config-if)# ip address 172.16.1.11 255.255.255.0 ! or DHCP
3SW1(config-if)# no shutdown

Konfiguracija default gateway-a:

1SW1(config)# ip default-gateway 172.16.1.1

Spremanje konfiguracije:

1SW1# copy running-config startup-config


2Destination filename [startup-config]? ! Press enter to confirm file
3name.
4Building
[OK]
configuration…
5
6! Short for write memory.
7SW1# wr
8Building configuration…
9[OK]

Working environment:

Konfiguracija name lookup, history, exec-timeout-a i logging ponasanja…, takodjer validno i


za line con 0.

1SW1(config)# no ip domain-lookup
2SW1(config)# line vty 0 4
3SW1(config-line)# history size 15
4SW1(config-line)# exec-timeout 10 30
5SW1(config-line)# logging synchronous

Konfiguracija switcha/rutera da koristi SSH pristup:

 Konfiguracija DNS domain name-a:

1SW1(config)# ip domain-name example.com

 Konfiguracija username-a i passworda:

1SW1(config)# username admin password cisco

 Generisanje enkripcijskog kljuca:

Velicina kljuca je u rasponu od 360 do 2048 bita

1SW1(config)# crypto key generate rsa


2How many bits in the modulus [512]: 1024
 Definisanje koja ce se verzija SSH pristupa koristiti:

1SW1(config)# ip ssh version 2

 Omogucavanje SSH pristupa unutar line vty mode-a:

1SW1(config)# line vty 0 4


2SW1(config-line)#
! You can set vty
login local
lines to use only telnet or only ssh or both as in the
3example.
4SW1(config-line)# transport input telnet ssh

Alias ( skracene ) komande:

Koristi se kreiranje shortcut komandi za duge komande.

1SW1(config)# alias exec c configure terminal


2SW1(config)# alias exec s show ip interface brief
3SW1(config)# alias exec sr show running-config

Konfiguracija opisa, brzine interface-a i duplex-a:

1SW1(config)# interface fastEthernet 0/1


2SW1(config-if)# description LINK TO INTERNET ROUTER
3SW1(config-if)# speed 100 ! Options: 10, 100, auto
4! The range keyword used to set a group of interfaces at once.
5SW1(config)# interface range fastEthernet 0/5 – 10
SW1(config-if-range)# duplex full (options: half, full, auto)
6

Verifikacija osnove konfiguracije:

 Prikazuje informacije o switchu/ruteru, njegovim interface-ima, RAM-u, NVRAM-u,


flash, IOS, itd.

1SW1# show version

 Prikazuje trenutnu konfiguraciju spremljenu u RAM.

1SW1# show running-config

 Prikazuje konfiguracijski file u NVRAM which is used at first boot process.

1SW1# show startup-config

 Prikazuje historiju do sad koristenih komandi.

1SW1# show history

 Prikazuje stanje svih interfaces-a, njihov fizicki status, protocol status i ip adresu ako
je dodjeljena.
1SW1# show ip interface brief

 Prikazuje detaljnije informacije o specificnom interface-u, njegovom statusu,


protokolu, duplexu, brzini i saobracaju u posljednih 5 minuta

1SW1# show interface vlan 1

 Prikazuje opis svih interface-a

1SW1# show interfaces description

 Prikazuje status svih interface-a kao npr. da li su spojeni ili ne, da li su access ili trunk
portovi itd.

1SW1# show interfaces status

 Prikazuje public encryption key koristen za SSH.

1SW1# show crypto key mypubkey rsa

 Prikazuje informacije o iznajmljenim IP adresama kada je IP adresa dodjeljena od


strane DHCP servera

1SW1# show dhcp lease

You might also like