码迷,mamicode.com
首页 > 其他好文 > 详细

华为三层交换机基础配置

时间:2019-11-06 20:01:03      阅读:289      评论:0      收藏:0      [点我收藏+]

标签:img   基础配置   工作   三层交换   out   bit   图片   mamicode   def   

华为三层交换机
工作原理:一次交换,多次转发
作用:实现vlan间的数据互通
ensp拓扑图如下:
技术图片

SW2

<Huawei>sys
[Huawei]sysname SW2
[SW2]vlan batch 10 20
[SW2]int e0/0/2
[SW2-Ethernet0/0/2]port link-type access 
[SW2-Ethernet0/0/2]port default vlan 10
[SW2-Ethernet0/0/2]un sh
[SW2-Ethernet0/0/2]int e0/0/3
[SW2-Ethernet0/0/3]port link-type access
[SW2-Ethernet0/0/3]port default vlan 20
[SW2-Ethernet0/0/3]un sh
[SW2-Ethernet0/0/3]int e0/0/1
[SW2-Ethernet0/0/1]port link-type trunk 
[SW2-Ethernet0/0/1]port trunk allow-pass vlan all 
[SW2-Ethernet0/0/1]un sh
[SW2-Ethernet0/0/1]int g0/0/1
[SW2-GigabitEthernet0/0/1]port link-type trunk  
[SW2-GigabitEthernet0/0/1]port trunk allow-pass vlan all 
[SW2-GigabitEthernet0/0/1]un sh

SW3

<Huawei>sys
[Huawei]sysname SW3 
[SW3]vlan batch 10 20
[SW3]int e0/0/2
[SW3-Ethernet0/0/2]port link-type access 
[SW3-Ethernet0/0/2]port default vlan 10
[SW3-Ethernet0/0/2]un sh
[SW3-Ethernet0/0/2]int e0/0/3
[SW3-Ethernet0/0/3]port link-type access    
[SW3-Ethernet0/0/3]port default vlan 20
[SW3-Ethernet0/0/3]un sh
[SW3-Ethernet0/0/3]int e0/0/1
[SW3-Ethernet0/0/1]port link-type trunk 
[SW3-Ethernet0/0/1]port trunk allow-pass vlan all 
[SW3-Ethernet0/0/1]un sh

SW1

<Huawei>sys
[Huawei]sysname SW1
[SW1]vlan batch 10 20 1000
[SW1]int g0/0/1
[SW1-GigabitEthernet0/0/1]port link-type trunk 
[SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan all 
[SW1-GigabitEthernet0/0/1]un sh
[SW1-GigabitEthernet0/0/1]int g0/0/2
[SW1-GigabitEthernet0/0/2]port link-type access
[SW1-GigabitEthernet0/0/2]port default vlan 1000
[SW1-GigabitEthernet0/0/2]un sh
[SW1-GigabitEthernet0/0/2]q
[SW1]int vlanif 10
[SW1-Vlanif10]ip add 192.168.10.1 24
[SW1-Vlanif10]int vlanif 20
[SW1-Vlanif20]ip add 192.168.20.1 24
[SW1]int vlanif 1000
[SW1-Vlanif1000]ip add 11.0.0.1 30
[SW1-Vlanif1000]q
[SW1]ip route-static 0.0.0.0 0.0.0.0 11.0.0.2

R1

<Huawei>sys
[Huawei]sysname R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 11.0.0.2 30
[R1-GigabitEthernet0/0/0]un sh
[R1-GigabitEthernet0/0/0]int loopback 0
[R1-LoopBack0]ip add 1.1.1.1 30
[R1-LoopBack0]q
[R1]ip route-static 192.168.10.0 24 11.0.0.1
[R1]ip route-static 192.168.20.0 24 11.0.0.1

配置完成后可实现各个主机之间互联互通
技术图片
谢谢!!

华为三层交换机基础配置

标签:img   基础配置   工作   三层交换   out   bit   图片   mamicode   def   

原文地址:https://blog.51cto.com/14475593/2448160

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!