CLI komande podešavanja usmjernika |
| 1 | 2 | 3 | |
Naredna tablica prikazuje komande i njihov redosljed uporabe da bi se konfigurirao Cisco usmjernik (router). Komande omogućavaju da se mrežnom uređaju definira od imena administratora i njegove zaporke do konfiguriranja komunikacijskih protokola i raznih mehanizama sigurnosti. U suštini, sve komande i njihov redoslijed uporabe odnosi se na cijelu seriju uređaja ove vrste.
================================================================================== Commands for configuring of Cisco router ================================================================================== 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 (part of SCM) LCM = Line CM (part of SCM) RCM = Router CM (part of SCM) --------------------------------------------------------- SCM #exit --> GCM SCM #<CTRL>+<Z> --> PEM ---------------------------------------------------------------------------------- Commands insight into the configuration ----------------------------------------- (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 ---------------------------------------------------------------------------------- Initial setup of router ---------------------------------- (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 # Routers of NETWORK_NAME - Enter into BUZDO # (GCM) BUZDO(config)#ip http server (GCM) BUZDO(config)# (GCM) BUZDO(config)#ip host /name of 1. Router/ /IP of 1. Router/ (GCM) BUZDO(config)#ip host /name of 2. Router/ /IP of 2. Router/ (GCM) BUZDO(config)#ip host /name of 1. Switch/ /IP of 1. Switch/ (GCM) BUZDO(config)# (GCM) BUZDO(config)#exit (PEM) BUZDO#copy running-config startup-config (PEM) BUZDO#exit (UEM) BUZDO> ---------------------------------------------------------------------------------- PASSWORD_ for GCM (ordinary and coded that 'kill' ordinary) ------------------------------------------------------------- (GCM) BUZDO(config)#enable password PASSWORD_1 (GCM) BUZDO(config)#enable secret PASSWORD_2 (GCM) BUZDO(config)#exit (PEM) BUZDO# ---------------------------------------------------------------------------------- PASSWORD_ for cosole (Enter into UEM) -------------------------------------- (GCM) BUZDO(config)#line console 0 (LCM) BUZDO(config-line)#password PASSWORD_3 (LCM) BUZDO(config-line)#login (LCM) BUZDO(config-line)#<CTRL>+<Z> (PEM) BUZDO# ---------------------------------------------------------------------------------- PASSWORD_ for modem (Enter into UEM) -------------------------------------- (GCM) BUZDO(config)#line vty 0 4 (LCM) BUZDO(config-line)#password PASSWORD_4 (LCM) BUZDO(config-line)#login (LCM) BUZDO(config-line)#<CTRL>+<Z> (PEM) BUZDO# ---------------------------------------------------------------------------------- Save configuration to NVRAM and vice versa -------------------------------------------- (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 (transfer of 'subnet' mask) 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 supports = IP, AppleTalk, IPX (multi-protocol) OSPF Cost = 10 (bps) / BW (bps) (OSPF must have 'loopback' interface) SP-Tree Cost = suma BW ---------------------------------------------------------------------------------- Defining a serial interface and FE interface (IF) --------------------------------------------------- (PEM) BUZDO# (PEM) BUZDO#configure terminal (GCM) BUZDO(config)# (GCM) BUZDO(config)#interface serial 0/0 (ICM) BUZDO(config-if)#clock rate 56000 (only for DCE) (ICM) BUZDO(config-if)#description serial connection to the 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 of BUZDO (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# ---------------------------------------------------------------------------------- ------------------------------------------------ BUZDO(config)#ip route /NW-IP destinatione/ /SNM dest./ /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 of destination/ (Router-Serial ADDRESS) ---------------------------------------------------------------------------------- Simulation of Internet and specific location ---------------------------------------------- (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)# ---------------------------------------------------------------------------------- Defining networks of router (RIP, IGRP, EIGRP, OSPF) ------------------------------------------------------- (GCM) BUZDO(config)# (GCM) BUZDO(config)# (GCM) BUZDO(config)#router /protocol/{opction} (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 connected to IF/ (RCM) BUZDO(config-router)#network /NW-IP connected to IF/ (RCM) BUZDO(config-router)#network /NW-IP connected to 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 connected to 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-address/ /255.255.255.255/ (ICM) BUZDO(config-if)# (host mask for software interface) (ICM) BUZDO(config-if)# (ICM) BUZDO(config-if)# (Router-ID = Host-IP-address) (ICM) BUZDO(config-if)#end (GCM) BUZDO(config)# (GCM) BUZDO(config)#<CTRL>+<Z> (PEM) BUZDO#copy running-config startup-config (PEM) BUZDO# ---------------------------------------------------------------------------------- HDLC encapsulation of a serial interface ------------------------------------------- BUZDO# BUZDO#configure terminal BUZDO(config)# BUZDO(config)#interface serial 0/0 BUZDO(config-if)#encapsulation HDLC (default on synchronous serial port) BUZDO(config-if)#no shutdown BUZDO(config-if)#<CTRL>+<Z> BUZDO# ---------------------------------------------------------------------------------- PPP encapsulation of a serial interface ------------------------------------------ BUZDO# BUZDO#configure terminal BUZDO(config)# BUZDO(config)#username /NAME of 1. connected Router/ password /PASSWORD/ BUZDO(config)#username /NAME of 2. connected Router/ password /PASSWORD/ BUZDO(config)# BUZDO(config)#interface serial 0/0 BUZDO(config-if)#ip address /IF-IP/ /SNM/ BUZDO(config-if)#clockrate 64000 (only for DCE) BUZDO(config-if)#encapsulation PPP BUZDO(config-if)# BUZDO(config-if)#compress {predictor|stack} BUZDO(config-if)#ppp quality /Percentage/ (Percentage = 1 - 100) BUZDO(config-if)#ppp multilink (if has) BUZDO(config-if)# BUZDO(config-if)#ppp authentication pap BUZDO(config-if)#ppp pap sent-username /Router NAME/ password /PASSWORD/ BUZDO(config-if)#no shutdown BUZDO(config-if)#<CTRL>+<Z> BUZDO# BUZDO(config-if)#ppp authentication chap (should not be sent NAME and PASSWORD) BUZDO(config-if)#no shutdown BUZDO(config-if)#<CTRL>+<Z> BUZDO#copy running-config startup-config BUZDO# ---------------------------------------------------------------------------------- FR encapsulation of a serial interface ----------------------------------------- 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 (there is no FR switch) 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 to the DTE connection 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 (there is no FR switch) 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 to the DCE connection BUZDO(config-if)#no shutdown BUZDO(config-if)#<CTRL>+<Z> BUZDO#copy running-config startup-config BUZDO# ---------------------------------------------------------------------------------- VLSM (supports /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 at FE (supports 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 of BUZDo with TRUNK BUZDO(config-if)#interface fastethernet 0/0.1 (0/0.1 - 0/0.255) BUZDO(config-subif)#description native 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 /something/ 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 /something/ 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 connected at 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 address/ /255.255.255.255/ BUZDO(config-if)# BUZDO(config-if)# (Router-ID = Host-IP-address) 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-of-server/ BUZDO(dhcp-config)#domain-name /IME_DOMENE.TIP/ BUZDO(dhcp-config)#netbioas-name-server /IP of server/ 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 /Private-Host-IP-address/ /255.255.255.255/ BUZDO(config-if)# BUZDO(config-if)# (Router-ID = Host-IP-address) 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 /Private-IP/ /Private-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 /Public-IP/ /Public-SNM/ BUZDO(config-if)#ip nat outside BUZDO(config-if)#no shutdown BUZDO(config-if)#exit BUZDO(config)# ---------------- NAT - dynamic ---------------- BUZDO(config)# (SLNo = 1 - onwards) BUZDO(config)#ip nat inside source list /SLNo/ pool /PUBLIC/ BUZDO(config)# BUZDO(config)#ip nat pool /PUBLIC/ /First-pub.-IP/ /Last-pub.-IP/ /Public-SNM/ BUZDO(config)# BUZDO(config)#access-list /SLNo/ permit /Private-NWIP/ /Private-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 /Priv.-Host-IP/ /Pub.-Host-IP/ BUZDO(config)# (addresses out of pool) ---------------- 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 /Private-NWIP/ /Private-ACL-Mask/ 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 lists (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 (allows only one IP address) standard = as close to the destination extended = as close to the source -------------------------------------------------------------------- BUZDO(config)# BUZDO(config)#access-list /StLNo/ {permit | deny} /Source-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 /somethin/ 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/ or BUZDO(config-if)#isdn switch /type/ BUZDO(config-if)# BUZDO(config-if)# BUZDO(config-if)# (minimum three commands for link) BUZDO(config-if)#encapsulation PPP BUZDO(config-if)#dialer-group /No/ BUZDO(config-if)#IP address /IP-address//Subnet-MASK/ BUZDO(config)# BUZDO(config)# BUZDO(config)# BUZDO(config)#controler {T1-E1,slot | port} BUZDO(config-controler)#pro-groupe timeslot /range/ BUZDO(config-controler)#framing /parameters/ BUZDO(config-controler)#linecode /parameters/ BUZDO(config-controler)#interface serial /parameters/ BUZDO(config)# -------------------------- FR (serial interface) -------------------------- BUZDO(config)# (DLCI-No = 0- 1023) BUZDO(config)# (because of LMI = 16 - 992) BUZDO(config)#encapsulation frame-relay {cisco | ietf} BUZDO(config)#IP address /IP-adresa//Subnet-MASK/ /DLCI-No/ static BUZDO(config)# BUZDO(config)# (protocol = IP, IPX) BUZDO(config)#frame-relay map /protocol/ /IP-address/ /DLCI-No/ broadcast BUZDO(config)# BUZDO(config)#frame-relay lmi-type {cisco | ansi | q933a} ==================================================================================
Sljedeća stranica odnosi se na konfiguraciju preklopnika (switch).
| 1 | 2 | 3 | |
Citiranje ove stranice: Radić, Drago. " Informatička abeceda " Split-Hrvatska. {Datum pristupa}; https://informatika.buzdo.com/pojmovi/datoteka. Copyright © by Drago Radić. Sva prava pridržana. | Odgovornost |