• 三层交换机配置说明(华为S5700设置三个网段互通)


    1.配置Switch

    # 创建VLAN

    <HUAWEI> system-view
    [HUAWEI] sysname Switch
    [Switch] vlan batch 10 20 30
    # 配置接口加入VLAN

    [Switch] interface gigabitethernet 0/0/1
    [Switch-GigabitEthernet0/0/1] port link-type access
    [Switch-GigabitEthernet0/0/1] port default vlan 10
    [Switch-GigabitEthernet0/0/1] quit
    [Switch] interface gigabitethernet 0/0/2
    [Switch-GigabitEthernet0/0/2] port link-type access
    [Switch-GigabitEthernet0/0/2] port default vlan 20
    [Switch-GigabitEthernet0/0/2] quit
    [Switch] interface gigabitethernet 0/0/3
    [Switch-GigabitEthernet0/0/3] port link-type access
    [Switch-GigabitEthernet0/0/3] port default vlan 30
    [Switch-GigabitEthernet0/0/3] quit
    # 配置VLANIF接口的IP地址

    [Switch] interface vlanif 10
    [Switch-Vlanif10] ip address 192.168.50.1 24
    [Switch-Vlanif10] quit
    [Switch] interface vlanif 20
    [Switch-Vlanif20] ip address 192.168.60.1 24
    [Switch-Vlanif20] quit
    [Switch] interface vlanif 30
    [Switch-Vlanif30] ip address 192.168.70.1 24
    [Switch-Vlanif30] quit
    2.检查配置结果

    在VLAN10中的User1主机上配置IP地址为192.168.50.2/24,缺省网关为VLANIF10接口的IP地址192.168.50.1/24。

    在VLAN20中的User2主机上配置IP地址为192.168.60.2/24,缺省网关为VLANIF20接口的IP地址192.168.60.1/24。

    在VLAN30中的User3主机上配置IP地址为192.168.70.2/24,缺省网关为VLANIF20接口的IP地址192.168.70.1/24。

    配置完成后,VLAN10内的User1与VLAN20内的User2和VLAN30内的User3能够相互访问。

  • 相关阅读:
    机器任务——最小点覆盖
    树的统计
    农夫约翰
    关押罪犯
    题单
    加分二叉树(递归,区间DP)
    [动态规划] 斜率优化DP
    [树形DP] 换根DP
    [期望DP][SCOI2008] 奖励关
    [数位DP][AHOI2009] Luogu P4127 同类分布
  • 原文地址:https://www.cnblogs.com/jinjiangongzuoshi/p/3873649.html
Copyright © 2020-2023  润新知