All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
105 lines
1.4 KiB
Markdown
105 lines
1.4 KiB
Markdown
<!--
|
|
title: Administring a Cisco Switch
|
|
date: 2025-04-17
|
|
-->
|
|
|
|
# Administring a Cisco Switch - Basics for the Homelab Usage
|
|
|
|
## Connecting to the Switch
|
|
|
|
Only quite old ssh parameters are supported:
|
|
|
|
```
|
|
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa admin@192.168.2.1
|
|
```
|
|
|
|
## Saving the Configuration
|
|
|
|
Never forget, otherwise after reboot changes are gone!
|
|
|
|
```
|
|
write memory
|
|
```
|
|
|
|
|
|
## Configure VLANs
|
|
|
|
Allow VLAN-IDs greater then 1005:
|
|
|
|
```
|
|
configure terminal
|
|
vtp mode transparent
|
|
exit
|
|
```
|
|
|
|
|
|
```
|
|
configure terminal
|
|
vlan 1001
|
|
name vlan1001
|
|
exit
|
|
exit
|
|
```
|
|
|
|
The first `exit` leaves the interface, the second `exit` leaves the config session.
|
|
|
|
If the VLAN should be used for management purposes it needs an IP address:
|
|
|
|
```
|
|
configure terminal
|
|
vlan 2000
|
|
name vlan2000
|
|
ip address dhcp
|
|
exit
|
|
exit
|
|
```
|
|
|
|
|
|
Check your work:
|
|
|
|
```
|
|
show vlan
|
|
```
|
|
|
|
|
|
## Configure Interfaces
|
|
|
|
To check your work use
|
|
|
|
```
|
|
show interfaces status
|
|
```
|
|
|
|
|
|
### Access Ports
|
|
|
|
```
|
|
configure terminal
|
|
interface GigabitEthernet1/0/1
|
|
switchport mode access
|
|
switchport access vlan 1001
|
|
spanning-tree portfast
|
|
no shutdown
|
|
exit
|
|
exit
|
|
```
|
|
|
|
### Trunk Ports
|
|
|
|
```
|
|
configure terminal
|
|
interface GigabitEthernet1/0/23
|
|
switchport mode trunk
|
|
switchport trunk allowed vlan 1012,3001,3002,3003,3004
|
|
switchport trunk native vlan 1012
|
|
no shutdown
|
|
exit
|
|
exit
|
|
```
|
|
|
|
`allowed` connects the port to the VLAN for tagged communication.
|
|
|
|
`native` makes the VLAN untagged on that port.
|
|
|
|
|