Examples switch configuration (DHCP, VLAN)

Examples switch configuration (DHCP, VLAN)

1. Port Address Configuration

int g0/0/1
ip add 172.16.131.5 255.255.255.0

2. Static Routing Configuration

Under Destination IP Mask hop
0.0.0.0 0.0.0.0 XXXX

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 configuration

1. Open the DHCP function

DHCP enable

2. Create VLAN10 on the server; 20; IP address pool IP address pool of VLAN 10 and 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. Give VLAN10, VLAN20 configure IP. Achieve three visits

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 port settings: the DHCP server 2 and a trunk link configuration

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

The switcher VLan configuration: a switch port on the 1; 2 added VLAN 10; trunk link port 3 provided

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. port binding MAC, IP address and Vlan

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

Safety switch port Huawei Detailed - port isolation, and loop detection port security
https://blog.csdn.net/xieyunc/article/details/82785340?utm_source=blogxgwz9

Huawei switches ip address and MAC address bindings
https://jingyan.baidu.com/article/8ebacdf0f12b8d09f65cd5fb.html

Guess you like

Origin www.cnblogs.com/cy-8593/p/12334262.html