This commit is contained in:
96
content/snippets/0260-administring-a-cisco-switch.md
Normal file
96
content/snippets/0260-administring-a-cisco-switch.md
Normal file
@ -0,0 +1,96 @@
|
||||
<!--
|
||||
title: Administring a Cisco Switch
|
||||
date: 2025-04-17
|
||||
-->
|
||||
|
||||
# Administring a Cisco Switch - Basics for the Homelab Usage
|
||||
|
||||
## 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.
|
||||
|
||||
|
Reference in New Issue
Block a user