Opened 5 years ago

Closed 3 years ago

Last modified 3 years ago

#2590 closed (toovague)

/usr/sbin/ip does not work

Reported by: bdrewery Owned by:
Keywords: ip addr Cc:


3.3.8-svn19342 - std

root@DD-WRT:/usr/sbin# ip root@DD-WRT:/usr/sbin# ip r l root@DD-WRT:/usr/sbin# ip a l root@DD-WRT:/usr/sbin# ls -al /usr/sbin/ip -rwxr-xr-x 1 root root 70933 Jun 8 04:45 /usr/sbin/ip

I don't see CONFIG_IP set in src/router/busybox/.config_std

It looks like r18776 and r18777 removed this from busybox, but did not enable for the std image.

I think this is causing #2565 as well.

Change History (19)

comment:1 Changed 5 years ago by bdrewery

Duplicate of #2444 and #2448

This is unfortunate as it breaks example scripts that use ip(1) for listing configuration. For example,

This is just 1 example.

comment:2 Changed 5 years ago by vasek00

Cсылка on an example, can't help with use of this IP version of the version. Use of variables for the result analysis through scripts as doesn't give result. Except for one command IP RO ADD... and to check result of this command it is possible through the route command, but the same route can be entered and through the route command.

Sadly for this built-in microprogram support which deprives of it additional possibilities for use.

comment:3 Changed 4 years ago by osmosis

This continues to be an issue in BS build r20453.

Thread confirming is here:

Last edited 4 years ago by osmosis (previous) (diff)

comment:4 Changed 4 years ago by BrainSlayer

Resolution: invalid
Status: newclosed

can be closed. ip does not return any usefull information on errors. this is a wanted behaviour. i removed that code to keep the ip command binary small. this is required to support alot of devices due flash size limitation

comment:5 Changed 4 years ago by BrainSlayer

by the way. ip is not from busybox. its a standalone command here

comment:6 Changed 4 years ago by osmosis

Removing error info is all well and fine, but it's not returning anything on known working commands where it would before. This breaks all the IPv6 scripts as mentioned above.

I noticed this first with the IPv6 6to4 startup script:

insmod /lib/modules/uname -r/ipv6.o sleep 5 radvd -C /tmp/radvd.conf start sleep 5 WANIP=$(ip -4 addr show dev vlan2 | grep 'inet ' | awk '{print $2}' | cut -d/ -f1) if [ -n "$WANIP" ] then V6PREFIX=$(printf '2002:%02x%02x:%02x%02x' $(echo $WANIP | tr . ' ')) ip tunnel add tun6to4 mode sit ttl 255 remote any local $WANIP ip link set tun6to4 mtu 1280 ip link set tun6to4 up ip addr add $V6PREFIX:0::1/16 dev tun6to4 ip addr add $V6PREFIX:1::1/64 dev br0 ip -6 route add 2000::/3 via :: dev tun6to4 kill -HUP $(cat /var/run/ fi radvd -C /tmp/radvd.conf start

So one (or all) of ip -4 addr show, ip tunnel add, ip link set, ip addr add, ip -6 route add is not working where it was fine before.

Last edited 4 years ago by osmosis (previous) (diff)

comment:7 Changed 4 years ago by osmosis

Keywords: ip addr added; iproute2 removed
Resolution: invalid
Status: closedreopened

comment:8 Changed 4 years ago by Sash

Resolution: invalid
Status: reopenedclosed

discuss you problem in the forum 1st

and upgrade

comment:9 Changed 4 years ago by osmosis

I hate to reopen when you guys have closed but seriously Sash, what are you talking about? Did you even read my comments? I'm running r20453 and this has been broken since r18777. If I hadn't upgraded I wouldn't have noticed it was broken in the first place, and I brought it up in the forums in the r20119 thread as well.

Last edited 4 years ago by osmosis (previous) (diff)

comment:10 Changed 4 years ago by osmosis

Resolution: invalid
Status: closedreopened

comment:11 Changed 4 years ago by osmosis

ip -4 addr show dev eth1

still gives no output in r20548

comment:12 Changed 4 years ago by osmosis

Resolution: wontfix
Status: reopenedclosed

only ip addr show doesn't work; this can be worked around using ifconfig.

Last edited 4 years ago by osmosis (previous) (diff)

comment:13 Changed 4 years ago by osmosis

The following line can be changed in the IPv6 scripts, fixing them:

WANIP=$(ip -4 addr show dev vlan2 | grep 'inet ' | awk '{print $2}' | cut -d/ -f1)


WANIP="$(ifconfig vlan2 | sed -n '/inet /{s/.*addr://;s/ .*;p}')"

comment:14 Changed 4 years ago by Sash

corrected in the wiki...which was your task...not mine

comment:15 Changed 4 years ago by osmosis

ip addr show is still broken, regardless of whether there's a workaround for the affected scripts. Your task was looking into that but instead all you've done is be dismissive and arrogant. Thanks for updating it, regardless.

Last edited 4 years ago by osmosis (previous) (diff)

comment:16 Changed 3 years ago by Eric Renfro

Resolution: wontfix
Status: closedreopened

Removing functionality from ip is the wrong solution. Removing ifconfig itself would be a better solution than removing iproute2 functionality to be blunt.

ifconfig itself is a tool that's been deprecated for over 10 years now. iproute2 has long since replaced it because it does many things even ifconfig can't do, like proper IP aliases. ifconfig works with ethX:A, ip works with actual secondary IP's which ifconfig won't even show you.

I've stopped using DD-WRT primarily because of this insistence to break things so crucial. By removing iproute2 functionality, you've effectively broken so many things on so many levels, it's not even funny. Even fwbuilder, which allows one to setup very detailed firewall rules and multiple IP addresses which the fwbuilder script even detects and handles initializing IP's not yet active... Because it /depends/ on iproute2 functionality.

Please fix this. I'd recommend if you're trying to save space on smaller devices, remove ifconfig. But for standard, keep all of iproute2 functional as it's intended, don't remove it and call it done.

comment:17 Changed 3 years ago by BrainSlayer

Resolution: toovague
Status: reopenedclosed

its not removed. ip works as it should. but you should not expect any console output response. this could be different if router would have more flash memory. but they wont. so everything must even fit into the smallest devices

comment:18 Changed 3 years ago by BrainSlayer

so to conclude. iproute2 is included, it works. but it has almost no console output

comment:19 Changed 3 years ago by BrainSlayer

and we dont use busybox ip. its useless and missing features. dd-wrt does use iproute2 package ip utility. so you're seekin on the wrong location for it

Note: See TracTickets for help on using tickets.