Scénario #26930
Restaurer la possibilité d'ajouter des routes statiques au travers de vlan en 2.6
100%
Description
Bonjour,
Jusqu'en vesion 2.5.2 il était possible de router les paquets au travers d'interfaces taggées
A partir de la version 2.6 il n'est plus possible de choisir autre chose qu'un numéro d'interface
Afin de pouvoir proposer un fonctionnement proche du 2.5.2 nous avons créer un dico additionnel et patcher le fichier static-route, mais il serait plus intéressant
pour tout le monde que cette fonvtionnalité soit native
CDT
Je vous joins le dico et le patch
Subtasks
History
#1 Updated by Joël Cuissinat over 4 years ago
- Subject changed from ajout de route static au travers de vlan to Restaurer la possibilité d'ajoutes des routes statiques au travers de vlan en 2.6
Cf. échanges sur la liste amon-sphynx
#2 Updated by Joël Cuissinat over 4 years ago
- Subject changed from Restaurer la possibilité d'ajoutes des routes statiques au travers de vlan en 2.6 to Restaurer la possibilité d'ajouter des routes statiques au travers de vlan en 2.6
#3 Updated by Gilles Grandgérard over 4 years ago
- Tracker changed from Demande to Scénario
- Due date set to 03/22/2019
- Target version set to sprint 2019 10-12 Equipe MENSR
- Release set to EOLE 2.6.2
c'est une régression ...
#4 Updated by Joël Cuissinat over 4 years ago
- Story points set to 3.0
#5 Updated by Scrum Master over 4 years ago
- Due date deleted (
03/22/2019) - Target version deleted (
sprint 2019 10-12 Equipe MENSR) - Start date deleted (
02/18/2019) - Release changed from EOLE 2.6.2 to EOLE 2.6.2.2
- Nous devons retravailler le patch et vérifier différents cas d'utilisation => reporté pour la réalisation 2.6.2
- L'implémentation sur les versions >= 2.7.0 nécessite un travail d'adaptation.
#6 Updated by Laurent HAEFFELE over 4 years ago
Pour information, concernant Eole 2.7.0, voici le dicos et les 3 patchs créés à Strasbourg (j'ai nommé la variable acastra_route_vlan_id pour plus de lisibilité et éviter les conflits à venir).
=> dico acastra-static-route-vlan.xml:
<?xml version="1.0" encoding="utf-8"?> <creole> <variables> <family mode="expert" name="réseau avancé" icon='sitemap'> <variable name='acastra_route_vlan_id' type='port' description="Numero de VLAN ou rien" ></variable> </family> </variables> <constraints> <group master='route_adresse'> <slave>acastra_route_vlan_id</slave> </group> </constraints> </creole>
=> 01-extras-routes.yaml.patch
--- distrib/01-extras-routes.yaml 2019-01-10 14:42:31.000000000 +0100 +++ modif/01-extras-routes.yaml 2019-03-06 16:51:20.659038723 +0100 @@ -1,3 +1,4 @@ +%set %%vlan_routes = {} %set %%routes = {} %for %%route in %%route_adresse %set %%interface = %%route.route_int @@ -5,14 +6,21 @@ %continue %end if %set %%carte = %%getVar(u'nom_zone_eth'+ %%interface) - %%routes.setdefault(%%carte, []).append({'dest': %%route, + %if %%route.acastra_route_vlan_id is None + %%routes.setdefault(%%carte, []).append({'dest': %%route, 'gw': %%route.route_gw, 'netmask': %%route.route_netmask}) + %else + %%vlan_routes.setdefault(%%route.acastra_route_vlan_id, []).append({'dest': %%route, + 'gw': %%route.route_gw, + 'netmask': %%route.route_netmask}) + %end if %end for -%if %%routes +%if %%routes or %%vlan_routes network: version: 2 renderer: networkd + %if %%routes ethernets: %for %%interface in %%routes: %%interface: @@ -22,5 +30,18 @@ via: %%route.gw metric: 100 %end for - %end for + %end for + %end if + %if %%vlan_routes + vlans: + %for %%vlan_id in %%vlan_routes: + vlan%%vlan_id: + routes: + %for %%route in %%vlan_routes[vlan_id]: + - to: %%route.dest/%%calc_classe(%%route.netmask) + via: %%route.gw + metric: 100 + %end for + %end for + %end if %end if
=> common-squid1.conf.patch
--- distrib/common-squid1.conf 2018-11-28 14:50:16.000000000 +0100 +++ modif/common-squid1.conf 2019-03-06 17:19:33.923079720 +0100 @@ -46,6 +46,13 @@ #empêche le fonctionnement de cntlm (#10130) #acl srcnoauth src %%ip_vlan/32 acl vlan_eth%%{interface}_%%vlans_iter src %%getattr(%%vlans_iter, %%network_key)/%%calc_classe(%%getattr(vlans_iter, %%netmask_key)) +%if %%is_defined('route_adresse') +%for %%route_iter in %%route_adresse + %if %%route_iter.route_int == %%interface and %%route_iter.acastra_route_vlan_id == %%vlans_iter +acl vlan_eth%%{interface}_%%vlans_iter src %%route_iter/%%calc_classe(route_iter.route_netmask) + %end if +%end for +%end if acl reseaueth%%{interface}_%%vlans_iter dst %%getattr(%%vlans_iter, %%network_key)/%%calc_classe(%%getattr(%%vlans_iter, %%netmask_key)) acl localhosteth%%{interface}_%%vlans_iter dst %%ip_vlan/32 %end for
=> nginx.wpad.patch
--- distrib/nginx.wpad 2017-11-16 11:22:14.000000000 +0100 +++ modif/nginx.wpad 2019-03-06 17:33:15.615099615 +0100 @@ -37,7 +37,11 @@ %if %%activer_route == "oui" #Routes statiques %for %%indirectnet in %%route_adresse - %%indirectnet/%%calc_classe(%%indirectnet.route_netmask) %%indirectnet.route_int; + %%indirectnet/%%calc_classe(%%indirectnet.route_netmask) eth%%indirectnet.route_int%slurp + %if %%indirectnet.acastra_route_vlan_id +.%%indirectnet.acastra_route_vlan_id%slurp + %end if +; %end for %end if } @@ -68,6 +72,13 @@ %%gen_wpad_end_of_file(%%nb_zone, %%getattr(%%vlan, 'vlan_ip_eth' + %%nb_zone), %%getattr(%%vlan, 'wpad_proxyport_vlan_eth' + %%nb_zone)) rewrite ^/wpad.eth%%{nb_zone}.%%vlan /wpad.eth%%{nb_zone} break; allow %%getattr(%%vlan, %%vlan_net)/%%calc_classe(%%getattr(%%vlan, %%vlan_mask)); + %if %%activer_route == "oui" + %for %%route_iter in %%route_adresse + %if %%route_iter.route_int == %%nb_zone and %%route_iter.acastra_route_vlan_id == %%vlan + allow %%route_iter/%%calc_classe(route_iter.route_netmask); + %end if + %end for + %end if deny all; } %end for
#7 Updated by Joël Cuissinat over 4 years ago
- Due date set to 04/12/2019
- Target version set to sprint 2019 13-15 Equipe MENSR
- Start date set to 03/25/2019
#8 Updated by Fabrice Barconnière over 4 years ago
- Assigned To set to Fabrice Barconnière
#9 Updated by Joël Cuissinat over 4 years ago
- Status changed from Nouveau to Terminé (Sprint)