三层交换实现不同VLAN间的通信[神州数码设备]

简介:

实验线路连接图:

 

实验内容:

三层交换机具有路由功能,在一般三层交换都是需要手动开启其路由功能。只是神州的5526S交换机不用开启,可以直接使用。具体思路就是,在SwitchA上设置VLAN10,且VLAN10IP地址为PC1的网关,另一半同理。

1)测试机配置

测试机PC1连接交换机A 1口,ip 192.168.10.1 网关:192.168.10.10

测试机PC2连接交换机B 10口,ip 192.168.20.1网关:192.168.20.10

2DCRS-5526S配置

SwitchA-Config[完整配置]

switch>enable

switch#config

switch(Config)#hostname SwitchA

SwitchA(Config)#interface ethernet 0/0/23

SwitchA(Config-Ethernet0/0/23)#switchport mode trunk

Set the port Ethernet0/0/23 mode TRUNK successfully

SwitchA(Config-Ethernet0/0/23)#exit

SwitchA(Config)#telnet-server enable

Telnetd already enabled.

SwitchA(Config)#telnet-user shenzhi password 0 123

SwitchA(Config)#ip http server

web server is on

SwitchA(Config)#web-user shenzhi password 0 123

SwitchA(Config)#vlan 10

SwitchA(Config-Vlan10)#switchport interface ethernet 0/0/1-8

Set the port Ethernet0/0/1 access vlan 10 successfully

Set the port Ethernet0/0/2 access vlan 10 successfully

Set the port Ethernet0/0/3 access vlan 10 successfully

Set the port Ethernet0/0/4 access vlan 10 successfully

Set the port Ethernet0/0/5 access vlan 10 successfully

Set the port Ethernet0/0/6 access vlan 10 successfully

Set the port Ethernet0/0/7 access vlan 10 successfully

Set the port Ethernet0/0/8 access vlan 10 successfully

SwitchA(Config-Vlan10)#interface vlan 10

SwitchA(Config-If-Vlan10)#ip address 192.168.10.10 255.255.255.0

SwitchA(Config-If-Vlan10)#vlan 20

SwitchA(Config-Vlan20)#interface vlan 20

SwitchB(Config-If-Vlan20)#ip address 192.168.20.10 255.255.255.0

 

SwitchB-Config[完整配置]

PC1<--->SwitchA(e0/0/1)

PC2<--->SwitchB(e0/0/10)

注意:PC2的网关并不是SwitchBVLAN20IP地址,而是SwitchA上的VLAN20IP地址,并且在SwitchB上的VLAN20并未设置IP地址,因为意义不大。

switch>enable

switch#config

switch(Config)#hostname SwitchB

SwitchB(Config)#telnet-server enable

Telnetd already enabled.

SwitchB(Config)#telnet-user shenzhi password 0 123

SwitchB(Config)#ip http server

web server is on

SwitchB(Config)#web-user shenzhi password 0 123

SwitchB(Config)#interface ethernet 0/0/23

SwitchB(Config-Ethernet0/0/23)#switchport mode trunk

Set the port Ethernet0/0/23 mode TRUNK successfully

SwitchB(Config-Ethernet0/0/23)#vlan 20

SwitchB(Config)#interface ethernet 0/0/23

SwitchB(Config-Ethernet0/0/23)#switchport mode trunk

Set the port Ethernet0/0/23 mode TRUNK successfully

SwitchB(Config-Ethernet0/0/23)#vlan 20

SwitchB(Config-Vlan20)#switchport interface ethernet 0/0/10-15

Set the port Ethernet0/0/10 access vlan 20 successfully

Set the port Ethernet0/0/11 access vlan 20 successfully

Set the port Ethernet0/0/12 access vlan 20 successfully

Set the port Ethernet0/0/13 access vlan 20 successfully

Set the port Ethernet0/0/14 access vlan 20 successfully

Set the port Ethernet0/0/15 access vlan 20 successfully

3)测试机A可以ping通测试机B

实验要求:

   掌握Vlan的定义,同一Vlan中的主机只要IP为同一网段便可以相互通信。



本文转自tiancong 51CTO博客,原文链接:http://blog.51cto.com/tiancong/656920

相关文章
|
7月前
|
网络协议 数据处理 网络虚拟化
【HCIA】10.VLAN间通信
【HCIA】10.VLAN间通信
71 0
|
5月前
|
存储 缓存 网络虚拟化
网络互联设备(集线器、交换机、路由器)
网络互连设备用于将网络的各个部件连接到一起,从连接性质的不同可分为两种: 物理上的互连能力:指所支持的物理接口,能连接的物理介质类型 协议上的互连能力:指工作在不同协议类型的网络之间,实现不同协议数据包的转换。
|
5月前
|
网络架构
利用路由器实现互联
随着网络的扩大,特别是多种工作平台连接成大规模的广域网环境,网桥在路由选择、流量控制以及网络管理等方面已远远不能满足要求,这时就需要使用路由器或者网关。
39 2
|
7月前
|
网络虚拟化
【HCIA】08.交换机基础和VLAN
【HCIA】08.交换机基础和VLAN
36 0
WLAN无线局域网技术 基础(二)PoE与PoE交换机的功能,二层组网和三层组网的概念与方式,有线组网概念:直连式组网、旁挂式组网,CAPWAP协议
WLAN无线局域网基础、讲述了有线侧组网的概念,PoE与PoE交换机的功能,二层组网和三层组网的概念与方式,直连式组网、旁挂式组网,CAPWAP协议
WLAN无线局域网技术 基础(二)PoE与PoE交换机的功能,二层组网和三层组网的概念与方式,有线组网概念:直连式组网、旁挂式组网,CAPWAP协议