MTU가 9000이되도록 네트워크 브리지를 어떻게 설정합니까? byte packets 1

브리지 한 네트워크 인터페이스를 기가비트해야합니다.

/ etc / network / interfaces는 다음과 같습니다 :

 auto lo
 iface lo inet loopback

# Set up interfaces manually, avoiding conflicts with, e.g., network manager
 iface eth0 inet manual

 iface eth1 inet manual

 # Bridge setup
 auto br0
 iface br0 inet static
    bridge_ports eth0 eth1
    address 192.168.88.2
    broadcast 192.168.88.255
    netmask 255.255.255.0
    gateway 192.168.88.254
    dns-nameservers 192.168.88.254

그러나 MTU는 1500입니다

myth@myth:~$ traceroute --mtu 192.168.88.1
traceroute to 192.168.88.1 (192.168.88.1), 30 hops max, 65000 byte packets
 1  RoboStation.local (192.168.88.1)  0.278 ms F=1500  0.279 ms  0.287 ms

다음 명령을 실행하면

myth@myth:~$ sudo ifconfig eth0 mtu 9000
myth@myth:~$ sudo ifconfig eth1 mtu 9000
myth@myth:~$ traceroute --mtu 192.168.88.1

traceroute to 192.168.88.1 (192.168.88.1), 30 hops max, 65000 byte packets
 1  RoboStation.local (192.168.88.1)  0.407 ms F=9000  0.422 ms  0.383 ms

이제 MTU가 9000이고 NAS로 전송하는 것이 훨씬 빠릅니다.

그러나 / etc / network / interfaces 파일에서이 작업을 수행한다고 생각했습니다.

 auto lo
 iface lo inet loopback

 # Set up interfaces manually, avoiding conflicts with, e.g., network manager
 iface eth0 inet manual
    mtu 9000

 iface eth1 inet manual
    mtu 9000

 # Bridge setup
 auto br0
 iface br0 inet static
    bridge_ports eth0 eth1
    address 192.168.88.2
    broadcast 192.168.88.255
    netmask 255.255.255.0
    gateway 192.168.88.254
    dns-nameservers 192.168.88.254
    mtu 9000

하지만 부팅 할 때 네트워크가 작동하지 않습니다

mtu 9000br0 섹션에서를 제거하고 네트워크가 연결된 상태에서 PC가 부팅되지만 MTU는 여전히 9000입니다.

브리지가 9000에서 실행되도록 부팅시 eth0 및 eth1에 대해 MTU를 9000으로 설정하려면 어떻게합니까?

또한 항상 재부팅하지 않고 / etc / network / interfaces를 테스트하는 방법이 있습니까?



답변

방법을 mtu사용할 때 옵션을 사용할 수없는 것 같습니다 manual(참조 interfaces(5)). 따라서 다음과 같이 작동해야합니다 (의견을 의견에 통합).

auto lo
iface lo inet loopback

# Set up interfaces manually, avoiding conflicts with, e.g., network manager
iface eth0 inet manual
   # nothing here

iface eth1 inet manual
   # nothing here

# Bridge setup
auto br0
iface br0 inet static
   bridge_ports eth0 eth1
   address 192.168.88.2
   ...
   post-up ifconfig eth0 mtu 9000 && ifconfig eth1 mtu 9000

은 Using up(또는이 경우 post-up우리는 우리 자신의 명령을 지정할 수 있습니다) 옵션은 인터페이스가 제기되는 시간 (이후의) 동안 실행합니다.