计算机网络实验三
!
Interface Ethernet0/0/18
!
Interface Ethernet0/0/19
!
Interface Ethernet0/0/20
!
Interface Ethernet0/0/21
!
Interface Ethernet0/0/22
!
Interface Ethernet0/0/23
---- ------------ ---------- --------- ----------------------------------------
1 default Static ENET Ethernet0/0/1(T) Ethernet0/0/2
Ethernet0/0/3 Ethernet0/0/4
交换机B192.168.2.12255.255.255.0
PC1-A192.168.2.101255.255.255.0
PC2-B192.168.2.102255.255.255.0
PC1、PC2接在VLAN100的成员端口1~8上,两台PC互相可以ping通;
PC1、PC2接在VLAN的成员端口9~16上,两台PC互相可以ping通;
Ethernet0/0/17 Ethernet0/0/18
Ethernet0/0/19 Ethernet0/0/20
Ethernet0/0/21 Ethernet0/0/22
Ethernet0/0/23 Ethernet0/0/24
10 VLAN0010 Static ENET Ethernet0/0/1(T) Ethernet0/0/5
switch#reload
Process with reboot? [Y/N] y
switch#config
switch(Config)#hostnameS5.3yangcuiting-A
2)给交换机设置IP地址以及划分VLAN
S5.3yangcuiting-A>
S5.3yangcuiting-A>
Ethernet0/0/14 Ethernet0/0/15
Ethernet0/0/16
S5.3yangcuiting-A#
3)验证主机与交换机是否连通
、
四、自我评价及建议
通过本次实验了解到了不同VLAN之间的相互通信,掌握了VLAN的划分方法和不同主机互相通信的方法。
!
Interface Ethernet0/0/24
!
!
interface Vlan1
interface vlan 1
ip address 192.168.2.11 255.255.255.0
!
!
S5.3yangcuiting-A#show vlan
VLAN Name Type Media Ports
S5.3yangcuiting-A>show run
> Unrecognized command or illegal parameter!
S5.3yangcuiting-A>enable
S5.3yangcuiting-A#show run
Current configuration:
!
hostname S5.3yangcuiting-A
Ethernet0/0/6 Ethernet0/0/7
Ethernet0/0/8
20 VLAN0020 Static ENET Ethernet0/0/1(T) Ethernet0/0/9
Ethernet0/0/10 Ethernet0/0/11
Ethernet0/0/12
30 VLAN0030 Static ENET Ethernet0/0/1(T) Ethernet0/0/13
实验3-交换机VLAN划分实验及跨交换机相同VLAN间通讯
一、实验目的
1、了解 VLAN通信原理;
2、熟练掌握二层交换机 VLAN 的划分方法;
3、了解如何验证 VLAN 的划分。
二、实验拓扑图及详细设备
三、实验内容及步骤
PC1和PC2的网络设置为:
设备IP地址Mask
交换机A192.168.2.11255.255.255.0
switchport access vlan 20
!
Interface Ethernet0/0/12
switchport access vlan 20
!
Interface Ethernet0/0/13
switchport access vlan 30
!
Interface Ethernet0/0/14
!
Interface Ethernet0/0/4
!
Interface Ethernet0/0/5
switchport access vlan 10
!
Interface Ethernet0/0/6
switchport access vlan 10
!
Interface Ethernet0/0/7
switchport access vlan 10
!
Interface Ethernet0/0/8
switchport access vlan 10
!
Interface Ethernet0/0/9
switchport access vlan 20
!
Interface Ethernet0/0/10
switchport access et0/0/11
!
!
Vlan 1
vlan 1
!
Vlan 10
vlan 10
!
Vlan 20
vlan 20
!
Vlan 30
vlan 30
!
!
Interface Ethernet0/0/1
switchport mode trunk
!
Interface Ethernet0/0/2
!
Interface Ethernet0/0/3
switchport access vlan 30
!
Interface Ethernet0/0/15
switchport access vlan 30
!
Interface Ethernet0/0/16
switchport access vlan 30
!
Interface Ethernet0/0/17
PC1接在VLAN100的成员端口1~8上,PC2接在VLAN200的成员端口9~16上,则互相ping不通。
若实验结果和理论相符,则本实验完成。
四、实验结果及小结
1)恢复交换机出厂设置并更改主机名
switch#set default
Are you sure? [Y/N] = y
switch#write