You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have managed to set up code that manually configures a vlan tagged interface with eth0 through vintage_net.
I'm posting my documentation here in hopes that it can help with the creation of a built in module within vintage_net.
Thank you for sharing this! I make passes on VintageNet updates about once a month. This is really interesting to me, and I think you may have filled in a couple key details and this might not be so much work to add. I'll have to think about it more. This is going to look like it's not getting any attention, but rest assured it's in the back of my mind for my next pass on VintageNet. Obviously, if I'm too slow, I love getting PRs and would brainstorm designs in the interim if someone was going to put in the time to implement.
cc: @aadavids
I have managed to set up code that manually configures a vlan tagged interface with eth0 through vintage_net.
I'm posting my documentation here in hopes that it can help with the creation of a built in module within vintage_net.
Commands used to get VLAN id started:
Creates VLAN interface:
VintageNet.Command.cmd("ip", ["link", "add", "link", "eth0", "name", "eth0." <> vlan_id, "type", "vlan", "id", vlan_id])
Configure static IP to VLAN interface:
VintageNet.configure("eth0." <> vlan_id, %{type: VintageNetEthernet, ipv4: %{method: :static, address: static_ip, prefix_length: 24, gateway: gateway_ip <> ".1", name_servers: ["1.1.1.1"]}}, persist: false)
Gets interface up:
VintageNet.Command.cmd("ip", ["link", "set", "dev", "eth0." <> vlan_id, "up"])
Other commands for debugging/testing:
Take interface down:
VintageNet.Command.cmd("ip", ["link", "set", "dev", "eth0." <> vlan_id, "down"])
Get info on interface:
VintageNet.Command.cmd("ip", ["-d", "link", "show", "eth0." <> vlan_id])
Delete interface:
VintageNet.Command.cmd("ip", ["link", "delete", "eth0." <> vlan_id"])
Linux Kernel Flags Required:
The text was updated successfully, but these errors were encountered: