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

Broadcast Address Incorrectly Set on /31 Interfaces #2918

Closed
bensallen opened this issue Nov 5, 2019 · 1 comment
Closed

Broadcast Address Incorrectly Set on /31 Interfaces #2918

bensallen opened this issue Nov 5, 2019 · 1 comment

Comments

@bensallen
Copy link
Contributor

@bensallen bensallen commented Nov 5, 2019

RancherOS Version: (ros os version) 1.5.2

Where are you running RancherOS? Bare-metal.

Due to #1863 and the upstream change vishvananda/netlink#248, interfaces with a /31 subnet have a broadcast address automatically calculated and assigned. Since /31 subnets are for point to point links, the network and broadcast addresses are used by the two end points.

With the auto-assigned broadcast address, /31 addressed interfaces do not successfully pass traffic.

It appears an upstream PR to correct the behavior has been proposed here: vishvananda/netlink#496.

/31 links are useful to minimize IP address usage, in a layer 3 topology from leaf switch to hosts.

Example of current behavior:

4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 52:54:00:83:52:f2 brd ff:ff:ff:ff:ff:ff
    inet 192.168.98.2/31 brd 192.168.98.3 scope global eth2
       valid_lft forever preferred_lft forever

Example of correct config via:

$ ip addr del 192.168.98.2/31 brd 192.168.98.3 dev eth2
$ ip addr add 192.168.98.2/31 dev eth2
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 52:54:00:83:52:f2 brd ff:ff:ff:ff:ff:ff
    inet 192.168.98.2/31 scope global eth2
       valid_lft forever preferred_lft forever
@kingsd041
Copy link
Contributor

@kingsd041 kingsd041 commented Dec 20, 2019

Tested with RancherOS v1.5.5-rc1

Use the following cloud-config.yaml config to install to disk:

#cloud-config
rancher:
  network:
    interfaces:
      eth0:
        dhcp: true
      eth1:
        dhcp: true
      eth2:
        dhcp: false
        address: 192.168.1.91/31

After waiting for Rancheros to restart, check the eth2 broadcast address

[[email protected] ~]# ifconfig eth2
eth2      Link encap:Ethernet  HWaddr 08:00:27:20:07:0D
          inet addr:192.168.1.91  Bcast:0.0.0.0  Mask:255.255.255.254
          inet6 addr: fe80::a00:27ff:fe20:70d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:47 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4724 (4.6 KiB)  TX bytes:936 (936.0 B)

It can be seen from the results that eth2 does not automatically assign a broadcast address

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants