美文网首页
二层网络架构配置实验

二层网络架构配置实验

作者: 讲武德的年轻人 | 来源:发表于2022-04-04 16:21 被阅读0次
    拓扑图 vlan20改为vlan30

    接入交换机sw2做配置:

    <Huawei>system-view 
    Enter system view, return user view with Ctrl+Z.
    [Huawei]
    [Huawei]sysname sw2
    [sw2]
    [sw2]vlan 10
    [sw2-vlan10]
    [sw2-vlan10]vlan 30
    [sw2-vlan30]
    [sw2-vlan30]quit
    [sw2]int e0/0/2
    [sw2-Ethernet0/0/2]
    [sw2-Ethernet0/0/2]port link-type access 
    [sw2-Ethernet0/0/2]
    [sw2-Ethernet0/0/2]
    [sw2-Ethernet0/0/2]port default vlan 10
    [sw2-Ethernet0/0/2]display this
    #
    interface Ethernet0/0/2
     port link-type access
     port default vlan 10
    #
    return
    [sw2-Ethernet0/0/2]
    [sw2-Ethernet0/0/2]int e0/0/3
    [sw2-Ethernet0/0/3]
    [sw2-Ethernet0/0/3]
    [sw2-Ethernet0/0/3]port link-type access
    [sw2-Ethernet0/0/3]
    [sw2-Ethernet0/0/3]port default vlan 30
    [sw2-Ethernet0/0/3]
    [sw2-Ethernet0/0/3]
    [sw2-Ethernet0/0/3]dis this
    #
    interface Ethernet0/0/3
     port link-type access
     port default vlan 30
    #
    return
    [sw2-Ethernet0/0/3]
    [sw2-Ethernet0/0/3]
    <sw2>
    <sw2>dis 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/1(U)     Eth0/0/4(D)     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(U)      GE0/0/2(D)                                      
    
    10   common  UT:Eth0/0/2(U)                                                     
    
    30   common  UT:Eth0/0/3(D)                                                     
    
    
    VID  Status  Property      MAC-LRN Statistics Description      
    --------------------------------------------------------------------------------
    
    1    enable  default       enable  disable    VLAN 0001                         
    10   enable  default       enable  disable    VLAN 0010                         
    30   enable  default       enable  disable    VLAN 0030                         
    <sw2>
    [sw2]int gi 0/0/1
    [sw2-GigabitEthernet0/0/1]
    [sw2-GigabitEthernet0/0/1]  
    [sw2-GigabitEthernet0/0/1]port link-type trunk 
    [sw2-GigabitEthernet0/0/1]
    [sw2-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 30
    

    接入交换机sw3做如下配置:

    [Huawei]
    [Huawei]sysname sw3
    [sw3]
    [sw3]
    [sw3]
    [sw3]
    [sw3]
    [sw3]
    [sw3]
    [sw3]
    [sw3]
    Mar  4 2020 20:46:02-08:00 sw3 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 c
    hange loop count is 0, and the maximum number of records is 4095.un in en
    Info: Information center is disabled.
    [sw3]
    [sw3]
    [sw3]
    [sw3]un in en
    Info: Information center is disabled.
    [sw3]
    [sw3]vlan 200
    [sw3-vlan200]qu
    [sw3]
    [sw3]int e0/0/2
    [sw3-Ethernet0/0/2] 
    [sw3-Ethernet0/0/2]port link-type access 
    [sw3-Ethernet0/0/2]port default vlan 200
    [sw3-Ethernet0/0/2]qu
    [sw3]
    [sw3]int gi 0/0/1   
    [sw3-GigabitEthernet0/0/1]port link-type trunk 
    [sw3-GigabitEthernet0/0/1]port trunk allow-pass vlan 200
    [sw3-GigabitEthernet0/0/1]
    [sw3-GigabitEthernet0/0/1]
    

    核心交换机sw1做配置:

    <Huawei>
    <Huawei>
    <Huawei>system  
    <Huawei>system-view 
    Enter system view, return user view with Ctrl+Z.
    [Huawei]
    [Huawei]
    [Huawei]
    [Huawei]sysname sw1
    [sw1]
    [sw1]
    [sw1]
    [sw1]int gi 
    [sw1]int GigabitEthernet 0/0/1 
    [sw1-GigabitEthernet0/0/1]
    [sw1-GigabitEthernet0/0/1]
    [sw1-GigabitEthernet0/0/1]port link-type tr
    [sw1-GigabitEthernet0/0/1]
    [sw1-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 30
    [sw1-GigabitEthernet0/0/1]
    [sw1-GigabitEthernet0/0/1]qu
    [sw1]
    [sw1]vlan ba    
    [sw1]vlan batch 10 30 200
    Info: This operation may take a few seconds. Please wait for a moment...done.
    [sw1]
    [sw1]
    [sw1]
    [sw1]int gi 0/0/2
    [sw1-GigabitEthernet0/0/2]
    [sw1-GigabitEthernet0/0/2]port link-type trunk
    [sw1-GigabitEthernet0/0/2]
    [sw1-GigabitEthernet0/0/2]port trunk allow-pass vlan 200
    [sw1-GigabitEthernet0/0/3]
    [sw1]
    [sw1]
    [sw1]int vlan 10
    [sw1-Vlanif10]
    Mar  4 2020 20:59:04-08:00 sw1 %%01IFNET/4/IF_STATE(l)[0]:Interface Vlanif10 has
     turned into UP state.
    [sw1-Vlanif10]
    [sw1-Vlanif10]
    [sw1-Vlanif10]
    [sw1-Vlanif10]ip in 
    [sw1-Vlanif10]ip add 192.168.10.1 24
    [sw1-Vlanif10]
    Mar  4 2020 20:59:21-08:00 sw1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
     on the interface Vlanif10 has entered the UP state.
    [sw1-Vlanif10]
    [sw1-Vlanif10]
    [sw1-Vlanif10]
    [sw1-Vlanif10]
    [sw1-Vlanif10]
    [sw1-Vlanif10]
    Mar  4 2020 20:59:27-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 
    change loop count is 0, and the maximum number of records is 4095.
    [sw1-Vlanif10]
    [sw1-Vlanif10]
    [sw1-Vlanif10]
    [sw1-Vlanif10]
    [sw1-Vlanif10]
    [sw1-Vlanif10]
    [sw1-Vlanif10]
    [sw1-Vlanif10]int vlan 30
    [sw1-Vlanif30]
    Mar  4 2020 20:59:38-08:00 sw1 %%01IFNET/4/IF_STATE(l)[2]:Interface Vlanif30 has
     turned into UP state.
    [sw1-Vlanif30]
    [sw1-Vlanif30]
    [sw1-Vlanif30]ip add 192.168.30.1 24
    [sw1-Vlanif30]
    Mar  4 2020 20:59:59-08:00 sw1 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
     on the interface Vlanif30 has entered the UP state.
    [sw1-Vlanif30]
    [sw1-Vlanif30]
    [sw1-Vlanif30]
    [sw1-Vlanif30]qu
    [sw1]
    [sw1]int vlan 200 
    [sw1-Vlanif200]
    [sw1-Vlanif200]
    [sw1-Vlanif200]ip add 192.168.200.1 24
    [sw1-Vlanif200]quit
    [sw1]dis ip int br
    *down: administratively down
    ^down: standby
    (l): loopback
    (s): spoofing
    The number of interface that is UP in Physical is 4
    The number of interface that is DOWN in Physical is 2
    The number of interface that is UP in Protocol is 3
    The number of interface that is DOWN in Protocol is 3
    
    Interface                         IP Address/Mask      Physical   Protocol  
    MEth0/0/1                         unassigned           down       down      
    NULL0                             unassigned           up         up(s)     
    Vlanif1                           unassigned           up         down      
    Vlanif10                          192.168.10.1/24      up         up        
    Vlanif30                          192.168.30.1/24      up         up        
    Vlanif200                         192.168.200.1/24     down       down      
    [sw1]
    

    相关文章

      网友评论

          本文标题:二层网络架构配置实验

          本文链接:https://www.haomeiwen.com/subject/aulilhtx.html