sdfsf 发表于 2017-10-25 08:59:38

华为交换机的VLAN基本配置


配置SW1的vlan
<Huawei>

<Huawei>language-mode Chinese//修改提示语言为中文
Changelanguage mode, confirm? y
提示:改变语言模式成功。
<Huawei>undo terminal monitor//关闭终端显示信息
Info:Current terminal monitor is off.
<Huawei>system-view
Entersystem view, return user view with Ctrl+Z.
sysname SW1
vlan 10
vlan 20
vlan 30
qu
int e0/0/2
port link-type access
port default vlan 10
int e0/0/3
port link-type access
port default vlan 20
int e0/0/4
port link-type access
port default vlan 30
quit
int e0/0/1
port link-type trunk
port trunk allow-pass vlan all   
quit
interface Vlan 10
ip address 192.168.1.1 24
undo sh
int vlan 20
ip address 192.168.2.1 24
undo sh
int vlan 30
ipadd 192.168.3.1 24
undo sh
display ip int br
*down:administratively down
^down:standby
(l):loopback
(s):spoofing
The numberof interface that is UP in Physical is 5
The numberof interface that is DOWN in Physical is 1
The numberof interface that is UP in Protocol is 4
The numberof interface that is DOWN in Protocol is 2
Interface                         IP Address/Mask      PhysicalProtocol
MEth0/0/1                         unassigned         down       down   
NULL0                           unassigned         up         up(s)   
Vlanif1                           unassigned         up         down      
Vlanif10                        192.168.1.1/24       up         up      
Vlanif20                        192.168.2.1/24       up         up      
Vlanif30                        192.168.3.1/24       up         up      
display vlan
The totalnumber of vlans is : 4
------------------------------------------------------------------
U:Up;         D: Down;         TG: Tagged;         UT: Untagged;
MP:Vlan-mapping;               ST:Vlan-stacking;
#:ProtocolTransparent-vlan;    *:Management-vlan;
------------------------------------------------------------------
VIDType       Ports                                                         
------------------------------------------------------------------
1    common UT: Eth0/0/1(U)   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/2(U)                                                      
            TG:Eth0/0/1(U)                                       20   common UT:Eth0/0/3(U)                                                   
            TG:Eth0/0/1(U)                                       30   common UT:Eth0/0/4(U)                                                   
            TG:Eth0/0/1(U)                                                   


VIDStatus Property      MAC-LRN StatisticsDescription      
------------------------------------------------------------------

1    enable default       enabledisable   VLAN 0001             10   enable default       enabledisable   VLAN 0010
20   enable default       enabledisable   VLAN 0020             30   enable default       enabledisable   VLAN 0030         
配置SW2的vlan
<Huawei>
<Huawei>language-mode Chinese
Changelanguage mode, confirm? y
提示:改变语言模式成功。
<Huawei>undo terminal monitor
Info:Current terminal monitor is off.
<Huawei>system-view
Entersystem view, return user view with Ctrl+Z.
sysname SW2
vlan 10
vlan 20
vlan 30
qu
int e0/0/2
port link-type access
port default vlan 10
int e0/0/3
port link-type access
port default vlan 20
int e0/0/4
port link-type access
port default vlan 30
qu
int e0/0/1
port link-type trunk
port trunk allow-pass vlan all
qu
int vlan 10
ip address 192.168.1.1 24
undo sh
int vlan 20
ip address 192.168.2.1 24
undo sh
int vlan 30
ip address 192.168.3.1 24
undo sh
qu
display ip int br
*down:administratively down
^down:standby
(l):loopback
(s):spoofing
The numberof interface that is UP   in Physical is 5
The numberof interface that is DOWN in Physical is 1
The numberof interface that is UP   in Protocol is 4
The numberof interface that is DOWN in Protocol is 2

Interface                         IP Address/Mask      PhysicalProtocol
MEth0/0/1                         unassigned         down       down   
NULL0                           unassigned         up         up(s)   
Vlanif1                           unassigned         up         down      
Vlanif10                        192.168.1.1/24       up         up      
Vlanif20                        192.168.2.1/24       up         up      
Vlanif30                        192.168.3.1/24       up       up      
display vlan
The totalnumber of vlans is : 4
------------------------------------------------------------------
U:Up;         D: Down;         TG: Tagged;         UT: Untagged;
MP:Vlan-mapping;               ST: Vlan-stacking;
#:ProtocolTransparent-vlan;    *:Management-vlan;
------------------------------------------------------------------
VIDType   Ports                                                         
------------------------------------------------------------------
1    common UT:Eth0/0/1(U)    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/2(U)                                                   
            TG:Eth0/0/1(U)                                       20   common UT:Eth0/0/3(U)                                                   
            TG:Eth0/0/1(U)                                       30   common UT:Eth0/0/4(U)                                                   
            TG:Eth0/0/1(U)                                                   
VIDStatus Property      MAC-LRN StatisticsDescription   
------------------------------------------------------------------
1    enable default       enabledisable   VLAN 0001             10   enable default       enabledisable   VLAN 0010             20   enable default       enabledisable   VLAN 0020             30   enable default       enabledisable   VLAN 0030             配置完后用PC机开始互相PING


页: [1]
查看完整版本: 华为交换机的VLAN基本配置