Package comparison ip-full & iproute2

I am using OpenWRT version 23.05 on my home router, I have ip-full - 6.3.0-1 installed, confirmed by output of opkg list-installed, though I can not remember that why & when I installed it. Based on below ip command man page, is package ip-full a subset of package**iproute2** ?

root@OpenWrt:~# ip

Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }
            ip [ -force ] -batch filename

where  OBJECT := { address | addrlabel | amt | fou | help | ila | ioam | l2tp |
                   link | macsec | maddress | monitor | mptcp | mroute | mrule |
                   neighbor | neighbour | netconf | netns | nexthop | ntable |
                   ntbl | route | rule | sr | tap | tcpmetrics |
                   token | tunnel | tuntap | vrf | xfrm }

OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |
                       -h[uman-readable] | -iec | -j[son] | -p[retty] |
                       -f[amily] { inet | inet6 | mpls | bridge | link } |
                       -4 | -6 | -M | -B | -0 |
                       -l[oops] { maximum-addr-flush-attempts } | -br[ief] |
                       -o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] |
                       -rc[vbuf] [size] | -n[etns] name | -N[umeric] | -a[ll] |
                       -c[olor]}

root@OpenWrt:~#

BusyBox comes with a stripped down version of iproute2, but if you need full support you need ip-full and maybe even ip-bridge or similar.

2 Likes

thanks for reply, I already have ip-full package installed, but still some commands (such as ip bridge) are not available, hence I would need iproute2 I guess.

Opkg list and filter for bridge.
O think but are not sure but should be called ip-bridge to get the bridge command from iproute2

The ip utility is concerned only with layer 3, bridges are layer 2.
There is no mention of bridge as an option in the man page:
ip(8) - Linux man page

Working with bridges is usually done using brctl.
brctl(8) - Linux manual page

What is it you are trying to achieve?

1 Like

But brctl is an "old" util. Afaik bridge is the modern version.

Edit: ip bridge is new to me :thinking:

2 Likes

True, but on OpenWrt we have the Busybox built in version.

Here we go then :clinking_beer_mugs: :
bridge(8) - Linux manual page

I usually end up having and needing both :clinking_beer_mugs:

1 Like

I used bridge initially but realised I could do the business with brctl so no extra dependency, at least for what I was doing.

I thing it was bridge fdb or similar what I needed sometimes and ended up just adding it to every image :person_shrugging:

I've done some testing.
Interesting for everyone, especially for @yantian:

  • The package bridge actually installs the full version of brctl. Badly named IMO, should be brctl-full to be consistent with other package naming conventions.
  • The package ip-bridge is what actually installs the bridge utility.

As for bridge fdb, you can get the same information from brctl but it involves parsing the output of multiple calls to brctl to get there. ie:

  1. brctl show gives you a list of bridges and their interfaces
  2. brctl showmacs [bridgename] run for each bridge, gives the mac addresses and port numbers. You can get the port numbers from brctl show

Conclusion:
bridge fdb gives you the full list of all macs in one go, but needs the package ip-bridge

brctl can get you to the same information with a bit of scripting but is there already in the form of the Busybox version. No additional dependency needed.

The choice depends upon the use case.

2 Likes

thank you all for reply, I have access to brctl, but bridge command can not be found on my Openwrt router running ver 23.05.3. I was looking for a command (ip bridge in iproute2 suit) to show details about FDB (L2 Forwarding Database).
I guess I need to simply install whatever packages in order to access some specific commands, despite some of those installed packages overlap with each other.
I am done with this query, thanks again.

appreciate your time and efforts for the testing, it is very helpful and informative.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.