The ip utility can be used in many ways. A few example commands and their applications are provided below.
Show information for all network interfaces:
$ ip link show
Show information for the eth0 network interface, including statistics:
$ ip -s link show eth0
Set the IP address for eth0:
$ sudo ip addr add 192.168.1.7 dev eth0
Bring interface eth0 down:
$ sudo ip link set eth0 down
Set MTU to 1480 bytes for interface eth0:
$ sudo ip link set eth0 mtu 1480
Set route to network:
$ sudo ip route add 172.16.1.0/24 via 192.168.1.5
No hay comentarios:
Publicar un comentario