思科交换机基本配置命令
时间: 2023-06-18 13:01:57 浏览: 165
以下是思科交换机的基本配置命令:
1. 设置主机名:
```
hostname Switch1
```
2. 配置管理接口:
```
interface vlan 1
ip address 192.168.1.10 255.255.255.0
no shutdown
```
3. 配置登录认证:
```
username admin privilege 15 password 0 admin123
line vty 0 4
login local
```
4. 配置启用 SSH:
```
ip domain-name example.com
crypto key generate rsa
ip ssh version 2
line vty 0 4
transport input ssh
```
5. 配置 VLAN:
```
vlan 10
name Sales
vlan 20
name Marketing
```
6. 配置端口:
```
interface gigabitethernet 0/1
switchport mode access
switchport access vlan 10
```
7. 配置路由:
```
ip routing
interface vlan 1
ip address 192.168.1.10 255.255.255.0
interface vlan 10
ip address 10.10.10.1 255.255.255.0
interface vlan 20
ip address 10.10.20.1 255.255.255.0
```
以上是基本的配置命令,实际上还有很多其他的配置命令,具体需要根据实际情况进行配置。
阅读全文