Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy

 The ip command

The distribution-specific scripts and graphical tools are front-ends to ip (or ifconfig and route on older systems) to display and configure the kernel's networking configuration.

The ip command is used for assigning IP addresses to interfaces, for setting up routes to the Internet and to other networks, for displaying TCP/IP configurations etcetera.

The following commands show IP address and routing information:

[email protected] benny> ip addr show
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet brd scope host lo
    inet6 ::1/128 scope host 
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:50:bf:7e:54:9a brd ff:ff:ff:ff:ff:ff
    inet brd scope global eth0
    inet6 fe80::250:bfff:fe7e:549a/10 scope link 

[email protected] benny> ip route show dev eth0  scope link dev lo  scope link 
default via dev eth0 

Things to note:

  • two network interfaces, even on a system that has only one network interface card: "lo" is the local loop, used for internal network communication; "eth0" is a common name for a real interface. Do not ever change the local loop configuration, or your machine will start mallfunctioning! Wireless interfaces are usually defined as "wlan0"; modem interfaces as "ppp0", but there might be other names as well.

  • IP addresses, marked with "inet": the local loop always has, the physical interface can have any other combination.

  • The hardware address of your interface, which might be required as part of the authentication procedure to connect to a network, is marked with "ether". The local loop has 6 pairs of all zeros, the physical loop has 6 pairs of hexadecimal characters, of which the first 3 pairs are vendor-specific.

Introducing Linux
Previous Page Home Next Page

  Published under the terms of the GNU General Public License Design by Interspire