OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • MTU for VLAN parent device
« previous next »
  • Print
Pages: [1]

Author Topic: MTU for VLAN parent device  (Read 2591 times)

random1104

  • Jr. Member
  • **
  • Posts: 75
  • Karma: 0
    • View Profile
MTU for VLAN parent device
« on: October 21, 2021, 07:39:25 pm »
Hello!,

I'm tagging/untagging on a OPNSense virtual machine. The host is already configured with MTU=9000 which is transfered to the VM NIC too.

I would like to set the MTU for my vtnet0 interface to 1600 bytes to properly pass 1500bytes payload tagged. The only option I can see is the VLAN interface MTU which is already 1500. How can I define the MTU for the parent device?

Logged

random1104

  • Jr. Member
  • **
  • Posts: 75
  • Karma: 0
    • View Profile
Re: MTU for VLAN parent device
« Reply #1 on: October 25, 2021, 09:25:22 am »
Well, tested defining an interface for the parent device. Still no joy:

root@vfw02:~ # ifconfig vtnet4
vtnet4: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1600
        options=800a8<VLAN_MTU,JUMBO_MTU,VLAN_HWCSUM,LINKSTATE>
        ether 6e:61:51:08:8c:94
        inet6 fe80::6c61:51ff:fe08:8c94%vtnet4 prefixlen 64 scopeid 0x5
        media: Ethernet 10Gbase-T <full-duplex>
        status: active
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
root@vfw02:~ #
root@vfw02:~ #
root@vfw02:~ # ifconfig vtnet4_vlan91
vtnet4_vlan91: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=80000<LINKSTATE>
        ether 6e:61:51:08:8c:94
        inet6 fe80::6c61:51ff:fe08:8c94%vtnet4_vlan91 prefixlen 64 scopeid 0x14
        inet 172.16.1.3 netmask 0xffffff00 broadcast 172.16.1.255
        inet 172.16.1.1 netmask 0xffffff00 broadcast 172.16.1.255 vhid 68
        groups: vlan
        carp: BACKUP vhid 68 advbase 1 advskew 100
        vlan: 91 vlanpcp: 0 parent interface: vtnet4
        media: Ethernet 10Gbase-T <full-duplex>
        status: active
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

root@vfw01:~ # ifconfig vtnet4
vtnet4: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1600
        options=800a8<VLAN_MTU,JUMBO_MTU,VLAN_HWCSUM,LINKSTATE>
        ether 72:ee:e4:b0:fa:14
        inet6 fe80::70ee:e4ff:feb0:fa14%vtnet4 prefixlen 64 scopeid 0x5
        media: Ethernet 10Gbase-T <full-duplex>
        status: active
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>


root@vfw01:~ # ifconfig vtnet4_vlan91
vtnet4_vlan91: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=80000<LINKSTATE>
        ether 72:ee:e4:b0:fa:14
        inet6 fe80::70ee:e4ff:feb0:fa14%vtnet4_vlan91 prefixlen 64 scopeid 0x14
        inet 172.16.1.2 netmask 0xffffff00 broadcast 172.16.1.255
        inet 172.16.1.1 netmask 0xffffff00 broadcast 172.16.1.255 vhid 68
        groups: vlan
        carp: MASTER vhid 68 advbase 1 advskew 0
        vlan: 91 vlanpcp: 0 parent interface: vtnet4
        media: Ethernet 10Gbase-T <full-duplex>
        status: active
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

root@vfw01:~ # ping -D -c 3 -s 1500 172.16.1.3
PING 172.16.1.3 (172.16.1.3): 1500 data bytes
ping: sendto: Message too long
ping: sendto: Message too long
ping: sendto: Message too long

--- 172.16.1.3 ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss


Both are VMs running on top of proxmox, devices seem correct (OVS bridge related):

root@pve01:~# ip addr|grep 1600
116: vmbr1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1600 qdisc noqueue state UNKNOWN group default qlen 1000
124: tap102i4: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1600 qdisc pfifo_fast master ovs-system state UNKNOWN group default qlen 1000
129: tap101i4: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1600 qdisc pfifo_fast master ovs-system state UNKNOWN group default qlen 1000


Any pointers?
« Last Edit: October 25, 2021, 09:29:42 am by random1104 »
Logged

lilsense

  • Hero Member
  • *****
  • Posts: 525
  • Karma: 19
    • View Profile
Re: MTU for VLAN parent device
« Reply #2 on: October 25, 2021, 09:29:00 pm »
why do you believe that either 9K or 15oo is not workingg properly
Logged

allebone

  • Sr. Member
  • ****
  • Posts: 374
  • Karma: 32
    • View Profile
Re: MTU for VLAN parent device
« Reply #3 on: October 25, 2021, 10:04:53 pm »
For ping you must remove 18 bytes to test an mtu of 1500 so in your test:

ping -D -c 3 -s 1500 172.16.1.3

This is testing an MTU of 1518.

Please use

ping -D -c 3 -s 1472 172.16.1.3

to test an MTU of 1500.

P
Logged

random1104

  • Jr. Member
  • **
  • Posts: 75
  • Karma: 0
    • View Profile
Re: MTU for VLAN parent device
« Reply #4 on: October 26, 2021, 07:18:49 pm »
Tried to send 1500 bytes of payload (ping test), which is what the servers expect to send/pass. Hence, the need to set MTU=1600 for the trunk interfaces.
Logged

allebone

  • Sr. Member
  • ****
  • Posts: 374
  • Karma: 32
    • View Profile
Re: MTU for VLAN parent device
« Reply #5 on: October 26, 2021, 09:01:44 pm »
I dont understand your reply. Can you repeat the test as I indicated and post the output?
Logged

random1104

  • Jr. Member
  • **
  • Posts: 75
  • Karma: 0
    • View Profile
Re: MTU for VLAN parent device
« Reply #6 on: October 28, 2021, 04:38:16 pm »
Quote from: allebone on October 25, 2021, 10:04:53 pm
For ping you must remove 18 bytes to test an mtu of 1500 so in your test:

ping -D -c 3 -s 1500 172.16.1.3

This is testing an MTU of 1518.

Please use

ping -D -c 3 -s 1472 172.16.1.3

to test an MTU of 1500.

P

root@vfw01:~ # ping -D -c 3 -s 1500 172.16.1.3
PING 172.16.1.3 (172.16.1.3): 1500 data bytes
ping: sendto: Message too long
ping: sendto: Message too long
ping: sendto: Message too long

--- 172.16.1.3 ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss

 
root@vfw01:~ # ping -D -c 3 -s 1472 172.16.1.3
PING 172.16.1.3 (172.16.1.3): 1472 data bytes
1480 bytes from 172.16.1.3: icmp_seq=0 ttl=64 time=0.959 ms
1480 bytes from 172.16.1.3: icmp_seq=1 ttl=64 time=0.351 ms
1480 bytes from 172.16.1.3: icmp_seq=2 ttl=64 time=0.319 ms

--- 172.16.1.3 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.319/0.543/0.959/0.294 ms
Logged

Patrick M. Hausen

  • Hero Member
  • *****
  • Posts: 3595
  • Karma: 305
    • View Profile
Re: MTU for VLAN parent device
« Reply #7 on: October 28, 2021, 04:58:17 pm »
Quote from: allebone on October 25, 2021, 10:04:53 pm
For ping you must remove 18 bytes to test an mtu of 1500 so in your test:

ping -D -c 3 -s 1500 172.16.1.3

This is testing an MTU of 1518.

Please use

ping -D -c 3 -s 1472 172.16.1.3

to test an MTU of 1500.

P
While I agree with your reasoning, I like to point out that 1500 - 18 = 1482. One of your numbers is wrong and it is probably not the 1500. ;)
Logged
Supermicro A2SDi-4C-HLN4F mainboard
Supermicro SC101F chassis
Intel Atom C3558 - 4 cores
16 GB ECC memory
Crucial MX 300 SSD M.2 SATA 275 GB
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

allebone

  • Sr. Member
  • ****
  • Posts: 374
  • Karma: 32
    • View Profile
Re: MTU for VLAN parent device
« Reply #8 on: October 28, 2021, 10:55:51 pm »
oops sorry you are right it is 28 not 18. 20 = ip header and 8 = ICMP header.

Regards the test then it seems you have confirmed the MTU is 1500 and there is no issue?

"root@vfw02:~ # ifconfig vtnet4_vlan91
vtnet4_vlan91: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=80000<LINKSTATE>
        ether 6e:61:51:08:8c:94
        inet6 fe80::6c61:51ff:fe08:8c94%vtnet4_vlan91 prefixlen 64 scopeid 0x14
        inet 172.16.1.3 netmask 0xffffff00 broadcast 172.16.1.255
        inet 172.16.1.1 netmask 0xffffff00 broadcast 172.16.1.255 vhid 68
        groups: vlan
        carp: BACKUP vhid 68 advbase 1 advskew 100
        vlan: 91 vlanpcp: 0 parent interface: vtnet4
        media: Ethernet 10Gbase-T <full-duplex>
        status: active
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>"

relevant info from above = mtu 1500 and IP 172.16.1.3

Test info:
root@vfw01:~ # ping -D -c 3 -s 1472 172.16.1.3
PING 172.16.1.3 (172.16.1.3): 1472 data bytes
1480 bytes from 172.16.1.3: icmp_seq=0 ttl=64 time=0.959 ms
1480 bytes from 172.16.1.3: icmp_seq=1 ttl=64 time=0.351 ms
1480 bytes from 172.16.1.3: icmp_seq=2 ttl=64 time=0.319 ms

Message indeed is received and replied to.

Can you explain further what you want to do? Are you wanting to change this interface to MTU 1600?
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • MTU for VLAN parent device
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2