備註:
核心版本:2.6.30.9
busybox版本:1.15.2
pc linux和開發板linux的工作使用者:root
1. 配置核心:
[*] networking support --->
networking options --->
<*> packet socket
<*> unix domain sockets
[*] tcp/ip networking
[*] ip: kernel level autoconfiguration
[*] ip: dhcp support
[*] network packet filtering framework (netfilter) --->
2. 配置busybox:
networking utilities --->
[*] udhcp client (udhcpc)
3.建立配置檔案:
從busybox的examples/udhcp/下copy ******.script檔案到開發板/usr/share/udhcpc/下,並重命名為default.script
4. 測試:
在命令臺執行udhcpc,注意:必須確保區域網內存在dhcp伺服器,否則udhcp執行失敗。
在easy2440上面執行結果如下:
udhcpc (v1.15.2) started
setting ip address 0.0.0.0 on eth0
sending discover...
sending select for 192.168.1.101...
lease of 192.168.1.101 obtained, lease time 7200
setting ip address 192.168.1.101 on eth0
deleting routers
route: siocdelrt: no such process
adding router 192.168.1.1
recreating /etc/resolv.conf
adding dns server 211.148.192.141
adding dns server 210.21.196.6
6. enjoy it!
DHCP 和 DHCP防護 配置
目的 通過配置開啟dhcp自動分配ip 在路由器上配置位址池 開啟 dhcp 服務 router config service dhcp router config ip dhcp pool vlan10 建立乙個名為 vlan10 的位址池 router dhcpconfig default ro...
DHCP配置實驗
r1 router enable router configure terminal router config no ip domain lookup router config line console 0 router config line exec timeout 0 0 router c...
dhcp簡單配置
dhcp使用的客戶端伺服器模型,dhcp伺服器為客戶端分配ip位址。我在電腦上裝了兩台centos7虛擬機器,一台是dhcp伺服器,一台低配作為客戶端.子網位址172.16.60.0 掩碼255.255.255.0 hcp動態分配位址172.16.60.10 172.16.60.200 使用指令修改...