fix gateway ip
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
244084df30
commit
9b060eaf34
2 changed files with 2 additions and 2 deletions
|
|
@ -35,7 +35,7 @@ function start_vm {
|
||||||
|
|
||||||
#bash agent.sh StartVm -c vpc-00000 -s subnet-00000 -v 12 -g 240.0.0.1 -n 240.0.0.0 -e 16 -m i-00000 -p 240.0.1.1
|
#bash agent.sh StartVm -c vpc-00000 -s subnet-00000 -v 12 -g 240.0.0.1 -n 240.0.0.0 -e 16 -m i-00000 -p 240.0.1.1
|
||||||
local local_ip=$(ip a show dev ${FLAGS_interface} | grep 'inet ' | sed -e 's/ */ /g' |cut -d\ -f 3|cut -d\/ -f1)
|
local local_ip=$(ip a show dev ${FLAGS_interface} | grep 'inet ' | sed -e 's/ */ /g' |cut -d\ -f 3|cut -d\/ -f1)
|
||||||
local gateway_ip="${FLAGS_gateway_ip}/32"
|
local gateway_ip="${FLAGS_gateway_ip}"
|
||||||
local subnet="${FLAGS_network}/${FLAGS_netmask}"
|
local subnet="${FLAGS_network}/${FLAGS_netmask}"
|
||||||
local vm_ip="${FLAGS_vm_ip}/${FLAGS_netmask}"
|
local vm_ip="${FLAGS_vm_ip}/${FLAGS_netmask}"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ function create_subnet {
|
||||||
|
|
||||||
|
|
||||||
print_in_color "${COLOR_GREEN}" " - add subnet ip"
|
print_in_color "${COLOR_GREEN}" " - add subnet ip"
|
||||||
ip -n "${vpc_name}" a add "${gateway_ip}" dev "br-${subnet_id}"
|
ip -n "${vpc_name}" a add "${gateway_ip}/32" dev "br-${subnet_id}"
|
||||||
print_in_color "${COLOR_GREEN}" " - add subnet route"
|
print_in_color "${COLOR_GREEN}" " - add subnet route"
|
||||||
ip -n "${vpc_name}" r add "${subnet}" dev "br-${subnet_id}" scope link
|
ip -n "${vpc_name}" r add "${subnet}" dev "br-${subnet_id}" scope link
|
||||||
print_in_color "${COLOR_GREEN}" " - add subnet firewall"
|
print_in_color "${COLOR_GREEN}" " - add subnet firewall"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue