Use ip commande insteed of route and ifconfig
authorThomas Pérennou (Viveris Technologie) <thomas.perennou@external.thalesgroup.com>
Wed, 25 Feb 2015 17:29:14 +0000 (18:29 +0100)
committerThomas Pérennou (Viveris Technologie) <thomas.perennou@external.thalesgroup.com>
Wed, 25 Feb 2015 17:29:14 +0000 (18:29 +0100)
master/root/bin/deploiement_conf_reseau_integration.sh

index 8ab7d740184b3263543cf53cc57e1c705a294710..dbdb5e2156700950ce0760007ce751d0b89ff149 100755 (executable)
@@ -40,12 +40,12 @@ done
 
 
 # Attribution adresse IP au capteur dans le domaine 192.168.$SUB.0
-ifconfig eth1:2 192.168.$SUB.160
+ip addr add 192.168.$SUB.160/24 dev eth0
 
 # Definition des routes supplementaires
-route add 192.168.$SUB.160 gw 192.168.$SUB.231
-route add 192.168.$SUB.231 gw 192.168.$SUB.160
-route add 192.168.0.53 gw 192.168.$SUB.160
+ip route add 192.168.$SUB.160 via 192.168.$SUB.231 dev eth0
+ip route add 192.168.$SUB.231 via 192.168.$SUB.160 dev eth0
+ip route add 192.168.0.53 via 192.168.$SUB.160 dev eth0
 
 if [ $SWITCH -eq 1 ]; then
     # Recuperation du chemin pour executer le script du switch depuis un chemin quelconque