eNSP的vlan创建

拓扑结构

这里写图片描述

配置步骤

STEP1:给PC配置IP地址
STEP2:将连接PC的端口配置成access模式
       int e0/0/1
       port link-type access ----指定端口模式为access模式
step3: 创建,划分VLAN,相应端口划分进相应VLAN.
       VLAN 10 
       des  SALES 
       port e0/0/1
       port e0/0/3 ---创建VLAN10,描述信息为SALES部门,并将e0/0/1,e0/0/3划分进VLAN10

       VLAN 20
       des CAIWU
       port e0/0/2
       port e0/0/4 ---创建VLAN20,描述信息为CAIWU部门,并将e0/0/2,e0/0/4划分进VLAN20

step4: display vlan---查看VLAN信息,观察哪些端口划分进哪些VLAN中
step5: 测试

结论:同一个VLAN,同一个网段,连接到同一个交换机上,才能够互通

具体操作


<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW1
[SW1]
Jul  5 2018 13:18:40-08:00 SW1 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 4, the cha
nge loop count is 0, and the maximum number of records is 4095.
[SW1]int e0 
[SW1]int e  
[SW1]int Ether  
[SW1]int Ethernet 0/0/1
[SW1-Ethernet0/0/1]port link-t  
[SW1-Ethernet0/0/1]port link-type ac    
[SW1-Ethernet0/0/1]port link-type access 
[SW1-Ethernet0/0/1]
Jul  5 2018 13:19:10-08:00 SW1 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 5, the cha
nge loop count is 0, and the maximum number of records is 4095.
[SW1-Ethernet0/0/1]quit
[SW1]int ethre  
[SW1]int ether  
[SW1]int Ethernet 0/0/2
[SW1-Ethernet0/0/2]port link-ty 
[SW1-Ethernet0/0/2]port link-type ac    
[SW1-Ethernet0/0/2]port link-type access 
[SW1-Ethernet0/0/2]quit
[SW1]in
Jul  5 2018 13:19:30-08:00 SW1 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 6, the cha
nge loop count is 0, and the maximum number of records is 4095.
     ^
Error:Ambiguous command found at '^' position.
[SW1]int ether  
[SW1]int Ethernet 0/0/3
[SW1-Ethernet0/0/3]port link-ty 
[SW1-Ethernet0/0/3]port link-type acc   
[SW1-Ethernet0/0/3]port link-type access 
[SW1-Ethernet0/0/3]quit
[SW1]int ether  
[SW1]int Ethernet 0/0/4
[SW1-Ethernet0/0/4]p
Jul  5 2018 13:19:50-08:00 SW1 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 7, the cha
nge loop count is 0, and the maximum number of records is 4095
[SW1-Ethernet0/0/4]port link-ty
[SW1-port-group-link-ty]
Jul  5 2018 13:20:00-08:00 SW1 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 8, the cha
nge loop count is 0, and the maximum number of records is 4095.
[SW1-port-group-link-ty]quit
[SW1]int ether  
[SW1]int Ethernet 0/0/4
[SW1-Ethernet0/0/4]port link-type acc   
[SW1-Ethernet0/0/4]port link-type access 
[SW1-Ethernet0/0/4]
Jul  5 2018 13:20:20-08:00 SW1 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 9, the cha
nge loop count is 0, and the maximum number of records is 4095.
[SW1-Ethernet0/0/4]quit
[SW1]vlan 10
[SW1-vlan10]des 
[SW1-vlan10]description SALES
[SW1-vlan10]
Jul  5 2018 13:20:40-08:00 SW1 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 11, the ch
ange loop count is 0, and the maximum number of records is 4095.
[SW1-vlan10]port e  
[SW1-vlan10]port Ethernet 0/0/1
[SW1-vlan10]port ether  
[SW1-vlan10]port Ethernet 0/0/3
[SW1-vlan10]
Jul  5 2018 13:21:00-08:00 SW1 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 13, the ch
ange loop count is 0, and the maximum number of records is 4095.
[SW1-vlan10]quit
[SW1]vlan 20
[SW1-vlan20]des 
[SW1-vlan20]description 
Jul  5 2018 13:21:10-08:00 SW1 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 ch
ange loop count is 0, and the maximum number of records is 4095.
                        ^
Error:Incomplete command found at '^' position.
[SW1-vlan20]des 
[SW1-vlan20]description CAIWU
[SW1-vlan20]port e
Jul  5 2018 13:21:20-08:00 SW1 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 15, the ch
ange loop count is 0, and the maximum number of records is 4095
                 ^
Error:Incomplete command found at '^' position.
[SW1-vlan20]port eth    
[SW1-vlan20]port Ethernet 0/0/2
[SW1-vlan20]p
Jul  5 2018 13:21:30-08:00 SW1 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 16, the ch
ange loop count is 0, and the maximum number of records is 4095
[SW1-vlan20]port ether  
[SW1-vlan20]port Ethernet 0/0/4
[SW1-vlan20]
Jul  5 2018 13:21:38-08:00 SW1 %%01IFNET/4/IF_STATE(l)[55]:Interface Vlanif1 has 
turned into DOWN state.
[SW1-vlan20]
Jul  5 2018 13:21:40-08:00 SW1 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 17, the ch
ange loop count is 0, and the maximum number of records is 4095.
[SW1-vlan20]disp    
[SW1-vlan20]display vlan
The total number of vlans is : 3
--------------------------------------------------------------------------------
U: Up;         D: Down;         TG: Tagged;         UT: Untagged;
MP: Vlan-mapping;               ST: Vlan-stacking;
#: ProtocolTransparent-vlan;    *: Management-vlan;
--------------------------------------------------------------------------------

VID  Type    Ports                
--------------------------------------------------------------------------------
1    common  UT:Eth0/0/5(D)     Eth0/0/6(D)     Eth0/0/7(D)     Eth0/0/8(D)     
                Eth0/0/9(D)     Eth0/0/10(D)    Eth0/0/11(D)    Eth0/0/12(D)    
                Eth0/0/13(D)    Eth0/0/14(D)    Eth0/0/15(D)    Eth0/0/16(D)    
                Eth0/0/17(D)    Eth0/0/18(D)    Eth0/0/19(D)    Eth0/0/20(D)    
                Eth0/0/21(D)    Eth0/0/22(D)    GE0/0/1(D)      GE0/0/2(D)      
10   common  UT:Eth0/0/1(U)     Eth0/0/3(U)                                     
20   common  UT:Eth0/0/2(U)     Eth0/0/4(U)                                     

VID  Status  Property      MAC-LRN Statistics Description      
--------------------------------------------------------------------------------
1    enable  default       enable  disable    VLAN 0001                         
10   enable  default       enable  disable    SALES                             
20   enable  default       enable  disable    CAIWU                             
[SW1-vlan20]

测试

ping一下,即可。截图略

  • 10
    点赞
  • 54
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值