Loopback address and network interface handling, general commands
U
SER
G
UIDE
154
IP
COMMAND
Introduction
The
ip
command gives the possibility to manage the activation and the verification of IP interfaces
and their respective routing, in an advanced mode.
ip
command is a very flexible tool and it is
often used for debugging or troubleshooting operations, mostly because the executed commands
do not effect the router configuration and they are lost at the next reboot.
The most common used command options are:
ip link
It displays and modifies the characteristics of devices
ip route
It adds or deletes an entry in the routing table which defines how to reach other network
nodes
ip rule
It defines routing rules which depends both on the packet’s destination and on other fields
of the header. Different routing tables can be defined according to the specific type of
packet to manage.
ip addr
It associates ip addresses to network devices
ip neigh
It manipulates ARP (Address Resolution Protocol) tables providing correlation between IP
addresses and physical addresses
In order to operate on IPv6 elements (addresses, routes, neighbour) it is necessary to specify the
-6
option. For example:
ip
–
6 addr <options>
ip
–
6 route <options>
N.B.:
The
ip
command has no effects on Imola configuration since modifications are lost at the next
reboot of the router. It is typically used together with trigger commands in order to indicate
transitory conditions.
For example, in order to activate a route together with the router‟s start-up:
set autocmd ip route add 10.1.10.10 via 10.10.254.1
In order to activate a route when an ISDN connection is established:
set trigger isdn up ip route add 10.1.10.0/24 dev ippp1
or when a GPRS connection is established:
set trigger gprs up ip route add 10.2.10.0/24 dev ppp0
In order to modify a route when passing to backup status:
set trigger backup up ip route del 10.1.10.10 via 10.10.254.1
set trigger backup up ip route add 10.1.10.10 via 192.168.1.2
Displaying interfaces status, ARP and routing tables through the IP
command
The
ip
command can be used to display links and routes present and active on Imola. For example,
the command
ip link list
:
root@Imola>
ip link list