Age | Commit message (Collapse) | Author |
|
|
|
A generic function which can parse the VLAN (vif, vif-s, cif-c) nodes in a
config session. A dictionary describing the VLAN is returned.
A good example will be the interface-bonding.py script used to generate bond
interfaces in the system. It is used as follows:
if conf.exists('vif'):
for vif in conf.list_nodes('vif'):
# set config level to vif interface
conf.set_level(cfg_base + ' vif ' + vif)
bond['vif'].append(vlan_to_dict(conf))
|
|
A list containing only unique elements not part of the other list is
returned. This is usefull to check e.g. which IP addresses need to be
removed from the OS.
|
|
vyos.ifconfig class
|
|
The following CLI command can be used to add a raw option to OpenVPN
which requires quotes:
> set interfaces openvpn vtun10 openvpn-option 'push "keepalive 1 10"'
The resulting config file will then have the following set:
> push "keepalive 1 10"
|
|
|
|
|
|
T1614 bonding
|
|
a bond
|
|
As in the past during the priority race of the bash script invalid configuration
could appear in the CLI and are de-synced from the kernle state, e.g. some
bonding modes do not support arp_interval.
This is no longer allowed and added to the migration script so that the config
again represents the truth.
|
|
|
|
Tested using:
=============
set interfaces bonding bond0 address 192.0.2.1/24
set interfaces bonding bond0 description "VyOS bonding"
set interfaces bonding bond0 disable-link-detect
set interfaces bonding bond0 hash-policy layer2+3
set interfaces bonding bond0 ip arp-cache-timeout 86400
set interfaces bonding bond0 mac 00:91:00:00:00:01
set interfaces bonding bond0 mode active-backup
set interfaces bonding bond0 mtu 9000
set interfaces bonding bond0 member interface eth1
set interfaces bonding bond0 member interface eth2
set interfaces bonding bond0 vif-s 100 address 192.168.10.1/24
set interfaces bonding bond0 vif-s 100 description "802.1ad service VLAN 100"
set interfaces bonding bond0 vif-s 100 mtu 1500
set interfaces bonding bond0 vif-s 100 mac 00:91:00:00:00:02
set interfaces bonding bond0 vif-s 100 vif-c 110 address "192.168.110.1/24"
set interfaces bonding bond0 vif-s 100 vif-c 110 description "client VLAN 110"
set interfaces bonding bond0 vif-s 100 vif-c 120 address "192.168.120.1/24"
set interfaces bonding bond0 vif-s 100 vif-c 120 description "client VLAN 120"
set interfaces bonding bond0 vif-s 100 vif-c 130 address "192.168.130.1/24"
set interfaces bonding bond0 vif-s 100 vif-c 130 description "client VLAN 130"
set interfaces bonding bond0 vif 400 address 192.168.40.1/24
set interfaces bonding bond0 vif 400 description "802.1q VLAN 400"
set interfaces bonding bond0 vif 400 mtu 1500
set interfaces bonding bond0 vif 400 mac 00:91:00:00:00:03
|
|
|
|
Support for vif-c interfaces is still missing
|
|
|
|
|
|
The node 'interfaces ethernet eth0 bond-group' has been changed and
de-nested. Bond members are now configured in the bond interface itself.
set interfaces bonding bond0 member interface eth0
|
|
[op-mode] T1621 rewrite misc commands to python/xml syntax
|
|
|
|
|
|
|
|
|
|
|
|
T1557 Create generic abstraction for configuring interfaces e.g. IP address
|
|
|
|
|
|
|
|
functionality must saved
|
|
|
|
|
|
|
|
This feature is not well supported by pyroute2 and thus uses the proof-of-concept
vyos.interfaceconfig library.
Maybe it's a better idea to write our own library from scratch.
|
|
|
|
* t1614-bonding:
Python/VyOS validate: add is_ip() to check for IPv4 or IPv4 address
bridge: T1556: remove unused function freeze()
list-interfaces: T1614: support listing interfaces which can be bonded
|
|
|
|
|
|
|
|
|
|
loopback: T1601: migrate to pyroute2
|
|
|
|
|
|
bridge: T1556: migrate to pyroute2
|
|
Tested with:
set interfaces bridge br0 address '192.0.2.1/24'
set interfaces bridge br0 aging '500'
set interfaces bridge br0 disable-link-detect
set interfaces bridge br0 forwarding-delay '11'
set interfaces bridge br0 hello-time '5'
set interfaces bridge br0 igmp querier
set interfaces bridge br0 max-age '11'
set interfaces bridge br0 member interface eth1 cost '1000'
set interfaces bridge br0 member interface eth1 priority '4'
set interfaces bridge br0 member interface eth2 cost '1001'
set interfaces bridge br0 member interface eth2 priority '56'
|
|
|
|
|
|
|
|
|
|
|
|
vyos@vyos:~$ show openvpn site-to-site
OpenVPN status on vtun1
Client CN Remote Host Local Host TX bytes RX bytes Connected Since
--------- ----------- ---------- -------- -------- ---------------
None (PSK) N/A 172.18.201.10:1195 3.3 KiB 3.3 KiB N/A
vyos@vyos:~$ show openvpn server
OpenVPN status on vtun10
Client CN Remote Host Local Host TX bytes RX bytes Connected Since
--------- ----------- ---------- -------- -------- ---------------
client1 172.18.202.10:58644 172.18.201.10:1194 63.6 KiB 63.4 KiB Mon Aug 26 11:47:56 2019
client3 172.18.204.10:52641 172.18.201.10:1194 63.1 KiB 62.7 KiB Mon Aug 26 11:47:58 2019
OpenVPN status on vtun11
Client CN Remote Host Local Host TX bytes RX bytes Connected Since
--------- ----------- ---------- -------- -------- ---------------
client2 172.18.203.10:39472 172.18.201.10:1200 61.2 KiB 61.5 KiB Mon Aug 26 11:50:30 2019
|
|
[op-mode] T1607 rewrite 'reset conntrack' and 'reset & show ip[v6]' to python/xml syntax
|