华为S5700怎么划分VLAN
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了华为S5700怎么划分VLAN相关的知识,希望对你有一定的参考价值。
参考技术A S5700共24个端口,现在要求端口1-12加入Vlan1,端口13-14加入Vlan2,端口Vlan15-16加入Vlan3,端口17-18加入Vlan4,端口19-20加入Vlan5,端口21-22加入Vlan6,端口23-24加入Vlan7.要求Vlan1可以互通Vlan2 Vlan3 Vlan4 Vlan5 Vlan6 Vlan7,但Vlan2 Vlan3 Vlan4 Vlan5 Vlan6 Vlan7不能互通,并且每个端口下连接的是傻瓜交换机,在每个交换机下的PC要求能自动获取到IP。所有服务器都在192.168.1.0段,Vlan1的IP192.168.1.1 Vlan2的IP192.168.2.1 Vlan3的IP192.168.3.1 Vlan4的IP192.168.4.1 Vlan5的IP192.168.5.1 Vlan6的IP192.168.6.1 Vlan7的IP192.168.7.1命令如下:
<Quidway>system-view
Enter system view, return user view with Ctrl+Z.
[Quidway]port-group 1
[Quidway-port-group-1]group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/ 12
[Quidway-port-group-1]
Oct 1 2008 00:12:28+08:00 Quidway DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.191.3.1 configurations have been changed. The current change number is 2, the change loop count is 0, and the maximum number of records is 4095.
[Quidway-port-group-1]port link-type trunk
[Quidway-GigabitEthernet0/0/1]port link-type trunk
[Quidway-GigabitEthernet0/0/2]port link-type trunk
[Quidway-GigabitEthernet0/0/3]port link-type trunk
[Quidway-GigabitEthernet0/0/4]port link-type trunk
[Quidway-GigabitEthernet0/0/5]port link-type trunk
[Quidway-GigabitEthernet0/0/6]port link-type trunk
[Quidway-GigabitEthernet0/0/7]port link-type trunk
[Quidway-GigabitEthernet0/0/8]port link-type trunk
[Quidway-GigabitEthernet0/0/9]port link-type trunk
[Quidway-GigabitEthernet0/0/10]port link-type trunk
[Quidway-GigabitEthernet0/0/11]port link-type trunk
[Quidway-GigabitEthernet0/0/12]port link-type trunk
[Quidway-port-group-1]port
Oct 1 2008 00:12:58+08:00 Quidway DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.191.3.1 configurations have been changed. The current change number is 14, the change loop count is 0, and the maximum number of records is 4095.
[Quidway-port-group-1]port trunk allow-pass vlan 1 to 7
[Quidway-GigabitEthernet0/0/1]port trunk allow-pass vlan 1 to 7
[Quidway-GigabitEthernet0/0/2]port trunk allow-pass vlan 1 to 7
[Quidway-GigabitEthernet0/0/3]port trunk allow-pass vlan 1 to 7
[Quidway-GigabitEthernet0/0/4]port trunk allow-pass vlan 1 to 7
[Quidway-GigabitEthernet0/0/5]port trunk allow-pass vlan 1 to 7
[Quidway-GigabitEthernet0/0/6]port trunk allow-pass vlan 1 to 7
[Quidway-GigabitEthernet0/0/7]port trunk allow-pass vlan 1 to 7
[Quidway-GigabitEthernet0/0/8]port trunk allow-pass vlan 1 to 7
[Quidway-GigabitEthernet0/0/9]port trunk allow-pass vlan 1 to 7
[Quidway-GigabitEthernet0/0/10]port trunk allow-pass vlan 1 to 7
[Quidway-GigabitEthernet0/0/11]port trunk allow-pass vlan 1 to 7
[Quidway-GigabitEthernet0/0/12]port trunk allow-pass vlan 1 to 7
[Quidway-port-group-1]
Oct 1 2008 00:14:18+08:00 Quidway DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.191.3.1 configurations have been changed. The current change number is 26, the change loop count is 0, and the maximum number of records is 4095.
[Quidway-port-group-1]port trunk pvid vlan 1
[Quidway-GigabitEthernet0/0/1]port trunk pvid vlan 1
[Quidway-GigabitEthernet0/0/2]port trunk pvid vlan 1
[Quidway-GigabitEthernet0/0/3]port trunk pvid vlan 1
[Quidway-GigabitEthernet0/0/4]port trunk pvid vlan 1
[Quidway-GigabitEthernet0/0/5]port trunk pvid vlan 1
[Quidway-GigabitEthernet0/0/6]port trunk pvid vlan 1
[Quidway-GigabitEthernet0/0/7]port trunk pvid vlan 1
[Quidway-GigabitEthernet0/0/8]port trunk pvid vlan 1
[Quidway-GigabitEthernet0/0/9]port trunk pvid vlan 1
[Quidway-GigabitEthernet0/0/10]port trunk pvid vlan 1
[Quidway-GigabitEthernet0/0/11]port trunk pvid vlan 1
[Quidway-GigabitEthernet0/0/12]port trunk pvid vlan 1
[Quidway-port-group-1]
Oct 1 2008 00:14:48+08:00 Quidway DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.191.3.1 configurations have been changed. The current change number is 38, the change loop count is 0, and the maximum number of records is 4095.
[Quidway-port-group-1]quit
[Quidway]interface Vlanif 1
[Quidway-Vlanif1]ip address 192.168.1.1 24
[Quidway-Vlanif1]
Oct 1 2008 00:16:48+08:00 Quidway DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.191.3.1 configurations have been changed. The current change number is 40, the change loop count is 0, and the maximum number of records is 4095.
[Quidway-Vlanif1]
[Quidway-Vlanif1]
[Quidway-Vlanif1]
[Quidway-Vlanif1]quit
[Quidway]vlan 2
[Quidway-vlan2]quit
[Quidway]interface GigabitEthernet 0/0/13
[Quidway-GigabitEthernet0/0/13]port link-type trunk
[Quidway-GigabitEthernet0/0/13]port trunk allow-pass vlan 1 ?
INTEGER<1-4094> VLAN ID
to Range link symbol
<cr>
[Quidway-GigabitEthernet0/0/13]port trunk allow-pass vlan 1 2
[Quidway-GigabitEthernet0/0/13]
Oct 1 2008 00:24:38+08:00 Quidway DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.191.3.1 configurations have been changed. The current change number is 46, the change loop count is 0, and the maximum number of records is 4095.
[Quidway-GigabitEthernet0/0/13]port trunk pvid vlan 1
[Quidway-GigabitEthernet0/0/13]dis th
#
interface GigabitEthernet0/0/13
port link-type trunk
port trunk allow-pass vlan 2
#
return
[Quidway-GigabitEthernet0/0/13]
Oct 1 2008 00:25:08+08:00 Quidway DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.191.3.1 configurations have been changed. The current change number is 47, the change loop count is 0, and the maximum number of records is 4095.
[Quidway-GigabitEthernet0/0/13]
[Quidway-GigabitEthernet0/0/13]qu
[Quidway-GigabitEthernet0/0/13]quit
[Quidway]interface Vlanif 2
[Quidway-Vlanif2]ip address 192.168.2.1 24
[Quidway-Vlanif2]dhcp select global
[Quidway-Vlanif2]
[Quidway-Vlanif2]dhcp server ?
dns-list Configure DNS servers
domain-name Configure domain name
excluded-ip-address Mark disable IP addresses
lease Configure the lease of the IP pool
nbns-list Configure the windows's netbios name servers
netbios-type Netbios node type
option Configure the DHCP options
option121 DHCP option 121
option184 DHCP option 184
static-bind Static bind
[Quidway-ip-pool-vlan2]network 192.168.2.0 mask 24
[Quidway-ip-pool-vlan2]gateway-list 10[1D [1D92.168.0.1[1D [1D[1D [1D[1D [1D2.1
[Quidway-ip-pool-vlan2]
Oct 1 2008 00:52:08+08:00 Quidway DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.191.3.1 configurations have been changed. The current change number is 68, the change loop count is 0, and the maximum number of records is 4095.
[Quidway-ip-pool-vlan2]
[Quidway-ip-pool-vlan2]
[Quidway]interface GigabitEthernet 0/0/14
[Quidway-GigabitEthernet0/0/14]
[Quidway-GigabitEthernet0/0/14]port trunk allow-pass vlan 1 2
[Quidway-GigabitEthernet0/0/14]
Oct 1 2008 00:59:27+08:00 Quidway %%01IFNET/4/IF_STATE(l)[39]:Interface Vlanif2 has turned into UP state.
Oct 1 2008 00:59:27+08:00 Quidway %%01IFNET/4/LINKNO_STATE(l)[40]:The line protocol on the interface Vlanif2 has entered the UP state.
Oct 1 2008 00:59:28+08:00 Quidway DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.191.3.1 configurations have been changed. The current change number is 71, the change loop count is 0, and the maximum number of records is 4095.
[Quidway-GigabitEthernet0/0/14]port trunk pvid vlan 2
PS:本人只配置了vlan2的接口、ip、dhcp,vlan3至vlan7与valn2配置类似不再赘述。
需要注意的是port trunk allow-pass vlan 1 X和port trunk pvid vlan X(其中X为 接口的vlan,注意空格,不同设备对vlan定义有所区别 ,)allow-pass也可能会是permit版本不同命令有所区别。 有个问题:‘dhcp server forbidden-ip’交换机无法识别不知哪位大侠能指点一下,在此拜谢O(∩_∩)O~
划分VLAN(华为)
vlan划分(华为)
1.access接口
PC5-9 ip分别为 10.1.1.1( 2 3 4 5 )
[LSW3]vlan 10 # 两种创建vlan方法
[LSW3]vlan 20
[LSW4]vlan batch 30 40
dis vlan # 用来查看vlan信息
LSW3 # 配置LSW3交换机划分vlan10 、20
system-view
int eth0/0/1
port link-type access
port default vlan 10
int eth0/0/2
port link-type access
port default vlan 10
int eth0/0/3
port link-type access
port default vlan 20
LSW4 # 配置LSW4交换机划分vlan30、40
sys
int eth0/0/1
port link-type access
port default vlan 30
int eth0/0/2
port link-type access
port default vlan 40
2.trunk接口
pc 1-4 ip 为 10.1.1.1(2 3 4)
首先创建vlan
LSW2 #研发部属于vlan10 市场部属于vlan 20
vlan 10
description R¥D
vlan 20
description Market
其余两台同理
用 display vlan 或 displayvlan summary 查看配置的vlan信息
配置交换机与pc机的access接口并且划分vlan
LSW2
sys
int eth0/0/2
port link-ty access
port default vlan10
int eth0/0/3
port link-type access
port default vlan 20
另一台同理
display port vlan #用来检查valn和接口的配置
此时 PC1与PC3 ,PC2 与PC4 无法ping通 ,因为交换机与交换机之间相连的接口上没有相应的vlan信息,
不识别和发送跨越交换机的报文,此时vlan只具有每台交换机的本地意义,无法实现相同vlan的跨交换机通信,
此时需要将交换机之间相连的接口配置为trunk接口,过程如下:
LSW2
int eth0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20
LSW3
int eth0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20
LSW1
int GE0/0/1
port link-type trunk
port trunk allow-pass vlan all
int GE0/0/2
port link-type trunk
port trunk allow-pass vlan all
dispaly port vlan 检查
PC1 ping PC3
成功!
3.hybird接口
PC1.2.3.4 ip 为192.168.1.1,2,3,4
PC5 ip 192.168.1.100
要求:市场部与产品部只能各自通信,IT部门可以和任意主机通信
S1
vlan batch 10 20 30
int e0/0/1
port link-ty hybrid
port hybrid tagged vlan 10 20 30
int e0/0/2
port link-ty hybrid
port hybrid untagged vlan 20 30
port hybrid pvid vlan 20
int e0/0/3
port link-ty hybrid
port hybrid untagged vlan 10 30
port hybrid pvid vlan 10
int e0/0/4
port link-ty hybrid
port hybrid pvid vlan 30
port hybrid untagged vlan 10 20 30
S2
vlan batch 10 20 30
int e0/0/1
port link-ty hybrid
port hybrid tagged vlan 10 20 30
int e0/0/2
port link-ty hybrid
port hybrid untagged vlan 20 30
port hybrid pvid vlan 20
int e0/0/3
port link-ty hybrid
port hybrid untagged vlan 10 30
port hybrid pvid vlan 10 20 30
遇到的问题!
在配置S2时没有创建vlan30,导致PC5 无法ping通PC3 PC4
以上是关于华为S5700怎么划分VLAN的主要内容,如果未能解决你的问题,请参考以下文章
华为交换机基本命令配置:建立VLAN,把端口划分到对于vlan上
华为交换机基本命令配置:建立VLAN,把端口划分到对于vlan上
华为三层交换机S5700做ACL访问控制列表限制不同vlan间的通信