es used, 950488 available, 4194304 total] 4096K bytes of processor board System flash (Read ONLY) Chip Bank Code Size Name 1 1 89A2 1024KB INTEL 28F008SA 2 1 89A2 1024KB INTEL 28F008SA 3 1 89A2 1024KB INTEL 28F008SA 4 1 89A2 1024KB INTEL 28F008SA Executing current image from System flash
Imet' dva fajla vo flesh mozhno tol'ko, esli imeetsya dva banka pamyati (u menya net) i vypolnit' special'nuyu proceduru (IOS nado nastroit' adresa - vypolnyaetsya-to ona iz flesha!). Bukva l v imeni fajla kak raz i oznachaet, chto adresa mozhno nastroit'.
Posmotret', skol'ko raz tuda chego zapisyvali: show flash err (po-moemu, erundu pokazyvaet).
Kopirovat' iz flesh na tftp: copy flash tftp, posle chego sprosyat imya servera, ishodnoe imya fajla i rezul'tatiruyushchee imya fajla (fajl dolzhen sushchestvovat' s pravami 666).
Kopirovat' konfiguraciyu na tftp: copy startup-config/running-config tftp
Zagruzit' konfiguraciyu s tftp: copy tftp startup-config/running-config (po-moemu, esli gruzit' tekushchuyu konfiguraciyu, to proishodit ne kopirovanie, a sliyanie).
Kopirovat' iz tftp vo flesh (esli dostatochno pamyati!!!): copy tftp flash
Ponyatnoe delo, chto esli IOS vypolnyaetsya iz flesh, to gruzit' novoe soderzhimoe flesha vo vremya raboty IOS ne stoit, nado zagruzit'sya iz ROM (libo nazhav Break pri zagruzke, libo vydav no boot system flash).
CHerta-s dva! Na samom dele vse ne tak kak v knizhke. Nado vydat' copy tftp flash pryamo iz IOS (ibo v bootstrap takoj komandy net vovse), budet zapushchen flash load helper, kotoryj zadaet vse neobhodimye voprosy, zatem perezapuskaet kisku iz ROMa, stiraet flesh, kopiruet fajl s tftp (zahodit' tol'ko s konsoli - inache nichego ne uvidish', i ob oshibkah ne uznaesh' ;). Posle etogo nado sohranit' konfiguraciyu (copy run start). A vse-taki interesno, kak vybirat'sya iz situacii, esli chto-to poluchilos' ne tak. Kstati, rekomenduetsya sohranit' konfiguraciyu kuda-nibud' na tftp pered izmeneniem flesha. p.s. vse-taki mozhno bylo by sdelat' i zagruzivshis' iz ROM (tol'ko ne ROM monitor, a ROM IOS), esli zadat' v registre konfiguracii mladshie 4 bita ravnymi 0-0-0-1.
Kopirovanie tekushchej konfiguracii v zagruzochnuyu: copy run start
Kopirovanie zagruzochnoj konfiguracii v tekushchuyu: copy start run
Posmotret' sostoyanie: show version
Proverit' kontrol'nuyu summu: verify flash
Szhatie konfiguracionnogo fajla rabotaet tol'ko na Cisco 3xxx i Cisco 7xxx.
Povtorno vypolnit' konfiguracionnyj fajl: configure memory
Ochistit' konfiguraciyu: erase startup
Posmotret' tekushchuyu/zagruzochnuyu konfiguraciyu: show run/start
V NVRAM zapisyvayutsya tol'ko parametry, otlichnye ot parametrov po umolchaniyu.
Registr konfiguracii: 16 bit. Menyaetsya komandoj: config-register. Mladshie 4 bita (3,2,1, i 0) obrazuyut pole zagruzki:
Fajl
konfiguracii seti (po
umolchaniyu imya fajla: network-config):
boot network [tftp]
imya-fajla
[ip-adres]
service config
Fajl
konfiguracii hosta (po
umolchaniyu imya fajla: network-config):
boot host [tftp]
imya-fajla
[ip-adres]
service config
Perezagruzka:
ClickStart: konfigurirovanie Cisco 1003, 1004 i 1005 cherez WWW (odnoportovye ISDN, Frame Relay i asinhronnye marshrutizatory).
AutoInstall: vklyuchaesh' novyj marshrutizator, on ishet skonfigurirovannyj ranee marshrutizator (Ethernet, FDDI, HDLC, Frame Relay) - trebuetsya takoe kolichestvo predvaritel'noj podgotovki, chto legche vse sdelat' vruchnuyu (esli tol'ko ne nado ustanovit' sotnyu kisok).
Setup: interaktivnaya ustanovka parametrov. Trebuet podklyucheniya konsol'nogo terminala (ya ispol'zuyu AUX port sosednej kiski).
Eshche byvaet sreamline setup (esli ustanovlen RXBOOT ROM) i voznikayut nepreodolimye problemy: zadaet minimum voprosov neobhodimyh, chtoby najti zagruzochnyj obraz i fajl s konfiguraciej. Servisy
CHasy (sbrasyvayutsya dazhe pri perezagruzke na 1 marta 1993 goda) hranyatsya v formate UTC (Coordinated Universal Time) - to zhe samoe, chto i GMT. Ispol'zuyutsya protokoly NTP (priem i peredacha - vklyuchen po umolchaniyu - pri perezagruzke i pri vyklyuchenii na paru minut vremya sohranyaetsya), SNTP na kiskah serii 1000 (tol'ko priem - vyklyuchen po umolchaniyu).
Zapustit' TFTP server na kiske:
Zapustit' RARP
server na kiske (chtoby eto real'no
ispol'zovat'
neobhodimo vypolnit' kuchu
dopolnitel'nyh uslovij -
obespechit' broadcast UDP - ip forward-protocol udp 111,
zapolnit' tablicu ARP
MAC-adresami klientov, ip helper-adress
adres-nastoyashchego-servera -
govoryat, chto problemy voznikli iz-za
nedodelannosti rpc.bootparamd v SunOS - sudya po
nashemu printeru tak ono i est'):
cat(config-if)>ip rarp-server
ip-adres-nastoyashchego-servera
rcp i rsh servis:
HTTP-server (pri vhode v
kachestve imeni nado govorit' imya kiski, a
parolya - parol'
supervizora) - pol'zy ot etogo
nikakoj:
ip http server
ip http port 80
Obshchee upravlenie
prompt stroka -
izmenenie
standartnogo
priglasheniya
hostname imya - imya
marshrutizatora
alias uroven'-EXEC
imya-sinonim
tekst-komandy -
sozdanie
sokrashchenij-sinonimov komand
show aliases
[uroven'-EXEC] -
posmotret' spisok
sinonimov
load-interval sekund - dlina
intervala vychisleniya srednej
zagruzki
Interfejsy
description
stroka-teksta
hold-queue dlina in/out -
zadanie razmera bufera
bandwidth kilobits -
ispol'zuetsya, naprimer, dlya
nastrojki parametrov TCP
delay
desyatye-milisekundy -
informaciya dlya nekotoryh
protokolov
marshrutizacii (ili desyatki
mikrosekund)
keepalive sekund - kak chasto
posylat' pkaety dlya proverki
zhivuchesti linii (interfejs
schitaetsya upavshim esli v techenii 3
intervalov ne prishlo otveta)
mtu bajt
async: 8 shtuk na Cisco 2509, 16 shtuk na Cisco 2511, eshche mozhno ispol'zovat' AUX port, no OCHENX ne sovetuyu (defektivnaya apparatnaya realizaciya: skorost' 38400, vse na programmnom urovne - v tom chisle i sinhronizaciya).
Samu fizicheskuyu liniyu nado konfigurirovat' otdel'no s pomoshch'yu komandy line.
Vhod v rezhim
konfiguracii
interfejsa:
interface async
nomer-porta
Inkapsulyaciya: podderzhivayutsya dva metoda inkapsulyacii - SLIP i PPP. O SLIP my zabudem srazu zhe.
Rezhim:
interaktivnyj ili zhestko
nastroennyj (dedicated): v
poslednem sluchae ne
zapuskaetsya EXEC, tak chto nel'zya
pomenyat' adres i drugie
parametry:
async mode interactive/dedicated
Razreshit' protokoly
dinamicheskoj
marshrutizacii:
async dynamic routing
Gruppovaya konfiguraciya (stol'ko preduprezhdenij ob oshibkah, chto luchshe i ne trogat')
hub ethernet number port
no shutdown
auto-polarity
link-test
source-address [MAC-address] -
propuskat' tol'ko pakety ot etogo MAC-adresa
interface loopback number
interface null 0
interface serial nomer
encapsulation
atm-dxi/hdlc/frame-relay/ppp/sdlc-primary/sdlc-secondary/smds/stun/x25
- po umolchaniyu HDLC (est'
obnaruzhenie oshibok, no net povtora
neverno peredannyh dannyh)
compress stac - esli
zagruzka CPU prevyshaet 65%, to
vyklyuchit'
pulse-time sekund - kakuyu pauzu
sdelat' pri
propadanii nesushchej
Dlya chego eto nado:
Komponenty:
Preduprezhdeniya:
interface tunnel nomer
tut dolzhno byt' opisano kakim
protokolam pozvoleno
tunnelirovat'sya
tunnel source
ip-address-ili-interfejs
tunnel destination
ip-address-ili-interfejs
tunnel mode aurp/cayman/dvmrp/eon/gre ip/nos -
opredelyaet protokol
inkapsulyacii
tunnel checksum - vse plohie pakety budut
vykidyvat'sya (nekotorye
protokoly trebuyut etogo)
tunnel key nomer - dolzhny byt'
odinakovy na oboih koncah (slabaya
zashchita)
tunnel sequence-datagramms -
otbrasyvat' pakety,
prishedshie ne v tom poryadke
(nekotorye protokoly trebuyut etogo)
show async status
show interface async
nomer
show compress
show controller
imya-kontrollera
show interface accounting
show interface tip
nomer
clear counters tip
nomer
show protocols
show version
clear interface tip
nomer
clear line nomer
shutdown
no shutdown
down-when-looped - schitat'
interfejs upavshim, esli na nem vklyuchen loopback
(neobhodimo dlya backup)
dinamicheskoe vydelenie IP-adresov iz lokal'nogo pula i uderzhanie ih za pol'zovatelyami
ip address-pool local
ip local pool default
nachal'nyj-ip-adres
konechnyj-ip-adres
interface Group-Async1
ip unnumbered Ethernet0
ip tcp header-compression passive
encapsulation ppp
bandwidth 112
delay 20000
keepalive 10
async mode interactive
no cdp enable
zdes' ya eshche govoril: peer default ip address pool, no
ona kuda-to delas'
(po-umolchaniyu nebos')
group-range 1 16
esli chej-to adres nado zadat' yavno, to skazhi:
member nomer peer default ip address
IP-adres
v versii 11.0(1) ne rabotala, v versii 11.1(12) vrode rabotaet konfigurirovanie v kachestve prostogo terminal'nogo servera
Primer konfiguracii s komentariyami.
service tcp-small-servers #
pozvolyaet kiske otvechat' na vsyakie melkie
zaprosy tipa echo, chargen i t.d.
Server dostupa (tacacs+) - eto
programma, kotoraya krutitsya na
UNIX-komp'yutere i otvechaet na zaprosy kiski tipa: est' li
takoj
pol'zovatel', kakie u nego prava i vedet
zhurnal poseshchenij. Kak
konfigurirovat' server smotri
otdel'nuyu glavu, a kiska
konfiguriruetsya tak:
hostname cat2511-wb # imya kiski,
vydaetsya v
priglashenii i ,navernoe, gde-to eshche
slock timezone MSK 3 #
vremennaya zona
slock summer-time MSD recurring last Sun Mar 2:00 last Sun Oct 2:00 #
letnee vremya
epable secret
epable password
ip subnet-zero # ne
razbiralsya
ip tcp synwait-time 120 #
zachem eto
ip tcp path-mtu-discovery #
avtomaticheskaya nastrojka na razmer MTU
ip accounting-threshold 256 # ne
razbiralsya
ip accounting-list 194.84.39.0 0.0.0.255 #
ne
razbiralsya
interface Ethernet0 # nachinaem
konfigurirovat' port Ethernet
ip address 194.84.39.24 255.255.255.224 # IP
adres i maska ethernet-porta
(osnovnoj adres kiski)
ip address 194.87.163.24 255.255.255.224 secondary #
esli u nas dva bloka IP-adresov (chto u nas bylo v
moment perehoda ot odnogo ISP k
drugomu
ehit # vyhod iz
konfigurirovaniya Ethernet
interface Serial0 # nachinaem
konfigurirovat'
sinhronnyj
posledovatel'nyj port
po ip address # net u nas ego
shutdown # -//-
ehit # vyhod iz
konfigurirovaniya porta
interface Serial1 # nachinaem
konfigurirovat'
sinhronnyj
posledovatel'nyj port
po ip address # net u nas ego
shutdown # -//-
ehit # vyhod iz
konfigurirovaniya porta
ip domain-name deol.ru. # imya nashego
domena
ip name-server 194.84.39.28 # adres
DNS-servera (mozhet byt' do 6 shtuk)
ip route 0.0.0.0 0.0.0.0 194.84.39.26 #
marshrut po umolchaniyu (vse, chto ne na nashih
portah, peredaem na bolee "umnuyu" kisku
snmp-server community public RO #
razreshaem SNMP
upravlenie (tol'ko chtenie)
line con 0 # nachinaem
konfigurirovanie
konsol'nogo porta
ehec-timeout 0 0 #
otklyuchaem tajm-aut
ehit # vyhod iz
konfigurirovaniya porta
line 1 16 # nachinaem
konfiguraciyu
asinhronnyh
posledovatel'nyh portov
ehec-timeout 0 0 #
otklyuchaem tajm-aut
modem InOut #
otrabatyvat' modemnye signaly
aitocommand telnet 194.84.39.28 # pri vhode na
liniyu, kiska nasil'no vydaet komandu telnet..., chto ne
pozvolyaet
pol'zovatelyu delat' chto-libo eshche (esli,
konechno, ne znaesh' kak iz etogo vyjti)
transport input none # ne
pozvolyaet zvonit' s nashih modemov (zajdya na liniyu
obratnym telnetom)
transport preferred none # na vsyakij
sluchaj
escape-character NONE # ne
pozvolyaet vyjti iz telnet'a
stopbits 1
rxspeed 115200 # skorost' mezhdu
modemom i kiskoj
txspeed 115200 # skorost' mezhdu kiskoj i
modemom
flowcontrol hardware
ehit # vyhod iz
konfigurirovaniya porta
line aux 0 #
konfigurirovanie
vspomogatel'nogo
asinhronnogo
posledovatel'nogo porta
transport input all # mozhet byt' syuda budet
podklyuchena konsol' drugoj kiski
ehit # vyhod iz
konfigurirovaniya porta
line vty 0 4 #
konfigirirovanie
virtual'nyh
terminalov (na nih my popadaem, kogda
zahodim telnetom na kisku)
ehec-timeout 0 0 #
otklyuchaem tajm-aut
rassword
login # kiska budet
sprashivat' parol' pri zahode na etu liniyu (v
dannom sluchae telnetom)
ehit # vyhod iz
konfigurirovaniya porta
konfigurirovanie vneshnego servera dostupa (tacacs+)
aaa new-model # budem
ispol'zovat' tacacs+, a ne starye
varianty
aaa authentication login default tacacs+ enable #
po-umolchaniyu proveryaem kazhdyj vhod na liniyu s
pomoshch'yu tacacs+ servera, a esli on ne
otzyvaetsya, to
sprashivaem parol'
superpol'zovatelya
aaa authentication ppp default if-needed none # pri
vklyuchenii PPP,
proizvodim proverku
pol'zovatelya, esli ne
proveryali ego ran'she (mozhet eto uzhe
mozhno
vyklyuchit'?)
aaa authorization exec tacacs+ if-authenticated #
proveryaem prava na zapusk EXEC (shell tak u kiski
nazyvaetsya) s pomoshch'yu servera tacacs+, a esli ego net, to
daem razreshenie, esli lichnost'
pol'zovatelya
udostoverena - tol'ko
blagodarya etoj strochke tacacs+ server
vozvrashchaet
avtokomandu (v nashem sluchae telnet ili ppp)
aaa authorization commands 1 tacacs+ if-authenticated #
proveryaem prava na
ispolnenie komand urovnya 1
(neprivilegirovannyh) s pomoshch'yu servera tacacs+, a esli ego
net, to daem
razreshenie, esli lichnost'
pol'zovatelya
udostoverena
aaa authorization commands 15 tacacs+ if-authenticated #
proveryaem prava na
ispolnenie komand urovnya 15
(privilegirovannyh) s pomoshch'yu servera tacacs+, a esli ego net, to
daem razreshenie, esli lichnost'
pol'zovatelya
udostoverena
aaa authorization network tacacs+ if-authenticated #
proverka prav, esli kto-to lezet k nam po seti s
pomoshch'yu servera tacacs+, a esli ego net, to daem
razreshenie, esli lichnost'
pol'zovatelya
udostoverena
aaa accounting network stop-only tacacs+ #
posylaem uchetnuyu zapis' tacacs+ serveru v
sluchae okonchaniya setevogo sobytiya
(zavershenie PPP-seansa,
naprimer)
aaa accounting connection stop-only tacacs+ #
posylaem uchetnuyu zapis' tacacs+
serveru v sluchae okonchaniya
telnet-seansa
aaa accounting system stop-only tacacs+ #
posylaem uchetnuyu zapis' tacacs+ serveru v
sluchae okonchaniya
sistemnogo sobytiya (naprimer,
perezagruzki)
eshche dolzhna rabotat' komanda: aaa authentication local-override
(esli konechno pered nej zavesti
pol'zovatelya na kiske username admin privilege 15 password
tacacs-server host 194.84.39.28 # adres
komp'yutera, na kotorom rabotaet tacacs+
server
tacacs-server host 194.84.39.27 # adres
komp'yutera, na kotorom rabotaet
zapasnoj tacacs+ server (v
real'nosti on ne rabotaet, no pri
neobhodimosti mozhno
zapustit')
tacacs-server key