返回首页
网站导航
资讯首页> 网站公告 >产品资讯 > 华为三层交换机如何实现不同vlan间通信

    华为三层交换机如何实现不同vlan间通信

    产品资讯2018年09月17日
    分享
      华为三层交换机如何实现不同vlan间通信?例如现在有一台三层交换机需要划分3个vlan,不同的网段。而三个vlan直接能互访,应该如何设置?河姆渡小编给大家介绍一个方法,首先,配置思路是不同vlan间互访需要路由器功能,由于交换机是三层交换机只需要创建vlan ,设置vlanif   Ip(此IP做为所属vlan下用户设备的网关地址)。把交换机端口划分到对应的vlan。下面我们可以跟着实验步骤一起来学习一下。
      华为三层交换机
      1.配置PC机

      华为三层交换机如何实现不同vlan间通信

    华为三层交换机实现不同vlan间通信

    华为三层交换机vlan间通信

      2.配置三层交换机
      
      <huawei>syste-mview
      
      [huawei]sysname gateway
      
      [gateway]vlan batch 10 20 30
      
      [gateway]interface vlanif 10
      
      [gateway-Vlanif10]undo shutdown
      
      [gateway-Vlanif10]ip address 192.168.10.254 255.255.255.0
      
      [gateway-Vlanif10]quit
      
      [gateway]interface vlanif 20
      
      [gateway-Vlanif20]undo shutdown
      
      [gateway-Vlanif20]ip address 192.168.20.254 255.255.255.0
      
      [gateway-Vlanif20]quit
      
      [gateway]interface vlanif30
      
      [gateway-Vlanif30]undo shutdown
      
      [gateway-Vlanif30]ip address 192.168.30.254 255.255.255.0
      
      [gateway-Vlanif30]quit
      
      [gateway]
      
      [gateway]interface GigabitEthernet 0/0/1
      
      [gateway-GigabitEthernet0/0/1]port link-type access
      
      [gateway-GigabitEthernet0/0/1]port default vlan 10
      
      [gateway-GigabitEthernet0/0/1]quit
      
      [gateway]interface GigabitEthernet 0/0/2
      
      [gateway-GigabitEthernet0/0/2]port link-type access
      
      [gateway-GigabitEthernet0/0/2]port default vlan 20
      
      [gateway-GigabitEthernet0/0/2]quit
      
      [gateway]interface GigabitEthernet 0/0/3
      
      [gateway-GigabitEthernet0/0/1]port link-type access
      
      [gateway-GigabitEthernet0/0/1]port default vlan 30
      
      [gateway-GigabitEthernet0/0/1]quit
      
      3.验证与测试
      
      PC1
      华为三层交换机实现不同vlan间通信
      PC2
      华为三层交换机如何实现不同vlan间通信
      PC3
      华为三层交换机如何实现不同vlan间通信
      实验总结:
      
      三层交换机配置思路:
      
      1.首先查看哪些vlan需要配置网关
      
      2.如果三层交换机上没有则创建该vlan
      
      3.为每个vlan创建相应的虚拟vlan(SVI)
      
      4.给每个vlan配置IP地址
      
      5.如果需要,配置三层交换机的动态路由或者静态路由
      
      实验结论:华为三层交换机可以通过创建虚拟vlan实现不同vlan通信,即实现vlan路由的功能。

    相关阅读