route files are not written on SUSE distros
Bug #1812117 reported by
Robert Schweikert
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
On SUSE distros the routes need to be written to ifroute-* files.
At present the sysconfig renderer does not write the default routes to ifroute-* files, rather the default rout information is set in ifcfg-*. However the values DEFROUTE=yes and IPV6_DEFAULTGW have no meaning in SUSE ifcfg-* files and are ignored. The routes for an interface are loaded from the ifroute-* file.
The file content is expected to be in the format
Destination Gateway Netmask Interface Options
The following config shown at https:/
ifroute-eth1
default 10.80.124.81
ifroute-eth2
default 192.168.1.254
ifroute-eth3
default fe80::10:80:124:81
Related branches
~rjschwei/cloud-init:setDefRoute
Merged
into
cloud-init:master
- Server Team CI bot: Approve (continuous-integration)
- Ryan Harper: Approve
- Dan Watkins: Approve
- Ryan Harper: Pending requested
-
Diff: 273 lines (+118/-17)3 files modifiedcloudinit/net/network_state.py (+33/-8)
cloudinit/net/sysconfig.py (+22/-9)
tests/unittests/test_net.py (+63/-0)
To post a comment you must log in.
Examples from the man page
An example with common network interfaces and some static routes:
# --- IPv4 routes in CIDR prefix notation:
204.127. 235.0/24 - - eth0
207.68. 156.51/ 32 207.68.145.45 - eth1
192.168. 0.0/16 207.68.156.51 - eth1
# Destination [Gateway] - Interface
#
127.0.0.0/8 - - lo
default 204.127.235.41 - eth0
# --- IPv4 routes in deprecared netmask notation:
204.127. 235.0 0.0.0.0 255.255.255.0 eth0
207.68. 156.51 207.68.145.45 255.255.255.255 eth1
# Destination [Dummy/Gateway] Netmask Interface
#
127.0.0.0 0.0.0.0 255.255.255.0 lo
default 204.127.235.41 0.0.0.0 eth0
192.168.0.0 207.68.156.51 255.255.0.0 eth1
# --- IPv6 routes are always using CIDR notation:
2001:DB8: 100::/64 - - eth0
2001:DB8: 100::/32 fe80::216: 3eff:fe6d: c042 - eth0
# Destination [Gateway] - Interface
#