본문 바로가기
AEWS2기

2-0-0. Linux Networking (netns, lo, eth, iptables, bridge fdb, neigh)

by yeongki0944 2024. 3. 13.

0. Predictable Network Interface Names

[ZETA WIKI] 리눅스 네트워크

[flavono123 블로그] ip: 리눅스 네트워크 장치

명칭 설명
eth[0-N] Classic, unpredictable kernel-native ethX naming eth0
eno[1-N] Names incorporating Firmware/BIOS provided index numbers for on-board devices
펌웨어에 인덱스 정보가 있는 경우
eno1
ens[1-N] Names incorporating Firmware/BIOS provided PCI Express hotplug slot index numbers
PCI 익스프레스 핫플러그 슬롯
ens1
enp<PCI slot>s<card index no> Names incorporating physical/geographical location of the connector of the hardware
특정 PCI 슬롯에 특정 슬롯 번호가 지정된 경우
p : PCI의 버스
s : PCI 슬롯 위치
enp2s0
enx Names incorporating the interfaces’s MAC address enx78e7d1ea46da
ppp point to point 프로토콜 장치 모뎀
lo 루프백 인터페이스 루프백
tap 가상 이더넷 장치  
gre Generic Routing Encapsulation
GRE : 라우팅 프로토콜이나 터널링을 위해 사용되는 프로토콜
gre0 : GRE 터널 인터페이스
 
gretap GRE Tunneling with Enhanced Privacy
GRE와 유사하지만 추가적인 개인 정보보호 기능이 있는 프로토콜
 
ip6tnl IPv6 Tunnling
IPv6 터널링을 위한 프로토콜
 
ip6gre IPv6 GRE Tunnneling
IPv6를 사용한 GRE터널링 인터페이스
 
erspan Encapsulated Remote Switched Port Analyzer
네트워크에서 트래픽을 모니터링하고 분석하기 위한 스위치 포트 분석 프로토콜
 

1. netns

[Hostway Blog] [토막] Network Namespace 간단한 구성

Digging into Linux namespaces - part 1

Create a Linux Network Namespace

  • Namespace : 격리된 환경을 제공하는 리눅스 커널의 기능
  • Network Namespace : linux host networkstack (set of network interfaces, routing rules, set of netfilter hooks 등)

Digging&nbsp;into&nbsp;Linux&nbsp;namespaces&nbsp;-&nbsp;part&nbsp;1

 

 


 

2. lo

  • loop back
    • virtual interface
    • communicate with itself
      • 문제해결 및 진단에 유용
    • loop back IP 예약 주소 - 127.0.0.0/8
    • localhost

/ect/hosts - localhost
lo 사용 예시1
lo 사용 예시2

 

# OS : Amazon Linux2 
ifconfig

[Baeldung] What Is the Loopback (lo) Device?


 

3. eth, veth

 

 

 

 

4. iptables

 

5. bridge fdb

 

6. neigh

 

Reference

[Baeldung] What Is the Loopback (lo) Device?

[WhaTap Blog] 리눅스 네트워크 관리에 필요한 <ifconfig> 사용법 11가지

[Hostway Blog] [토막] Network Namespace 간단한 구성