项目2-2:配置trunk管理与vtp
拓扑:
设备 | Vlan | IP地址 | 子网掩码 |
S1 | VLAN99 | 172.31.99.11 | 255.255.255.0 |
S2 | VLAN99 | 172.31.99.12 | 255.255.255.0 |
S3 | VLAN99 | 172.31.99.13 | 255.255.255.0 |
PC1 | 网卡 | 172.31.10.1 | 255.255.255.0 |
PC2 | 网卡 | 172.31.20.1 | 255.255.255.0 |
PC3 | 网卡 | 172.31.30.1 | 255.255.255.0 |
PC4 | 网卡 | 172.31.10.2 | 255.255.255.0 |
PC5 | 网卡 | 172.31.20.2 | 255.255.255.0 |
PC6 | 网卡 | 172.31.30.2 | 255.255.255.0 |
端口分配(S2 和 S3)
端口 | 分配 | 网络 |
Fa0/1 - 0/5 | 802.1q 中继 | |
Fa0/6 - 0/10 | VLAN 30 - Administration | 172.31.30.0 /24 |
Fa0/11 - 0/17 | VLAN 10 - Engineering | 172.31.10.0 /24 |
Fa0/18 - 0/24 | VLAN 20 - Sales | 172.31.20.0 /24 |
VLAN 99 – Network Mgmt | 172.31.99.0 /24 |
项目目标
1、 执行交换机上的基本配置任务 (按照拓扑所示配置交换机主机名。禁用 DNS 查找。将执行模式口令配置为class。将控制台和 vty 连接口令配置为 cisco)
2、 配置主机 PC 上的以太网接口
3、 在交换机上配置 VTP
检查三台交换机上的当前 VTP 配置。
在所有三台交换机上配置工作模式(S1 server )、域名(czie)和 VTP 口令(cisco)
为所有三台交换机上的中继端口配置中继和本征 VLAN
在 S2 和 S3 接入层交换机上配置端口安全功能(每个接口只能连接一台主机)
在 VTP 服务器上配置 VLAN
在所有三台交换机上配置管理接口地址
分配交换机端口给 VLAN
答案:
S1
en
conf t
host S1
no ip domain-lookup
enable se class
line vty 0 4
pass cisco
login
exi
line co 0
pass cisco
login
exi
vtp domain czie
vtp mode server
vtp pass cisco
vlan 99
name NetworkMgmt
vlan 10
name Engineering
vlan 20
name Sales
vlan 30
name Administration
int vlan 99
ip add 172.31.99.11 255.255.255.0
no sh
S2
en
conf t
host S2
no ip domain-lookup
enable se class
line vty 0 4
pass cisco
login
exi
line co 0
pass cisco
login
exi
vtp domain czie
vtp mode cl
vtp pass cisco
int vlan 99
ip add 172.31.99.12 255.255.255.0
no sh
exi
int ran f0/1 - 5
sw mo tr
exi
int ran f0/6 - 10
sw mo acc
sw acc vlan 30
exi
int ran f0/11 - 17
sw mo acc
sw acc vlan 10
exi
int ran f0/18 - 24
sw mo acc
sw acc vlan 20
exi
int ran f0/1 - 24
switchport port-security maximum 1
sw port-security violation shutdown
end
w m
S3
en
conf t
host S3
no ip domain-lookup
enable se class
line vty 0 4
pass cisco
login
exi
vtp domain czie
vtp mode cl
vtp pass cisco
line co 0
pass cisco
login
exi
int vlan 99
ip add 172.31.99.13 255.255.255.0
no sh
exi
int ran f0/1 - 5
sw mo tr
exi
int ran f0/6 - 10
sw mo acc
sw acc vlan 30
exi
int ran f0/11 - 17
sw mo acc
sw acc vlan 10
exi
int ran f0/18 - 24
sw mo acc
sw acc vlan 20
exi
int ran f0/1 - 24
switchport port-security maximum 1
sw port-security violation shutdown
end
w m
转载于:https://blog.51cto.com/jason8023/249215