Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 19 Nov 2017, 17:53
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Misc
Use the ip command in favor of the deprecated ifconfig
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [2 Posts]  
Author Message
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 12699
Location: Arizona USA

PostPosted: Tue 02 Feb 2016, 22:51    Post subject:  Use the ip command in favor of the deprecated ifconfig  

Pro tip: Use the ip command in favor of the deprecated ifconfig
Quote:
If you're a network admin, you probably work with Linux. If you constantly reach for the ifconfig command, Jack Wallen says it's time you learn its replacement: ip.

By Jack Wallen | February 1, 2016

Did you know back in 2009 it was announced that the ifconfig Linux command would be deprecated? It was and it has been. In fact, no work has been done on ifconfig for some time now. In its place is the ip command. Although some aren't exactly happy about this choice, the die was cast and we must move on (sort of).

Yes, ifconfig is still available to use...so those of you absolutely fear change, need not worry. For everyone else, it's time to move on.

So what do you do? You use the ip command. How is it used? Actually it's quite easy. The syntax of the ip command looks like:

ip [options] OBJECT COMMAND

Objects include things like:
ADVERTISING


link: network device
address: protocol address of a device
addrlabel: label configuration for protocol address
neighbour: ARP or NDISC cache entry
route: routing table entry
rule: rule in routing policy database
maddress: multicast address
mroute: multicast routing cache entry
tunnel: tunnel over IP
xfrm: framework for IPsec protocol

If you need more help with an object, you can issue the command ip OBJECT help (where OBJECT is the name of the object in question).
Examples

Let's see some examples of the ip command.

Display info about all network interfaces:
The Experimental Elements Of Video Games
There are many ways of setting games apart from the herd, but you don’t necessarily have to reinvent the wheel to make an innovative game.
Sponsored by maximum games

ip a

Display info about all IPv4 network interfaces:

ip -4 a

Display info about all IPv6 network interfaces:

ip -6 a

Display info about a particular network interface:

ip a show eth0

You can also modify an existing interface with the ip command. Say you want to assign a specific IP address to the eth0 interface:

ip a add 192.168.10.100/24 dev eth0

You could also flush all addresses from all interfaces on the 192.168.10.x network with the command:

ip -s -s a f to 192.168.10.0/24

Finally, you can bring up and down interfaces with ip like so:

ip link set dev eth0 down

ip link set dev eth0 up

There are plenty of other uses for this command. To get a complete listing, issue the man ip command to read the full details.
Back to top
View user's profile Send private message 
gcmartin

Joined: 14 Oct 2005
Posts: 6730
Location: Earth

PostPosted: Wed 03 Feb 2016, 01:19    Post subject:  

Thanks @Flash. This is very helpful to members about the change from ifconfig to the supported "ip" command.

In reading some may find this command useful. The command
Code:
# ifconfig
is the same as the article's
Code:
# ip a
The "a" is shortcut notation for these
Code:
# ip address
# ip addr

The biggest problem across the industry in general, and Puppy Linux specifically, is that scripts all over have used the old command (deprecated) format. At some point or when new scripts are created, hopefully developers will be aware of the need for change.

Thanks again.

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engines or use DogPile
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [2 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Taking the Puppy out for a walk » Misc
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0291s ][ Queries: 11 (0.0032s) ][ GZIP on ]