summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig.py
AgeCommit message (Collapse)Author
2020-02-24ifconfig: T2057: generalised Interface configurationThomas Mangin
Provides a way to pass options to interface consistent between subclasses of Interface
2020-02-16ifconfig: bond: T2043: T2030: fix wrong call to os.listdir()Christian Poessinger
2020-02-16bond: T2030: fix incorrect delta calculation on member interfacesChristian Poessinger
THe delta check/calculation always returned False on system startup leading to a non functioning bond interface after a reboot as no physical interface actually enslaved. This was fixed by not calculating the current enslaved interfaces from the existing config but rather retrieving the interfaces from sysfs.
2020-02-14ifconfig: T2034: remove obsolete commentChristian Poessinger
2020-02-14T2034: Disallow removal of default loopback addressesRunar Borge
The removal of interfaces loopback lo results in all address being removed from the loopback interface. (also not cli controlled addresses) In this process 127.0.0.1/8 and ::1/128 are also removed witch results in error for services that are dependent on these adresses, this includes eg. snmp and ssh Removal of these addresses needs to be disallowed by the config backend and removal of the whole config block interfaces loopback lo needs to result in removal of all non-default addresses only.
2020-02-13macvlan: T1635: migrate pseudo-ethernet interface definition to XML/PythonChristian Poessinger
2020-02-01Revert "ifconfig: T2002: only admin up interfaces if parent interface is up"Christian Poessinger
This reverts commit 4a4e2b6386b4c036bbf4486a8a7ac7002d08158b.
2020-02-01Revert "ifconfig: T2002: T2009: bugfix for always disabled Ethernet/Bond ↵Christian Poessinger
interfaces" This reverts commit 95f7a440031c58b47fd88d6aa9fac3ddaf6ae231.
2020-02-01ifconfig: T2002: T2009: bugfix for always disabled Ethernet/Bond interfacesChristian Poessinger
Commit 4a4e2b6 ("ifconfig: T2002: only admin up interfaces if parent interface is up") contained an inheritance issue where the Ethernet and Bond interface was always admin down. This was caused by wrong calls in the inheritance structure.
2020-01-31ifconfig: T2002: only admin up interfaces if parent interface is upChristian Poessinger
On an A/D (administrative down) interface the VLAN code tries to still admin up the interface. This won't work and the kernel will complain with: RTNETLINK answers: Operation not permitted With this change the VLAN interface is only enabled when the parent interface is administrative up, too.
2020-01-03ifconfig: T1939: provide abstraction for interface "ip" optionChristian Poessinger
Provide an XML/Python abstraction to * ip disable-arp-filter * ip enable-arp-accept * ip enable-arp-announce * ip enable-arp-ignore The old implementation can co-exist until the last interfaces have been migrated.
2019-12-31l2tpv3: T1923: support interface deletionChristian Poessinger
2019-12-31l2tpv3: T1923: implementation in XML/PythonChristian Poessinger
Tested using: R1: --- set interfaces l2tpv3 l2tpeth10 address '2001:db8:beef::1/64' set interfaces l2tpv3 l2tpeth10 address '100.0.0.1/24' set interfaces l2tpv3 l2tpeth10 destination-port '3000' set interfaces l2tpv3 l2tpeth10 encapsulation 'udp' set interfaces l2tpv3 l2tpeth10 local-ip '172.18.201.10' set interfaces l2tpv3 l2tpeth10 peer-session-id '10' set interfaces l2tpv3 l2tpeth10 peer-tunnel-id '100' set interfaces l2tpv3 l2tpeth10 remote-ip '172.18.204.10' set interfaces l2tpv3 l2tpeth10 session-id '20' set interfaces l2tpv3 l2tpeth10 source-port '6000' set interfaces l2tpv3 l2tpeth10 tunnel-id '200' R2: --- set interfaces l2tpv3 l2tpeth10 address '2001:db8:beef::2/64' set interfaces l2tpv3 l2tpeth10 address '100.0.0.2/24' set interfaces l2tpv3 l2tpeth10 destination-port '6000' set interfaces l2tpv3 l2tpeth10 encapsulation 'udp' set interfaces l2tpv3 l2tpeth10 local-ip '172.18.204.10' set interfaces l2tpv3 l2tpeth10 peer-session-id '20' set interfaces l2tpv3 l2tpeth10 peer-tunnel-id '200' set interfaces l2tpv3 l2tpeth10 remote-ip '172.18.201.10' set interfaces l2tpv3 l2tpeth10 session-id '10' set interfaces l2tpv3 l2tpeth10 source-port '3000' set interfaces l2tpv3 l2tpeth10 tunnel-id '100'
2019-12-31ifconfig: vxlan: change VXLANIf APIChristian Poessinger
2019-12-31ifconfig: geneve: always place interface in A/D stateChristian Poessinger
2019-12-31geneve: use proper variable nameChristian Poessinger
2019-12-06ifconfig: T1849: fix DHCPv6 startupChristian Poessinger
2019-12-06ifconfig: T1793: remove dhcpv6 client debug outputChristian Poessinger
2019-11-24geneve: T1799: add Generic Network Virtualization EncapsulationChristian Poessinger
2019-11-11ifconfig: T1793: extend set_speed_duplex() delta checkChristian Poessinger
Commit 9e4947770064 ("ifconfig: T1793: add delta check on set_speed_duplex()") was wave1 of reducing the amount of switch-port flaps and BGP session resets. The delta check now also handles the case of fixed speed and duplex settings.
2019-11-10ifconfig: T1793: add delta check on set_speed_duplex()Christian Poessinger
The speend and duplex settings should only be changed when they need to. Always configuring this setting will make the kernel disable and re-enable the physical interface. This will not only let the switchport flap but it will also reset e.g. BGP sessions. This is the first part of this fix for speed/duplex auto settings. In addition - this also reduces the config commit time.
2019-11-10ifconfig: T1793: add delta check on set_flow_control()Christian Poessinger
The flow control settings should only be changed when they need to. If flow control is altered, the kernel will disable and re-enable the interface. This will not only let the switchport flap but it will also reset e.g. BGP sessions. In addition - this also reduces the config commit time.
2019-11-10Python/ifconfig: wireguard: remove trailing whitespacesChristian Poessinger
2019-11-04Python/ifconfig: T1557: do not allow both IPv4 and dhcp address on interfacesChristian Poessinger
2019-10-27T1759: Fixing dependency bug from previous commitkroy
2019-10-27T1759: Merging interface.py into ifconfig.pykroy
2019-10-18Python/ifconfig: T1712: always start DHCP when configuredChristian Poessinger
DHCP was only started when the interface operstate was set to up but this is wrong. An interface can be configured as DHCP interface and DHCP client must be launched even when the physical interface becomes available n-minutes later. DHCP client then can ask for an IP assignemnt by DHCP. Tested by starting DHCP client on a not connected ethernet interface. Address was assigned later on after link became ready.
2019-10-18Python/ifconfig: T1557: get_status() must use admin state not operstateChristian Poessinger
2019-10-16Revert "Python/ifconfig: T1712: wait when changing interface state"Christian Poessinger
This reverts commit 1257d7851866d42287018b38dd871f279b87286a. It will delay network interface configuration everywhere when e.g. no network cable is plugged in. We should find the root cause why DHCPd sometimes did not start.
2019-10-13Python/ifconfig: T1557: add support for DHCPv6 client optionsChristian Poessinger
2019-10-13Python/ifconfig: T1557: bugfix when configuring accept_ra on VLAN interfacesChristian Poessinger
2019-10-11Python/ifconfig: T1723: add flag to specify if we should wait for interface upChristian Poessinger
2019-10-09T1430: add dhcp vendor-class-id client optionChristian Poessinger
2019-10-09Python/ifconfig: T1557: add generic support for DHCP client optionsChristian Poessinger
2019-10-06Python/ifconfig: T1712: wait when changing interface stateChristian Poessinger
With some interfaces, for example bond vif, it take some time for the state change to really happen. Because of this later code, like starting DHCP client, might not work as expected as get_state() reports the old (real) state. Now when changing state of an interface we are (busy-)waiting up to 12.5 seconds before we inform the user that the interface could not be brought up. This should be more then enough time for any interface to start except when there is really no cable attached.
2019-10-06Python/ifconfig: T1557: add return in front of self._cmd() callsChristian Poessinger
2019-09-24Python/ifconfig: T1557: add STPIf class (spanning tree) bridge memberChristian Poessinger
2019-09-24Python/ifconfig: T1557: bugfix removing Q-in-Q VLAN interfacesChristian Poessinger
VLAN interfaces have not been removed "in order". What does it mean? We need to delete Q-in-Q interfaces prior to deleting the underlaying VLAN interface (vif-s). This was not the case and that triggered an exception that a non existing interface was about to be removed. Tested using adding and deleting the following config: set interfaces ethernet eth2 address 192.0.2.1/24 set interfaces ethernet eth2 description "VyOS bonding" set interfaces ethernet eth2 disable-link-detect set interfaces ethernet eth2 mac 00:91:00:00:00:01 set interfaces ethernet eth2 mtu 9000 set interfaces ethernet eth2 vif-s 100 address 192.168.10.1/24 set interfaces ethernet eth2 vif-s 100 description "802.1ad service VLAN 100" set interfaces ethernet eth2 vif-s 100 mtu 1500 set interfaces ethernet eth2 vif-s 100 mac 00:91:00:00:00:02 set interfaces ethernet eth2 vif-s 100 vif-c 110 address "192.168.110.1/24" set interfaces ethernet eth2 vif-s 100 vif-c 110 description "client VLAN 110" set interfaces ethernet eth2 vif-s 100 vif-c 120 address "192.168.120.1/24" set interfaces ethernet eth2 vif-s 100 vif-c 120 description "client VLAN 120" set interfaces ethernet eth2 vif-s 100 vif-c 130 address "192.168.130.1/24" set interfaces ethernet eth2 vif-s 100 vif-c 130 description "client VLAN 130" set interfaces ethernet eth2 vif 400 address 192.168.40.1/24 set interfaces ethernet eth2 vif 400 description "802.1q VLAN 400" set interfaces ethernet eth2 vif 400 mtu 1500 set interfaces ethernet eth2 vif 400 mac 00:91:00:00:00:03
2019-09-24Python/ifconfig: T1557: refactor BondIf 'mode' property to set_mode()Christian Poessinger
2019-09-24Python/ifconfig: T1557: refactor BondIf 'arp_interval' property to ↵Christian Poessinger
set_arp_interval()
2019-09-24Python/ifconfig: T1557: refactor BondIf 'arp_ip_target' property to ↵Christian Poessinger
set_arp_ip_target()/get_arp_ip_target()
2019-09-24Python/ifconfig: T1557: refactor BondIf 'arp_interval' property to ↵Christian Poessinger
set_arp_interval()
2019-09-24Python/ifconfig: T1557: refactor BondIf 'xmit_hash_policy' property to ↵Christian Poessinger
set_hash_policy()
2019-09-24Python/ifconfig: T1557: remove unused has_autoneg() from EthernetIfChristian Poessinger
2019-09-24Python/ifconfig: T1557: refactor Interface 'state' property to ↵Christian Poessinger
set_state()/get_state()
2019-09-24Python/ifconfig: T1557: refactor Interface 'arp_cache_tmo' property to ↵Christian Poessinger
set_set_arp_cache_tmo()
2019-09-24Python/ifconfig: T1557: refactor Interface 'proxy_arp_pvlan' property to ↵Christian Poessinger
set_proxy_arp_pvlan()
2019-09-24Python/ifconfig: T1557: refactor Interface 'proxy_arp' property to ↵Christian Poessinger
set_proxy_arp()
2019-09-24Python/ifconfig: T1557: loopback: implement derived remove()Christian Poessinger
2019-09-24Python/ifconfig: T1557: refactor Interface 'ifalias' property to set_alias()Christian Poessinger