AVI: Difference between revisions
Content added Content deleted
Line 440: | Line 440: | ||
subnetid=`openstack subnet show data4snw | grep " id " | awk '{print $4;}'` |
subnetid=`openstack subnet show data4snw | grep " id " | awk '{print $4;}'` |
||
neutron router-interface-add $routerid subnet=$subnetid |
neutron router-interface-add $routerid subnet=$subnetid |
||
== Configuring Allowed Address Pair (AAP) == |
|||
* This setup is not required if the OS VM is not deployed on top of another OS cloud. |
|||
* If the OS VM is deployed on top of a vCenter cloud, we need to change the value of Promiscous Mode, MAC address Changes and Forged Transmists to Accept on the PG used for the Provider Network Mapping(for ex: eth1) interface of the VM |
|||
* Not needed if Devstack is deployed in VCenter |
|||
interface="ens192" |
|||
cidr="10.70.47.96/27" |
|||
for e in `env | grep ^OS_ | cut -d'=' -f1`; do unset $e; done |
|||
my_mac=`ifconfig $interface | grep "HWaddr" | awk '{print $5;}'` |
|||
if [ -z "$my_mac" ]; then |
|||
echo "Can't find mac!" |
|||
exit |
|||
fi |
|||
Resolve openstack-controller |
|||
sed -i "s/nameserver 10.10.0.100\n//g" /etc/resolv.conf |
|||
echo "nameserver 10.10.0.100" >> /etc/resolv.conf |
|||
sed -i "s/search avi.local\n//g" /etc/resolv.conf |
|||
echo "search avi.local" >> /etc/resolv.conf |
|||
Figure out the port-id from lab credentials |
|||
port_id=`neutron port-list | grep "$my_mac" | awk '{print $2;}'` |
|||
qrouters=`ip netns list | grep qrouter | cut -f 1 -d ' '` |
|||
aaplist="" |
|||
for qr in $qrouters; do |
|||
mac=`sudo ip netns exec $qr ifconfig | grep qg | awk '{print $5;}'` |
|||
aaplist="$aaplist mac_address=$mac,ip_address=$cidr" |
|||
done |
|||
neutron port-update $port_id --allowed-address-pairs type=dict list=true $aaplist |
|||
= Using Ansible = |
= Using Ansible = |