ST1Tutorials/Tutorials/M3 Lab 2 - Switch Configuration/README.md

78 lines
1.7 KiB
Markdown
Raw Normal View History

2023-10-30 23:51:32 +00:00
# Lab 02 - Switch Configuration
> ***Objectives:***
> - Ensure PCs and switches are connected properly
> - Cable types
> - PC-SW: straight cables
> - SW-SW: ~~gay~~ crossover cables
> - Connections
> - Connect PCs to ports 1-3 and 11-13 of switches
> - Connect switches together with ports 23 and 24
> - Configure switches properly
> - Rename switches to `SW1`-`SW4`
> - Assign ports 1-10 to VLAN 10
> - Assign ports 11-20 to VLAN 20
> - Set spanning-tree `portfast` on ports 1-20
> - Set ports 22-24 as trunks for VLAN 10 and 20
> - Set spanning-tree `portfast trunk` for ports 22-24
> - Set `SW2` to be spanning-tree root primary for VLAN 10 and root secondary for VLAN 20
> - Set `SW3` to be spanning-tree root secondary for VLAN 20
> - Configure static IP addresses for at least 3 computers per switch
2023-10-31 22:55:16 +00:00
The lab is realized in `./Networks/Main.ptk` in tag `lab-2`
2023-10-31 22:55:16 +00:00
## Basic Configuration
Run this configuration on each Switch replacing `{x}` with the switch number:
```sh
enable
configure terminal
hostname SW{x}
interface range fastEthernet 0/1-10
switchport mode access
switchport access vlan 10
interface range fastEthernet 0/11-20
switchport mode access
switchport access vlan 20
interface range fastEthernet 0/1-20
spanning-tree portfast
interface range fastEthernet 0/22-24
switchport mode trunk
switchport trunk allowed vlan 10,20
spanning-tree portfast trunk
exit
exit
disable
exit
```
## Configuration of `SW2`
```sh
enable
configure terminal
spanning-tree vlan 10 root primary
spanning-tree vlan 20 root secondary
exit
exit
disable
exit
```
## Configuration of `SW3`
```sh
enable
configure terminal
spanning-tree vlan 10 root secondary
spanning-tree vlan 20 root primary
exit
exit
disable
exit
```