需要配置一个dhcp自动获取,要创两个地址池分别是192.168.10.0和192.168.20.0
如图
(0)
最佳答案
交换机配置
<H3C>sys
[H3C]sysname sw1
[sw1-vlan10]port GigabitEthernet 1/0/1 to GigabitEthernet 1/0/9
[sw1-vlan10]quit
[sw1-vlan20]port GigabitEthernet 1/0/10 to GigabitEthernet 1/0/19
[sw1-vlan10]quit
[sw1]interface GigabitEthernet 1/0/24
[sw1-GigabitEthernet1/0/24]port link-type trunk
[sw1-GigabitEthernet1/0/24]port trunk permit vlan all
路由器配置
<H3C>sys
[H3C]sysname r1
[R1]interface GigabitEthernet 0/0.1
[R1-GigabitEthernet0/0.1]ip address 192.168.10.254 24
[R1-GigabitEthernet0/0.1]vlan-type dot1q vid 10
[R1-GigabitEthernet0/0.1]exit
[R1]interface GigabitEthernet 0/0.2
[R1-GigabitEthernet0/0.2]ip address 192.168.20.254 24
[R1-GigabitEthernet0/0.2]vlan-type dot1q vid 20
[R1-GigabitEthernet0/0.2]exit
[R1]interface GigabitEthernet 0/1
[R1-GigabitEthernet0/1]ip address 10.10.10.1 24
[R1-GigabitEthernet0/1]quit
接下来开启路由器的DHCP的功能,并让子接口绑定DHCP服务器
[R1]dhcp enable
[R1]interface GigabitEthernet 0/0.1
[R1-GigabitEthernet0/0.1]dhcp select relay
[R1-GigabitEthernet0/0.1]dhcp relay server-address 10.10.10.2
[R1-GigabitEthernet0/0.1]exit
[R1]interface GigabitEthernet 0/0.2
[R1-GigabitEthernet0/0.2]dhcp select relay
[R1-GigabitEthernet0/0.2]dhcp relay server-address 10.10.10.2
[R1-GigabitEthernet0/0.2]exit
DHCP服务器配置
<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]sysname DHCP
[DHCP]interface GigabitEthernet 0/1
[DHCP-GigabitEthernet0/1]ip add
[DHCP-GigabitEthernet0/1]ip address 10.10.10.2 24
开启DHCP服务器功能
[DHCP]dhcp enable
设置DHCP服务器的地址池名字
[DHCP]dhcp server ip-pool vlan10
设置DHCP服务器的地址池
[DHCP-dhcp-pool-vlan10]network 192.168.10.0 mask 255.255.255.0
设置网关
[DHCP-dhcp-pool-vlan10]gateway-list 192.168.10.254
设置DNS地址
[DHCP-dhcp-pool-vlan10]dns-list 8.8.8.8 202.103.0.117
[DHCP-dhcp-pool-vlan10]exit
[DHCP]dhcp server ip-pool vlan20
[DHCP-dhcp-pool-vlan20]network 192.168.20.0 mask 255.255.255.0
[DHCP-dhcp-pool-vlan20]gateway-list 192.168.20.254
[DHCP-dhcp-pool-vlan20]dns-list 8.8.8.8 202.103.0.117
[DHCP-dhcp-pool-vlan20]exit
设置默认路由
[DHCP]ip route-static 0.0.0.0 0.0.0.0 10.10.10.1
(0)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明