Packages in DEBIAN - Part IV (Network Interface Management)

Greetings, Dear cyber-readers.

After a long pause we continued with the fourth (4th) post full series of 10 dedicated to Study of GNU / Linux Distros Packages, based on the DISTRO DEBIAN. Let us remember that thoroughly handling (knowing) the packages and their commands are of utmost importance for any user / technician of Free Operating Systems usually. And as in the previous one we will continue with those packages and commands related to Network Interface Management.

DEBIAN packages

Additionally use for any questions or information in this regard the following links:

And if you want to read the previous entries in this series, they are:

In this post we will study more in depth about the package iproute2 and using the command ip

Package:
Iproute2: According to DEBIAN official website this package in its version for the stable Distribution "Jessie" currently in its version 3.16.0-2 It is part of the network tools and traffic control. And it is currently a collection of utilities for network connection and traffic control. The utilities of iproute2 communicate with the Linux kernel through the interface "(Rt) netlink", providing advanced features not available through traditional networking tools like "Ifconfig" y "Route".

Note: Currently its dependencies are libc6 (> = 2.14) [not arm64, ppc64el] - libc6 (> = 2.17) [arm64, ppc64el], libdb5.3, and libselinux1. And in its version for DEBIAN Testing it is currently in the number 4.3.0-1. For more information consult Package: iproute 2

Iproute2: Most network setup manuals still refer to ifconfig y road. like the primary network configuration tools, but ifconfig it is known to behave inappropriately in modern network environments. They are outdated commands, but most distributions still include them. Most network configuration systems make use of ifconfig and therefore provide a limited set of features. El / etc / net project aims to support most modern network technologies, as it does not use ifconfig and allows a system administrator to make use of all the functions of iproute2, including traffic control. iproute2 usually sends your information in a package called iproute o iproute2 and consists of several tools, of which the most important are IP y TC. IP controls the IPv4 and IPv6 configuration y TC manage the traffic control.

Note: Some of the main functionalities that iproute2 provides are: Implement QoS (Quality of service), to prioritize the different types of traffic; Keep multiple routing tables by different gateways connected to different devices; establish the Load balancing, assigning weights to each of the existing network interfaces within a device and the Definition of tunnels IP to provide a means to transport data packets between domains when the protocol in those domains is not supported by intermediary networks, that is, for example to transport IPv6 packets in IPv4 networks and to allow IPv6 communication between 2 two distant IPv6 networks. For more information consult Linux Foundation: iproute2

Commands:
  • IP: And expanding the information of the previous publication we have about the command IP the following  usage examples:
  1. Mostrar todas las Interfaces
  2. ip address show
  1. Mostrar una sola Interfase
  2. ip address show [nombre_interfaz]
  1. Mostrar solo las Interfaces levantadas
  2. ip address show up
  1. Mostrar las interfaces dinámicas o estáticas
  2. ip address show dev [nombre_interfaz]
  3. ip address show dev [nombre_interfaz]
  1. Añadir una dirección IP a una Interfaz
  2. ip address add 192.168.1.100/24 dev [nombre_interfaz]
  3. ip address add 2001:db8:1::/48 dev [nombre_interfaz]
  1. Borrar una dirección IP a una Interfaz
  2. ip address delete 192.168.1.100/24 dev [nombre_interfaz]
  3. ip address delete 2001:db8:1::/48 dev [nombre_interfaz]
  1. Añadir una descripción legible a una Interfaz / Dirección IP
  2. ip address add 192.168.1.100/24 dev [nombre_interfaz] label [nombre_interface]:Mi_Red_Interna
  1. Remover (Liberar) las direcciones ip de una Interfaz de red
  2. ip address flush dev [nombre_interfaz]
  1. Mostrar todas las rutas de red disponible
  2. ip route
  3. ip route show
  4. ip -4 route show
  5. ip -6 route show
  1. Mostrar las rutas de una red y sus sub-redes incluidas
  2. ip route show to root direccion_red/prefijo_mascara_red
  1. Mostrar las rutas hacia una red especifica
  2. ip route show to exact direccion_red/prefijo_mascara_red
  1. Mostrar la ruta actual usada por el kernel
  2. ip route get direccion_red/prefijo_mascara_red
  1. Añadir una ruta via gateway
  2. ip route add direccion_red/prefijo_mascara_red via direccion_ip_gateway
  1. Añadir una ruta via interfaz
  2. ip route add direccion_red/prefijo_mascara_red dev nombre_interfaz
  1. Cambiar o reemplazar una ruta
  2. ip route change direccion_red/prefijo_mascara_red via direccion_ip_gateway
  3. ip route replace direccion_red/prefijo_mascara_red dev nombre_interfaz
  1. Borrar una ruta
  2. ip route delete direccion_red/prefijo_mascara_red via direccion_ip_gateway
  3. ip route delete direccion_red/prefijo_mascara_red dev nombre_interfaz
  1. Establecer una ruta por defecto
  2. ip route add default via direccion_red/prefijo_mascara_red
  3. ip route add default via dev nombre_interfaz
  4. ip route add 0.0.0.0/0 via direccion_red/prefijo_mascara_red
  5. ip route add 0.0.0.0/0 via dev nombre_interfaz
  1. Establecer rutas de propósitos especificos
  2. ip route add blackhole direccion_red/prefijo_mascara_red
  3. ip route add unreacheable direccion_red/prefijo_mascara_red
  4. ip route add prohibit direccion_red/prefijo_mascara_red
  5. ip route add throw direccion_red/prefijo_mascara_red
  1. Establecer una ruta con una métrica especifica
  2. ip route add direccion_red/prefijo_mascara_red via direccion_ip_gateway metric numero_metrica
  3. ip route add direccion_red/prefijo_mascara_red dev nombre_interfaz metric numero_metrica
  1. Establecer una ruta multivia
  2. ip route add default nexthop via direccion_ip_gateway_1 weight numero_weight nexthop via direccion_ip_gateway_2 weight numero_weightip
  3. ip route add default nexthop via direccion_ip_gateway_1 weight numero_weight nexthop dev nombre_interfaz metric numero_metrica
  1. Mostrar/Listar interfaces
    ip link show
  2. ip link show dev nombre_interfaz
  3. ip link list
  4. ip link list dev nombre_interfaz
  1. Configurando el estado de una interfaz
  2. ip link set dev nombre_interfaz up
  3. ip link set dev nombre_interfaz down
  4. ip link list
  5. ip link list dev nombre_interfaz
  1. Configurando una descripción para una interfaz
  2. ip link set dev nombre_interfaz alias "descripcion"
  1. Configurando un nuevo nombre a una interfaz
  2. ip link set dev actual_nombre_interfaz name nuevo_nombre_interfaz
  1. Configurando una Dirección MAC a una interfaz
  2. ip link set dev nombre_interfaz address aa:bb:cc:dd:ee:ff
  1. Cambiando el valor de MTU de una interfaz
  2. ip link set dev nombre_interfaz mtu valor_mtu
  1. Eliminando una interfaz
  2. ip link delete dev nombre_interfaz
  1. Habilitar / Deshabilitar el Multicast / ARP en una interfaz
  2. ip link set nombre_interfaz multicast on
  3. ip link set nombre_interfaz multicast off
  4. ip link set nombre_interfaz arp on
  5. ip link set nombre_interfaz arp off
  1. Creando una interfaz del tipo VLAN
  2. ip link add name nombre_interfaz_vlan link nombre_interfaz type vlan id valor_id
  1. Creando una interfaz del tipo VLAN Stacking (QinQ) en Interfaz de Servidor y de Cliente
  2. ip link add name nombre_interfaz_vlan link nombre_interfaz type vlan proto 802.1ad id valor_id
  3. ip link add name nombre_interfaz_vlan link nombre_interfaz type vlan proto 802.1q id valor_id
  1. Gestionando tipos de interfaces
  2. ip link add name nombre_tipo_interfaz link nombre_interfaz type macvlan
  3. ip link add name nombre_tipo_interfaz type dummy
  4. ip link add name nombre_tipo_interfaz type bond
  5. ip link add name nombre_tipo_interfaz type ifb
  6. ip link add name nombre1 type veth peer nombre2
  1. Gestionando puentes sobre una interfaz
  2. ip link add name nombre_puente type brigde
  3. ip link set dev nombre_interfaz master nombre_puente
  4. ip link set dev nombre_interfaz no master
  5. ip link set nombre_interfaz arp off
  1. Gestionando grupos de interfaces
  2. ip link set dev nombre_interface group id_group
  3. ip link set dev nombre_interfaz group 0
  4. ip link set dev nombre_interfaz group default
  5. ip link set dev nombre_interface group nombre_group
  6. ip link set group id_group up/down
  7. ip link list group id_group
  8. ip address show group nombre_grupo

For more information about this command read here

In the next post we will study about the use of the commands ct, iw y ethtool.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.