Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

IP address on tagged VLAN interface #1551

Closed
simwood-simon opened this issue Jan 24, 2017 · 2 comments · Fixed by #2346
Closed

IP address on tagged VLAN interface #1551

simwood-simon opened this issue Jan 24, 2017 · 2 comments · Fixed by #2346
Milestone

Comments

@simwood-simon
Copy link

Hi there

RancherOS Version: (ros os version)
v0.7.1

Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.)
Baremetal.

I have a config like:

    interfaces:
      "mac=00:25:90:xx:xx:xx:xx":
        dhcp: true
      "mac=00:1b:21:xx:xx:xx:xx":
        vlans: 234:infra,264:public
      infra:
        address: xxx.xxx.xxx.xxx/xx
      public:
        address: xxx.xxx.xxx.xxx/xx

Whilst the interfaces are created and brought up, the IP addresses are not assigned. ros config export shows that they are there but they do not show in ifconfig and are unresponsive from the switch side of things.

I couldn't find any known issues like this.

Thanks!
Simon

@bensallen
Copy link
Contributor

I'm having this same problem with v1.3.0.

It appears the issue is that the "mac=00:1b:21:xx:xx:xx:xx" interface is matching for the new infra and public interfaces as they all share the same MAC address. Currently the code is saying MAC address matches win over interface names. There's an override for this case for bond interfaces, but not VLAN interfaces currently at https://github.com/rancher/os/blob/master/netconf/netconf_linux.go#L117.

I think the fix should be ignore MAC address matches if the interface is a VLAN interface. Matching the VLAN interface by either checking link.Attrs().ParentIndex == 0. However this it of a bigger hammer than needed as it will also match macvlan interfaces as well. Instead netConf.Vlans should be inspect and if the interface name is contained, skip using the "mac=00:1b:21:xx:xx:xx:xx" match.

@will-chan
Copy link
Contributor

Zhibo, can you review and merge this in for 1.3.0?

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

Successfully merging a pull request may close this issue.

4 participants