Académique Documents
Professionnel Documents
Culture Documents
Base configuration 1
Configure a hostname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Configure an IP address for the switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Configure an access to the switch from telnet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Enable a password for privileged mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Configure a gateway . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Erase and reload the switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
SSH 2
Allow ssh access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Show ssh server state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Deactivate ssh server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
VLAN 3
Suppress the previous vlan configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Configure the vlan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Remove a host (pc) from a vlan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Delete a vlan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Show . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Inter-VLAN routing 4
Base configuration
Configure a hostname
Switch> enable # or en
Switch# configure terminal # or conf t
Switch(config)# interface vlan 1
Switch(config-if)# ip address 192.168.1.50 255.255.255.0
Switch(config-if)# no shutdown
Switch(config-if)# end
Switch#
Switch# conf t
Switch(config)# line vty 0 15
Switch(config-line)# password cisco
1
Switch(config-line)# login
Switch(config-line)# exit
Switch# conf t
Switch(config)# enable password cisco # or enable secret cisco
Switch(config)# end
Configure a gateway
Switch# conf t
Switch(config)# ip default-gateway 192.168.1.1
SSH
2
Show ssh server state
VLAN
Delete a vlan
3
Show
The command show vlan brief is used to show vlan configuration on the switch.
The command show interface vlan 1 is used to show a vlan interface configuration. The vlan interface has to be
created first.
The command show interface f0/1 switchport is used to show the switchport mode on a port.
We create the vlans in the server normally (like we do without VTP), and automatically the same vlans get created
on the switchs that were configured as client.
Show
Inter-VLAN routing
The majority of the configuration is done on the router. The only thing that has to be done on the switch, is to put
the port connected to the router in trunk mode :
Switch(config)# interface fa0/15
Switch(config-if)# switchport mode trunk
Switch(config-if)# end