On Thu, 2007-05-03 at 10:06 -0600, Charles Curley wrote:
> On Thu, May 03, 2007 at 09:13:33AM -0600, Nicholas Leippe wrote:
>
> > Might I suggest in all of this that you begin to learn the new tools?
> > emerge iproute2 and use the 'ip' command. ifconfig is deprecated and has
> > not
> > supported all of the features of the Linux networking stack since the 2.4
> > kernels. It's embarrassing IMO that most distros still ship with ifconfig
> > as
> > the default.
>
> I'd have learned about it had I known about it. ip must be one of the
> better kept secrets of Linux. Thanks for bringing it to my attention.
>
> The man page is a bit obtuse; can you recommend a write-up more
> oriented to those who are new to the program?
Here are the commands I commonly use:
# add an IP address to eth0
ip addr add 192.168.0.1/24 dev eth0
# delete an IP address from eth1
ip addr del 10.0.0.1/8 dev eth0
# bring up the interface
ip link set dev eth0 up
# show the IPs on eth0
ip addr
# add a route
ip route add 192.168.1.0/24 via 192.168.0.2
# view the ARP table
ip neigh
# clear the ARP table
ip neigh flush dev eth0
# nuke all IP addresses on eth0
ip addr flush dev eth0
Corey
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/