Beruflich Dokumente
Kultur Dokumente
Router#configure terminal Router(config)#hostname R1 R1(config)#no ip domain-lookup R1 (config)# enable password class R1 (config)# enable secret class R1(config)#banner motd & R1 (config)# line console 0
R1(config-line)#logging synchronous (evitar mensajes) R1(config-line)#exec-timeout 0 0 (tiempo de session min y seg)
Interfaces
R1 R1 R1 R1 (config)# interface fa0/0 (config-if)# description Connection to Host1 with crossover cable (config-if)# ip address 192.168.1.1 255.255.255.0 (config-if)# no shutdown
R1(config-if)#interface serial 0/0/0 R1(config-if)#ip address 192.168.2.1 255.255.255.0 R1(config-if)#clock rate 64000 R1(config-if)#no shutdown
Sub Interfases
R1(config-if)#interface fastethernet 0/1.1 R1(config-subif)#encapsulation dot1q 1 (numero cualquiera sub int) R1(config-subif)#ip address 172.17.1.1 255.255.255.0
Protocolo de enrutamiento
Agregar solo las que aparezcan con C en Show ip rute
R1 R1 R1 R1
R1(config)#router eigrp 1 R3(config-router)#network 192.168.10.8 0.0.0.3 (wildcard) R1 (config-router)#no auto-summary R2(config)#interface serial0/0/1 R2(config-if)#bandwidth 1024 (1544 kbits por defecto) R2(config)#router ospf 1 R2(config-router)#network 10.10.10.0 0.0.0.255 area 0 R1(config-router)#default-information originate R3(config)#interface serial0/0/0 R3(config-if)#ip ospf cost 1562 (ancho de banda utilizado) R1(config-if)#ip ospf hello-interval 5 R1(config-if)#ip ospf dead-interval 20 R3(config)#interface fastEthernet0/0 R3(config-if)#ip ospf priority 100
R2(config)#interface serial 0/0/0 R2(config-if)#encapsulation ppp R2(config)#interface serial 0/0/0 R2(config-if)#encapsulation hdlc
ACL Standard
R3(config)#ip access-list standard STND-1 R3(config-std-nacl)#deny 192.168.11.0 0.0.0.255 log R3(config-std-nacl)#permit any R3(config)#interface serial 0/0/1 R3(config-if)#ip access-group STND-1 in Denegar telnelnet. R2(config)#ip access-list standard TASK-5 R2(config-std-nacl)#permit 10.2.2.0 0.0.0.3 R2(config-std-nacl)#permit 192.168.30.0 0.0.0.255 R2(config)#line vty 0 4 R2(config-line)#access-class TASK-5 in R2(config-line)#end R2#copy run start ip access-list extended BLOCK_R3 deny ip 10.3.1.0 0.0.0.255 10.1.1.0 0.0.0.255 permit ospf any any permit icmp any host 10.1.0.2 permit icmp any host 10.3.0.2 permit icmp any host 10.13.205.1 permit tcp any any eq 80 log interface serial 0/0/0 ip access-group BLOCK_R1 in
ACL Extendida
R1(config)#ip access-list extended EXTEND-1 R1(config-ext-nacl)#deny ip 192.168.10.0 0.0.0.255 host 209.165.200.225 R1(config-ext-nacl)#permit ip any any
DHCP
R2(config)#ip dhcp excluded-address 192.168.10.1 192.168.10.10 (rango de exclusin dhcp) R2(config)#ip dhcp pool R1Fa1 R2(dhcp-config)#network 192.168.11.0 255.255.255.0 R2(dhcp-config)#dns-server 192.168.11.5 R2(dhcp-config)#default-router 192.168.11.1 R1(config)#interface fa0/0 R1(config-if)#ip helper-address 10.1.1.2 (interfaces conectadas directamente) R1(config)#interface serial 0/0/1 R1(config-if)#ip address dhcp (para que otro router le de a este dhcp)
NAT
ISP(config)#ip route 209.165.200.240 255.255.255.240 serial 0/0/1 R2(config)#ip route 0.0.0.0 0.0.0.0 209.165.200.226 (ip gateway isp) R2(config)# ip domain-name 8.8.8.8 (DNS para que navegue la red) R2(config)#router ospf 1 (o rip) R2(config-router)#default-information originate
NAT esttica
R2(config)#ip nat inside source static 192.168.20.254 209.165.200.254 R2(config)#interface serial 0/0/1 R2(config-if)#ip nat outside R2(config-if)#interface fa0/0 R2(config-if)#ip nat inside
NAT dinmica
R2(config)#ip nat pool MY-NAT-POOL 209.165.200.241 209.165.200.246 netmask 255.255.255.248
R2(config)#ip access-list extended NAT R2(config-ext-nacl)#permit ip 192.168.10.0 0.0.0.255 any (redes a traducir) R2(config)#ip nat inside source list NAT pool MY-NAT-POOL R2(config)#interface serial 0/0/0 R2(config-if)#ip nat inside R2(config-if)#interface fa0/0 R2(config-if)#ip nat outside
Frame Relay
FR-Switch(config)#frame-relay switching FR-Switch(config)#interface serial 0/0/0 FR-Switch(config)#clock rate 64000 FR-Switch(config-if)#encapsulation frame-relay FR-Switch(config-if)#)#frame-relay lmi-type cisco (ansi, lmi q9339) FR-Switch(config-if)#frame-relay intf-type dce FR-Switch(config-if)#frame-relay route 102 interface serial 0/0/1 201 (interface contrary de FR) FR-Switch(config-if)#no shutdown FR-Switch(config-if)#interface serial 0/0/1 FR-Switch(config)#clock rate 64000 FR-Switch(config-if)#encapsulation frame-relay FR-Switch(config-if)#)#frame-relay lmi-type cisco (ansi, lmi q9339) FR-Switch(config-if)#frame-relay intf-type dce FR-Switch(config-if)#frame-relay route 201 interface serial 0/0/0 102 (interface contrary de FR) FR-Switch(config-if)#no shutdown
R1(config)#interface serial 0/0/1 R1(config-if)#encapsulation frame-relay R1(config-if)#ip address 10.0.0.1 255.0.0.0 R1(config-if)#frame-relay interface-dlci 102 (dlci conectado a frame relay) R1(config-if)#ip ospf network point-to-multipoint (caso en que ospf no funcione)
R1(config-if)#standby 1 ip 10.0.0.100 (HSRP para que la carga viaje hacia isp conectado en otro extremo en caso de fallar el ms cercano)
R1(config-if)#no shutdown R2(config)#interface serial 0/0/1 R2(config-if)#encapsulation frame-relay R2(config-if)# ip address 10.0.0.1 255.0.0.0 R2(config-if)#frame-relay interface-dlci 201 (dlci conectado a frame relay) R2(config-if)#ip ospf network point-to-multipoint (caso en que ospf no funcione)
R2(config-if)#standby 1 ip 10.0.0.100 (HSRP para que la carga viaje hacia isp conectado en otro extremo en caso de fallar el ms cercano)
R2(config-if)#no shutdown *Encapsulation standard. R2(config)#interface serial0/0/1 R2(config-if)#encapsulation frame-relay ietf (standard no de cisco) R2(config-if)#encapsulation frame-relay (cisco) *LMI a ANSI o CISCO o q9339. R2(config)#interface serial 0/0/1 R2(config-if)#encapsulation frame-relay R2(config-if)#frame-relay lmi-type ansi (standard no de cisco) R2(config-if)#frame-relay lmi-type cisco (cisco)
*Sub Interfaces
R1(config)#interface serial 0/0/1.112 point-to-point R1(config-subif)#ip address 10.1.1.5 255.255.255.252 R1(config-subif)#frame-relay interface-dlci 112 R2(config)#interface serial 0/0/1.212 point-to-point R2(config-subif)#ip address 10.1.1.6 255.255.255.252 R2(config-subif)#frame-relay interface-dlci 212
Guardar tftp
Router# copy tftp startup-config Address or name of remote host []? 10.250.250.253 Source filename []? router1-confg Destination filename [startup-config]? <INTRO>
Guardar
R1#copy running-config startup-config R1#write
Borrar
Shows
R1#show running-config R1#show ip cdp neighbors R1#show cdp neighbors R1#show ip interface brief R2#show ip route R1#show ip protocols R1#show controllers serial 0 R1#show startup-config R1# show interfaces fastEthernet 0/0 R1#show ip (rip ospf) database R2#show ip eigrp topology R1#show ip ospf neighbor R1#show ip ospf interface R1#show versin FR-Switch#show frame-relay pvc R2#show frame-relay lmi R1#show frame-relay map
R1#show frame-relay pvc R2#show flash R1#show ip access-list R1#show ip dhcp binding R2#show ip dhcp pool R2#show ip nat translations R2#show ip nat statistics
Debugs
R1#undebug all R1#debug ip routing
R1#debug ppp negotiation R1#debug ppp packet R2#debug ppp negotiation R3#debug ppp authentication R1#debug frame-relay lmi R1#debug ip icmp R1#show frame-relay map
Seguridad
R3#auto secure Est este router conectado a Internet? [no]: s Enter the new enable password: ciscoccna Confirm the enable password: ciscoccna Enter the new enable password: ccnacisco Confirm the enable password: ccnacisco Enter the username: ccna Enter the password: ciscoccna Confirm the password: ciscoccna Blocking Period when Login Attack detected: 300 Maximum Login failures with the device: 5 Maximum time period for crossing the failed login attempts: 120 Configure SSH server? Yes Enter domain-name: cisco.com Configure CBAC firewall feature: no Enable TCP intercept feature: yes
SDM
R2(config)#username ccna password ciscoccna R2(config)#ip http secure-server