DHCP服务(relay中继)实验简述

一、DHCP服务(relay中继模式)
在这里插入图片描述
一、配置接入交换机LSW 2
The device is running!
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info-center enable
Info: Information center is disabled.
[Huawei]sysname LSW2
[LSW2]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment…done.
[LSW2]int e0/0/1
[LSW2-Ethernet0/0/1]port link-type trunk
[LSW2-Ethernet0/0/1]port trunk allow-pass vlan 10 20
[LSW2-Ethernet0/0/1]int e0/0/2
[LSW2-Ethernet0/0/2]port link-type access
[LSW2-Ethernet0/0/2]port default vlan 10
[LSW2-Ethernet0/0/2]quit
[LSW2]int e0/0/3
[LSW2-Ethernet0/0/3]port link-type access
[LSW2-Ethernet0/0/3]port default vlan 20
[LSW2-Ethernet0/0/3]quit
[LSW2]quit
save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Now saving the current configuration to the slot 0.
Save the configuration successfully.

二、配置接入交换机LSW3
The device is running!
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info-center enable
Info: Information center is disabled.
[Huawei]sysname LSW3
[LSW3]vlan batch 30 40
Info: This operation may take a few seconds. Please wait for a moment…done.
[LSW3]int e0/0/1
[LSW3-Ethernet0/0/1]port link-type trunk
[LSW3-Ethernet0/0/1]port trunk allow-pass vlan 30 40
[LSW3-Ethernet0/0/1]int e0/0/2
[LSW3-Ethernet0/0/2]port link-type access
[LSW3-Ethernet0/0/2]port default vlan 30
[LSW3-Ethernet0/0/2]int e0/0/3
[LSW3-Ethernet0/0/3]port link-type access
[LSW3-Ethernet0/0/3]port default vlan 40
[LSW3-Ethernet0/0/3]quit
[LSW3]quit
save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Now saving the current configuration to the slot 0.
Save the configuration successfully.

三、配置汇聚交换机LSW1
The device is running!
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info-center enable
Info: Information center is disabled.
[Huawei]sysname LSW1
[LSW1]vlan batch 10 20 30 40 100
Info: This operation may take a few seconds. Please wait for a moment…done.
[LSW1]int g0/0/1
[LSW1-GigabitEthernet0/0/1]port link-type access
[LSW1-GigabitEthernet0/0/1]port default vlan 100
[LSW1-GigabitEthernet0/0/1]int g0/0/2
[LSW1-GigabitEthernet0/0/2]port link-type trunk
[LSW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 10 20
[LSW1-GigabitEthernet0/0/2]int g0/0/3
[LSW1-GigabitEthernet0/0/3]port link-type trunk
[LSW1-GigabitEthernet0/0/3]port trunk allow-pass vlan 30 40
[LSW1-GigabitEthernet0/0/3]quit
[LSW1]int vlanif 100
[LSW1-Vlanif100]ip add 10.1.1.2 24
[LSW1-Vlanif100]quit
[LSW1]int vlanif 10
[LSW1-Vlanif10]ip add 172.16.10.254 24
[LSW1-Vlanif10]int vlanif 20
[LSW1-Vlanif20]ip add 172.16.20.254 24
[LSW1-Vlanif20]int vlanif 30
[LSW1-Vlanif30]ip add 172.16.30.254 24
[LSW1-Vlanif30]int vlanif 40
[LSW1-Vlanif40]ip add 172.16.40.254 24
[LSW1-Vlanif40]quit
[LSW1]ip route-static 0.0.0.0 0 10.1.1.1
[LSW1]quit
save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Now saving the current configuration to the slot 0.
Save the configuration successfully.

四、配置路由器DHCP Server
The device is running!
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info-center enable
Info: Information center is disabled.
[Huawei]sysname DHCP-Server
[DHCP-Server]int g0/0/0
[DHCP-Server-GigabitEthernet0/0/0]ip address 10.1.1.1 24
[DHCP-Server-GigabitEthernet0/0/0]quit
[DHCP-Server]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[DHCP-Server]ip pool jxskxy-10
Info:It’s successful to create an IP address pool.
[DHCP-Server-ip-pool-jxskxy-10]gateway-list 172.16.10.254
[DHCP-Server-ip-pool-jxskxy-10]network 172.16.10.0 mask 24
[DHCP-Server-ip-pool-jxskxy-10]dns-list 211.141.85.68
[DHCP-Server-ip-pool-jxskxy-10]dns-list 8.8.8.8
[DHCP-Server-ip-pool-jxskxy-10]quit
[DHCP-Server]ip pool jxskxy-20
Info:It’s successful to create an IP address pool.
[DHCP-Server-ip-pool-jxskxy-20]network 172.16.20.0 mask 24
[DHCP-Server-ip-pool-jxskxy-20]gateway-list 172.16.20.254
[DHCP-Server-ip-pool-jxskxy-20]dns-list 211.141.85.68
[DHCP-Server-ip-pool-jxskxy-20]dns-list 8.8.8.8
[DHCP-Server-ip-pool-jxskxy-20]quit
[DHCP-Server]ip pool jxskxy-30
Info:It’s successful to create an IP address pool.
[DHCP-Server-ip-pool-jxskxy-30]network 172.16.30.0 mask 24
[DHCP-Server-ip-pool-jxskxy-30]gateway-list 172.16.30.254
[DHCP-Server-ip-pool-jxskxy-30]dns-list 211.141.85.68
[DHCP-Server-ip-pool-jxskxy-30]dns-list 8.8.8.8
[DHCP-Server-ip-pool-jxskxy-30]quit
[DHCP-Server]ip pool jxskxy-40
Info:It’s successful to create an IP address pool.
[DHCP-Server-ip-pool-jxskxy-40]network 172.16.40.0 mask 24
[DHCP-Server-ip-pool-jxskxy-40]gateway-list 172.16.40.254
[DHCP-Server-ip-pool-jxskxy-40]dns-list 211.141.85.68
[DHCP-Server-ip-pool-jxskxy-40]dns-list 8.8.8.8
[DHCP-Server-ip-pool-jxskxy-40]quit
[DHCP-Server]int g0/0/0
[DHCP-Server-GigabitEthernet0/0/0]dhcp select global
[DHCP-Server-GigabitEthernet0/0/0]quit
[DHCP-Server]ip route-static 0.0.0.0 0 10.1.1.2
[DHCP-Server]quit
save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]
Error: Please choose ‘YES’ or ‘NO’ first before pressing ‘Enter’. [Y/N]:
Error: Please choose ‘YES’ or ‘NO’ first before pressing ‘Enter’. [Y/N]:n
save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Now saving the current configuration to the slot 17.
Save the configuration successfully.

五、配置LSW1中继
The device is running!
sys
Enter system view, return user view with Ctrl+Z.
[LSW1]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[LSW1]int vlanif 10
[LSW1-Vlanif10]dhcp select relay
[LSW1-Vlanif10]dhcp relay server-ip 10.1.1.1
[LSW1-Vlanif10]quit
[LSW1]int vlanif 20
[LSW1-Vlanif20]dhcp select relay
[LSW1-Vlanif20]dhcp relay server-ip 10.1.1.1
[LSW1-Vlanif20]quit
[LSW1]int vlanif 30
[LSW1-Vlanif30]dhcp select relay
[LSW1-Vlanif30]dhcp relay server-ip 10.1.1.1
[LSW1-Vlanif30]quit
[LSW1]int vlanif 40
[LSW1-Vlanif40]dhcp select relay
[LSW1-Vlanif40]dhcp relay server-ip 10.1.1.1
[LSW1-Vlanif40]quit
[LSW1]quit
save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Now saving the current configuration to the slot 0…
Save the configuration successfully.

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
实验完成。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值