标签:inter static ffffff oss 1.0 size expired 端口 方式
1、DHCP
PC1自动获取的ip地址
PC2自动获取的ip地址
这个任务主要是做DHCP中继。
DHCP服务器在路由器上,而SWA上有3个VLAN,分属于3个不同网段,
DHCP的请求报文是广播,因此必须在SWA上设置中继才能够传到路由器。
配置步骤
(1) 配置路由器。
<H3C> system-view
[H3C] interface g 0/0
[[H3C-GigabitEthernet0/0]] ip address 10.1.1.2 30
[[H3C-GigabitEthernet0/0]] quit
启用 DHCP 服务。
[H3C] dhcp enable
*配置 DHCP 地址池 2,为来自 192.168.20.0/24网段内的客户端分配地址。
[H3C] dhcp server ip-pool 2
[H3C-dhcp-pool-0] network 192.168.20.0 mask 255.255.255.0
[H3C-dhcp-pool-0] dns-list 8.8.8.8
[H3C-dhcp-pool-0] gateway-list 192.168.20.254
[H3C-dhcp-pool-0] quit
配置 DHCP 地址池 3,为来自 192.168.30.0/24网段内的客户端分配地址。
[H3C] dhcp server ip-pool 3
[H3C-dhcp-pool-0] network 192.168.30.0 mask 255.255.255.0
[H3C-dhcp-pool-0] dns-list 8.8.8.8
[H3C-dhcp-pool-0] gateway-list 192.168.30.254
[H3C-dhcp-pool-0] quit
(2) 配置 SWA交换机。
[H3C]inter range g 1/0/1 to g 1/0/5
[H3C-if-range]port link-type access
[H3C-if-range]port access vlan 10
[H3C-if-range]quit
[H3C]inter range g 1/0/6 to g 1/0/10
[H3C-if-range]port link-type access
[H3C-if-range]port access vlan 20
[H3C-if-range]quit
[H3C]inter range g 1/0/11 to g 1/0/15
[H3C-if-range]port link-type access
[H3C-if-range]port access vlan 30
[H3C-if-range]quit
[H3C]inter vlan 10
[H3C-Vlan-interface10]ip add 192.168.10.254 24
[H3C-Vlan-interface10]quit
[H3C]inter vlan 20
[H3C-Vlan-interface20]ip add 192.168.20.254 24
[H3C-Vlan-interface20]quit
[H3C]inter vlan 30
[H3C-Vlan-interface30]ip add 192.168.30.254 24
[H3C-Vlan-interface30]quit
[H3C]
[H3C]inter g 1/0/23
[H3C-GigabitEthernet1/0/23]port link-m r
[H3C-GigabitEthernet1/0/23]ip add 10.1.1.1 30
[H3C-GigabitEthernet1/0/23]quit
(3)配置DHCP中继(SWA交换机)
启用 DHCP 服务。
[H3C] dhcp enable
配置 DHCP 服务器的地址。
[H3C-Vlan-interface10] dhcp relay server-address 10.1.1.2
[H3C-Vlan-interface10] quit
配置 VLAN 接口 20 工作在 DHCP 中继模式。
[H3C] interface vlan-interface 20
[H3C-Vlan-interface20] dhcp select relay
[H3C-Vlan-interface20] dhcp relay server-address 10.1.1.2
[H3C-Vlan-interface20] quit
这个任务主要是做DHCP Snooping。
DHCP服务器在路由器上,而SWA上有3个VLAN,分属于3个不同网段,
DHCP的请求报文是广播,因此必须在SWA上设置中继才能够传到路由器。
伪DHCP Server已经配置好,将发布172.22.1.1-99的地址池,网关172.22.1.254,DNS 9.9.9.9
配置步骤
(1) * 配置路由器。
<H3C> system-view
[H3C] interface g 0/0
[[H3C-GigabitEthernet0/0]] ip address 10.1.1.2 30
[[H3C-GigabitEthernet0/0]] quit
启用 DHCP 服务。
[H3C] dhcp enable
配置 DHCP 地址池 1,为来自 192.168.1.0/24网段内的客户端分配地址。
[H3C] dhcp server ip-pool 1
[H3C-dhcp-pool-0] network 192.168.10.0 mask 255.255.255.0
[H3C-dhcp-pool-0] dns-list 8.8.8.8
[H3C-dhcp-pool-0] gateway-list 192.168.10.254
[H3C-dhcp-pool-0] quit
*配置 DHCP 地址池 3,为来自 192.168.30.0/24网段内的客户端分配地址。
[H3C] dhcp server ip-pool 3
[H3C-dhcp-pool-0] network 192.168.30.0 mask 255.255.255.0
[H3C-dhcp-pool-0] dns-list 8.8.8.8
[H3C-dhcp-pool-0] gateway-list 192.168.30.254
[H3C-dhcp-pool-0] quit
[H3C]inter range g 1/0/1 to g 1/0/5
[H3C-if-range]port link-type access
[H3C-if-range]port access vlan 10
[H3C-if-range]quit
[H3C]inter range g 1/0/6 to g 1/0/10
[H3C-if-range]port link-type access
[H3C-if-range]port access vlan 20
[H3C-if-range]quit
[H3C]inter range g 1/0/11 to g 1/0/15
[H3C-if-range]port link-type access
[H3C-if-range]port access vlan 30
[H3C-if-range]quit
[H3C]inter vlan 10
[H3C-Vlan-interface10]ip add 192.168.10.254 24
[H3C-Vlan-interface10]quit
[H3C]inter vlan 20
[H3C-Vlan-interface20]ip add 192.168.20.254 24
[H3C-Vlan-interface20]quit
[H3C]inter vlan 30
[H3C-Vlan-interface30]ip add 192.168.30.254 24
[H3C-Vlan-interface30]quit
[H3C]
[H3C]inter g 1/0/23
[H3C-GigabitEthernet1/0/23]port link-t
[H3C-GigabitEthernet1/0/23]ip add 10.1.1.1 30
[H3C-GigabitEthernet1/0/23]quit
(3)*配置DHCP中继(SWA交换机)
启用 DHCP 服务。
[H3C] dhcp enable
*配置 VLAN 接口 20 工作在 DHCP 中继模式。
[H3C] interface vlan-interface 20
[H3C-Vlan-interface20] dhcp select relay
[H3C-Vlan-interface20] dhcp relay server-address 10.1.1.2
[H3C-Vlan-interface20] quit
标签:inter static ffffff oss 1.0 size expired 端口 方式
原文地址:https://blog.51cto.com/14220576/2380619