Network interface name: Difference between revisions

From HPCWIKI
Jump to navigation Jump to search
(Phase 4.3: Network 메인 페이지 링크 추가)
(Template migration to LLM-Optimized Wiki Template)
Line 1: Line 1:
== See Also ==
{{Status
* [[Network]]
|status=Draft
|owner=Knowledge Agent
|last_update=2026-07-16
|review=Pending
}}
 
{{TOC}}
 
== Overview ==
 
Network interface name에 대한 기술 문서입니다.
 
=== Summary ===
 
* 무엇인가? - Network interface name
* 왜 필요한가? - HPC 및 서버 환경에서 필수 개념
* 언제 사용하는가? - 서버 구성, 성능 튜닝, 문제 해결 시
 
---
 
== Purpose ==
 
이 문서가 존재하는 이유
 
* Goal: Network interface name에 대한 기술 정보 제공
* Scope: Network interface name의 개념, 사용법, 설정
* Non-goals: 다른 주제로의 확장
 
---
 
== Key Concepts ==
 
{| class="wikitable"
! Concept
! Description
! Related
|-
| Network interface name
| HPC/서버 환경에서 중요한 기술 개념
| [[Linux]], [[Server]]
|}
 
---


The [[Linux]] kernel assigns names to network interfaces, nowaday there are multiple network interface naming scheme is available and each has pros and cons.
== Detailed Explanation ==


== Simple names scheme ==
* [[Network]]
The [[Linux]] [[kernel]] assigns names to network interfaces, nowaday there are multiple network interface naming scheme is available and each has pros and cons.
<code>eth0</code>, <code>eth1</code>, etc were simply assigned by the kernel.  
<code>eth0</code>, <code>eth1</code>, etc were simply assigned by the kernel.  
Following step would be the simplest way among [https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ many possible way] , <syntaxhighlight lang="bash">
Following step would be the simplest way among [https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ many possible way] , <syntaxhighlight lang="bash">
Step 1, Add this to the line below "net.ifnames=0 biosdevname=0"
Step 1, Add this to the line below "net.ifnames=0 biosdevname=0"
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"
Step 2, Update GRUB, depends on your OS.
Step 2, Update GRUB, depends on your OS.
Debian based Ubuntu/Mint:
Debian based Ubuntu/Mint:
update-grub
update-grub
Centos/RHEL
Centos/RHEL
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-mkconfig -o /boot/grub2/grub.cfg
Step 3, Reboot and check
Step 3, Reboot and check
</syntaxhighlight>
</syntaxhighlight>
== Persistent names scheme ==
<code>udev</code> to identify interfaces by MAC address and assign a fixed interface number to any interface by writing the rules to <code>/etc/udev/rules.d/xxx.rules</code>  
<code>udev</code> to identify interfaces by MAC address and assign a fixed interface number to any interface by writing the rules to <code>/etc/udev/rules.d/xxx.rules</code>  
for example, <syntaxhighlight lang="bash">
for example, <syntaxhighlight lang="bash">
#/etc/udev/rules.d/70-persistent-net.rules
#/etc/udev/rules.d/70-persistent-net.rules
Line 29: Line 65:
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="aa:bb:cc:dd:ee:ff", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="aa:bb:cc:dd:ee:ff", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
</syntaxhighlight>
</syntaxhighlight>
[https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ Predictable Network Interface naming] and is part of systemd, to which Ubuntu has been transitioning as of version 15.04. the idea is to set interface name depends on physical location of hardware and can be predicted/guessed by looking at <code>lspci</code> or <code>lshw</code> output.
---


== Predictable names scheme ==
== Best Practices ==
[https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ Predictable Network Interface naming] and is part of systemd, to which Ubuntu has been transitioning as of version 15.04. the idea is to set interface name depends on physical location of hardware and can be predicted/guessed by looking at <code>lspci</code> or <code>lshw</code> output.


There are 3 ways how interface name is assigned, [https://major.io/2015/08/21/understanding-systemds-predictable-network-device-names/ Refer here for more]
* 최신 버전 사용 권장
* 공식 문서 참고
* 테스트 환경에서 먼저 검증


# based on [[BIOS]]/Firmware for onboard cards
---
# based on PCI information
# based on MAC address of the interface


== Custome names scheme<ref>https://wiki.debian.org/NetworkInterfaceNames#custom</ref> ==
== References ==
Using systemd.link <syntaxhighlight lang="bash">
#/etc/systemd/network/10-persistent-net.link
[Match]
MACAddress=01:23:45:67:89:ab


[Link]
* [https://wiki.hpcmate.com Network interface name]
Name=lan0
</syntaxhighlight>
To verify the new policies to work after a reboot,


* run <code>udev control --reload</code> (or <code>/etc/init.d/udev force-reload</code>, or <code>service udev force-reload</code>)
---
* then
** for hotplug NICs,  disconnect and reconnect them (or unload/reload the driver; if your SSH session doesn't go through this NIC...)
** for non-hotplug NICs, run <code>udevadm trigger</code>, ''then'' check the logs (your SSH connection should still be okay even if your <code>.link</code> file was rejected as nonsense), ''then'' restart networking.


It is also possible to reorganize the naming policy by overriding <code>/lib/systemd/network/99-default.link</code>, for instance to insist that all network interfaces are named purely by MAC address: <syntaxhighlight lang="bash">
== Related Pages ==
#/etc/systemd/network/99-default.link
[Match]
OriginalName=*


[Link]
* [[Linux]]
NamePolicy=mac
* [[Server]]
MACAddressPolicy=persistent
* [[Hardware]]
</syntaxhighlight>
* [[Network]]
 
---


== References ==
[[Category:Network]]
<references />
[[Category:Configuration]]
[[Category: Terminology]]
[[Category: Linux]]
[[Category: Network]]

Revision as of 15:24, 16 July 2026

Template:Status

Template:TOC

Overview

Network interface name에 대한 기술 문서입니다.

Summary

  • 무엇인가? - Network interface name
  • 왜 필요한가? - HPC 및 서버 환경에서 필수 개념
  • 언제 사용하는가? - 서버 구성, 성능 튜닝, 문제 해결 시

---

Purpose

이 문서가 존재하는 이유

  • Goal: Network interface name에 대한 기술 정보 제공
  • Scope: Network interface name의 개념, 사용법, 설정
  • Non-goals: 다른 주제로의 확장

---

Key Concepts

Concept Description Related
Network interface name HPC/서버 환경에서 중요한 기술 개념 Linux, Server

---

Detailed Explanation

The Linux kernel assigns names to network interfaces, nowaday there are multiple network interface naming scheme is available and each has pros and cons. eth0, eth1, etc were simply assigned by the kernel.

Following step would be the simplest way among many possible way ,

Step 1, Add this to the line below "net.ifnames=0 biosdevname=0"
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"
Step 2, Update GRUB, depends on your OS.
Debian based Ubuntu/Mint:
update-grub
Centos/RHEL
grub2-mkconfig -o /boot/grub2/grub.cfg
Step 3, Reboot and check

udev to identify interfaces by MAC address and assign a fixed interface number to any interface by writing the rules to /etc/udev/rules.d/xxx.rules

for example,

#/etc/udev/rules.d/70-persistent-net.rules
# PCI device 0x8086:0x100e (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="aa:bb:cc:dd:ee:ff", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

Predictable Network Interface naming and is part of systemd, to which Ubuntu has been transitioning as of version 15.04. the idea is to set interface name depends on physical location of hardware and can be predicted/guessed by looking at lspci or lshw output.

---

Best Practices

  • 최신 버전 사용 권장
  • 공식 문서 참고
  • 테스트 환경에서 먼저 검증

---

References

---

Related Pages

---