华为DHCP中继服务
发表于:2026-11-03 作者:千家信息网编辑
千家信息网最后更新 2026年11月03日,DHCP中继服务dhcp中继:给不同网段主机分配IP;dhcp服务:给同一网段主机分配IP.ensp拓扑图如下:SW1sys[Huawei]sysname SW1[SW1]vlan bat 10 20
千家信息网最后更新 2026年11月03日华为DHCP中继服务
DHCP中继服务
dhcp中继:给不同网段主机分配IP;
dhcp服务:给同一网段主机分配IP.
ensp拓扑图如下:
SW1
sys[Huawei]sysname SW1[SW1]vlan bat 10 20Info: This operation may take a few seconds. Please wait for a moment...done.[SW1]int e0/0/1[SW1-Ethernet0/0/1]port link-type access [SW1-Ethernet0/0/1]port default vlan 10[SW1-Ethernet0/0/1]un sh[SW1-Ethernet0/0/1]int e0/0/2[SW1-Ethernet0/0/2]port link-type access [SW1-Ethernet0/0/2]port default vlan 20[SW1-Ethernet0/0/2]un sh[SW1-Ethernet0/0/2]int e0/0/3[SW1-Ethernet0/0/3]port link-type access [SW1-Ethernet0/0/3]port default vlan 10[SW1-Ethernet0/0/3]un sh[SW1-Ethernet0/0/3]int e0/0/4[SW1-Ethernet0/0/4]port link-type access[SW1-Ethernet0/0/4]port default vlan 20[SW1-Ethernet0/0/4]un sh[SW1-Ethernet0/0/4]dis vlanThe total number of vlans is : 3--------------------------------------------------------------------------------U: Up; D: Down; TG: Tagged; UT: Untagged;MP: Vlan-mapping; ST: Vlan-stacking;#: ProtocolTransparent-vlan; *: Management-vlan;--------------------------------------------------------------------------------VID Type Ports --------------------------------------------------------------------------------1 common UT:Eth0/0/5(D) Eth0/0/6(D) Eth0/0/7(D) Eth0/0/8(D) Eth0/0/9(D) Eth0/0/10(D) Eth0/0/11(D) Eth0/0/12(D) Eth0/0/13(D) Eth0/0/14(D) Eth0/0/15(D) Eth0/0/16(D) Eth0/0/17(D) Eth0/0/18(D) Eth0/0/19(D) Eth0/0/20(D) Eth0/0/21(D) Eth0/0/22(D) GE0/0/1(U) GE0/0/2(D) 10 common UT:Eth0/0/1(U) Eth0/0/3(U) 20 common UT:Eth0/0/2(U) Eth0/0/4(U) VID Status Property MAC-LRN Statistics Description --------------------------------------------------------------------------------1 enable default enable disable VLAN 0001 10 enable default enable disable VLAN 0010 20 enable default enable disable VLAN 0020 [SW1-Ethernet0/0/4]int g0/0/1[SW1-GigabitEthernet0/0/1] port link-type trunk [SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan all[SW1-GigabitEthernet0/0/1]un sh R1
[R1]int g0/0/1.10[R1-GigabitEthernet0/0/1.10]dot1q termination vid 10[R1-GigabitEthernet0/0/1.10]ip add 192.168.10.1 24[R1-GigabitEthernet0/0/1.10]arp broadcast enable [R1-GigabitEthernet0/0/1.10]dhcp select relay [R1-GigabitEthernet0/0/1.10]dhcp relay server-ip 14.0.0.2[R1-GigabitEthernet0/0/1.10]int g0/0/1.20[R1-GigabitEthernet0/0/1.20]dot1q termination vid 20[R1-GigabitEthernet0/0/1.20]ip add 192.168.20.1 24[R1-GigabitEthernet0/0/1.20]arp broadcast enable [R1-GigabitEthernet0/0/1.20]dhcp select relay [R1-GigabitEthernet0/0/1.20]dhcp relay server-ip 14.0.0.2[R1-GigabitEthernet0/0/1.20]q[R1]int g0/0/2[R1-GigabitEthernet0/0/2]ip add 14.0.0.1 24[R1-GigabitEthernet0/0/2]un sh[R1-GigabitEthernet0/0/2]int g0/0/0[R1-GigabitEthernet0/0/0]ip add 12.0.0.1 24[R1-GigabitEthernet0/0/0]un sh[R1-GigabitEthernet0/0/0]dis ip int b*down: administratively down!down: FIB overload down^down: standby(l): loopback(s): spoofing(d): Dampening SuppressedThe number of interface that is UP in Physical is 6The number of interface that is DOWN in Physical is 7The number of interface that is UP in Protocol is 5The number of interface that is DOWN in Protocol is 8Interface IP Address/Mask Physical Protocol Ethernet0/0/0 unassigned down down Ethernet0/0/1 unassigned down down GigabitEthernet0/0/0 12.0.0.1/24 up up GigabitEthernet0/0/1 unassigned up down GigabitEthernet0/0/1.10 192.168.10.1/24 up up GigabitEthernet0/0/1.20 192.168.20.1/24 up up GigabitEthernet0/0/2 14.0.0.1/24 up up GigabitEthernet0/0/3 unassigned down down NULL0 unassigned up up(s) [R1]ip route-static 15.0.0.0 24 12.0.0.2R2
sys[Huawei]sysname R2[R2]int g0/0/0[R2-GigabitEthernet0/0/0]ip add 12.0.0.2 24[R2-GigabitEthernet0/0/0]un sh[R2-GigabitEthernet0/0/0]q[R2]dhcp enable [R2]int g0/0/1[R2-GigabitEthernet0/0/1]ip add 15.0.0.1 24[R2-GigabitEthernet0/0/1]dhcp select relay [R2-GigabitEthernet0/0/1]dhcp relay server-ip 14.0.0.2[R2-GigabitEthernet0/0/1]un sh[R2-GigabitEthernet0/0/1]q [R2]ip route-static 0.0.0.0 0.0.0.0 12.0.0.1[R2]dis ip int b*down: administratively down!down: FIB overload down^down: standby(l): loopback(s): spoofing(d): Dampening SuppressedThe number of interface that is UP in Physical is 3The number of interface that is DOWN in Physical is 8The number of interface that is UP in Protocol is 3The number of interface that is DOWN in Protocol is 8Interface IP Address/Mask Physical Protocol Ethernet0/0/0 unassigned down down Ethernet0/0/1 unassigned down down GigabitEthernet0/0/0 12.0.0.2/24 up up GigabitEthernet0/0/1 15.0.0.1/24 up up GigabitEthernet0/0/2 unassigned down down GigabitEthernet0/0/3 unassigned down down NULL0 unassigned up up(s) R4
sys[Huawei]sysname R4[R4]int g0/0/0[R4-GigabitEthernet0/0/0]ip add 14.0.0.2 24[R4-GigabitEthernet0/0/0]q[R4]dhcp enable[R4]int g0/0/0[R4-GigabitEthernet0/0/0]dhcp select global [R4-GigabitEthernet0/0/0]un sh[R4-GigabitEthernet0/0/0]dis this#interface GigabitEthernet0/0/0 ip address 14.0.0.2 255.255.255.0 dhcp select global#return[R4-GigabitEthernet0/0/0]dis ip int b*down: administratively down!down: FIB overload down^down: standby(l): loopback(s): spoofing(d): Dampening SuppressedThe number of interface that is UP in Physical is 2The number of interface that is DOWN in Physical is 9The number of interface that is UP in Protocol is 2The number of interface that is DOWN in Protocol is 9Interface IP Address/Mask Physical Protocol Ethernet0/0/0 unassigned down down Ethernet0/0/1 unassigned down down GigabitEthernet0/0/0 14.0.0.2/24 up up GigabitEthernet0/0/1 unassigned down down GigabitEthernet0/0/2 unassigned down down GigabitEthernet0/0/3 unassigned down down NULL0 unassigned up up(s) [R4-GigabitEthernet0/0/0]q[R4]ip pool DHCPV10[R4-ip-pool-DHCPV10]network 192.168.10.0 mask 24 [R4-ip-pool-DHCPV10]gateway-list 192.168.10.1[R4-ip-pool-DHCPV10]dns-list 8.8.8.8 2.2.2.2[R4-ip-pool-DHCPV10]q[R4]ip pool DHCPV20[R4-ip-pool-DHCPV20]network 192.168.20.0 mask 24[R4-ip-pool-DHCPV20]gateway-list 192.168.20.1[R4-ip-pool-DHCPV20]dns-list 8.8.8.8 2.2.2.2[R4-ip-pool-DHCPV20]q[R4]ip route-static 0.0.0.0 0.0.0.0 14.0.0.1 PC机获取IP地址
PC1:PC>ipconfig /releaseIP ConfigurationLink local IPv6 address...........: fe80::5689:98ff:fea1:3b9eIPv6 address......................: :: / 128IPv6 gateway......................: ::IPv4 address......................: 0.0.0.0Subnet mask.......................: 0.0.0.0Gateway...........................: 0.0.0.0Physical address..................: 54-89-98-A1-3B-9EDNS server........................:PC>ipconfig /renewIP ConfigurationLink local IPv6 address...........: fe80::5689:98ff:fea1:3b9eIPv6 address......................: :: / 128IPv6 gateway......................: ::IPv4 address......................: 192.168.10.254Subnet mask.......................: 255.255.255.0Gateway...........................: 192.168.10.1Physical address..................: 54-89-98-A1-3B-9EDNS server........................: 8.8.8.8 2.2.2.2PC2:PC>ipconfig /releaseIP ConfigurationLink local IPv6 address...........: fe80::5689:98ff:feb4:ce3IPv6 address......................: :: / 128IPv6 gateway......................: ::IPv4 address......................: 0.0.0.0Subnet mask.......................: 0.0.0.0Gateway...........................: 0.0.0.0Physical address..................: 54-89-98-B4-0C-E3DNS server........................:PC>ipconfig /renewIP ConfigurationLink local IPv6 address...........: fe80::5689:98ff:feb4:ce3IPv6 address......................: :: / 128IPv6 gateway......................: ::IPv4 address......................: 192.168.20.254Subnet mask.......................: 255.255.255.0Gateway...........................: 192.168.20.1Physical address..................: 54-89-98-B4-0C-E3DNS server........................: 8.8.8.8 2.2.2.2PC3:PC>ipconfig /releaseIP ConfigurationLink local IPv6 address...........: fe80::5689:98ff:feff:10f2IPv6 address......................: :: / 128IPv6 gateway......................: ::IPv4 address......................: 0.0.0.0Subnet mask.......................: 0.0.0.0Gateway...........................: 0.0.0.0Physical address..................: 54-89-98-FF-10-F2DNS server........................:PC>ipconfig /renewIP ConfigurationLink local IPv6 address...........: fe80::5689:98ff:feff:10f2IPv6 address......................: :: / 128IPv6 gateway......................: ::IPv4 address......................: 192.168.10.253Subnet mask.......................: 255.255.255.0Gateway...........................: 192.168.10.1Physical address..................: 54-89-98-FF-10-F2DNS server........................: 8.8.8.8 2.2.2.2PC4:PC>ipconfig /releaseIP ConfigurationLink local IPv6 address...........: fe80::5689:98ff:fea9:2cf2IPv6 address......................: :: / 128IPv6 gateway......................: ::IPv4 address......................: 0.0.0.0Subnet mask.......................: 0.0.0.0Gateway...........................: 0.0.0.0Physical address..................: 54-89-98-A9-2C-F2DNS server........................:PC>ipconfig /renewIP ConfigurationLink local IPv6 address...........: fe80::5689:98ff:fea9:2cf2IPv6 address......................: :: / 128IPv6 gateway......................: ::IPv4 address......................: 192.168.20.253Subnet mask.......................: 255.255.255.0Gateway...........................: 192.168.20.1Physical address..................: 54-89-98-A9-2C-F2DNS server........................: 8.8.8.8 2.2.2.2PC5:PC>ipconfig /releaseIP ConfigurationLink local IPv6 address...........: fe80::5689:98ff:feed:3b15IPv6 address......................: :: / 128IPv6 gateway......................: ::IPv4 address......................: 0.0.0.0Subnet mask.......................: 0.0.0.0Gateway...........................: 0.0.0.0Physical address..................: 54-89-98-ED-3B-15DNS server........................:PC>ipconfig /renewIP ConfigurationLink local IPv6 address...........: fe80::5689:98ff:feed:3b15IPv6 address......................: :: / 128IPv6 gateway......................: ::IPv4 address......................: 15.0.0.254Subnet mask.......................: 255.255.255.0Gateway...........................: 15.0.0.1Physical address..................: 54-89-98-ED-3B-15DNS server........................: 2.2.2.2 8.8.8.8多台主机能实现全网互通!!
主机
中继
服务
网段
分配
不同
全网
地址
多台
拓扑
拓扑图
华为
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
云之行互联网科技
湖南永感互联网科技有限公司
互联网科技工作委员会副主任毛军
互联网是不是新科技
互联网科技未来
互联网金融 科技金融
鑫亿盛互联网科技
广州互联网络科技有限公司
互联网科技网站
互联网 新科技
安控科技rtu产品工业互联网
常德市电业局互联网科技部
新兴科技互联网创新大赛颁奖典礼
辽宁互联网新科技
互联网保险科技创业
四川慕妮娅互联网科技有限公司
恒生互联网科技业指数调整周期
山东有哪些互联网科技公司
南京一网一红互联网科技有限公司
互联网科技大佬云集
湖南永感互联网科技有限公司
互联网科技公司有哪些
海南科技产业互联网平台
成都互联网科技公司100强
湖南诚度互联网科技有限公司
天津腾达互联网科技有限公司
2021互联网科技公司排名
互联网风格科技公司名称
珠海东科互联网科技有限公司
互联网科技平台产品运营