zoukankan      html  css  js  c++  java
  • 华为交换机划分vlan及路由配置

    创建vlan

    [center_switch]vlan 40                           

    [center_switch-vlan40]quit

    给vlan配置IP地址           

    [center_switch]interface Vlanif 10      

    [center_switch-Vlanif10] ip address 10.3.0.1   255.255.0.0

    将端口加入vlan (少的话可以一个一个加,多了可以分组,将端口组加入vlan)

    [center_switch] interface port GigabitEthernet 0/0/24

    [center_switch-GigabitEthernet0/0/24]port link-type access

    [center_switch-GigabitEthernet0/0/24]port default vlan10 

    [center_switch-GigabitEthernet0/0/24]quit

    [center_switch] interface port GigabitEthernet 0/0/23  

    [center_switch-GigabitEthernet0/0/23]port link-type access

    [center_switch-GigabitEthernet0/0/23]port default vlan10

    创建端口组

    [center_switch]port-group port1to8forvlan30

    将相应的端口加入组中

    [center_switch]port-group port1to8forvlan30]group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/8

    设置端口方式

    [center_switch-port-group-port1to8forvlan30]port link-type access

    设置端口组默认vlan(即之前创建好的vlan ID 30)

    [center_switch-port-group-port1to8forvlan30]port default vlan 30

    trunk口配置方式(trunk口为交换机与交换机之间vlan互相通信的接口,两台交换机trunk口互连即可)

    进入接口

     port link-type trunk
     port trunk allow-pass vlan all

    静态路由配置

    ip route-static 0.0.0.0  0.0.0.0  10.0.0.1

    上层还有要路由器的话需要在路由器上配置回指路由(交换机到路由器的静态路由有了,还需要有路由器到交换机的静态路由)

    vlan下配置dhcp服务

    开启服务

    [Huawei]dhcp enable

    ip pool vlan10 (池名称)

    network 10.7.0.0 mask 255.255.0.0

    gateway-list 10.7.0.1

    dns-list 223.5.5.5

    lease day 2

    quit --

    interface Vlanif10

    dhcp select global

  • 相关阅读:
    linux-kernel邮件列表订阅出错,提示命令不能识别---解决方案
    MD5(单向散列算法)原理分析
    win32汇编跳转指令用法
    (转载)c/c++优先级列表
    linux man手册各个章节的意义
    如何解决dpkg: error processing install-info
    python魔法函数(常见)
    redis 哈希封装
    数据库去重
    抖音破解字体加密
  • 原文地址:https://www.cnblogs.com/chenjiye/p/12060141.html
Copyright © 2011-2022 走看看