網管須知:華為3COM路由器DHCP Client配置
根據前面兩節,我們已經對華為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配置結合起來,實現內網用戶上網功能。