IPv4
Comenzi de vizualizare:
Router# show ip route
Router# show ip protocol
Router# show run+tab
Router# show ip interface brief
Router# show ip interface ... (ex Go0/0)
Router# show interface brief
Router# show start //permite vizualizarea conf de start pe echipament
Router# debug ip rip
Router# copy run start //copiaza running-config in strartup config
Router# no CDP run //opreste CDP-ul
Router# debug ip icmp
Router# undebug all //taie orice proces de debug
Router# show history //afiseaza toate comenzile ce au fost introduse
Router# terminal history size //marirea comenzilor din istorie
0.0.0.0/0 //adresa internetului in Ipv4
::/0 //adresa internetului in Ipv6
IPv6
Router# show ipv6 route
Router# show ipv6 interface brief
COMENZI SWITCH
IPv4
Resetare SWITCH:
Switch(#) erase startup-config
Switch(#) delete flash:vlan.dat
Switch(#) reload
.........................................................................
REDENUMIRE ECHIPAMENT:
Switch(config)# hostname ....
.........................................................................
SALVARE START-UP CONFIG:
Switch(#)copy running-config startup-config
.........................................................................
SSH PASSWORD:
Switch(config)# ip domain-name cisco.com
Switch(config)# username ...... secret ......
Switch(config)# crypto key generate rsa
Switch(config)# 1024
Switch(config)# line vty 0 15
Switch(config)# login local
Switch(config)# transport imput ssh / telnet / all
Switch(config)# enable secret ..... (parola)
TELNET PASSWORD:
Switch(config)# line vty 0 15
Switch(config)# password ....
Switch(config)# login
.........................................................................
Banner:
Switch(config)# banner motd "....."
.........................................................................
INTRODUCERE ADRESA PE INTERFATA:
Switch(config)# interface Vlan 1
Switch(config-if)# ip address IP SM
Switch(config-if)# no shutdown
.........................................................................
SETARE DEFAULT GATEWAY:
Switch(config)# ip default-gateway .... (IP de la DGW)
.........................................................................
IPv6
Activare IPV6:
Switch(config)# sdm prefer dual-Ipv4-and-Ipv6 default
Switch(config)# copy run start // sau comanda WR
Switch(config)# reload
........................................................................
Switch(config-if)# ipv6 address (FE80::1) link-local // link-local poate fi modificat
.........................................................................
ACCES PORT CONFIG:
Pe interfata:
Switch(config-if)# switch port mode acces
Switch(config-if)# switch port acces vlan ... (in ce LAN vrem sa bagam acest port : ex: 10)
.........................................................................
TRUNK PORT CONFIG:
Switch(config-if)# switch port mode trunk
Switch(config-if)# switch port trunk encapsulation dot1q
Switch(config-if)# switch port trunk allow vlan ...., .... (adaugam retelele care sunt direct conectate)
COMENZI ROUTER
IPv4
Resetare Router:
Router(#) erase startup-config
Router(#) reload
.........................................................................
COPIERE START-UP CONFIG
Router(#) copy running-config startup-config
.........................................................................
Router(config-if)# DESCRIPTION ....
.........................................................................
REDENUMIRE ECHIPAMENT:
Router(config)# hostname ....
.........................................................................
Banner:
Router(config)# banner motd "....."
.........................................................................
CONSOLA PASSWORD:
Router(config)# line console 0
Router(config)# password ...... (cisco)
Router(config)# login
.........................................................................
SSH PASSWORD:
Router(config)#
Router(config)# ip domain-name cisco.com
Router(config)# username ...... secret ......
Router(config)# crypto key generate rsa
Router(config)# 1024
Router(config)# line vty 0 15
Router(config)# login local
Router(config)# transport input ssh / telnet / all
.........................................................................
TELNET PASSWORD:
Router(config)# line vty 0 15
Router(config)# password ....
Router(config)# login
.........................................................................
Setare PASSWORD:
Router(config)# enable secret ..... (parola) // seteaza parola criptata pe user in #
Router(config)# enable password .... (parola) // seteaza parola pentru a trece din user in #
.........................................................................
CRIPTARE PAROLE:
Router(config)# service password encryption
.........................................................................
INTRODUCERE ADRESA PE INTERFATA:
Router(config)# interface Fa0/0
Router(config-if)# ip address IP SM
Router(config-if)# no shutdown
.........................................................................
RUTARE STATICA:
Router(config)# ip route NA (destinatie) SM (destinatie) serial (ex: S0/0/0 pe unde ies)
Router(config)# no shutdown
.........................................................................
RIP V2:
Router(config)#router rip
Router(config-router)#version 2
Router(config-router)#no auto-summary
Router(config-router)#network ....... (NA direct conectata)
Router(config-router)#network ....... (NA direct conectata)
Router(config-router)#passive-interface fa0/0 //opreste update-ul pe SW)
Router(config-router)#default-information originate
Router(config-router)#exit
Router(config)#exit
Router# ping
.........................................................................
ACL:
Router#conf terminal
Router(config)#access-list ?
<1-99> IP standard access list
<100-199> IP extended access list
<1100-1199> Extended 48-bit MAC address access list
<1300-1999> IP standard access list (expanded range)
<200-299> Protocol type-code access list
<2000-2699> IP extended access list (expanded range)
<2700-2799> MPLS access list
<700-799> 48-bit MAC address access list
dynamic-extended Extend the dynamic ACL absolute timer
rate-limit Simple rate-limit specific access list
Router(config)#access-list 1 ?
deny Specify packets to reject
permit Specify packets to forward
remark Access list entry comment
Router(config)#access-list 1 remark PC1 nu poate accesa LAN 2, oricare PC din LAN 1 , poate sa aiba
acces pe LAN 2
Router(config)#exit
Router#enable
Router#conf terminal
Router(config)#access-list 1 deny host 192.168.1.1 (IP)
Router(config)#access-list 1 permit 192.168.1.0 (NA) 0.0.0.255 (Wildcard)
Router(config)#access-list 1 deny any
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip access-group ?
<1-199> IP access list (standard or extended)
<1300-2699> IP expanded access list (standard or extended)
WORD Access-list name
Router(config-if)#ip access-group 1 ?
in inbound packets
out outbound packets
Router(config-if)#ip access-group 1 out
Router#show access-lists 1
.........................................................................
CONFIGURARE SUB-INTERFATA PE ROUTER:
Router(config)# interfate .... (ex: Gi0/0.10)
Router(config)# encapsulation dot1q ... (ex 10 - cel care l-am introdus mai sus)
Router(config)# ip address IP SM
Router(config)# exit
.........................................................................
COMENZI UTILE LOOPBACK 0:
Router(config)# interface loopback 0
Router(config)# ip address IP SM
Router(config)# router rip
Router(conf-router)# default-information originate
Router(conf-router)# exit
Router(config)# ip route 0.0.0.0 0.0.0.0 loopback 0
Router(config)# exit
.........................................................................
SSH cu ACL:
Router(config)# line vty 0 15
Router(config)# login local
Router(config)# transport input ssh
Router(config)# access-class ....
Router(config)# exit
Router(config)# access-list ... permit ....(IP/NA) .... (wildcard)
Router(config)# access-list ... deny any
.........................................................................
IPV6
Activare adresa Ipv6:
Router(config)# ipv6 unicast-routing
.........................................................................
LINK-LOCAL:
Router(config)# interface .....
Router(config-if)# ipv6 address (@ipv6/prefix 64) // genereaza automat @de link-local din adresa MAC
Router(config-if)# no shutdown
sau
Router(config-if)# ipv6 address (NA @ IPv6) eui-64 // genereaza portiunea de gazda din @MAC a
interfetei ; //genereaza automat @de link-local din adresa MAC
Router(config-if)# no shutdown
LINK-LOCAL:
Router(config-if)# ipv6 address (FE80::1) link-local // link-local poate fi modificat
Router(config-if)# no shutdown
.........................................................................
RIPng comenzi:
Router(config-if)# Ipv6 rip Test1 enable // activeaza procesul de RIPng pe interfata
Router(config-if)# ipv6 rip Test1 default-information originate // redistribuie in update de RIP default
route