Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[radvd] Build radvd from source; Patch so as not to treat out-of-range MTU as an error #2795

Merged
merged 2 commits into from
Apr 17, 2019
Merged

Conversation

jleveque
Copy link
Contributor

- What I did

  • Download radvd source from Debian source repo, apply a patch such that if radvd finds a MTU value in the config file which is out-of-range (i.e., greater than MTU configured in the kernel for that interface), it will not treat it as an error. Thus, radvd _will_send router advertisements on the interface and it will also not continually reload its config file and spam the syslog with error messages. This is a temporary workaround until we are able to properly configure the MTU value in the kernel. [Root problem is that when any member interfaces are added/removed from a VLAN, the kernel sets the VLAN's MTU to the default value, 1500, which is smaller than our expected MTU, 9100]

NOTE: This patch is equivalent to the patch I made on the 201803 branch (#2552). The difference being that here on the master branch we have upgraded the Docker to be based off Debian Stretch, so this patch applies against the latest version of radvd for Debian Stretch, version 2.17-2~bpo9+1.

- How to verify it

  • Ensure router advertisements are sent on VLAN interfaces within the configured interval (currently 10 minutes):
root@sonic:/home/admin# tcpdump -nevvv -i Vlan1000 ip6 -Qout
tcpdump: listening on Vlan1000, link-type EN10MB (Ethernet), capture size 262144 bytes
01:40:57.877994 ec:f4:bb:fe:80:90 > 33:33:00:00:00:01, ethertype IPv6 (0x86dd), length 118: (hlim 255, next-header ICMPv6 (58) payload length: 64) fe80::eef4:bbff:fefe:8090 > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 64
        hop limit 64, Flags [managed], pref medium, router lifetime 1800s, reachable time 0s, retrans time 0s
          prefix info option (3), length 32 (4): 2603:10a0:312:140b::/64, Flags [onlink], valid time infinity, pref. time infinity
            0x0000:  4080 ffff ffff ffff ffff 0000 0000 2603
            0x0010:  10a0 0312 140b 0000 0000 0000 0000
          mtu option (5), length 8 (1):  9100
            0x0000:  0000 0000 238c
          source link-address option (1), length 8 (1): ec:f4:bb:fe:80:90
            0x0000:  ecf4 bbfe 8090
01:49:46.898809 ec:f4:bb:fe:80:90 > 33:33:00:00:00:01, ethertype IPv6 (0x86dd), length 118: (hlim 255, next-header ICMPv6 (58) payload length: 64) fe80::eef4:bbff:fefe:8090 > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 64
        hop limit 64, Flags [managed], pref medium, router lifetime 1800s, reachable time 0s, retrans time 0s
          prefix info option (3), length 32 (4): 2603:10a0:312:140b::/64, Flags [onlink], valid time infinity, pref. time infinity
            0x0000:  4080 ffff ffff ffff ffff 0000 0000 2603
            0x0010:  10a0 0312 140b 0000 0000 0000 0000
          mtu option (5), length 8 (1):  9100
            0x0000:  0000 0000 238c
          source link-address option (1), length 8 (1): ec:f4:bb:fe:80:90
            0x0000:  ecf4 bbfe 8090
02:01:52.348106 ec:f4:bb:fe:80:90 > 33:33:00:00:00:01, ethertype IPv6 (0x86dd), length 118: (hlim 255, next-header ICMPv6 (58) payload length: 64) fe80::eef4:bbff:fefe:8090 > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 64
        hop limit 64, Flags [managed], pref medium, router lifetime 1800s, reachable time 0s, retrans time 0s
          prefix info option (3), length 32 (4): 2603:10a0:312:140b::/64, Flags [onlink], valid time infinity, pref. time infinity
            0x0000:  4080 ffff ffff ffff ffff 0000 0000 2603
            0x0010:  10a0 0312 140b 0000 0000 0000 0000
          mtu option (5), length 8 (1):  9100
            0x0000:  0000 0000 238c
          source link-address option (1), length 8 (1): ec:f4:bb:fe:80:90
            0x0000:  ecf4 bbfe 8090

@jleveque jleveque merged commit c0904f7 into sonic-net:master Apr 17, 2019
@jleveque jleveque deleted the radvd_ignore_mtu branch April 17, 2019 23:41
MichelMoriniaux pushed a commit to criteo-forks/sonic-buildimage that referenced this pull request May 28, 2019
jleveque added a commit that referenced this pull request Sep 1, 2020
…nce again (#5242)

Remove radvd Makefile and patch, change docker-router-advertiser Dockerfile template to simply install the vanilla radvd package using apt-get.

- In PR #2795, we started building radvd from source and patching it to prevent it from erroring out when advertising an MTU of 9100 which was greater than the MTU size configured on the bridge interface (1500), which was due to a limitation in the 4.9 Linux kernel.
- Master branch is now using Linux kernel 4.19. As of 4.18, the kernel supports setting a bridge MTU to a value > 1500.
- PR sonic-net/sonic-swss#1393 modified vlanmgrd to take advantage of this and now configures the MTU of bridge interfaces in SONiC to the proper size of 9100. Therefore, we no longer need to patch radvd. Since we no longer need to patch radvd, we no longer need to build it from source, so we can save build time by going back to simply installing the vanilla radvd Debian package in the router-advertiser container.
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
…nce again (sonic-net#5242)

Remove radvd Makefile and patch, change docker-router-advertiser Dockerfile template to simply install the vanilla radvd package using apt-get.

- In PR sonic-net#2795, we started building radvd from source and patching it to prevent it from erroring out when advertising an MTU of 9100 which was greater than the MTU size configured on the bridge interface (1500), which was due to a limitation in the 4.9 Linux kernel.
- Master branch is now using Linux kernel 4.19. As of 4.18, the kernel supports setting a bridge MTU to a value > 1500.
- PR sonic-net/sonic-swss#1393 modified vlanmgrd to take advantage of this and now configures the MTU of bridge interfaces in SONiC to the proper size of 9100. Therefore, we no longer need to patch radvd. Since we no longer need to patch radvd, we no longer need to build it from source, so we can save build time by going back to simply installing the vanilla radvd Debian package in the router-advertiser container.
mihirpat1 pushed a commit to mihirpat1/sonic-buildimage that referenced this pull request Jun 14, 2023
…#2795)

- What I did
Extend the list of required external dependencies with bridge-utils

- Why I did it
To fix the issue of missing brctl command

- How I verified it
Run test_fabric.py test

Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants