us network and Uuntu 8.10 - is there a better way?

Joel Newkirk freerunner at
Fri Dec 26 19:55:11 CET 2008

On Fri, 26 Dec 2008 16:47:46 +0100, "Torfinn Ingolfsen" <tingox at>

> Thanks!
> It seems that it still works by using the ifdown / ifup scripts.
> annoying that good old ifconfig doesn't work anymore, but I can live
> with that.
>> PS And consider using "ip addr" and friends instead of venerable
>> "ifconfig". "ip" command is newer way of operating network
>> interfaces.
> Hmm, I found that one. What's up with that? Whay are they changing the
> established way of doing things?
> AFAICT, the ip command is a Linuxism.
> Not everything is better just because it is new.

It's not exactly new, "ip" has been around since kernel 2.2. (ten years?
Early 1999 IIRC)  "ip" together with "tc" (Traffic Control) comprise
iproute2 and expose a vast array of networking options within the kernel,
including basic networking setup but also various advanced routing
scenarios like tunnels, multiroute setups, route failovers, bandwidth
management, etc.  Basically use iptables/ip6tables/arptables/ebtables for
firewall, tc for bandwidth management, ip for everything else networking.

If you're interested in what it offers beyond basic network controls take a
look at - Linux Advanced Routing & Traffic Control.  They have
the manpages and primary documentation as well as extensive tutorials and
howtos, cookbook for things like a gateway router load-balancing multiple
uplinks (IE dual T1), 'wondershaper' bandwidth management script, etc.

As far as the basics, "ip route add default via dev eth0
metric 20", "ip link set eth0 down" (=="ifconfig eth0 down"), "ip address
add dev usb0" are some examples of common tasks.  Almost
all keywords can be abbreviated, leading to "ip l s eth0 up" and "ip a a dev usb0" for example, and other portions can be omitted
sometimes, like "ip r a default via" which will determine the
interface needed for the given gateway and use default metric. (more
advanced, "ip tunnel add netb mode gre remote local ttl 2" would try to create a GRE tunnel to named

When you use "ip a a dev usb0" to set that IP and subnet
on device usb0 it also implicitly performs "ip route add
dev usb0 src table 254" (254="main")

On the informative rather than configuration side of things, "ip a" shows
all interfaces with their statuses and their addresses/subnets (ipv4, ipv6
and MAC), "ip r" shows main routing table (short for "ip route show table
main", "ip r s t local" shows the "local" routing table, etc - uses numbers
for tables, or names if they're defined in /etc/iproute2/rt_tables), "ip n"
shows neighbor table with IP, MAC, interface and status, "ip ru" shows
routing rules ("ip rules show"), which specify which routing table to use
for various conditions.


PS - be aware that the "ip" functions in busybox are a small subset of the
full command's capabilities - everything is still there in the kernel, but
busybox doesn't expose much of it.

Joel Newkirk      (blog) (FR stuff)

More information about the community mailing list