| Klase računalnih mreža, subnetiranje - CLI komande IOS |
Konfiguriranje računalne mreže znači da se vrši konfiguriranje aktivne mrežne opreme koja se u mreži koristi prema dizajniranoj i prihvaćenoj shemi. Nekad se je za navedeno koristio serijski priključka RS232c na računalu povezan s posebnim priključkom na mrežnom uređaju. Mogu se koristiti i drugačije vrste konektora, ali je kabel za povezivanje mrežnog uređaja i računala strogo namjenski i isporučuje se uz mrežni uređaj. Preko 'Terminal' ('Hyper Terminal' kod Windows XP OS) programske potpore računala pristupa se aktivnom mrežnom uređaju te zadavanjem komandi sadržanih u operativnom sustavu mrežnog uređaja vrši se njegovo konfiguriranje. Kad se mrežnom uređaju dodijeli adresa koja je u skladu s osmišljenom mrežnom shemom firme-ustanove, može se preko web sučelja, koristeći grafički prikaz GUI (Graphic User Interface), pristupiti konfiguriranju mrežnog uređaja, ali ne u punoj mjeri kao kroz komandnu liniju - CLI (Command Line Interface). CLI je primarni način konfiguriranja uređaja.
Tako firma Cisco u svojim mrežnim uređajima koristi IOS (Internetwork Operating System) koji omogućava konfiguriranje mrežnog uređaja na oba navedena načina. Naredni tekst je mali priručnik koji pokazuje kako treba sagledati TCP/IP u odnosu na OSI model koncepcije mreže, korisne komande koje Windows OS sadrži za brzi pregled postavljenih parametara računala i kontrolu komunikacije kroz mrežu, popis klasa računala, pomoćne tablice za uspješno vršenje subnet-iranja mreže, te komande za konfiguriranje Cisco usmjernika (router) i preklopnika (switch). Komande omogućavaju da se mrežnom uređaju definira od imena administratora i njegove zaporke do konfiguriranja komunikacijskih protokola i raznih mehanizama sigurnosti.
=========================================================================================
TCP/IP skup protokola prema slojevima OSI modela
=========================================================================================
OSI TCP/IP Protokoli PDU
---------------- ---------------------------- ------------------------- -------
7. Application Application Telnet, FTP, SMTP
6. Presentation ASCII, GIF, JPEG D A T A
5. Session Socket Interface (HD, FD) Data
4. TRANSPORT TRANSPORT(Host2Host/End2End) TCP, UDP SEGMENT
3. Network Internet IP PACKET
2. Data Link Network Access(Host2Net)
LLC (802.2) SAP, SNAP
MAC (802.3) FRAME
1. Physical Bits
=========================================================================================
=========================================================================================
Klase računalnih mreža i subnetiranje
=========================================================================================
Komande u COMMAND prompt-u PC-a
---------------------------------
ipconfig /all
arp -a
netstat -n
ping (network sloj - 3)
tracert
telnet (application sloj - 7)
=========================================================================================
Mrežne klase - adrese računala (javne i privatne)
-----------------------------------------------------------------
A 1-126.h.h.h IP/ 8 0
B 128-191.N.h.h IP/16 HOBits 10
C 192-223.N.N.h IP/24 110
------------------------
D 224-239.n.n.n IP/32 (Multicast) 1110
E 240-255.n.n.n IP/32 (Reserved) 11110
-----------------------------------------------------------------
Network 127 rezervirana je za loopback 127.0.0.1 i testiranje
-----------------------------------------------------------------
224.0.0. 5 = OSPF DR i BDR (Hello-LSA)
224.0.0. 6 = OSPF ostali
224.0.0. 9 = RIPv2
224.0.0.10 = EIGRP (Dual-Hello), SR (routing i top tablica)
, FS (top.tablica)
, tablica susjeda
-----------------------------------------------------------------
A 10. 0.0.0 - 10.255.255.255 |
B 172. 16.0.0 - 172. 31.255.255 |---- privatne mreže
C 192.168.0.0 - 192.168.255.255 |
-----------------------------------------------------------------------------------------
Najčešće korišteni portovi (broj i svrha)
|------|-----|-----|-----|------|-----|-----|-----|-----|-----|-----|-----|-----|-----|
|Port | 20 | 21 | 22 | 23 | 25 | 53 | 69 | 80 | 119 | 110 | 161 | 443 | 531 |
|------|-----|-----|-----|------|-----|-----|-----|-----|-----|-----|-----|-----|-----|
|Svrha |FTP-D| FTP | SSH |Telnet| SMTP| %DNS|*TFTP| HTTP| NNTP| POP3|*SNMP|HTTPS| CHAT|
|------|-----|-----|-----|------|-----|-----|-----|-----|-----|-----|-----|-----|-----|
*UDP %UDP+TCP
=========================================================================================
Dekadni-heksadekadni-binarni brojevi
|------|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|
|Dek. | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|------|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|
|Heks. | F | E | D | C | B | A | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|------|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|
|Bin. |1111|1110|1101|1100|1011|1010|1001|1000|0111|0110|0101|0100|0011|0010|0001|0000|
|------|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|
Dekadni-heksadekadni-binarni brojevi s vodećim nulama
|-----|-----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|
|Dek. |16384|8192|4096|2048|1024| 512| 256| 128| 64 | 32 | 16 | 8 | 4 | 2 | 1 | 0 |
|-----|-----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|
|Heks.| 4000|2000|1000| 800| 400| 200| 100| 80 | 40 | 20 | 10 | 8 | 4 | 2 | 1 | 0 |
|-----|-----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|
| | 0100|0010|0001| | | | | | | | | | | | | |
|Bin. | 0000|0000|0000|1000|0100|0010|0001| | | | | | | | | |
| | 0000|0000|0000|0000|0000|0000|0000|1000|0100|0010|0001| | | | | |
| | 0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|0000|1000|0100|0010|0001|0000|
|-----|-----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|
Subnetirana B-klasa (128-191.N.h.h IP/16)
|----------|-----|-----|----|----|----|----|----|----||----|----|----|----|----|-----|
|Format | /17 | /18 | /19| /20| /21| /22| /23| /24|| /25| /26| /27| /28| /29| /30|
|----------|-----|-----|----|----|----|----|----|----||----|----|----|----|----|-----|
| Net | 128 | 192 | 224| 240| 248| 252| 254| 255|| 255| 255| 255| 255| 255| 255|
| MASK | 0 | 0 | 0| 0| 0| 0| 0| 0|| 128| 192| 224| 240| 248| 252|
|----------|-----|-----|----|----|----|----|----|----||----|----|----|----|----|-----|
|Net-Bits | 1 | 2 | 3| 4| 5| 6| 7| 8|| 9| 10| 11| 12| 13| 14|
|Host-Bits | 15 | 14 | 13| 12| 11| 10| 9| 8|| 7| 6| 5| 4| 3| 2|
|----------|-----|-----|----|----|----|----|----|----||----|----|----|----|----|-----|
| | 1000| 1100|1110|1111|1111|1111|1111|1111||1111|1111|1111|1111|1111| 1111|
|Binarno | 0000| 0000|0000|0000|1000|1100|1110|1111||1111|1111|1111|1111|1111| 1111|
| | 0000| 0000|0000|0000|0000|0000|0000|0000||1000|1100|1110|1111|1111| 1111|
| | 0000| 0000|0000|0000|0000|0000|0000|0000||0000|0000|0000|0000|1000| 1100|
|----------|-----|-----|----|----|----|----|----|----||----|----|----|----|----|-----|
|Range | 128 | 64 | 32| 16| 8| 4| 2| 1|| 128| 64| 32| 16| 8| 4|
|----------|-----|-----|----|----|----|----|----|----||----|----|----|----|----|-----|
|T-subnets | *2 | 4 | 8| 16| 32| 64| 128| 256|| 512|1024|2048|4096|8192|16384|
|U-SUBNETS | * | 2 | 6| 14| 30| 62| 126| 254|| 510|1022|2046|4094|8190|16382|
|----------|-----|-----|----|----|----|----|----|----||----|----|----|----|----|-----|
|T-hosts |32768|16384|8192|4096|2048|1024| 512| 256|| 128| 64| 32| 16| 8| 4|
|U-HOSTS |32766|16382|8190|4094|2046|1022| 510| 254|| 126| 62| 30| 14| 6| 2|
|----------|-----|-----|----|----|----|----|----|----||----|----|----|----|----|-----|
* Ako je od strane IOS router-a podržana nulta podmreža može i navedeno
Subnetirana C-klasa (192-223.N.N.h IP/24)
|--------------------|-----|-----|-----|-----|-----|-----|-----|-----|
| Format | /25 | /26 | /27 | /28 | /29 | /30 | | |
|--------------------|-----|-----|-----|-----|-----|-----|-----|-----|
| Net Mask | 128 | 192 | 224 | 240 | 248 | 252 | 254 | 255 |
|--------------------|-----|-----|-----|-----|-----|-----|-----|-----|
| Bits borrowed - NB | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| Bits for host - HB | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|--------------------|-----|-----|-----|-----|-----|-----|-----|-----|
| | 1000| 1100| 1110| 1111| 1111| 1111| 1111| 1111|
| Binarno | 0000| 0000| 0000| 0000| 1000| 1100| 1110| 1111|
|--------------------|-----|-----|-----|-----|-----|-----|-----|-----|
| Range | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|--------------------|-----|-----|-----|-----|-----|-----|-----|-----|
| Total subnets | *2 | 4 | 8 | 16 | 32 | 64 | NB |
| Usable SUBNETS | * | 2 | 6 | 14 | 30 | 62 | 2 - 2 |
|--------------------|-----|-----|-----|-----|-----|-----|-----------|
| Total hosts |*128 | 64 | 32 | 16 | 8 | 4 | HB |
| Usable HOSTS | 126 | 62 | 30 | 14 | 6 | 2 | 2 - 2 |
|--------------------|-----|-----|-----|-----|-----|-----|-----------|
| IP-IP hosts RANGE | *1 | 1 | 1 | 1 | 1 | 1 | |
| for first SUBNET |*126 | 62 | 30 | 14 | 6 | 2 | |
|--------------------|-----|-----|-----|-----|-----|-----|-----------|
* Ako router podržava nultu podmrežu može i navedeno
Subnetirana C-klasa /27 (3 bit-a posuđena)
|-----|---------------|-----------|----------|
| Broj| Subnet ID | IP-Brojevi| Boadcast | Adrese s nulama "0"
|Mreže| (NET-MASK) | HOSTOVA | ID | rezervirane su za MREŽU
|-----|---------------|-----------|----------| (bit-ovi host dijela)
| 0 |x.x.x.(000) 0 | 1 - 30 |x.x.x. 31 |
| 1 |x.x.x.(001) 32 | 33 - 62 |x.x.x. 63 | Adrese s jedinicama "1"
| 2 |x.x.x.(010) 64 | 65 - 94 |x.x.x. 95 | rezervirane su za
| 3 |x.x.x.(011) 96 | 97 - 126 |x.x.x.127 | BROADCAST MREŽE
| 4 |x.x.x.(100)128 | 129 - 158 |x.x.x.159 | (bit-ovi host dijela)
| 5 |x.x.x.(101)160 | 161 - 190 |x.x.x.191 |
| 6 |x.x.x.(110)192 | 193 - 222 |x.x.x.223 |
| 7 |x.x.x.(111)224 | 225 - 254 |x.x.x.255 |
|-----|---------------|-----------|----------|
Subnet maska za podmreže /27 je: 255.255.255.224 (x.x.x.11100000)
Sub-Subnetirana C-klasa /27 na /30 za serijske linkove
|-----|---------|-------|----------|---------|
| Pod |Sub-Subn.| IP |Sub-Subnet| IP |
|Mreža| ID |LINKOVA| ID | LINKOVA |
|-----|---------|-------|----------|---------| Adrese s nulama "......00"
| 0 |x.x.x.32 | 33-34 |x.x.x.192 | 193-194 | rezervirane su za POD-MREŽU
| 1 |x.x.x.36 | 37-38 |x.x.x.196 | 197-198 | (bit-ovi host dijela)
| 2 |x.x.x.40 | 41-42 |x.x.x.200 | 201-202 |
| 3 |x.x.x.44 | 45-46 |x.x.x.204 | 205-206 | Adrese s jedinicama "......11"
| 4 |x.x.x.48 | 49-50 |x.x.x.208 | 209-210 | rezervirane su za
| 5 |x.x.x.52 | 53-54 |x.x.x.212 | 213-214 | BROADCAST POD-MREŽE
| 6 |x.x.x.56 | 57-58 |x.x.x.216 | 217-218 | (bit-ovi host dijela)
| 7 |x.x.x.60 | 61-62 |x.x.x.220 | 221-222 |
|-----|---------|-------|----------|---------|
Subnet maska za pod-podmreže /30 je: 255.255.255.252 (x.x.x.11111100)
----------------------------------------------------------------------------------------
Drugačije tablice subnetiranja samo za 'Usable SUBNETS' i 'Usable HOSTS'
Subnetirana B-klasa (128-191.N.h.h IP/16)
|------|-------|-----------------|---------|-------|-------|
|Format|OF Bits| Subnet Mask | Subnets | Hosts | Range |
|------|-------|-----------------|---------|-------|-------|
| /17 | *1 | 255.255.128. 0 | *2 | 32766 | 128 |
|------|-------|-----------------|---------|-------|-------|
| /18 | 2 | 255.255.192. 0 | 2 | 16382 | 64 |
|------|-------|-----------------|---------|-------|-------|
| /19 | 3 | 255.255.224. 0 | 6 | 8190 | 32 |
|------|-------|-----------------|---------|-------|-------|
| /20 | 4 | 255.255.240. 0 | 14 | 4094 | 16 |
|------|-------|-----------------|---------|-------|-------|
| /21 | 5 | 255.255.248. 0 | 30 | 2046 | 8 |
|------|-------|-----------------|---------|-------|-------|
| /22 | 6 | 255.255.252. 0 | 62 | 1022 | 4 |
|------|-------|-----------------|---------|-------|-------|
| /23 | 7 | 255.255.254. 0 | 126 | 510 | 2 |
|------|-------|-----------------|---------|-------|-------|
| /24 | 8 | 255.255.255. 0 | 254 | 254 | 1 |
|------|-------|-----------------|---------|-------|-------|
|------|-------|-----------------|---------|-------|-------|
| /25 | 9 | 255.255.255.128 | 510 | 126 | 128 |
|------|-------|-----------------|---------|-------|-------|
| /26 | 10 | 255.255.255.192 | 1022 | 62 | 64 |
|------|-------|-----------------|---------|-------|-------|
| /27 | 11 | 255.255.255.224 | 2046 | 30 | 32 |
|------|-------|-----------------|---------|-------|-------|
| /28 | 12 | 255.255.255.240 | 4094 | 14 | 16 |
|------|-------|-----------------|---------|-------|-------|
| /29 | 13 | 255.255.255.248 | 8190 | 6 | 8 |
|------|-------|-----------------|---------|-------|-------|
| /30 | 14 | 255.255.255.252 | 16382 | 2 | 4 |
|------|-------|-----------------|---------|-------|-------|
* Ako router podržava nultu podmrežu može i navedeno
Subnetirana C-klasa (192-223.N.N.h IP/24)
|------|-------|-----------------|---------|-------|-------|
|Format|OF Bits| Subnet Mask | Subnets | Hosts | Range |
|------|-------|-----------------|---------|-------|-------|
| /25 | *1 | 255.255.255.128 | *2 | 126 | 128 |
|------|-------|-----------------|---------|-------|-------|
| /26 | 2 | 255.255.255.192 | 2 | 62 | 64 |
|------|-------|-----------------|---------|-------|-------|
| /27 | 3 | 255.255.255.224 | 6 | 30 | 32 |
|------|-------|-----------------|---------|-------|-------|
| /28 | 4 | 255.255.255.240 | 13 | 14 | 16 |
|------|-------|-----------------|---------|-------|-------|
| /29 | 5 | 255.255.255.248 | 30 | 6 | 8 |
|------|-------|-----------------|---------|-------|-------|
| /30 | 6 | 255.255.255.252 | 62 | 2 | 4 |
|------|-------|-----------------|---------|-------|-------|
* Ako router podržava nultu podmrežu može i navedeno
=========================================================================================
=========================================================================================
Komande za konfiguriranje Cisco router-a
=========================================================================================
UEM = User Exec Mode (view only)
PEM = Privileged Exec Mode (enabled)
GCM = Global Configuration Mode (configuration)
-------------- UEM -> PEM -> GCM -> SCM -----------------
SCM = Specific Configuration Mode
----------------------------------
ICM = Interface CM (dio SCM)
LCM = Line CM (dio SCM)
RCM = Router CM (dio SCM)
---------------------------------------------------------
SCM #exit --> GCM
SCM #<CTRL>+<Z> --> PEM
-----------------------------------------------------------------------------------------
Komande uvida u konfiguraciju
--------------------------------
(PEM) ROUTER#show version
(PEM) ROUTER#show startup-config (NVRAM)
(PEM) ROUTER#show run
(PEM) ROUTER#show running-config (RAM)
(PEM) ROUTER#show cdp
(PEM) ROUTER#show cdp neighbors
(PEM) ROUTER#show interfaces
(PEM) ROUTER#show ip protocols
(PEM) ROUTER#show ip interface [brief]
(PEM) ROUTER#show ip route [eigrp]
(PEM) ROUTER#show ip eigrp neighbors
(PEM) ROUTER#show ip eigrp interfaces
(PEM) ROUTER#show ip eigrp topology { | | }
(PEM) ROUTER#show ip eigrp topology all-links
(PEM) ROUTER#show ip eigrp traffic
(PEM) ROUTER#show ip ospf
(PEM) ROUTER#show ip ospf neighbor [detail]
(PEM) ROUTER#show ip ospf interface [fastethernet 0]
(PEM) ROUTER#show ip ospf database
(PEM) ROUTER#show frame-relay pvc
(PEM) ROUTER#show frame-relay map
(PEM) ROUTER#show frame-relay lmi
(PEM) ROUTER#show ip dhcp binding
(PEM) ROUTER#show ip dhcp server statistic
(PEM) ROUTER#show ip nat translations
-----------------------------------------------------------------------------------------
Inicijalno podešavanje router-a
----------------------------------
(UEM) ROUTER>enable
(PEM) ROUTER#show running-config
(PEM) ROUTER#configure terminal
(GCM) ROUTER(config)#
(GCM) ROUTER(config)#hostname BUZDO
(GCM) BUZDO(config)#
(GCM) BUZDO(config)#banner motd # Routeri IME_MREŽE - Ulazite u BUZDU #
(GCM) BUZDO(config)#ip http server
(GCM) BUZDO(config)#
(GCM) BUZDO(config)#ip host /ime 1.Router-a/ /IP-Router-a/
(GCM) BUZDO(config)#ip host /ime 2.Router-a/ /IP-Router-a/
(GCM) BUZDO(config)#ip host /ime 1.Switch-a/ /IP-Switch-a/
(GCM) BUZDO(config)#
(GCM) BUZDO(config)#exit
(PEM) BUZDO#copy running-config startup-config
(PEM) BUZDO#exit
(UEM) BUZDO>
-----------------------------------------------------------------------------------------
ZAPORKA_ za GCM (obična i kodirana koja 'ubije' običnu)
----------------------------------------------------------
(GCM) BUZDO(config)#enable password ZAPORKA_1
(GCM) BUZDO(config)#enable secret ZAPORKA_2
(GCM) BUZDO(config)#exit
(PEM) BUZDO#
-----------------------------------------------------------------------------------------
ZAPORKA_ za konzolu (ulaz u UEM)
-----------------------------------
(GCM) BUZDO(config)#line console 0
(LCM) BUZDO(config-line)#password ZAPORKA_3
(LCM) BUZDO(config-line)#login
(LCM) BUZDO(config-line)#<CTRL>+<Z>
(PEM) BUZDO#
-----------------------------------------------------------------------------------------
ZAPORKA_ za modem (ulaz u UEM)
---------------------------------
(GCM) BUZDO(config)#line vty 0 4
(LCM) BUZDO(config-line)#password ZAPORKA_4
(LCM) BUZDO(config-line)#login
(LCM) BUZDO(config-line)#<CTRL>+<Z>
(PEM) BUZDO#
-----------------------------------------------------------------------------------------
Spremanje konfiguracije u NVRAM i obratno
--------------------------------------------
(PEM) BUZDO#copy running-config startup-config (RAM-NVRAM)
(PEM) BUZDO#copy run start
(PEM) BUZDO#reload
(UEM) BUZDO>enable
(PEM) BUZDO#
(PEM) BUZDO#copy startup-config running-config
(PEM) BUZDO#copy start run
-----------------------------------------------------------------------------------------
A.D. = Administrative Distance
C2I = Count To infinity
S-H = Split Horizon with Poison Reverse
H-D = Hold-Down Timer
Upd. = Periodicni update
T-Up = Trigered update
L.B. = Load Balancing - equal paths - unequal paths (maximum / default)
R.S. = Route Summarization (prenosi se subnet maska)
Alg. = Algoritam
|----------------|-----|----|----|----|----|----|----|----|----|----|----|------|
| TIP RUTE | A.D.|Cnt2|Spl-|H-DW|Per.|Trg.|L.B.|L.B.|Met.|HOP |VLSM|Algor.|
| (PROTOCOLA) | |Inf.|Hor.|Timr|Upd.|Upd.|EQP |UEQP| | |R.S.| |
|----------------|-----|----|----|----|----|----|----|----|----|----|----|------|
| Connected | 0 | | | | | | | | | | | |
|----------------|-----|----|----|----|----|----|----|----|----|----|----|------|
| Static | 1 | | | | | | | | | | | |
|----------------|-----|----|----|----|----|----|----|----|----|----|----|------|
| EIGRP Summary | 5 | | | | | | | | | | | |
|----------------|-----|----|----|----|----|----|----|----|----|----|----|------|
| External BGP | 20 | | | | | | | | | | | |
|----------------|-----|----|----|----|----|----|----|----|----|----|----|------|
| EIGRP | 90 | | * | |5s-H| * | 6/4| * |Comp| 224| * |Dual-H|
|----------------|-----|----|----|----|----|----|----|----|----| -- |----|------|
| IGRP | 100 | * | * | * | 90s| * | * | * |Comp| 255| | |
|----------------|-----|----|----|----|----|----|----|----|----|----|----|------|
| OSPF | 110 | | | |30m | * | * | |Cost| 200| * |Lsa-H |
|----------------|-----|----|----|----|----|----|----|----|----|----|----|------|
| IS-IS | 115 | | | | | * | * | |Cost|1024| * | |
|----------------|-----|----|----|----|----|----|----|----|----|----|----|------|
| RIPv1 | 120 | * | * | * | 30s| * | 6/4| |Hop | 15 | | |
|----------------|-----|----|----|----|----|----|----|----|----|----|----|------|
| RIPv2 | 120 | * | * | * | 30s| * | 6/4| |Hop | 15 | * | |
|----------------|-----|----|----|----|----|----|----|----|----|----|----|------|
| External EIGRP | 170 | | | | | | | | | | | |
|----------------|-----|----|----|----|----|----|----|----|----|----|----|------|
| Internal BGP | 200 | | | | | | | | | | | |
|----------------|-----|----|----|----|----|----|----|----|----|----|----|------|
| Unknown | 255 | | | | | | | | | | | |
|----------------|-----|----|----|----|----|----|----|----|----|----|----|------|
EIGRP podržava = IP, AppleTalk, IPX (multi-protocol)
8
OSPF Cost = 10 (bps) / BW (bps) ; OSPF mora imati 'loopback interface'
SP-Tree Cost = suma BW
-----------------------------------------------------------------------------------------
Definiranje serijskog i FE interface-a (IF)
----------------------------------------------
(PEM) BUZDO#
(PEM) BUZDO#configure terminal
(GCM) BUZDO(config)#
(GCM) BUZDO(config)#interface serial 0/0
(ICM) BUZDO(config-if)#clock rate 56000 (samo za DCE)
(ICM) BUZDO(config-if)#description DCE serijska veza prema DTE-s0
(ICM) BUZDO(config-if)#ip address /IF-IP/ /SNM/
(ICM) BUZDO(config-if)#no shutdown
(ICM) BUZDO(config-if)exit
(GCM) BUZDO(config)#
(GCM) BUZDO(config)#interface fastethernet 0/0
(ICM) BUZDO(config-if)#ip address /IF-IP/ /SNM/
(ICM) BUZDO(config-if)#description LAN od BUZDE
(ICM) BUZDO(config-if)#no shutdown
(ICM) BUZDO(config-if)exit
(GCM) BUZDO(config)#<CTRL>+<Z>
(PEM) BUZDO#copy running-config startup-config
(PEM) BUZDO#
-----------------------------------------------------------------------------------------
Definiranje statičke i podrazumne rute (GWLR)
------------------------------------------------
BUZDO(config)#ip route /NW-IP odredišne/ /SNM odredišne/ /S-IF | IP-NextHOP/ [AD]
BUZDO(config)#
BUZDO(config)#ip route 0.0.0.0 0.0.0.0 /S-IF | IP-NextHOP/
BUZDO(config)#
BUZDO(config)#ip default-network /NW-IP odredišne/ (vezana za Router-Serial)
-----------------------------------------------------------------------------------------
Simulacija Interneta i specifične lokacije
---------------------------------------------
(GCM) BUZDO(config)#
(GCM) BUZDO(config)#interface loopback /LNo/ (LNo = 0 - 2'147'483'647)
(ICM) BUZDO(config-if)#
(ICM) BUZDO(config-if)#ip address /Host-IP-adresa/ /255.255.255.255/
(ICM) BUZDO(config-if)#no shutdown
(ICM) BUZDO(config-if)#exit
(GCM) BUZDO(config)#
-----------------------------------------------------------------------------------------
Definiranje mreža za router (RIP, IGRP, EIGRP, OSPF)
-------------------------------------------------------
(GCM) BUZDO(config)#
(GCM) BUZDO(config)#
(GCM) BUZDO(config)#router /protocol/{opcija}
(GCM) BUZDO(config)#router rip
(RCM) BUZDO(config-router)#version 2
(RCM) BUZDO(config-router)#exit
(GCM) BUZDO(config)#
(GCM) BUZDO(config)#
(GCM) BUZDO(config)#router igrp /AS/ (AS = 1-65'535)
(GCM) BUZDO(config)#router eigrp /AS/
(RCM) BUZDO(config-router)#
(RCM) BUZDO(config-router)#network /NW-IP spojene na IF/
(RCM) BUZDO(config-router)#network /NW-IP spojene na IF/
(RCM) BUZDO(config-router)#network /NW-IP spojene na IF/
(RCM) BUZDO(config-router)#bandwidth /kbps/
(RCM) BUZDO(config-router)#eigrp log-neighbor-changes
(RCM) BUZDO(config-router)#exit
(GCM) BUZDO(config)#
(GCM) BUZDO(config)# (WCM= WildCard Mask)
(GCM) BUZDO(config)#router ospf /ID/
(RCM) BUZDO(config-router)#network /NW-IP spojene na IF/ /WCM/ area /ANo/
(RCM) BUZDO(config-router)#
(RCM) BUZDO(config-router)# (ID = 1-65'535)
(RCM) BUZDO(config-router)# (ANo = 0-4'294'967'295)
(RCM) BUZDO(config-router)#log-adjancency-changes
(RCM) BUZDO(config-router)#end
(GCM) BUZDO(config)# (LNo = 0 - 2'147'483'647)
(GCM) BUZDO(config)#interface loopback /LNo/
(ICM) BUZDO(config-if)#ip address /Host-IP-adresa/ /255.255.255.255/
(ICM) BUZDO(config-if)# (host mask za software interface)
(ICM) BUZDO(config-if)#
(ICM) BUZDO(config-if)# (Router-ID = Host-IP-adresa)
(ICM) BUZDO(config-if)#end
(GCM) BUZDO(config)#
(GCM) BUZDO(config)#<CTRL>+<Z>
(PEM) BUZDO#copy running-config startup-config
(PEM) BUZDO#
-----------------------------------------------------------------------------------------
HDLC enkapsulacija serijskog interface-a
-------------------------------------------
BUZDO#
BUZDO#configure terminal
BUZDO(config)#
BUZDO(config)#interface serial 0/0
BUZDO(config-if)#encapsulation HDLC (podrazumno na serijskom sinkronom port-u)
BUZDO(config-if)#no shutdown
BUZDO(config-if)#<CTRL>+<Z>
BUZDO#
-----------------------------------------------------------------------------------------
PPP enkapsulacija serijskog interface-a
------------------------------------------
BUZDO#
BUZDO#configure terminal
BUZDO(config)#
BUZDO(config)#username /ime 1.vezanog Router-a/ password /ZAPORKA/
BUZDO(config)#username /ime 2.vezanog Router-a/ password /ZAPORKA/
BUZDO(config)#
BUZDO(config)#interface serial 0/0
BUZDO(config-if)#ip address /IF-IP/ /SNM/
BUZDO(config-if)#clockrate 64000 (samo za DCE)
BUZDO(config-if)#encapsulation PPP
BUZDO(config-if)#
BUZDO(config-if)#compress {predictor|stack}
BUZDO(config-if)#ppp quality /Postotak/ (Postotak = 1 -100)
BUZDO(config-if)#ppp multilink (ako ima)
BUZDO(config-if)#
BUZDO(config-if)#ppp authentication pap
BUZDO(config-if)#ppp pap sent-username /ime vezanog Router-a/ password /ZAPORKA/
BUZDO(config-if)#no shutdown
BUZDO(config-if)#<CTRL>+<Z>
BUZDO#
BUZDO(config-if)#ppp authentication chap (ne treba slati ime i ZAPORKU)
BUZDO(config-if)#no shutdown
BUZDO(config-if)#<CTRL>+<Z>
BUZDO#copy running-config startup-config
BUZDO#
-----------------------------------------------------------------------------------------
FR enkapsulacija serijskog interface-a
-----------------------------------------
BUZDO#
BUZDO#configure terminal
BUZDO(config)#
BUZDO(config)#interface serial 0/1 (DCE)
BUZDO(config-if)#clock_rate 64000
BUZDO(config-if)#encapsulation frame-relay ietf
BUZDO(config-if)#bandwith 64
BUZDO(config-if)#no keepalive (kad nema FR switch-a)
BUZDO(config-if)#ip address /DCE-IF-IP/ /SNM/
BUZDO(config-if)#frame-relay map ip /DTE-IF-IP/ /DLCI/ ietf broadcast
BUZDO(config-if)#description PVC prema DTE vezi
BUZDO(config-if)# (DLCI = 16 - 992)
BUZDO(config-if)#no shutdown
BUZDO(config-if)#<CTRL>+<Z>
BUZDO# (SNM = 225.225.225.0)
BUZDO#
BUZDO#
BUZDO#configure terminal
BUZDO(config)#
BUZDO(config)#interface serial 0/0 (DTE)
BUZDO(config-if)#encapsulation frame-relay ietf
BUZDO(config-if)#bandwith 64
BUZDO(config-if)#no keepalive (kad nema FR switch-a)
BUZDO(config-if)#ip address /DTE-IF-IP/ /SNM/
BUZDO(config-if)#frame-relay map ip /DCE-IF-IP/ /DLCI/ ietf broadcast
BUZDO(config-if)#description PVC prema DCE vezi
BUZDO(config-if)#no shutdown
BUZDO(config-if)#<CTRL>+<Z>
BUZDO#copy running-config startup-config
BUZDO#
-----------------------------------------------------------------------------------------
VLSM (podržava /30; RIPv2; OSPF; EIGRP)
------------------------------------------
BUZDO(config)# (/30 = 255.255.255.252)
BUZDO(config)#interface serial 0/0 (/24 = 255.255.255. 0)
BUZDO(config-if)#ip address /IF-IP/ /255.255.255.252/ (/22 = 255.255.252. 0)
BUZDO(config-if)
-----------------------------------------------------------------------------------------
VLAN na FE (podržava isl|dot1q)
-------------------------------------
BUZDO(config)#
BUZDO(config)#interface fastethernet 0/0
BUZDO(config-if)#full duplex
BUZDO(config-if)#speed {10 | 100 | 1000}
BUZDO(config-if)#
BUZDO(config-if)#ip address /IF-IP/ /SNM/
BUZDO(config-if)#description LAN od BUZDE s TRUNK
BUZDO(config-if)#interface fastethernet 0/0.1 (0/0.1 - 0/0.255)
BUZDO(config-subif)#description nativni VLAN 1
BUZDO(config-subif)#encapasulation {isl|dot1q} /1/ (VNo = 1 - 1000)
BUZDO(config-subif)#ip address /LIF-IP/ /SNM/
BUZDO(config-subif)#exit
BUZDO(config-if)#
BUZDO(config-if)#interface fastethernet 0/0.2
BUZDO(config-subif)#description /neki/
BUZDO(config-subif)#encapasulation isl /VLNo/
BUZDO(config-subif)#ip address /LIF-IP/ /SNM/
BUZDO(config-subif)#exit
BUZDO(config-if)#
BUZDO(config-if)#interface fastethernet 0/0.3
BUZDO(config-subif)#description /neki/
BUZDO(config-subif)#encapasulation isl /VLNo/
BUZDO(config-subif)#ip address /LIF-IP/ /SNM/
BUZDO(config-subif)#exit
BUZDO(config-if)#
BUZDO(config-if)#no shutdown
BUZDO(config-if)exit
BUZDO(config)#<CTRL>+<Z>
BUZDO#copy running-config startup-config
BUZDO#
-----------------------------------------------------------------------------------------
DHCP
-------------------------------------
BUZDO(config)#
BUZDO(config)#router ospf /ID/
BUZDO(config-router)#network /NW-IP spojene na IF/ /SNM/ area /ANo/
BUZDO(config-router)#
BUZDO(config-router)# (ID = 1-65'535)
BUZDO(config-router)# (ANo = 0-4'294'967'295)
BUZDO(config-router)#log-adjancency-changes
BUZDO(config-router)#end
BUZDO(config)#
BUZDO(config)#interface loopback /LNo/ (LNo = 0 - 2'147'483'647)
BUZDO(config-if)#ip address /Host-IP-adresa/ /255.255.255.255/
BUZDO(config-if)#
BUZDO(config-if)# (Router-ID = Host-IP-adresa)
BUZDO(config-if)#end
BUZDO(config)#
-------------------------------------
BUZDO(config)#
BUZDO(config)#ip dhcp pool BUZDO
BUZDO(dhcp-config)#network /NW-IP/ /SNM/
BUZDO(dhcp-config)#default-router /FE-IF-IP/
BUZDO(dhcp-config)#dns-server /IP-poslužitelja/
BUZDO(dhcp-config)#domain-name /IME_DOMENE.TIP/
BUZDO(dhcp-config)#netbioas-name-server /IP-poslužitelja/
BUZDO(dhcp-config)#
BUZDO(dhcp-config)#ip dhcp exclude-address /IP/ /IP/ ...
BUZDO(dhcp-config)#
BUZDO(dhcp-config)#exit
BUZDO(config)#
BUZDO(config)#no service dhcp
BUZDO(config)#
BUZDO(config)#service dhcp
BUZDO(config)#
-----------------------------------------------------------------------------------------
NAT i PAT
-------------------------------------
BUZDO(config)#
BUZDO(config)#interface loopback /LNo/ (LNo = 0 - 2'147'483'647)
BUZDO(config-if)#ip address /Privatna-Host-IP-adresa/ /255.255.255.255/
BUZDO(config-if)#
BUZDO(config-if)# (Router-ID = Host-IP-adresa)
BUZDO(config-if)#end
BUZDO(config)#
----------------
BUZDO(config)#
BUZDO(config)#ip route 0.0.0.0 0.0.0.0 /IP-NextHOP/
BUZDO(config)#
BUZDO(config)#interface fastethernet 0/0
BUZDO(config-if)#ip address /Privatna-IP/ /Privatna-SNM/
BUZDO(config-if)#ip nat inside (10.10.10.1 - 255.255.255.0)
BUZDO(config-if)#no shutdown
BUZDO(config-if)#exit
BUZDO(config)#
BUZDO(config)#interface serial 0/0
BUZDO(config-if)#ip address /Javna-IP/ /Javna-SNM/
BUZDO(config-if)#ip nat outside
BUZDO(config-if)#no shutdown
BUZDO(config-if)#exit
BUZDO(config)#
----------------
NAT - dynamic
----------------
BUZDO(config)# (SLNo = 1 - nadalje)
BUZDO(config)#ip nat inside source list /SLNo/ pool /JAVNO/
BUZDO(config)#
BUZDO(config)#ip nat pool /JAVNO/ /Prva-javna-IP/ /Zadnja-javna-IP/ /Javna-SNM/
BUZDO(config)#
BUZDO(config)#access-list /SLNo/ permit /Privatna-NWIP/ /Privatna-ACL-Maska/
BUZDO(config)# (10.10.10.0 - 0.0.0.255)
BUZDO(config)#
----------------
NAT - static
----------------
BUZDO(config)#
BUZDO(config)#ip nat pool inside source static /Privatna-Host-IP/ /Javna-Host-IP/
BUZDO(config)# (adrese van pool-a)
----------------
PAT
----------------
BUZDO(config)#
BUZDO(config)#ip route 0.0.0.0 0.0.0.0 serial 0/0
BUZDO(config)#
BUZDO(config)#access-list /SLNo/ permit /Privatna-NWIP/ /Privatna-ACL-Maska/
BUZDO(config)# (10.10.10.0 - 0.0.0.255)
BUZDO(config)#
BUZDO(config)#ip nat inside source list /SLNo/ interface serial 0/0 overload
BUZDO(config)#
-----------------------------------------------------------------------------------------
Access liste (IP standard 1-99, IP Extended 100-199)
(IPX standard 800-899, IPX Extended 900-999)
(IPX SAP standard 1000-1099)
-------------------------------------------------------------------
any = 0.0.0.0 255.255.255.255
host = /IP-hosta/ 0.0.0.0 (propušta samo jednu IP adresu)
standard = što bliže odredištu
extended = što bliže izvoru
--------------------------------------------------------------------
BUZDO(config)#
BUZDO(config)#access-list /StLNo/ {permit | deny} /Izvorna-IP/ /WildCard-MASK/
BUZDO(config)#access-list /StLNo/ permit host /IP/
BUZDO(config)#
BUZDO(config)# (protocol = IP, IPX ...)
BUZDO(config)#
BUZDO(config-if)#/protocol/ access-group /StLno/ {out | in}
BUZDO(config-if)#IP access-group /StKLno/ {out | in}
BUZDO(config)#
BUZDO(config)#no access-list /StLNo/ (operator = lt, gt, eq, neq)
BUZDO(config)#
BUZDO(config)#access-list /ExtLNo/ {permit | deny} /protocol/
/Izvorna-IP//I-WCM/ /Odredišna-IP//O-WCM/ /operator/ /port/
/established/
BUZDO(config)#
BUZDO(config-if)#IP access-group /ExtLNo/ {out | in}
BUZDO(config)#
BUZDO(config)#no access-list /StLNo/
BUZDO(config)#
BUZDO(config)#line vty 0 4
BUZDO(config-line)#password /nešto/
BUZDO(config-line)#login
BUZDO(config-line)#access-class /StLno/ in
BUZDO(config)#
----------------
ISDN
----------------
BUZDO(config)#dialer-list, protocol ip permit
BUZDO(config)#
BUZDO(config)#isdn switch /type/ ili
BUZDO(config-if)#isdn switch /type/
BUZDO(config-if)#
BUZDO(config-if)#
BUZDO(config-if)# (tri minimalne komande za link)
BUZDO(config-if)#encapsulation PPP
BUZDO(config-if)#dialer-group /No/
BUZDO(config-if)#IP address /IP-adresa//Subnet-MASKA/
BUZDO(config)#
BUZDO(config)#
BUZDO(config)#
BUZDO(config)#controler {T1-E1,slot | port}
BUZDO(config-controler)#pro-groupe timeslot /raspon/
BUZDO(config-controler)#framing /parametri/
BUZDO(config-controler)#linecode /parametri/
BUZDO(config-controler)#interface serial /parametri/
BUZDO(config)#
--------------------------
FR (serijski interface)
--------------------------
BUZDO(config)# (DLCI-No = 0- 1023)
BUZDO(config)# (zbog LMI = 16 - 992)
BUZDO(config)#encapsulation frame-relay {cisco | ietf}
BUZDO(config)#IP address /IP-adresa//Subnet-MASKA/ /DLCI-No/ static
BUZDO(config)#
BUZDO(config)# (protocol = IP, IPX)
BUZDO(config)#frame-relay map /protocol/ /IP-adresa/ /DLCI-No/ broadcast
BUZDO(config)#
BUZDO(config)#frame-relay lmi-type {cisco | ansi | q933a}
=========================================================================================
=========================================================================================
Komande za konfiguriranje Cisco switch-a
=========================================================================================
Komande uvida u konfiguraciju
--------------------------------
(PEM) SWITCH#show version
(PEM) SWITCH#show startup-config (NVRAM)
(PEM) SWITCH#show run
(PEM) SWITCH#show running-config (RAM)
(PEM) SWITCH#show cdp
(PEM) SWITCH#show cdp neighbors
(PEM) SWITCH#dir flash
(PEM) SWITCH#show flash
(PEM) SWITCH#show ip
(PEM) SWITCH#show vlan id {VNo} (VNo = 1 - 1005)
(PEM) SWITCH#show vlan name /ime VLAN-a/
(PEM) SWITCH#show interface fastethernet x/y
(PEM) SWITCH#show ip interface vlan /VNo/
(PEM) SWITCH#show mac-address-table
(PEM) SWITCH#
(PEM) SWITCH#
-----------------------------------------------------------------------------------------
Inicijalno podešavanje switch-a
----------------------------------
(UEM) SWITCH>enable
(PEM) SWITCH#show running-config
(PEM) SWITCH#configure terminal
(GCM) SWITCH(config)#
(GCM) SWITCH(config)#hostname TUPKO
(GCM) TUPKO(config)#
(GCM) TUPKO(config)#ip host /ime 1.Router-a/ /IP-Router-a/
(GCM) TUPKO(config)#ip host /ime 2.Router-a/ /IP-Router-a/
(GCM) TUPKO(config)#ip host /ime 1.Switch-a/ /IP-Switch-a/
(GCM) TUPKO(config)#
(GCM) TUPKO(config)#ip http server
(GCM) TUPKO(config)#ip http port 80
(GCM) TUPKO(config)#exit
-----------------------------------------------------------------------------------------
Zaporke za GCM, konzolu i modem
----------------------------------
(PEM) TUPKO#
(PEM) TUPKO#configure terminal
(GCM) TUPKO(config)#enable password ZAPORKA_1
(GCM) TUPKO(config)#enable secret ZAPORKA_2
(GCM) TUPKO(config)#exit
(PEM) TUPKO#
(GCM) TUPKO(config)#line con 0
(LCM) TUPKO(config-line)#password ZAPORKA_3
(LCM) TUPKO(config-line)#login
(LCM) TUPKO(config-line)#<CTRL>+<Z>
(PEM) TUPKO#
(GCM) TUPKO(config)#line vty 0 15
(LCM) TUPKO(config-line)#password ZAPORKA_4
(LCM) TUPKO(config-line)#login
(LCM) TUPKO(config-line)#<CTRL>+<Z>
(PEM) TUPKO#configure terminal
(GCM) TUPKO(config)#
(GCM) TUPKO(config)#interface VLAN1
(ICM) TUPKO(config-if)#ip address /Switch-IP//SNM/
(ICM) TUPKO(config-if)#duplex full
(ICM) TUPKO(config-if)#speed 100
(ICM) TUPKO(config-if)#
(ICM) TUPKO(config-if)#no shutdown
(ICM) TUPKO(config-if)#ip default-gateway /IP/
(ICM) TUPKO(config-if)#<CTRL>+<Z>
(PEM) TUPKO#
-----------------------------------------------------------------------------------------
Spremanje konfiguracije u NVRAM
----------------------------------
(PEM) TUPKO#copy running-config startup-config (RAM-NVRAM)
(PEM) TUPKO#copy run start
(PEM) TUPKO#reload
-----------------------------------------------------------------------------------------
Konfiguriranje switch-a
--------------------------
(PEM) TUPKO#
(PEM) TUPKO#delete flash:vlan.dat
(PEM) TUPKO#erase startup-config (briše NVRAM)
(PEM) TUPKO#reload
(UEM) TUPKO>enable
(PEM) TUPKO#clear mac-address-table {dynamic}
(PEM) TUPKO#configure terminal
(GCM) TUPKO(config)#
-----------------------------------------------------------------------------------------
Postavljanje GW i VLAN-1 (podrazumni)
----------------------------------------
TUPKO#
TUPKO(config)#ip default-gateway /IP-FE na Router-u/
TUPKO(config)#interface VLAN 1
TUPKO(config-if)#ip address /IP u mreži - najbolje zadnji/ /SNM/
TUPKO(config-if)no shutdown
TUPKO(config-if)#<CTRL>+<Z>
TUPKO#
-----------------------------------------------------------------------------------------
Statička MAC adresa
-------------------------------------
TUPKO#
TUPKO(config)#mac-address-table static AAAA.AAAA.AAAA fastethernet x/y vlan 1
TUPKO(config)#
TUPKO(config)#<CTRL>+<Z>
TUPKO#
-----------------------------------------------------------------------------------------
Port security
-------------------------------------
TUPKO#
TUPKO(config)#interface fastethernet x/y
TUPKO(config-if)#switchport mode {access | dinamic | trunk}
TUPKO(config-if)#switchport mode access
TUPKO(config-if)#switchport port-security { | | | }
TUPKO(config-if)#<CTRL>+<Z>
TUPKO#
-----------------------------------------------------------------------------------------
Port TRUNK
-------------------------------------
TUPKO#
TUPKO(config)#interface fastethernet x/y
TUPKO(config-if)#switchport mode trunk
TUPKO(config-if)#switchport trunk encapsulation {isl | dot1q}
TUPKO(config-if)#switchport trunk allowed vlan all
TUPKO(config-if)#<CTRL>+<Z>
TUPKO#
-----------------------------------------------------------------------------------------
Port VLAN
-------------------------------------
TUPKO#
TUPKO#vlan database
TUPKO(vlan)#show
TUPKO(vlan)#
TUPKO(vlan)#vtp {server | client}
TUPKO(vlan)# (VLNo = 1 default)
TUPKO(vlan)#vlan /VLNo1/ name /1.ime/ (VLNo = 2 - 1001)
TUPKO(vlan)#vlan /VLNo2/ name /2.ime/ (VLNo > 1001 rezervirano)
TUPKO(vlan)#vlan /VLNo3/ name /3.ime/
TUPKO(vlan)#
TUPKO(vlan)#no vlan /VLNo/
TUPKO(vlan)#
TUPKO(vlan)#show
TUPKO(vlan)#applay
TUPKO(vlan)#exit
TUPKO#
TUPKO(config)#interface fastethernet x/y
TUPKO(config-if)#switchport mode access
TUPKO(config-if)#switchport access vlan /VLNo/
TUPKO(config-if)#<CTRL>+<Z>
TUPKO#
TUPKO(config)#interface fastethernet x/y
TUPKO(config-if)#no switchport mode access
TUPKO(config-if)#no switchport access vlan /VLNo/
TUPKO(config-if)#<CTRL>+<Z>
TUPKO#
=========================================================================================
Komande nisu iste za sve vrste uređaje ali prema načinu pristupa i njihovog korištenja može se zaključiti da pripadaju istoj porodici uređaja. Proizvođač povremeno za svoj IOS izdaje unapređenja koja nekad nudi besplatno a nekad naplaćuje, kao i nove verzije operativnog sustava, što ovisi o sadržaju ugovora sklopljenog prilikom kupovine mrežne opreme. Nije dobro ne osigurati njihovu podršku barem za par godina.