zoukankan      html  css  js  c++  java
  • 交换机配置实例(DHCP、VLAN)

    交换机配置实例(DHCP、VLAN)

    1. 端口地址配置

    int g0/0/1
    ip add 172.16.131.5 255.255.255.0
    

    2. 静态路由配置

    目的IP 掩码 下一跳
    0.0.0.0 0.0.0.0 X.X.X.X

    ip route-static 0.0.0.0 0.0.0.0 192.168.88.1    这条路由是所有的访问下一跳都是88.1
    ip route-static 10.10.100.0 255.255.255.0 10.10.101.1     这条路由是10.10.100.0/24这个段的访问地址是10.10.101.1
    

    3. DHCP、VLAN配置

    1. 打开DHCP功能

    DHCP enable
    

    2. 在服务器上创建VLAN10;20;IP地址池VLAN 10和IP地址池 VLAN 20

    vlan batch 10 20
    ip pool vlan10
    	gateway-list 192.168.1.254
    	network 192.168.1.0 mask 255.255.255.0
    	lease day 3
    	dns-list 8.8.8.8/
    
    ip pool VLAN20
    	gateway-list 192.168.2.254
    	network 192.168.2.0 mask 255.255.255.0
    	lease day 3
    	dns-list 8.8.8.8/
    

    3. 给VLAN10,VLAN20配置IP。实现三层互访

    interface vlanif10
    	ip address 192.168.1.254 255.255.255.0
    	dhcp select global
    interface vlanif20
    	ip address 192.168.2.254 255.255.255.0
    	dhcp select global
    

    4. VLAN端口设置:给DHCP服务器1口和2口配置trunk链路

    interface gi0/0/1
    	port link-type trunk
    	port trunk allow-pass all
    
    interface gi0/0/2
    	port link-type trunk
    	port trunk allow-pass all
    

    5. 二层交换机VLan配置:在交换机一上把端口1;2加入VLAN 10;端口3设置成trunk链路

    vlan batch 10 20
    interface gi0/1
    	port link-type access
    	port default vlan 10
    
    interface gi0/2
    	port link-type access
    	port default vlan 10
    
    interface gi0/3
    	port link-type trunk
    	port trunk allow-pass all
    

    6. 端口绑定MAC、IP地址和Vlan

    user-bind static ip-address 192.168.1.252 mac-address 5489-9858-4B5c interface GigabitEthernet 0/0/1 vlan 100
    

    华为交换机端口安全详解--端口隔离、环路检测与端口安全
    https://blog.csdn.net/xieyunc/article/details/82785340?utm_source=blogxgwz9

    华为交换机绑定ip地址和MAC地址
    https://jingyan.baidu.com/article/8ebacdf0f12b8d09f65cd5fb.html

  • 相关阅读:
    4-11
    4-10
    4-9
    4-7
    4-8
    4-6
    4-4
    4-5
    4-3
    4-2
  • 原文地址:https://www.cnblogs.com/cy-8593/p/12334262.html
Copyright © 2011-2022 走看看