ifdown
David Henderson
dhenderson at digital-pipe.com
Fri Jun 17 19:52:29 UTC 2011
On 06/17/2011 01:29 PM, Christopher Barry wrote:
> On Fri, 2011-06-17 at 11:54 -0400, David Henderson wrote:
>> On 06/17/2011 10:36 AM, Christopher Barry wrote:
>>> On Fri, 2011-06-17 at 10:17 -0400, David Henderson wrote:
>>>> On 06/16/2011 01:25 PM, David Henderson wrote:
>>>>> Hello everyone! I'm working some more with the 'if*' commands and
>>>>> come across an issue and wanted to ask about it here. I have a script
>>>>> that calls 'ifdown' for an adapter like: ifdown -f lan01&& echo
>>>>> success || echo failure. I noticed that it wasn't executing correctly
>>>>> so I performed the step manually from the command line like:
>>>>>
>>>>> # ifdown lan01&& echo success || echo failure
>>>>> ifdown: interface lan01 not configured
>>>>> success
>>>>> # ifconfig
>>>>> lan01 Link encap:Ethernet HWaddr 00:27:0E:17:99:35
>>>>> inet addr:192.168.0.198 Bcast:192.168.0.255
>>>>> Mask:255.255.255.0
>>>>> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
>>>>> RX packets:340 errors:0 dropped:0 overruns:0 frame:0
>>>>> TX packets:109 errors:0 dropped:0 overruns:0 carrier:0
>>>>> collisions:0 txqueuelen:100
>>>>> RX bytes:34257 (33.4 KiB) TX bytes:15911 (15.5 KiB)
>>>>> Memory:d0d00000-d0d20000
>>>>>
>>>>> lo Link encap:Local Loopback
>>>>> inet addr:127.0.0.1 Mask:255.0.0.0
>>>>> UP LOOPBACK RUNNING MTU:16436 Metric:1
>>>>> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>>>>> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>>>>> collisions:0 txqueuelen:0
>>>>> RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
>>>>>
>>>>> I see two issues right off the top. First, as you can see, the lan01
>>>>> interface does exist but isn't seen by 'ifdown', and second, it's exit
>>>>> status doesn't appear to be correct as it should have shown 'failure'
>>>>> instead of 'success'. Currently I'm working around the issue by
>>>>> calling 'ifconfig lan01 down' which does work correctly. Any ideas as
>>>>> to what's going on here? These are all busybox applets, btw.
>>>>>
>>>>> Thanks,
>>>>> Dave
>>>> bump for help
>>>>
>>> what happens if you temporarily rename the interface to a more standard
>>> name, like eth0 (use nameif to do this), and see if it's the name lan01
>>> causing you problems. That would help nail it down.
>>>
>>> -C
>>>
>> I don't recall any issues when using the eth0 naming scheme, but unless
>> the network adapter isn't being renamed somewhere by the ifrename binary
>> (or there's a bug in busyboxes ifdown), then I can't understand why just
>> naming the adapter lan01 would be the cause of the problem. That's not
>> a special name used in anything that I'm aware of. :) Also, it further
>> complicates the situation because ifconfig doesn't have any issues bring
>> down the interface, just ifdown. Any other thoughts?
>>
>> Dave
> My thinking was that it may be a name parsing error in ifdown. If it
> behaves correctly while named eth0, then that would help to isolate the
> problem. Also, what type of interface is named lan01 by default?
>
> Good Luck,
> -C
>
>
Thanks for the continued help Christopher. By default the interface
comes up as eth0, but for several reasons, the adapter was renamed using
lan## as the static naming convention. Does it look like we have
isolated it to an ifdown binary issue at this point? I can't think it
could be anything else as all other software seems to work fine (e.g.
ifup, ifconfig, ifrename, etc).
Dave
More information about the busybox
mailing list