Difference between revisions of "Cisco basic configuration"

From Teknologisk videncenter
Jump to: navigation, search
m (Undersøg om der er en eksisterende konfiguration)
m
Line 31: Line 31:
 
</source>
 
</source>
 
</div>
 
</div>
<source lang="cli">
 
<time>
 
#:Hej
 
#Goddag
 
#.hej
 
Du er 'gammel' sagde manden. Det er du "også" sagde anden
 
Hej
 
msgid javel
 
</source>
 
  
 
= Slet eksisterende konfiguration =
 
= Slet eksisterende konfiguration =
 
For at slette den eksiterende konfiguration skal man først logge ind på routeren. Vi bruger '''altid''' passwordet ''cisco'', ''class'' eller ''Cisco'' her på skolen. Du bør således kunne logge ind som vist herunder. Hvis du mod forventning ikke kan logge ind er det nødvendigt at udføre proceduren [[Cisco password recovery procedure| password recovery procedure]].
 
For at slette den eksiterende konfiguration skal man først logge ind på routeren. Vi bruger '''altid''' passwordet ''cisco'', ''class'' eller ''Cisco'' her på skolen. Du bør således kunne logge ind som vist herunder. Hvis du mod forventning ikke kan logge ind er det nødvendigt at udføre proceduren [[Cisco password recovery procedure| password recovery procedure]].
<pre style="margin: 10px 75px;">
+
<div style="margin: 10px 75px;">
R5>enable
+
<source lang="cli">
 +
R5><enable>
 
Password:
 
Password:
 
R5#
 
R5#
</pre>
+
</source>
 +
</div>
 
Efter du er logget ind på routeren kan du slette konfigurationen som ligger i en fil som hedder ''startup-config'' og genstarte routeren. ''erase startup-config'' slettet konfigurationen og ''reload'' genstarter routeren. Vist herunder.
 
Efter du er logget ind på routeren kan du slette konfigurationen som ligger i en fil som hedder ''startup-config'' og genstarte routeren. ''erase startup-config'' slettet konfigurationen og ''reload'' genstarter routeren. Vist herunder.
<pre style="margin: 10px 75px;">
+
<div style="margin: 10px 75px;">
 +
<source lang="cli">
 
R5#erase startup-config
 
R5#erase startup-config
 
Erasing the nvram filesystem will remove all configuration files! Continue?
 
Erasing the nvram filesystem will remove all configuration files! Continue?
Line 55: Line 49:
 
Erase of nvram: complete
 
Erase of nvram: complete
 
R5#reload
 
R5#reload
</pre>
+
</source>
 +
</div>
 +
 
 
And the Router reloads with a empty configuration  
 
And the Router reloads with a empty configuration  
 
<span id="setup step 1"></span>
 
<span id="setup step 1"></span>
Line 61: Line 57:
 
= Konfiguration trin 1  =
 
= Konfiguration trin 1  =
 
Se eksemplet herunder
 
Se eksemplet herunder
<pre style="margin: 10px 75px;">
+
<div style="margin: 10px 75px;">
 +
<source lang="cli">
  
 
         --- System Configuration Dialog ---
 
         --- System Configuration Dialog ---
  
Would you like to enter the initial configuration dialog? [yes/no]: yes
+
Would you like to enter the initial configuration dialog? [yes/no]: <yes>
  
 
At any point you may enter a question mark '?' for help.
 
At any point you may enter a question mark '?' for help.
Line 75: Line 72:
 
to configure each interface on the system
 
to configure each interface on the system
  
Would you like to enter basic management setup? [yes/no]: yes
+
Would you like to enter basic management setup? [yes/no]: <yes>
 
Configuring global parameters:
 
Configuring global parameters:
  
   Enter host name [Router]: Viborg1
+
   Enter host name [Router]: <Viborg1>
  
 
   The enable secret is a password used to protect access to
 
   The enable secret is a password used to protect access to
 
   privileged EXEC and configuration modes. This password, after
 
   privileged EXEC and configuration modes. This password, after
 
   entered, becomes encrypted in the configuration.
 
   entered, becomes encrypted in the configuration.
   Enter enable secret: cisco
+
   Enter enable secret: <cisco>
  
 
   The enable password is used when you do not specify an
 
   The enable password is used when you do not specify an
 
   enable secret password, with some older software versions, and
 
   enable secret password, with some older software versions, and
 
   some boot images.
 
   some boot images.
   Enter enable password: class
+
   Enter enable password: <class>
  
 
   The virtual terminal password is used to protect
 
   The virtual terminal password is used to protect
 
   access to the router over a network interface.
 
   access to the router over a network interface.
   Enter virtual terminal password: cisco
+
   Enter virtual terminal password: <cisco>
   Configure SNMP Network Management? [yes]: no
+
   Configure SNMP Network Management? [yes]: <no>
  
 
Current interface summary
 
Current interface summary
Line 105: Line 102:
  
 
Enter interface name used to connect to the
 
Enter interface name used to connect to the
management network from the above interface summary: FastEthernet0/0
+
management network from the above interface summary: <FastEthernet0/0>
  
 
Configuring interface FastEthernet0/0:
 
Configuring interface FastEthernet0/0:
   Use the 100 Base-TX (RJ-45) connector? [yes]:
+
   Use the 100 Base-TX (RJ-45) connector? [yes]:<yes>
   Operate in full-duplex mode? [no]: yes
+
   Operate in full-duplex mode? [no]: <yes>
   Configure IP on this interface? [yes]:
+
   Configure IP on this interface? [yes]:<yes>
     IP address for this interface: 192.168.22.1
+
     IP address for this interface: <192.168.22.1>
     Subnet mask for this interface [255.255.255.0] :
+
     Subnet mask for this interface [255.255.255.0] : <255.255.255.0>
 
     Class C network is 192.168.22.0, 24 subnet bits; mask is /24
 
     Class C network is 192.168.22.0, 24 subnet bits; mask is /24
  
Line 145: Line 142:
 
[2] Save this configuration to nvram and exit.
 
[2] Save this configuration to nvram and exit.
  
Enter your selection [2]:2
+
Enter your selection [2]:<2>
</pre>
+
</source>
 +
</div>
 +
 
  
 
=Konfiguration trin 2=
 
=Konfiguration trin 2=
 
== FastEthernet 0/1 ==
 
== FastEthernet 0/1 ==
 
Konfiguration af ''fastethernet0/1'' interfacet.
 
Konfiguration af ''fastethernet0/1'' interfacet.
<pre style="margin: 10px 75px;">
+
<div style="margin: 10px 75px;">
Viborg1#configure terminal
+
<source lang="cli">
 +
Viborg1#<configure terminal>
 
Enter configuration commands, one per line.  End with CNTL/Z.
 
Enter configuration commands, one per line.  End with CNTL/Z.
Viborg1(config)#interface FastEthernet0/1
+
Viborg1(config)#<interface FastEthernet0/1>
Viborg1(config-if)#ip address 172.16.0.1 255.255.0.0
+
Viborg1(config-if)#<ip address 172.16.0.1 255.255.0.0>
Viborg1(config-if)#no shutdown
+
Viborg1(config-if)#<no shutdown>
Viborg1(config-if)#CTRL-Z
+
Viborg1(config-if)#<CTRL-Z>
</pre>
+
</source>
 +
</div>
 +
 
  
 
== Loopback 0 ==
 
== Loopback 0 ==
 
Konfiguration af ''loopback0'' interfacet.
 
Konfiguration af ''loopback0'' interfacet.
<pre style="margin: 10px 75px;">
+
<div style="margin: 10px 75px;">
Viborg1#configure terminal
+
<source lang="cli">
Viborg1(config)#interface loopback 0
+
Viborg1#<configure terminal>
Viborg1(config-if)#ip address 10.10.10.1 255.255.255.255
+
Viborg1(config)#<interface loopback 0>
Viborg1(config-if)#no shutdown
+
Viborg1(config-if)#<ip address 10.10.10.1 255.255.255.255>
Viborg1(config-if)#CTRL-Z
+
Viborg1(config-if)#<no shutdown>
</pre>
+
Viborg1(config-if)#<CTRL-Z>
 +
</source>
 +
</div>
 +
 
 
== Starte og konfigurere RIP ==
 
== Starte og konfigurere RIP ==
<pre style="margin: 10px 75px;">
+
<div style="margin: 10px 75px;">
Viborg1#configure terminal
+
<source lang="cli">
Viborg1(config)#ip routing
+
Viborg1#<configure terminal>
Viborg1(config)#router rip
+
Viborg1(config)#<ip routing>
Viborg1(config-router)#version 2
+
Viborg1(config)#<router rip>
Viborg1(config-router)#network 192.168.22.0
+
Viborg1(config-router)#<version 2>
Viborg1(config-router)#network 172.16.0.0
+
Viborg1(config-router)#<network 192.168.22.0>
Viborg1(config-router)#network 10.0.0.0
+
Viborg1(config-router)#<network 172.16.0.0>
Viborg1(config-router)#CTRL-Z
+
Viborg1(config-router)#<network 10.0.0.0>
</pre>
+
Viborg1(config-router)#<CTRL-Z>
 +
</source>
 +
</div>
 
[[Category:Cisco]][[Category:CCNA]][[Category:IOS]][[Category:Network]]
 
[[Category:Cisco]][[Category:CCNA]][[Category:IOS]][[Category:Network]]

Revision as of 14:58, 22 May 2009

Picture 1: Putty serial communication
Cisco Rollover kabel

I dette eksempel konfigureres en Cisco 2621XM router fra grunden.

Konfigurationsoversigt

En Cisco 2621XM har to FastEthernet interfaces. FastEthernet 0/0 og FastEthernet 0/1.

  • hostnavn konfigurers til Viborg1
  • FastEthernet 0/0 konfigures med ip adressen 192.168.22.1 og subnetmasken 255.255.255.0
  • FastEthernet 0/1 konfigures med ip adressen 172.16.0.1 og subnetmasken 255.255.0.0
  • loopback 0 interfacet som er et virtuelt interface får ip adressen 10.10.10.1 og subnetmasken 255.255.255.255
  • RIP version 2 konfigureres til at inkludere alle tre subnet (FastEthernet porte og loopback porten)

Forbind routeren og en PC's COM port med et cisco roolover kabel. Se billedet af et roolover kabel. Start en terminalemulator på PC'en. Jeg vil anbefale terminalemulatoren putty

Start Putty and udfyld konfigurationsbilledet som markeret med de røde ringe i figur 1. (Min COM port er på COM6. Din er måske på en anden. Forsøg dig frem eller se det i Windows enhedshåndtering)

Start routeren og du bør kunne se på Putty at routeren er ved at boote. Når routeren er bootet er det måske nødvendigt at fjerne en eventuel eksisterende konfiguration. Følg anvisningerne herunder.

Undersøg om der er en eksisterende konfiguration

Hvis routeren efter den har bootet viser System Configuration Dialog som vist i dialogbilledet nedenunder, har routeren ingen konfiguration liggende og du kan fortsætte til Konfiguration trin 1. Hvis routeren skriver en række fejlbeskeder på skærmen er det nødvendigt at Slette den eksisterende konfiguration

         --- System Configuration Dialog ---

Would you like to enter the initial configuration dialog? [yes/no]: <yes>

Slet eksisterende konfiguration

For at slette den eksiterende konfiguration skal man først logge ind på routeren. Vi bruger altid passwordet cisco, class eller Cisco her på skolen. Du bør således kunne logge ind som vist herunder. Hvis du mod forventning ikke kan logge ind er det nødvendigt at udføre proceduren password recovery procedure.

R5><enable>
Password:
R5#

Efter du er logget ind på routeren kan du slette konfigurationen som ligger i en fil som hedder startup-config og genstarte routeren. erase startup-config slettet konfigurationen og reload genstarter routeren. Vist herunder.

R5#erase startup-config
Erasing the nvram filesystem will remove all configuration files! Continue?
[OK]
Erase of nvram: complete
R5#reload

And the Router reloads with a empty configuration

Konfiguration trin 1

Se eksemplet herunder

         --- System Configuration Dialog ---

Would you like to enter the initial configuration dialog? [yes/no]: <yes>

At any point you may enter a question mark '?' for help.
Use ctrl-c to abort configuration dialog at any prompt.
Default settings are in square brackets '[]'.

Basic management setup configures only enough connectivity
for management of the system, extended setup will ask you
to configure each interface on the system

Would you like to enter basic management setup? [yes/no]: <yes>
Configuring global parameters:

  Enter host name [Router]: <Viborg1>

  The enable secret is a password used to protect access to
  privileged EXEC and configuration modes. This password, after
  entered, becomes encrypted in the configuration.
  Enter enable secret: <cisco>

  The enable password is used when you do not specify an
  enable secret password, with some older software versions, and
  some boot images.
  Enter enable password: <class>

  The virtual terminal password is used to protect
  access to the router over a network interface.
  Enter virtual terminal password: <cisco>
  Configure SNMP Network Management? [yes]: <no>

Current interface summary


Any interface listed with OK? value "NO" does not have a valid configuration

Interface                  IP-Address      OK? Method Status        Protocol
FastEthernet0/0            unassigned      NO  unset  up            down
FastEthernet0/1            unassigned      NO  unset  up            down

Enter interface name used to connect to the
management network from the above interface summary: <FastEthernet0/0>

Configuring interface FastEthernet0/0:
  Use the 100 Base-TX (RJ-45) connector? [yes]:<yes>
  Operate in full-duplex mode? [no]: <yes>
  Configure IP on this interface? [yes]:<yes>
    IP address for this interface: <192.168.22.1>
    Subnet mask for this interface [255.255.255.0] : <255.255.255.0>
    Class C network is 192.168.22.0, 24 subnet bits; mask is /24

The following configuration command script was created:

hostname Viborg1
enable secret 5 $1$Q0eK$BS6PyvYOB0dfDILGrDYLc.
enable password class
line vty 0 4
password cisco
no snmp-server
!
no ip routing

!
interface FastEthernet0/0
no shutdown
media-type 100BaseX
full-duplex
ip address 192.168.22.1 255.255.255.0
no mop enabled
!
interface FastEthernet0/1
shutdown
no ip address
!
end


[0] Go to the IOS command prompt without saving this config.
[1] Return back to the setup without saving this config.
[2] Save this configuration to nvram and exit.

Enter your selection [2]:<2>


Konfiguration trin 2

FastEthernet 0/1

Konfiguration af fastethernet0/1 interfacet.

Viborg1#<configure terminal>
Enter configuration commands, one per line.  End with CNTL/Z.
Viborg1(config)#<interface FastEthernet0/1>
Viborg1(config-if)#<ip address 172.16.0.1 255.255.0.0>
Viborg1(config-if)#<no shutdown>
Viborg1(config-if)#<CTRL-Z>


Loopback 0

Konfiguration af loopback0 interfacet.

Viborg1#<configure terminal>
Viborg1(config)#<interface loopback 0>
Viborg1(config-if)#<ip address 10.10.10.1 255.255.255.255>
Viborg1(config-if)#<no shutdown>
Viborg1(config-if)#<CTRL-Z>

Starte og konfigurere RIP

Viborg1#<configure terminal>
Viborg1(config)#<ip routing>
Viborg1(config)#<router rip>
Viborg1(config-router)#<version 2>
Viborg1(config-router)#<network 192.168.22.0>
Viborg1(config-router)#<network 172.16.0.0>
Viborg1(config-router)#<network 10.0.0.0>
Viborg1(config-router)#<CTRL-Z>