This shows you the differences between two versions of the page.
sred:setup_lab_openstack [2024/11/29 14:49] horia.stoenescu Added page for openstack setup |
sred:setup_lab_openstack [2024/12/03 19:53] (current) horia.stoenescu Added workaround for network connection |
||
---|---|---|---|
Line 41: | Line 41: | ||
{{:sred:openstack_eve_ng.png?600|}} | {{:sred:openstack_eve_ng.png?600|}} | ||
+ | |||
+ | 6. (update) For connecting nodes to Internet, you cannot use Management/Cloud0/pnet0, as we require special permissions (enabling Promiscuous mode, forged arp packets, and mac address changes), and instead use a workaround to trick it by using Cloud1 (from here: https://www.youtube.com/watch?v=7CJR2l8VXM0&ab_channel=NetworkCollective). | ||
+ | |||
+ | Steps: | ||
+ | |||
+ | A. Configure interface //pnet1// from **/etc/network/interfaces** as follows: | ||
+ | <code> | ||
+ | iface eth1 inet manual | ||
+ | auto pnet1 | ||
+ | iface pnet1 inet static | ||
+ | bridge_ports eth1 | ||
+ | bridge_stp off | ||
+ | address 10.199.199.1 | ||
+ | netmask 255.255.255.0 | ||
+ | </code> | ||
+ | |||
+ | Then, restart networking service: | ||
+ | <code> | ||
+ | systemctl restart networking.service | ||
+ | </code> | ||
+ | |||
+ | B. Enable ip forwarding by commenting from **/etc/sysctl.conf**: | ||
+ | <code> | ||
+ | # from sysctl.conf | ||
+ | net.ip4.ip_forward=1 | ||
+ | # then | ||
+ | sysctl -p /etc/sysctl.conf | ||
+ | </code> | ||
+ | |||
+ | C. At last, add a rule for forwarding all packets via nat to pnet0 and make this configuration persistent: | ||
+ | <code> | ||
+ | iptables -t nat -A POSTROUTING -s 10.199.199.0/24 -o pnet0 -j MASQUERADE | ||
+ | # install iptables-persistent | ||
+ | apt-get install -y iptables-persistent | ||
+ | # after a reboot, configuration should remain for nat chain | ||
+ | </code> |