拓扑图在组网及组网描述中
交换机都是用的第49端口的光口光纤传输的,
需要划分2个VLAN20 跟22,使这3个设备和电脑能在这3个交换机中互相通信
交换机1的端口1-48已经分完VLAN了,剩下光口49端口还在默认的vlan1 中不知道怎么搞了,交换机1中还需要设置什么?核心的交换机要怎么需要怎么设置才能和交换机互相通信啊,。
设置列表
对齐方式
(0)
如图1所示:
· 为了避免广播报文泛滥和通信的安全性,某公司网络中使用VLAN技术来隔离部门间的二层流量。其中部门A使用VLAN 100,部门B使用VLAN 200。
· 部门A的终端用户使用192.168.1.0/24 IP网段,各终端用户配置的网关地址为192.168.1.1;部门B的终端用户使用192.168.2.0/24 IP网段,各终端用户配置的网关地址为192.168.2.1;
现要求通过配置基于端口的VLAN和VLAN接口实现下面应用需求:
· 同一VLAN内的主机能够二层互通,不同VLAN内的主机不能二层互通,能够三层互通。
· 通过配置使Device A作为部门A中用户的网关,Device B作为部门B中用户的网关。
# 创建VLAN 100,并将GigabitEthernet 1/0/1加入VLAN 100。
<DeviceA> system-view
[DeviceA] vlan 100
[DeviceA-vlan100] port gigabitethernet 1/0/1
[DeviceA-vlan100] quit
# 创建Vlan-interface 100,并配置其IP地址为192.168.1.1/24。
[DeviceA] interface Vlan-interface 100
[DeviceA-Vlan-interface100] ip address 192.168.1.1 24
[DeviceA-Vlan-interface100] quit
# 创建VLAN 200,并将GigabitEthernet 1/0/2加入VLAN 200。
[DeviceA] vlan 200
[DeviceA-vlan200] port gigabitethernet 1/0/2
[DeviceA-vlan200] quit
# 创建Vlan-interface 200,并配置其IP地址为192.168.2.2/24。
[DeviceA] interface Vlan-interface 200
[DeviceA-Vlan-interface200] ip address 192.168.2.2 24
[DeviceA-Vlan-interface200] quit
# 为了使Device A上VLAN 100和VLAN 200的报文能发送给Device B,将GigabitEthernet 1/0/3的链路类型配置为Trunk,并允许VLAN 100和VLAN 200的报文通过,取消允许VLAN 1通过。
[DeviceA] interface gigabitethernet 1/0/3
[DeviceA-GigabitEthernet1/0/3] port link-type trunk
[DeviceA-GigabitEthernet1/0/3] port trunk permit vlan 100 200
[DeviceA-GigabitEthernet1/0/3] undo port trunk permit vlan 1
[DeviceA-GigabitEthernet1/0/3] quit
(2) 配置Device B
# 创建VLAN 100,并将GigabitEthernet 1/0/1加入VLAN 100。
<DeviceB> system-view
[DeviceB] vlan 100
[DeviceB-vlan100] port gigabitethernet 1/0/1
[DeviceB-vlan100] quit
# 创建Vlan-interface 100,并配置其IP地址为192.168.1.2/24。
[DeviceB] interface Vlan-interface 100
[DeviceB-Vlan-interface100] ip address 192.168.1.2 24
[DeviceB-Vlan-interface100] quit
# 创建VLAN 200,并将GigabitEthernet 1/0/2加入VLAN 200。
[DeviceB] vlan 200
[DeviceB-vlan200] port gigabitethernet 1/0/2
[DeviceB-vlan200] quit
# 创建Vlan-interface 200,并配置其IP地址为192.168.2.1/24。
[DeviceB] interface Vlan-interface 200
[DeviceB-Vlan-interface200] ip address 192.168.2.1 24
[DeviceB-Vlan-interface200] quit
# 为了使Device A上VLAN 100和VLAN 200的报文能发送给Device B,将GigabitEthernet 1/0/3的链路类型配置为Trunk,并允许VLAN 100和VLAN 200的报文通过,取消允许VLAN 1通过。
[DeviceB] interface gigabitethernet 1/0/3
[DeviceB-GigabitEthernet1/0/3] port link-type trunk
[DeviceB-GigabitEthernet1/0/3] port trunk permit vlan 100 200
[DeviceB-GigabitEthernet1/0/3] undo port trunk permit vlan 1
[DeviceB-GigabitEthernet1/0/3] quit
(1) 通过display vlan命令查看显示信息验证配置是否成功,以查看Device A上VLAN 100和VLAN 200的配置信息为例。
[DeviceA] display vlan 100
VLAN ID: 100
VLAN Type: static
Route Interface: configured
IP Address: 192.168.1.1
Subnet Mask: 255.255.255.0
Description: VLAN 0100
Name: VLAN 0100
Tagged Ports:
GigabitEthernet1/0/3
Untagged Ports:
GigabitEthernet1/0/1
[DeviceA] display vlan 200
VLAN ID: 200
VLAN Type: static
Route Interface: configured
IP Address: 192.168.2.2
Subnet Mask: 255.255.255.0
Description: VLAN 0200
Name: VLAN 0200
Tagged Ports:
GigabitEthernet1/0/3
Untagged Ports:
GigabitEthernet1/0/2
(2) Host A和Host C能够互相ping通。查看Host A的ARP表,表中有Host C的IP地址和MAC地址对应的ARP表项。查看Host C的ARP表,表中有Host A的IP地址和MAC地址对应的ARP表项。
(3) Host A和Host D能够互相ping通。查看Host A的ARP表,表中没有Host D的ARP表项。查看Host D的ARP表,表中也没有Host A的ARP表项。
S5500-SI系列交换机不支持port link-mode bridge命令。
#
vlan 100
#
vlan 200
#
interface Vlan-interface100
ip address 192.168.1.1 255.255.255.0
#
interface Vlan-interface200
ip address 192.168.2.2 255.255.255.0
#
interface GigabitEthernet1/0/1
port link-mode bridge
port access vlan 100
#
interface GigabitEthernet1/0/2
port link-mode bridge
port access vlan 200
#
interface GigabitEthernet1/0/3
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 100 200
#
· Device B
#
vlan 100
#
vlan 200
#
interface Vlan-interface100
ip address 192.168.1.2 255.255.255.0
#
interface Vlan-interface200
ip address 192.168.2.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port link-mode bridge
port access vlan 100
#
interface GigabitEthernet1/0/2
port link-mode bridge
port access vlan 200
#
interface GigabitEthernet1/0/3
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 100 200
http://www.h3c.com.cn/cn/d_201312/807737_30005_0.htm#_Toc374370341
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论