CCNA’ye yeni başlayanlar için komutlar

Ebru Otan 09 Haziran 2012 6
  • Sumo

Consoldan (PC den) Router’ a bağlanma

Bu bağlama işlemi için Roll-over kablo kullanılır.

Pc de Terminal i amaç gereklidir.

PC de terminalin açılması

Control Paneli >> Add Windows Component >> Accessoires & Utilities >> Communications >> Hyper Terminal

(Bu işlem için i386 klasörü gereklidir.)

Windows 7 / Windows Vista / Server 2008 system 32 den alacağız.

Router’in içinde ne var?

RAM : Running Config

NVRAM (Kalıcı RAM) : Startup Config

Flash Memory : IOS

ROM : Bootstrap Kodu

 

Router’ın power düğmesine bastığımızda gerçekleşen olaylar sırası

 

1-      POST : Power-on-self-test. CPU ve Interfacelerin doğru çalışıp çalışmadığını kontrol eder.

 

2-      ROM’un içinde bulunan Bootstrap çalışır. Bootstrap IOS’u arar. Bootstrap default olarak IOS için Flash Memory’e bakar ve buradaki IOS’u RAM’e yükler. (Flash Memory de IOS bulunmaması halinde ROM’un içinde bulunan RxBoot IOS’unu yükler.

 

IOS ‘un yüklenebileceği 3 yer

1-Flash Memory

2-ROM

3-TFTP Sever

 

3-    NVRAM de bulunan Startup konfigürasyonu RAM’e çekilir. Eğer daha önceden kaydedilmiş bir Startup konfigürasyonu yoksa RAM’e birşey yüklenmez ve router set-up modunda açılır.

 

Router Modları

 

Router kullanım arayüzünde karşılaşılan 3 mod vardır.

 

1-User Mod ( Router> )

2-Previllage Execute Mode ( Router# )

3-Global Configuration Mode ( Router(config)# )

 

Routerda modları arası geçit komutları

Router>

Router>enable

Router#configure terminal

Router(config)#

 

Exit : Bir önceki moda dönme komutu

Routera isim verme komutu

Router>

Router>enable

Router#configure terminal

Router(config)#hostname R1

R1(config)#

 

Routerdaki konfigürasyonu NVRAMe kaydetme komutu

R1(config)#copy runnig-config startup-config

 

Routerı yeniden başlatma komutu

R1#reload

 

Router Interface’ine IP vermek

IP adresi verirken önce IP verilmek istenen Interface girilmelidir.

IP adresi verme komutu ip address Verilecek IP Subnet Mask  şeklindedir.

Interfaceler otomatik olarak kapalıdır. Bu interfaceleri açmak için no shutdown komutu kullanılır.

 

R1(config)#interface ethernet 0/0

R1(config-if)#ip address 192.168.0.103 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#exit

R1(config)#

 

Routerdaki start-up konfigürasyonu TFTP’ye kaydetme komutu

 

Router da komutların devamını bilmediğimizde ? işaretinden faydalanabiliriz.

 

R1#copy startup-config ?

flash:                         Copy to flash file

ftp:                            Update (merge with) current system configuration

running-config          Update (merge with) current system configuration

tftp:                          Update (merge with) current system configuration

 

R1#copy startup-config tftp:

Address or name of remote host [ ]? 192.168.0.101

Destination filename [R1-confg]?

 

Writing startup-config…!!

[OK – 559 bytes]

 

559 bytes copied in 0.04 secs (13000 bytes/sec)

R1#

 

 

Bu işlem Cisco Packet Tracer kullanarak da simule edilebilir.

Packet Tracer da işlem adımları

  1. Router (WIC-2T modülü ile beraber)  ve TFTP Server eklemek (Server ekleyip TFTP hariç diğer özelliklerini kapatarak yapılır.)
  2. Router ve TPTP server’ı birbirlerine Fastethernet portlarından bağlamak.
  3. Router’in fast ethernet interfaceine girerek IP vermek (192.168.0.103)
  4. TFTP serverin fast ethernet interfaceine girerek IP vermek (192.168.0.101)
  5. Router’a enable modda yukarıdaki kopyalama komutlarını yazmak
  6. Router’da kopyalandı bilgisini okuduktan sonra TFTP serverda dosyanın kopyalandığını görmek.

Routerdaki TFTP deki start-up konfigürasyonu Routera kaydetme komutu

 

Router#copy tftp ?

flash:                              Copy to flash: file system

running-config               Copy configuration from system

startup-config                 Copy startup configuration from system

 

Router#copy tftp: running-config

Address or name of remote host [ ]? 192.168.0.101

Source filename [ ]? R1-confg

Destination filename [running-config]?

 

Accessing tftp://192.168.0.101/R1-confg…

Loading R1-confg from 192.168.0.101: !

[OK – 559 bytes]

 

559 bytes copied in 0.03 secs (18633 bytes/sec)

 

R1#

%SYS-5-CONFIG_I: Configured from console by console

 

Bir önceki örnekte TFTP server’ a R1-confg olarak kaydedilen dosya geri yüklendi.

 

Copy TFTP komutundan sonra ? yazıldığında TFTP den Flash’a, running-config ve startup-config’e yükleme yapılacağı görülür. Yani bu komut TFTP’den Flash’a  IOS’un kopyalanması için de kullanılabilir.

Routerdaki IOS’un TFTP’ye kopyalanması

R1#copy flash ?

ftp:                                    Copy to ftp: file system

running-config                  Update (merge with) current system configuration

startup-config                   Copy to startup configuration

tftp:                                  Copy to tftp: file system

R1#copy flash tftp

Source filename [ ]?

 

Routerdaki IOS’un TFTP’ye kopyalanması için adının bilinmesi gereklidir.

 

Routerdaki IOS’un adına nasıl bakılır?

 

R1#sh flash:

 

System flash directory:

File  Length   Name/status

3   50938004 c2800nm-advipservicesk9-mz.124-15.T1.bin

2   28282    sigdef-category.xml

1   227537   sigdef-default.xml

[51193823 bytes used, 12822561 available, 64016384 total]

63488K bytes of processor board System flash (Read/Write)

 

R1#copy flash ?

ftp:                                    Copy to ftp: file system

running-config                  Update (merge with) current system configuration

startup-config                   Copy to startup configuration

tftp:                                  Copy to tftp: file system

R1#copy flash tftp

Source filename [ ]? c2800nm-advipservicesk9-mz.124-15.T1.bin

Address or name of remote host [ ]? 192.168.0.101

Destination filename casino pa natet [c2800nm-advipservicesk9-mz.124-15.T1.bin]? FlashdakiIOS.bin

 

Writing c2800nm-advipservicesk9-mz.124-15.T1.bin…!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

[OK – 50938004 bytes]

 

50938004 bytes copied in 20.228 secs (2518000 bytes/sec)

R1#

 

 

Routerda Serial Interface

 

İki router birbirlerine serial kablo ile bağlandıklarında kablonun bir ucu DTE nir ucu da saat sinyalinin sağlandığı DCE dir. Serial Interfacelerde DCE olan uca clock saati verilmeden serial interface çalışmayacaktır.

Hangi ucun DCE olduğunu görme komutu

 

R1#show controllers serial 0/0/0

 

Interface Serial0/0/0

Hardware is PowerQUICC MPC860

DCE V.35, no clock

idb at 0x81081AC4, driver data structure at 0x81084AC0

SCC Registers:

General [GSMR]=0x2:0x00000000, Protocol-specific [PSMR]=0x8

Events [SCCE]=0x0000, Mask [SCCM]=0x0000, Status [SCCS]=0x00

Transmit on Demand [TODR]=0x0, Data Sync [DSR]=0x7E7E

Interrupt Registers:

Config [CICR]=0x00367F80, Pending [CIPR]=0x0000C000

Mask   [CIMR]=0x00200000, In-srv  [CISR]=0x00000000

Command register [CR]=0x580

Port A [PADIR]=0x1030, [PAPAR]=0xFFFF

[PAODR]=0x0010, [PADAT]=0xCBFF

Port B [PBDIR]=0x09C0F, [PBPAR]=0x0800E

[PBODR]=0x00000, [PBDAT]=0x3FFFD

Port C [PCDIR]=0x00C, [PCPAR]=0x200

[PCSO]=0xC20,  [PCDAT]=0xDF2, [PCINT]=0x00F

Receive Ring

rmd(68012830): status 9000 length 60C address 3B6DAC4

rmd(68012838): status B000 length 60C address 3B6D444

Transmit Ring

 

R1#

Router’a clock sinyali verme komutu

R1(config-if)#clock rate 64000

 

DCE ucu olan routera girilecek komutlar

R1(config)#int s In that way, you can determine whether you might want to best online casino use a public cloud IaaS (described later) — for example, for your big deleted file recovery projects — or if you want to continue to keep all your deleted file recovery on premises. 0/0/0

R1(config-if)#clock rate 64000

R1(config-if)#ip add 192.168.1.1 255.255.255.0

R1(config-if)#no shut

 

DTE ucu olan routera girilecek komutlar

R2(config)#int s 0/0/0

R2(config-if)#ip add 192.168.1.2 255.255.255.0

R2(config-if)#no shut

 

Interface Görüntülemek

 

Router#show ip interface brief

Interface                     IP-Address      OK?   Method           Status                Protocol

 

FastEthernet0/0          unassigned      YES    unset      administratively down       down

 

FastEthernet0/1          unassigned      YES    unset       administratively down       down

 

Serial0/0/0                  192.168.1.1     YES    manual    up                                       up

 

Serial0/0/1                  unassigned      YES    unset      administratively down        down

 

Vlan1                          unassigned      YES    unset      administratively down        down

Router#

 

Eğer Serial interface de clock rate girilmediğinde interface’in çalışmadığı görülür.

 

Router# show ip interface brief

Interface                     IP-Address      OK?   Method           Status                Protocol

 

FastEthernet0/0          unassigned      YES    unset       administratively down      down

 

FastEthernet0/1          unassigned      YES    unset       administratively down      down

 

Serial0/0/0                  192.168.1.1     YES    manual    up                                      down

 

Serial0/0/1                  unassigned      YES    unset      administratively down       down

 

Vlan1                          unassigned      YES    unset      administratively down       down

Router#

 

Şifreler

Enable Password

Enable şifresi koymak

Router(config)#enable password CISCO

 

Enable şifresini kaldırmak

Router(config)#no enable password

 

Cisco devicelar default olarak No service password-encryption konumundadır. Bu konumdayken enable passworda verilen şifreler show run ile görülebilir. Kapatmak için Konfigürasyon modunda komutun başındaki no kaldırılırak yazılması gerekir. Kapatıldığında şifre MD7 formatinda saklanır.

 

Running Config’ i görüntüleme

 

Router#sh run

Building configuration…

 

Current configuration : 585 bytes

!

version 12.4

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname Router

!

!

enable password CISCO

!

!

interface FastEthernet0/0

no ip address

duplex auto

speed auto

shutdown

!

interface FastEthernet0/1

no ip address

duplex auto

speed auto

shutdown

!

interface Serial0/0/0

ip address 192.168.1.1 255.255.255.0

!

interface Serial0/0/1

no ip address

shutdown

!

interface Vlan1

no ip address

shutdown

!

ip classless

!

!

line con 0

line vty 0 4

login

!

 

!

end

 

Router#

 

Service Password Encryption ı kaldırma

 

Router(config)# service password-encryption

Router(config)#sh run

Building configuration…

 

Current configuration : 591 bytes

!

version 12.4

no service timestamps log datetime msec

no service timestamps debug datetime msec

service password-encryption

!

hostname Router

!

!

!

enable password 7 0802657D2A36

!

!

!

!

interface FastEthernet0/0

no ip address

duplex auto

speed auto

shutdown

!

interface FastEthernet0/1

no ip address

duplex auto

speed auto

shutdown

!

interface Serial0/0/0

ip address 192.168.1.1 255.255.255.0

!

interface Serial0/0/1

no ip address

shutdown

!

interface Vlan1

no ip address

shutdown

!

ip classless

!

 

!

line con 0

line vty 0 4

login

!

!

end

 

 

Router#

 

Secret Password

Secret Şifresi Koymak

Router(config)#enable secret CLASS

 

Secret Şifresini Kaldırmak

Router(config)#no enable secret

 

Secret Password kullanılmışssa, enable şifresi geçersiz kalır.

 

Console’dan bağlanırken şifre sormak

Console şifresi koymak

Router(config)#line console 0

Router(config-line)#password CONSOLE

Router(config-line)#login

 

Console Şifresini Kaldırmak

Router(config)#line console 0

Router(config-line)#no password

Telnet’ten Bağlanırken şifre sormak

Telnet şifresi koymak

Router(config)#line vty 0 4

Router(config-line)#password TELNET

 

Telnet şifresi kaldırmak

Router(config)#line vty 0 4

Router(config-line)#no password

 

AUX Bağlantısına şifre sormak

Aux şifresi koymak

Router(config)#line aux 0

Router(config-line)#password AUX

 

Aux şifresi kaldırmak

Router(config)#line aux 0

Router(config-line)#no password

 

 

Banner Yazmak ( Günün mesajı)

 

Router(config)#banner motd x Hosgeldiniz x

 

Buradaki komut banner motd’dir. Daha sonra herhangi bir karakter kullanıp mesaj yazılır ve mesajdan önce kullanılan karakter mesaj sonuna yazılır. (Burada x karakteri kullanılmıştır.)

 

Password Recovery

 

Enable, secret, console, aux ve telnet şifreleri atanmış bir routerda şifreler unutulduğunda uygulanır.

 

  1. Router / Switch reboot edilir.
  2. Router açılırken CTRL BREAK tuşuna basılır. (IOS decomprese edilmeden önce) Rommon moduna girilir.
  3. Rommon > confreg 0x2142  yazılır.

Registera 2142 nin yazılması NVRAM deki startup-config’i yüklenmesi yerine boş bir config dosyasıyla açılacağı anlamına gelir.

  1. Rommon 2 > reset

Reset komutuyla cihaz reboot edilir.

Bu aşamada NVRAM de bulunan mevcut şifrelerin set edildiği konfigürasyon saklanır fakat cihaz açılırken boş bir konfigürasyon açılır. Eski config silinmez.

  1. Router>en

Router#copy startup-config running-config

R1#conf t

R1(config)#no enable password

R1(config)#no enable secret

R1(config)#line console 0

R1(config-line)#no password

R1(config-line)#exit

R1(config)#line aux 0

R1(config-line)#no password

R1(config-line)#exit

 

R1(config)#line vty  0 4

R1(config-line)#no password

R1(config-line)#exit

 

NVRAM deki eski config “copy startup-config running-config” komutu ile RAM’ e çekilir ve şifreler kaldırılır ya da değiştirilir.

 

  1. R1(config)#config-register 0x2102

R1(config)#do write

 

Config Register 2102’ye çekilir. Bu işlem yapılmazsa cihaz her açıldığında boş config dosyası ile açılır.

 

 

6 Comments »

  1. Ferdi Tiyek 30 Eylül 2012 at 20:32 - Reply

    Hocam 🙂

    Çok güzel anlatmışsınız..Teşekkürler..

  2. ihsan 06 Temmuz 2013 at 11:14 - Reply

    sevgili hocam.bu sayfaya projeler4i soru vewap şeklinde koyarsanız daha fazdalı olur komutları böle yazmak bi çözüm ama uygulayacak porje şeması üzerinde yapmak daha başarılı olacaktır.soru ve çözüm şeklinde olması cisco eğitimi açısından daha mantıklı olacaktır.
    eski öğrenciniz.

    • Ebru 16 Temmuz 2013 at 21:34 - Reply

      Merhaba Ihsan,
      Yorumun ve farkli bakisin icin tesekkur ederim. Bir dahaki donemde ogrencilerden gelen soru ve cevaplari ekleyecegim. Ama ne kadar eklersem ekleyeyim hic bir sey derste yapilan ornekler kadar aciklayici olmayacaktir…
      O yuzden derslere katilmakta fayda var 🙂

  3. zafer 11 Nisan 2014 at 14:53 - Reply

    evet güzel anlatım teşekkürler

  4. mert 13 Eylül 2016 at 21:29 - Reply

    Anlatımın harika 🙂 teşekkürler 🙂

  5. Hacker 13 Kasım 2017 at 08:58 - Reply

    Helal Ulan

Yorum Bırak »

Cevabı iptal etmek için tıklayın.