Tabla de Contenidos

[Redes] Comandos: ifconfig / ipconfig / ip

Función


Linux: Equivalencia de los comandos ip e ifconfig

Mostrar dispositivos de red y su configuración

Con ifconfig:
  ifconfig

Con ip:
  ip addr show
  ip link show

Activar una interfaz de red

Con ifconfig:
  ifconfig eth0 up

Con ip:
  ip link set eth0 up

Desactivar una interfaz de red

Con ifconfig:
  ifconfig eth0 down

Con ip:
  ip link set eth0 down

Establecer una dirección IP a una interfaz

Con ifconfig:
  ifconfig eth0 192.168.1.1

Con ip:
  ip address add 192.168.1.1 dev eth0

Eliminar una dirección IP de una interfaz

Con ifconfig: No podrá hacer esto.

Con ip:
  ip address del 192.168.1.1 dev eth0

Añadir una interfaz virtual

Con ifconfig:
  ifconfig eth0:1 10.0.0.1/8

Con ip:
  ip addr add 10.0.0.1/8 dev eth0 label eth0:1

Añadir una entrada en la tabla ARP

Con arp:
  arp -i eth0 -s 192.168.0.1 00:11:22:33:44:55

Con ip:
  ip neigh add 192.168.0.1 lladdr 00:11:22:33:44:55 nud permanent dev eth0

Desconectar un dispositivo ARP

Con ifconfig:
  ifconfig -arp eth0

Con ip:
  ip link set dev eth0 arp off


Enlaces