-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* interface: implement IP address configuration Example configuration (CLI): ``` interfaces interface eth-rt2 type iana-if-type:ethernetCsmacd ! ipv4 address 10.0.1.1 prefix-length 24 ! ``` Example configuration (JSON): ``` { "ietf-interfaces:interfaces": { "interface": [ { "name": "eth-rt2", "type": "iana-if-type:ethernetCsmacd", "ietf-ip:ipv4": { "address": [ { "ip": "10.0.1.1", "prefix-length": 24 } ] } } } } } ``` This commit also includes a refactoring to allow configuring interfaces before they exist at the OS-level. Then, once the interface becomes available, its pre-existing configuration is applied. Signed-off-by: Renato Westphal <[email protected]> * interface: implement admin status configuration Signed-off-by: Renato Westphal <[email protected]> * interface: implement MTU configuration Of particular note, the ietf-interfaces module has different leafs to configure MTU for IPv4 and IPv6, but Linux supports a single MTU for all L3 protocols. As such, a validation callback was added to ensure the IPv4 and IPv6 MTUs are the same when both are configured. Signed-off-by: Renato Westphal <[email protected]> * interface: implement VLAN subinterfaces configuration Example configuration (CLI): ``` [snip] interfaces interface eth-rt2.10 type ietf-if-extensions:ethSubInterface encapsulation dot1q-vlan outer-tag vlan-id 10 parent-interface eth-rt2 ! ``` Example configuration (JSON): ``` { "ietf-interfaces:interfaces": { "interface": [ [snip] { "name": "eth-rt2.10", "type": "ietf-if-extensions:ethSubInterface", "ietf-if-extensions:encapsulation": { "ietf-if-vlan-encapsulation:dot1q-vlan": { "outer-tag": { "vlan-id": 10 } } }, "ietf-if-extensions:parent-interface": "eth-rt2" } ] } } ``` Signed-off-by: Renato Westphal <[email protected]> --------- Signed-off-by: Renato Westphal <[email protected]>
- Loading branch information
Showing
17 changed files
with
2,381 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.