Leia

CCNA Modulo2 – Comandos

Senha no console

Router(config-line)#password cisco

Router(config-line)#login

 

Senha nos acessos remoto:

Router>enable

Router#con

Router#conf

Router#configure t

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#line vt

Router(config)#line vty 0 4

Router(config-line)#pass

Router(config-line)#password cisco

Router(config-line)#login

 

Salvar configuração

copy running-config startup-config

 

Banner:

Router#configure terminal

Router(config)#banner m

Router(config)#banner motd $Roterador1$

 

CONFIGURAR IPs (gateway roteador)

Router(config)#interface

Router(config)#in

Router(config)#inte

Router(config)#interface fi

Router(config)#interface gis

Router(config)#interface gi

Router(config)#interface gigabitEthernet b

Router(config)#interface gigabitEthernet 0

Router(config)#interface gigabitEthernet 0

Router(config)#interface gigabitEthernet 0

Router(config)#interface gigabitEthernet 0

Router(config)#interface gigabitEthernet 0

Router(config)#interface gigabitEthernet 0/0

Router(config)#interface gigabitEthernet 0/0

%Invalid interface type and number

Router(config)#exit

Router#

%SYS-5-CONFIG_I: Configured from console by console

Router#sho

Router#show ip

Router#show ip in

Router#show ip int

Router#show ip interface br

Router#show ip interface brief

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 unassigned YES unset administratively down down

FastEthernet0/1 unassigned YES unset administratively down down

Serial0/0/0 unassigned YES unset down down

Serial0/0/1 unassigned YES unset down down

Vlan1 unassigned YES unset administratively down down

Router#con

Router#conf

Router#configure t

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#int

Router(config)#interface fa

Router(config)#interface fastEthernet 0

Router(config)#interface fastEthernet 0/0

Router(config-if)#ip ad

Router(config-if)#ip address 192.168.10.1

% Incomplete command.

Router(config-if)#ip address 192.168.10.1 255.255.255.0

Router(config-if)#no stu

Router(config-if)#no shu

Router(config-if)#no shutdown (subir porta)

Router(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#exit

Router(config)#interface fastEthernet 0/1

Router(config-if)#ip address 192.168.11.1 255.255.255.0

Router(config-if)#no shutdown (subir porta)

 

VLANs

Switch>enable

Switch#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#vlan 20

Switch(config-vlan)#name vendas

Switch(config-vlan)#vlan 30

Switch(config-vlan)#name adm

Switch(config-vlan)#end

Switch#

%SYS-5-CONFIG_I: Configured from console by console

Switch#show

Switch#show vlan brief

VLAN Name Status Ports

—- ——————————– ——— ——————————-

1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4

Fa0/5, Fa0/6, Fa0/7, Fa0/8

Fa0/9, Fa0/10, Fa0/11, Fa0/12

Fa0/13, Fa0/14, Fa0/15, Fa0/16

Fa0/17, Fa0/18, Fa0/19, Fa0/20

Fa0/21, Fa0/22, Fa0/23, Fa0/24

Gig0/1, Gig0/2

20 vendas active

30 adm active

1002 fddi-default active

1003 token-ring-default active

1004 fddinet-default active

1005 trnet-default active

 

Switch#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#interface range fastEthernet 0/1-10

Switch(config-if-range)#switchport mode access

Switch(config-if-range)#switchport access vlan 20

Switch(config-if-range)#end

Switch#

%SYS-5-CONFIG_I: Configured from console by console

show vlan brief

VLAN Name Status Ports

—- ——————————– ——— ——————————-

1 default active Fa0/11, Fa0/12, Fa0/13, Fa0/14

Fa0/15, Fa0/16, Fa0/17, Fa0/18

Fa0/19, Fa0/20, Fa0/21, Fa0/22

Fa0/23, Fa0/24, Gig0/1, Gig0/2

20 vendas active Fa0/1, Fa0/2, Fa0/3, Fa0/4

Fa0/5, Fa0/6, Fa0/7, Fa0/8

Fa0/9, Fa0/10

30 adm active

1002 fddi-default active

1003 token-ring-default active

1004 fddinet-default active

1005 trnet-default active

Switch#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#interface range fastEthernet 0/11-21

Switch(config-if-range)#switchport mode access

Switch(config-if-range)#switchport access vlan 30

Switch(config-if-range)#end

Switch#

%SYS-5-CONFIG_I: Configured from console by console

Switch#show vlan brief

VLAN Name Status Ports

—- ——————————– ——— ——————————-

1 default active Fa0/22, Fa0/23, Fa0/24, Gig0/1

Gig0/2

20 vendas active Fa0/1, Fa0/2, Fa0/3, Fa0/4

Fa0/5, Fa0/6, Fa0/7, Fa0/8

Fa0/9, Fa0/10

30 adm active Fa0/11, Fa0/12, Fa0/13, Fa0/14

Fa0/15, Fa0/16, Fa0/17, Fa0/18

Fa0/19, Fa0/20, Fa0/21

1002 fddi-default active

1003 token-ring-default active

1004 fddinet-default active

1005 trnet-default active

Switch#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#int

Switch(config)#interface f

Switch(config)#interface fastEthernet 0/21

Switch(config-if)#switchport access vlan 50

% Access VLAN does not exist. Creating vlan 50

Switch(config-if)#end

Switch#

%SYS-5-CONFIG_I: Configured from console by console

show vlan brief

VLAN Name Status Ports

—- ——————————– ——— ——————————-

1 default active Fa0/22, Fa0/23, Fa0/24, Gig0/1

Gig0/2

20 vendas active Fa0/1, Fa0/2, Fa0/3, Fa0/4

Fa0/5, Fa0/6, Fa0/7, Fa0/8

Fa0/9, Fa0/10

30 adm active Fa0/11, Fa0/12, Fa0/13, Fa0/14

Fa0/15, Fa0/16, Fa0/17, Fa0/18

Fa0/19, Fa0/20

50 VLAN0050 active Fa0/21

1002 fddi-default active

1003 token-ring-default active

1004 fddinet-default active

1005 trnet-default active

Switch#sho

Switch#show fla

Switch#show flash:

Directory of flash:/

1 -rw- 4414921 <no date> c2960-lanbase-mz.122-25.FX.bin

2 -rw- 736 <no date> vlan.dat

 

Configurar Vlan nativa

Switch(config)#interface GigabitEthernet 0/1

Switch(config-if)#switchport native vlan 99

Switch(config-if)#exit