Linux 가상 인터페이스에 대해 혼란스러워함

Linux 가상 인터페이스에 대해 혼란스러워함

Linux 가상 인터페이스에 대해 몇 가지 오해가 있습니다. 어떤 인터페이스가 가상 인터페이스인지, 물리적 인터페이스인지 알아냈습니다.

ls -l /sys/class/net/
total 0
lrwxrwxrwx 1 root root    0 Sep 30  2020 bond0 -> ../../devices/virtual/net/bond0
lrwxrwxrwx 1 root root    0 Sep 30  2020 bond1 -> ../../devices/virtual/net/bond1
-rw-r--r-- 1 root root 4096 May 29  2019 bonding_masters
lrwxrwxrwx 1 root root    0 Sep 30  2020 em1 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/net/em1
lrwxrwxrwx 1 root root    0 Sep 30  2020 em2 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.1/net/em2
lrwxrwxrwx 1 root root    0 Sep 30  2020 em3 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.2/net/em3
lrwxrwxrwx 1 root root    0 Sep 30  2020 em4 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.3/net/em4
lrwxrwxrwx 1 root root    0 Sep 30  2020 gpd0 -> ../../devices/virtual/net/gpd0
lrwxrwxrwx 1 root root    0 Apr 26 15:50 lo -> ../../devices/virtual/net/lo
lrwxrwxrwx 1 root root    0 Apr  8 06:36 tun0 -> ../../devices/virtual/net/tun0

나는 가상 인터페이스(실수하지 않으면 IP 앨리어싱이라고 함)를 생성할 때 가상 인터페이스가 물리적 인터페이스에 속해야 한다는 것을 알고 있습니다. 따라서 를 실행하면 다음 ifconfig과 같은 내용이 표시됩니다 eth0:0. 실행 ifconfig하면 tun0.

그렇다면 tun0이 속한 물리적 인터페이스를 어떻게 찾을 수 있습니까?

또 다른 질문은 가상 인터페이스 tun0이 어떻게 구성되어 있는지 어떻게 알 수 있습니까? 구성은 어디서 볼 수 있나요? 예를 들어 브리지, 본드 등 어떤 인터페이스인지 알고 싶기 때문입니다.

또한 마지막으로 tun0의 최대 대역폭/속도를 어떻게 찾을 수 있습니까? 을 시도했지만 ethtool tun0 | grep Speed결과 Speed: 10Mb/s는 그렇지 않습니다. 인터페이스에서 40MB/초의 속도에 도달했기 때문입니다.

이 분야에서 빛을 발할 수 있도록 도와주세요. 감사해요

ifconfig도움이 될 수 있는 경우 출력 은 다음과 같습니다 .

# ifconfig

bond0: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST>  mtu 1500
        inet 10.95.23.48  netmask 255.255.255.192  broadcast 10.95.23.63
        inet6 fe80::cb1f:67ff:fee4:9702  prefixlen 64  scopeid 0x20<link>
        ether c8:2f:64:e4:77:02  txqueuelen 1000  (Ethernet)
        RX packets 243518864917  bytes 183519943755229 (166.9 TiB)
        RX errors 10588776  dropped 12  overruns 10588776  frame 0
        TX packets 157033363607  bytes 94275994054741 (85.7 TiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

bond1: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST>  mtu 1500
        inet 192.168.51.135  netmask 255.255.255.0  broadcast 192.168.50.255
        inet6 fe81::ce1f:66df:fee4:93fe  prefixlen 64  scopeid 0x20<link>
        ether c8:1f:63:e5:96:fe  txqueuelen 1000  (Ethernet)
        RX packets 45646678520  bytes 28999726204781 (26.3 TiB)
        RX errors 84433  dropped 0  overruns 84433  frame 0
        TX packets 47963885822  bytes 47821802061163 (43.4 TiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

em1: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether c8:1f:63:e5:96:fe  txqueuelen 1000  (Ethernet)
        RX packets 22674442503  bytes 14282139328614 (12.9 TiB)
        RX errors 42312  dropped 0  overruns 42312  frame 0
        TX packets 23996218106  bytes 23932998480505 (21.7 TiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 54  memory 0xd5000000-d57fffff

em2: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether c8:1f:63:e5:96:fe 1000  (Ethernet)
        RX packets 22972236017  bytes 14717586876167 (13.3 TiB)
        RX errors 42121  dropped 0  overruns 42121  frame 0
        TX packets 23967667716  bytes 23888803580658 (21.7 TiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 65  memory 0xd6000000-d67fffff

em3: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether c8:2f:64:e4:77:02  txqueuelen 1000  (Ethernet)
        RX packets 243515511980  bytes 183519729162035 (166.9 TiB)
        RX errors 10588695  dropped 0  overruns 10588695  frame 0
        TX packets 157033363607  bytes 94275994054741 (85.7 TiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 65  memory 0xd7000000-d77fffff

em4: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether c8:2f:64:e4:77:02 txqueuelen 1000  (Ethernet)
        RX packets 3352937  bytes 214593194 (204.6 MiB)
        RX errors 81  dropped 0  overruns 81  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 86  memory 0xd8000000-d87fffff

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 770379511  bytes 787793708080 (733.6 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 770379511  bytes 787793708080 (733.6 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1359
        inet 198.17.124.104  netmask 255.255.255.255  destination 198.17.134.104
        inet6 fe80::c531:2573:f236:62f9  prefixlen 64  scopeid 0x20<link>
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 500  (UNSPEC)
        RX packets 3218016567  bytes 3792108289457 (3.4 TiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1913195063  bytes 141030980947 (131.3 GiB)
        TX errors 0  dropped 19274 overruns 0  carrier 0  collisions 0
    

관련 정보