码迷,mamicode.com
首页 > 其他好文 > 详细

busybox filesystem ifup

时间:2016-01-24 10:18:26      阅读:135      评论:0      收藏:0      [点我收藏+]

标签:

/********************************************************************
 *                   busybox filesystem ifup
 * 声明:
 *     本文主要是记录busybox文件系统中ifup使用报错的解决方式。
 *
 *                                 2016-1-24 深圳 南山平山村 曾剑锋
 *******************************************************************/

一、错误处理1:
    1. 现象:
        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:00, irq=-1)
        Sending discover...
        Sending discover...
        Sending discover...
        No lease, forking to background
        [zengjf@root ~]# ifup -a
        ifup: cant open /etc/network/interfaces: No such file or directory
    2. 解决办法:
        cat /etc/network/interfaces
            # Loopback interface.
            auto lo
            iface lo inet loopback
            
            # dhcp
            auto eth0
            iface eth0 inet dhcp
            
            # fixed
            auto eth1
            iface eth1 inet static
                    address 192.168.1.254
                    netmask 255.255.255.0
                    broadcast 192.168.1.255

二、错误处理2:
    1. 现象:
        [zengjf@root network]# ifup -a
        run-parts: /etc/network/if-pre-up.d: No such file or directory
        run-parts: /etc/network/if-up.d: No such file or directory
        ifup: cant open /var/run/ifstate: No such file or directory
        [zengjf@root network]# 
    2. 解决方法:
        cd /etc/network
        mkdir if-down.d  if-post-down.d  if-pre-up.d  if-up.d
        mkdir /var/run

三、错误处理3:
    1. 现象:
        [zengjf@root ]# ifup -a
        ip: RTNETLINK answers: File exists
        udhcpc (v1.24.1) started
        Setting IP address 0.0.0.0 on eth0
        Sending discover...
        Sending discover...
        Sending discover...
        No lease, failing
        ip: cant find device eth1        ip: SIOCGIFFLAGS: No such device
        [zengjf@root ]#
    2. 解决办法:
        cat /etc/network/interfaces
            # Loopback interface.
            auto lo
            iface lo inet loopback
            
            # dhcp
            auto eth0
            iface eth0 inet dhcp
            
            # fixed
            #auto eth1
            #iface eth1 inet static
            #        address 192.168.1.254
            #        netmask 255.255.255.0
            #        broadcast 192.168.1.255

 

busybox filesystem ifup

标签:

原文地址:http://www.cnblogs.com/zengjfgit/p/5154714.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!