zoukankan      html  css  js  c++  java
  • busybox filesystem udhcpc 原理

    /********************************************************************
     *               busybox filesystem udhcpc 原理
     * 声明:
     *     本文主要是记录busybox中的如何运用udhcpc获取IP,参考文章里写的
     * 很详细,不再累赘。
     *
     *                                 2016-1-23 深圳 南山平山村 曾剑锋
     *******************************************************************/
    
    一、参考文章:
        BusyBox 應用 – udhcpc
            http://felix-lin.com/linux/busybox-%E6%87%89%E7%94%A8-udhcpc/
    
    二、应用:
        1. 拷贝udhcpc脚本:
            cp busybox-1.24.1/examples/udhcp/simple.script <filesystem root>/usr/share/udhcpc/default.script
        2. 运行:
            udhcpc -b -S -p /var/run/udhcpc.pid
    
    三、效果如下:
        udevd version 126 started
        zengjf login: root
        login[1423]: root login on 'ttymxc0'
        udhcpc (v1.24.1) started
        Setting IP address 0.0.0.0 on eth0
        eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=1:01, irq=-1)
        Sending discover...
        Unable to load library icui18n "Cannot load library icui18n: (icui18n: cannot open shared object file: No such file or directory)" 
        zengjf check QWSDisplay::requestRegion directServerConnection position.
        
        PHY: 1:01 - Link is Up - 100/Full
        Sending discover...
        Sending select for 10.0.1.52...
        Lease of 10.0.1.52 obtained, lease time 7200
        Setting IP address 10.0.1.52 on eth0
        Deleting routers
        route: SIOCDELRT: No such process
        Adding router 10.0.1.254
        Recreating /etc/resolv.conf
         Adding DNS server 8.8.8.8
         Adding DNS server 202.96.128.166
        [zengjf@root ~]# 
  • 相关阅读:
    django_4数据库3——admin
    django_4数据库2——表外键
    django_4:数据库1——django操作数据库
    django_4:数据库0——配置数据库
    django_3:url配置
    django_2:模板
    Python3安装mysql模块
    django_1:配置文件
    python:正则1
    POJChallengeRound2 Tree 【数学期望】
  • 原文地址:https://www.cnblogs.com/zengjfgit/p/5153758.html
Copyright © 2011-2022 走看看