Académique Documents
Professionnel Documents
Culture Documents
br
Olá Amigos,
Configurar hostname:
Switch(config)# hostname SW1
Configurar password:
SW1(config)# enable secret cisco ! MD5 hash
SW1(config)# enable password notcisco ! Clear text
Encriptar senhas:
SW1(config)# service password-encryption
Configuração de banners:
SW1(config)# banner motd $
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
UNAUTHORIZED ACCESS IS PROHIBITED
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
$
Salvar configuração:
SW1# copy running-config startup-config
Destination filename [startup-config]? ! Press enter to confirm file
name.
Building configuration…
[OK]
Configurar SSH:
• Shows information about the switch and its interfaces, RAM, NVRAM, flash, IOS, etc.
SW1# show version
• Shows the configuration file stored in NVRAM which is used at first boot process.
SW1# show startup-config
• Shows an overview of all interfaces, their physical status, protocol status and ip address
if assigned.
SW1# show ip interface brief
• Shows detailed information about the specified interface, its status, protocol, duplex,
speed, encapsulation, last 5 min traffic.
SW1# show interface vlan 1
• Shows the status of all interfaces like connected or not, speed, duplex, trunk or access
vlan.
SW1# show interfaces status
• Shows information about the leased IP address (when an interface is configured to get
IP address via a dhcp server)
SW1# show dhcp lease
The sticky keyword is used to let the interface dynamically learns and configures the MAC
addresses of the currently connected hosts.
Configurando VLANs:
Configurando Trunks
SW1(config)# interface fastEthernet 0/1
Configurando VTP:
The transparent VTP mode is used when an engineer wants to deactivate VTP on a particular
switch
• Lists all the trunk ports on a switch including the trunk allowed VLANs:
SW1# show interfaces trunk
• Lists VTP configuration (mode, domain-name, version, etc) and revision number:
SW1# show vtp status
Otimização de STP
Portfast and BPDU guard are enabled only on interfaces connected to end user hosts
• Shows information about the directly connected cisco devices including interfaces names
capabilities:
SW1# show cdp neighbors
• Shows detailed information about the neighboring cisco devices including device address
and version of IOS they run:
SW1# show cdp neighbors detail
! OR
This section includes IOS commands that are absolutely identical on both routers and switches,
except the part of line aux 0 which is configured only on router because switches do not have an
auxiliary port.
Router(config)# hostname R1
R1(config-line)# login
R1(config-line)# exec-timeout 30 0
R1(config-line)# exit
R1(config-line)# login
R1(config-line)# exec-timeout 30 0
www.ciscoredes.com.br
R1(config-line)# exit
R1(config-line)# login
R1(config-line)# exec-timeout 30 0
R1(config-line)# exit
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
R1(config)# no ip domain-lookup
Clock rate is set only on the DCE side, typically the ISP side. On your router which is DTE you
don’t need to set clocking.
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config-if)# no shutdown
R1(config-if)# no shutdown
Rota Estática:
Rota default:
R1(config)# ip route 0.0.0.0 0.0.0.0 199.1.1.1
Configuração do RIPv2:
R1(config)# router rip
R1(config-router)# version 2
www.ciscoredes.com.br
R1(config-router)# no auto-summary
Validação do RIPv2:
• Shows detailed information about the route to the specified destination network:
R1# show ip route 10.1.1.1
Configuração do OSPF:
• Configure one or more network commands to identify which interfaces will run OSPF:
1 R1(config-router)# network 10.0.0.0 0.255.255.255 area 0
2 R1(config-router)# network 172.16.8.0 0.0.7.255 area 0
3 R1(config-router)# network 192.168.1.254 0.0.0.0 area 1
• Impact routing choices by tuning interface cost using one of the following ways
(Optional):
Changing the reference bandwidth that used by OSPF to calculate the cost:
Verificação do OSPF:
• Shows all neighboring routers along with their respective adjacency state:
R1# show ip ospf neighbors
Configuração do EIGRP:
• Configure one or more network commands to enable EIGRP on the specified interfaces:
R1(config-router)# network 10.0.0.0
R1(config-router)# variance 4
Validação do EIGRP:
• Lists statistics on numbers of EIGRP messages sent and received by the router:
R1# show ip eigrp traffic
• Enable the ACL on the chosen router interface in the correct direction (in or out):
R1(config-if)# ip access-group 2 out
R1(config-line)# access-class 99 in
• Extended ACL matches packets based on source & des.IP addresses, protocol, source &
des. Port numbers andother criteria as well
R1(config)# access-list 101 remark MY_ACCESS_LIST
www.ciscoredes.com.br
ACL Nomeada:
• Named ACLs use names to identify ACLs rather than numbers, and commands that permit
or deny traffic are written in a sub mode called named ACL mode (nacl).
• Named ACL enables the editing of the ACL (deleting or inserting statements) by
sequencing statements of the ACL.
Verificar ACLs:
• Shows all ACLs configured on a router with counters at the end of each statement:
R1# show access-lists
! OR
• Define network and mask to use in this pool and the default gateway:
R1(dhcp-config)# network 192.168.1.0 255.255.255.0
• Shows the status of the specified pool and the leased addresses from that pool:
R1# show ip dhcp pool POOL_1
www.ciscoredes.com.br
• Shows all the leased ip addresses from all configured DHCP pools:
R1# show ip dhcp binding
Configuração de PPP:
R1(config)# interface serial 0/0
Autenticação de PPP:
CHAP:
• Configure the hostname:
R1(config)# hostname ALPHA
• Configure the name of the other end router and the shared password:
! The password used is shared password, that means it must be the same on both
routers
PAP:
• Configure the hostname:
R1(config)# hostname ALPHA
• Configure the name of the other end router and the shared password:
ALPHA(config)# username BETA password XYZ
• Enable PAP authentication on the interface and define the username and password to be
sent by PAP:
ALPHA(config)# interface serial 0/0
• Useful for viewing the configuration of usernames and passwords used to authenticate
PPP:
R1# show running-config
NAT Estático:
• Define the outside and inside interfaces:
R1(config)# interface serial 0/0
NAT Dinamico:
• Define the outside and inside interfaces
<ul>
<li>The same as dynamic NAT with the use of the overload keyword at the end of
NAT statement:</li>
</ul>
<pre>
• Useful in viewing the configuration of NAT pool and the inside and outside interfaces:
R1# show running-config
• Shows counters for packets and NAT table entries, as well as basic configuration
information:
R1# show ip nat stasitics
• Issues a log message describing each packet whose ip address is translated with NAT:
R1# debug ip nat
Reference:
https://www.cisco.com/c/en/us/td/docs/ios/12_2/configfun/command/reference/ffun_r/frf0
01.html
https://www.cisco.com/c/en/us/td/docs/ios/fundamentals/command/reference/cf_book.htm
l
https://www.cisco.com/c/en/us/td/docs/ios-
xml/ios/fundamentals/configuration/15mt/fundamentals-15-mt-book.html