From 759f8187b15ca5ec540f14f3885a5d13328e5044 Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Tue, 24 Jun 2025 16:05:46 +0300 Subject: [PATCH] ip*: unify network interface notation (#16930) --- pages/linux/ip-address.md | 8 ++++---- pages/linux/ip-link.md | 12 ++++++------ pages/linux/ip-maddress.md | 6 +++--- pages/linux/ip-neighbour.md | 14 +++++++------- pages/linux/ip-route-add.md | 8 ++++---- pages/linux/ip-route-get.md | 4 ++-- pages/linux/ip-route-list.md | 2 +- pages/linux/ip-route.md | 10 +++++----- pages/linux/ip.md | 6 +++--- 9 files changed, 35 insertions(+), 35 deletions(-) diff --git a/pages/linux/ip-address.md b/pages/linux/ip-address.md index d3b1c0ed24..7d5a0c009f 100644 --- a/pages/linux/ip-address.md +++ b/pages/linux/ip-address.md @@ -13,16 +13,16 @@ - Display information about a specific network interface: -`ip {{[a|address]}} {{[s|show]}} {{eth0}}` +`ip {{[a|address]}} {{[s|show]}} {{ethX}}` - Add an IP address to a network interface: -`sudo ip {{[a|address]}} {{[a|add]}} {{ip_address}} dev {{eth0}}` +`sudo ip {{[a|address]}} {{[a|add]}} {{ip_address}} dev {{ethX}}` - Remove an IP address from a network interface: -`sudo ip {{[a|address]}} {{[d|delete]}} {{ip_address}} dev {{eth0}}` +`sudo ip {{[a|address]}} {{[d|delete]}} {{ip_address}} dev {{ethX}}` - Delete all IP addresses in a given scope from a network interface: -`sudo ip {{[a|address]}} {{[f|flush]}} {{eth0}} scope {{global|host|link}}` +`sudo ip {{[a|address]}} {{[f|flush]}} {{ethX}} scope {{global|host|link}}` diff --git a/pages/linux/ip-link.md b/pages/linux/ip-link.md index d3e32dc222..1d8f41204a 100644 --- a/pages/linux/ip-link.md +++ b/pages/linux/ip-link.md @@ -9,24 +9,24 @@ - Show information about a specific network interface: -`ip {{[l|link]}} {{[sh|show]}} {{ethN}}` +`ip {{[l|link]}} {{[sh|show]}} {{ethX}}` - Bring a network interface up or down: -`sudo ip {{[l|link]}} {{[s|set]}} {{ethN}} {{up|down}}` +`sudo ip {{[l|link]}} {{[s|set]}} {{ethX}} {{up|down}}` - Give a meaningful name to a network interface: -`sudo ip {{[l|link]}} {{[s|set]}} {{ethN}} {{[al|alias]}} "{{LAN Interface}}"` +`sudo ip {{[l|link]}} {{[s|set]}} {{ethX}} {{[al|alias]}} "{{LAN Interface}}"` - Change the MAC address of a network interface: -`sudo ip {{[l|link]}} {{[s|set]}} {{ethN}} {{[a|address]}} {{ff:ff:ff:ff:ff:ff}}` +`sudo ip {{[l|link]}} {{[s|set]}} {{ethX}} {{[a|address]}} {{ff:ff:ff:ff:ff:ff}}` - Change the MTU size for a network interface to use jumbo frames: -`sudo ip {{[l|link]}} {{[s|set]}} {{ethN}} mtu {{9000}}` +`sudo ip {{[l|link]}} {{[s|set]}} {{ethX}} mtu {{9000}}` - Set the promisc mode status of a device: -`sudo ip {{[l|link]}} {{[s|set]}} {{ethN}} promisc {{on|off}}` +`sudo ip {{[l|link]}} {{[s|set]}} {{ethX}} promisc {{on|off}}` diff --git a/pages/linux/ip-maddress.md b/pages/linux/ip-maddress.md index 260fabe533..9b9cab4972 100644 --- a/pages/linux/ip-maddress.md +++ b/pages/linux/ip-maddress.md @@ -9,15 +9,15 @@ - List device specific addresses: -`ip {{[m|maddress]}} {{[s|show]}} dev {{eth0}}` +`ip {{[m|maddress]}} {{[s|show]}} dev {{ethX}}` - Join a multicast group statically: -`sudo ip {{[m|maddress]}} {{[a|add]}} {{33:33:00:00:00:02}} dev {{eth0}}` +`sudo ip {{[m|maddress]}} {{[a|add]}} {{33:33:00:00:00:02}} dev {{ethX}}` - Leave a static multicast group: -`sudo ip {{[m|maddress]}} {{[d|delete]}} {{33:33:00:00:00:02}} dev {{eth0}}` +`sudo ip {{[m|maddress]}} {{[d|delete]}} {{33:33:00:00:00:02}} dev {{ethX}}` - Display help: diff --git a/pages/linux/ip-neighbour.md b/pages/linux/ip-neighbour.md index 88d37fc442..1660330af6 100644 --- a/pages/linux/ip-neighbour.md +++ b/pages/linux/ip-neighbour.md @@ -7,18 +7,18 @@ `ip {{[n|neighbour]}}` -- Remove entries in the neighbour table on device `eth0`: +- Remove entries in the neighbour table on device `ethX`: -`sudo ip {{[n|neighbour]}} {{[f|flush]}} dev {{eth0}}` +`sudo ip {{[n|neighbour]}} {{[f|flush]}} dev {{ethX}}` - Perform a neighbour lookup and return a neighbour entry: -`ip {{[n|neighbour]}} {{[g|get]}} {{lookup_ip}} dev {{eth0}}` +`ip {{[n|neighbour]}} {{[g|get]}} {{lookup_ip}} dev {{ethX}}` -- Add or delete an ARP entry for the neighbour IP address to `eth0`: +- Add or delete an ARP entry for the neighbour IP address to `ethX`: -`sudo ip {{[n|neighbour]}} {{add|delete}} {{ip_address}} lladdr {{mac_address}} dev {{eth0}} nud reachable` +`sudo ip {{[n|neighbour]}} {{add|delete}} {{ip_address}} lladdr {{mac_address}} dev {{ethX}} nud reachable` -- Change or replace an ARP entry for the neighbour IP address to `eth0`: +- Change or replace an ARP entry for the neighbour IP address to `ethX`: -`sudo ip {{[n|neighbour]}} {{change|replace}} {{ip_address}} lladdr {{new_mac_address}} dev {{eth0}}` +`sudo ip {{[n|neighbour]}} {{change|replace}} {{ip_address}} lladdr {{new_mac_address}} dev {{ethX}}` diff --git a/pages/linux/ip-route-add.md b/pages/linux/ip-route-add.md index 8f93a23206..8c794b1257 100644 --- a/pages/linux/ip-route-add.md +++ b/pages/linux/ip-route-add.md @@ -7,14 +7,14 @@ `sudo ip {{[r|route]}} {{[a|add]}} default via {{gateway_ip}}` -- Add a default route using `eth0`: +- Add a default route using `ethX`: -`sudo ip {{[r|route]}} {{[a|add]}} default dev {{eth0}}` +`sudo ip {{[r|route]}} {{[a|add]}} default dev {{ethX}}` - Add a static route: -`sudo ip {{[r|route]}} {{[a|add]}} {{destination_ip}} via {{gateway_ip}} dev {{eth0}}` +`sudo ip {{[r|route]}} {{[a|add]}} {{destination_ip}} via {{gateway_ip}} dev {{ethX}}` - Add a route to a specific routing table: -`sudo ip {{[r|route]}} {{[a|add]}} {{destination_ip}} dev {{eth0}} {{[t|table]}} {{ip}}` +`sudo ip {{[r|route]}} {{[a|add]}} {{destination_ip}} dev {{ethX}} {{[t|table]}} {{ip}}` diff --git a/pages/linux/ip-route-get.md b/pages/linux/ip-route-get.md index 9360854741..e6b99a2069 100644 --- a/pages/linux/ip-route-get.md +++ b/pages/linux/ip-route-get.md @@ -13,11 +13,11 @@ - Print route to a destination for packets arriving on a specific interface: -`ip {{[r|route]}} {{[g|get]}} {{destination}} iif {{eth0}}` +`ip {{[r|route]}} {{[g|get]}} {{destination}} iif {{ethX}}` - Print route to a destination, forcing output through a specific interface: -`ip {{[r|route]}} {{[g|get]}} {{destination}} oif {{eth1}}` +`ip {{[r|route]}} {{[g|get]}} {{destination}} oif {{ethX}}` - Print route to a destination with a specified Type of Service (ToS): diff --git a/pages/linux/ip-route-list.md b/pages/linux/ip-route-list.md index 81f35d8a30..a034fe2622 100644 --- a/pages/linux/ip-route-list.md +++ b/pages/linux/ip-route-list.md @@ -21,7 +21,7 @@ - List routes from a given device only: -`ip {{[r|route]}} {{[l|list]}} dev {{eth0}}` +`ip {{[r|route]}} {{[l|list]}} dev {{ethX}}` - List routes within a given scope: diff --git a/pages/linux/ip-route.md b/pages/linux/ip-route.md index 1e46496da8..717b293707 100644 --- a/pages/linux/ip-route.md +++ b/pages/linux/ip-route.md @@ -11,21 +11,21 @@ `sudo ip {{[r|route]}} {{[a|add]}} default via {{gateway_ip}}` -- Add a default route using `eth0`: +- Add a default route using `ethX`: -`sudo ip {{[r|route]}} {{[a|add]}} default dev {{eth0}}` +`sudo ip {{[r|route]}} {{[a|add]}} default dev {{ethX}}` - Add a static route: -`sudo ip {{[r|route]}} {{[a|add]}} {{destination_ip}} via {{gateway_ip}} dev {{eth0}}` +`sudo ip {{[r|route]}} {{[a|add]}} {{destination_ip}} via {{gateway_ip}} dev {{ethX}}` - Delete a static route: -`sudo ip {{[r|route]}} {{[d|delete]}} {{destination_ip}} dev {{eth0}}` +`sudo ip {{[r|route]}} {{[d|delete]}} {{destination_ip}} dev {{ethX}}` - Change or replace a static route: -`sudo ip {{[r|route]}} {{change|replace}} {{destination_ip}} via {{gateway_ip}} dev {{eth0}}` +`sudo ip {{[r|route]}} {{change|replace}} {{destination_ip}} via {{gateway_ip}} dev {{ethX}}` - Show which route will be used by the kernel to reach an IP address: diff --git a/pages/linux/ip.md b/pages/linux/ip.md index 29ce4a7dea..c43257863a 100644 --- a/pages/linux/ip.md +++ b/pages/linux/ip.md @@ -26,12 +26,12 @@ - Make an interface up/down: -`sudo ip {{[l|link]}} {{[s|set]}} {{interface_name}} {{up|down}}` +`sudo ip {{[l|link]}} {{[s|set]}} {{ethX}} {{up|down}}` - Add/Delete an IP address to an interface: -`sudo ip {{[a|address]}} {{add|delete}} {{ip}}/{{mask}} dev {{interface_name}}` +`sudo ip {{[a|address]}} {{add|delete}} {{ip}}/{{mask}} dev {{ethX}}` - Add a default route: -`sudo ip {{[r|route]}} {{[a|add]}} default via {{ip}} dev {{interface_name}}` +`sudo ip {{[r|route]}} {{[a|add]}} default via {{ip}} dev {{ethX}}`