根据前面两节,我们已经对华为3COM路由器DHCP Server配置和华为3COM路由器DHCP Relay配置的步骤有所掌握了,这里我们就再说一下***一部分:华为3COM路由器DHCP Client配置,具体步骤和内容如下:
华为3COM路由器DHCP Client配置1。 需求
路由器作为DHCP Client,获取接口的动态IP地址。
主要用在使用路由器的以太网接口通过LAN方式接入公网的组网。
华为3COM路由器DHCP Client配置2。 组网图
华为3COM路由器DHCP Client配置3。 配置脚本
- RouterA配置脚本
- #
- sysname RouterA
- #
- radius scheme system
- #
- domain system
- #
- interface Ethernet1/0/0
- ip address dhcp-alloc /配置DHCP方式获取地址/
- #
- interface Ethernet1/0/1
- ip address 192.168.0.1 255.255.255.0
- #
- interface NULL0
- #
- ip route-static 0.0.0.0 0.0.0.0 202.101.68.1 preference 60
- /指定默认出口路由/
- #
- user-interface con 0
- user-interface vty 0 4
- #
- return
华为3COM路由器DHCP Client配置4。 验证
通过disp int 可以查看接口获取的IP地址
- [Quidway]disp int e 1/0/0
- Ethernet1/0/0 current state :UP
- Line protocol current state :UP
- Description : Ethernet1/0/0 Interface
- The Maximum Transmit Unit is 1500, Hold timer is 10(sec)
- Internet Address is 202.101.xx.4/24, acquired via DHCP
- IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc45-2ca7
- Media type is twisted pair, loopback not set, promiscuous mode not set
- 100Mb/s, Full-duplex, link type is autonegotiation
- Output flow-control is disabled, input flow-control is disabled
- Output queue : (Urgent queue : Size/Length/Discards) 0/50/0
- Output queue : (Protocol queue : Size/Length/Discards) 0/500/0
- Output queue : (FIFO queuing : Size/Length/Discards) 0/75/0
- Last 300 seconds input rate 0.00 bytes/sec, 0.00 packets/sec
- Last 300 seconds output rate 0.00 bytes/sec, 0.00 packets/sec
- Input: 406 packets, 57174 bytes, 406 buffers
- 218 broadcasts, 0 multicasts, 0 pauses
- 0 errors, 0 runts, 0 giants
- 0 crc, 0 align errors, 0 overruns
- 0 dribbles, 0 drops, 0 no buffers
- Output:268 packets, 37113 bytes, 269 buffers
- 86 broadcasts, 19 multicasts, 0 pauses
- 0 errors, 0 underruns, 0 collisions
- 0 deferred, 0 lost carriers
华为3COM路由器DHCP Client配置5。 提示
1、 为了实现上网功能必须指定默认路由器。该网关的地址可以通过debugDHCPclient packet获得。将设备的默认路由指向该网关就可以了。该默认网关一般都是固定不变的,不会随地址的获取和释放而变化。
2、 该配置经常需要和NAT配置结合起来,实现内网用户上网功能。