Fix an issue that prevents vDNS replies
[demo.git] / vnfs / vLBMS / scripts / set_gre_tunnel.sh
1 #!/bin/bash
2
3 LB_TO_PKTGEN_IF=$(cat /opt/config/lb_to_pktgen_if.txt)
4 LB_PRIVATE_IP=$(cat /opt/config/lb_private_ipaddr.txt)
5 MY_PRIVATE_IP=$(cat /opt/config/local_private_ipaddr.txt)
6
7 sed -i "s/x.x.x.x/"$LB_TO_PKTGEN_IF"/g" /etc/bind/named.conf.options
8
9 ip tunnel add gre123 mode gre remote $LB_PRIVATE_IP local $MY_PRIVATE_IP ttl 255
10 ip link set gre123 up
11 ip addr add $LB_TO_PKTGEN_IF"/32" dev gre123
12 route add default dev gre123
13 ifconfig eth0 down
14
15 service bind9 restart