[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /etc/network/interfaces & point-to-point ethernet & broadcast address



On Tue, Feb 11, 2003 at 03:43:58PM +1100, Jamie Wilkinson wrote:
> willow% ip addr eth0
> Command "eth0" is unknown, try "ip address help".

The command you want is:

ip addr show dev eth0

Simple!

(don't ask me how long it took to work out)

> willow% ip addr help 
> Usage: ip addr {add|del} IFADDR dev STRING
>        ip addr {show|flush} [ dev STRING ] [ scope SCOPE-ID ]
>                             [ to PREFIX ] [ FLAG-LIST ] [ label PATTERN ]
> IFADDR := PREFIX | ADDR peer PREFIX
>           [ broadcast ADDR ] [ anycast ADDR ]
>           [ label STRING ] [ scope SCOPE-ID ]
> SCOPE-ID := [ host | link | global | NUMBER ]
> FLAG-LIST := [ FLAG-LIST ] FLAG
> FLAG  := [ permanent | dynamic | secondary | primary |
>            tentative | deprecated ]
> willow% zippy
> HOLY CRAP!! ip HAS HELP BUILT IN and the SYNTAX looks ALMOST LIKE that of
> ifconfig AND route!  SHEESH!
> willow%

Almost the same, not quite.

The major difference in this screen is that ifconfig has no way of
adding or deleting IP addresses from an interface.

In route there are some other small differences, eg. ip route does not
require/support a -net parameter, instead it tells automatically based
of the address supplied.

Similarly, "gw" has been renamed "via", and there is a "src" option to
give the preferred IP address for outgoing connections.

Also the help screen is more detailed, but "harder" to read, IMHO.
Especially for the "ip route" command.

ip route doesn't not support duplicate routes to exactly the same
destination and metric values, but route does (eg. multiple routes
to "default").

To delete a route, you just need to supply the x.x.x.x/y of the route, I
think with route you need to supply more details of the route (but I am
not positive on that).
--
Brian May <bam@debian.org>



Reply to: