PageSourceSearch

https://archive-os-3-29.netlify.app/assets/js/80a5fbd6.763b4431.js

js archive-os-3-29.netlify.app collected 2026-10-03 10:31:38 UTC 7,851 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunktigera_docs=self.webpackChunktigera_docs||[]).push([["6116"],{31435(e,n,t){t.r(n),t.d(n,{metadata:()=>i,default:()=>h,frontMatter:()=>a,contentTitle:()=>s,toc:()=>c,assets:()=>l});var i=JSON.parse('{"id":"networking/openstack/floating-ips","title":"Floating IPs","description":"Configure floating IPs in Calico for OpenStack.","source":"@site/calico_versioned_docs/version-3.29/networking/openstack/floating-ips.mdx","sourceDirName":"networking/openstack","slug":"/networking/openstack/floating-ips","permalink":"/calico/3.29/networking/openstack/floating-ips","draft":false,"unlisted":false,"editUrl":"https://github.com/tigera/docs/edit/main/calico_versioned_docs/version-3.29/networking/openstack/floating-ips.mdx","tags":[],"version":"3.29","frontMatter":{"description":"Configure floating IPs in Calico for OpenStack."},"sidebar":"calicoSidebar","previous":{"title":"Detailed semantics","permalink":"/calico/3.29/networking/openstack/semantics"},"next":{"title":"Service IPs","permalink":"/calico/3.29/networking/openstack/service-ips"}}'),r=t(70689),o=t(3413);let a={description:"Configure floating IPs in Calico for OpenStack."},s="Floating IPs",l={},c=[];function d(e){let n={admonition:"admonition",code:"code",h1:"h1",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"floating-ips",children:"Floating IPs"})}),"\n",(0,r.jsxs)(n.p,{children:["Calico includes beta support for floating IPs. Currently this\nrequires running Calico as a Neutron core plugin (i.e. ",(0,r.jsx)(n.code,{children:"core_plugin = calico"}),") instead of as an ML2 mechanism driver."]}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsx)(n.p,{children:"We would like it to work as an ML2 mechanism driver too\u2014patches\nand/or advice welcome!"})}),"\n",(0,r.jsx)(n.p,{children:"To set up a floating IP, you need the same pattern of Neutron data model\nobjects as you do for Neutron in general, which means:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"a tenant network, with an instance attached to it, that will be the target of\nthe floating IP"}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"a Neutron router, with the tenant network connected to it"}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["a provider network with ",(0,r.jsx)(n.code,{children:"router:external True"})," that is set as the\nrouter's gateway (e.g. with ",(0,r.jsx)(n.code,{children:"neutron router-gateway-set"}),"), and with a\nsubnet with a CIDR that floating IPs will be allocated from"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"a floating IP, allocated from the provider network subnet, that maps onto the\ninstance attached to the tenant network."}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"For example:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Create tenant network and subnet."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"neutron net-create --shared calico\nneutron subnet-create --gateway 10.65.0.1 --enable-dhcp --ip-version 4 --name calico-v4 calico 10.65.0.0/24\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Boot a VM on that network."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"nova boot [...]\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Find its Neutron port ID."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"neutron port-list\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Create an external network and subnet; this is where floating\nIPs will be allocated from."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"neutron net-create public --router:external True\nneutron subnet-create public 172.16.1.0/24\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Create a router connecting the tenant and external networks."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"neutron router-create router1\nneutron router-interface-add router1 <tenant-subnet-id>\nneutron router-gateway-set router1 public\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Create a floating IP and associate it with the target VM."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"neutron floatingip-create public\nneutron floatingip-associate <floatingip-id> <target-VM-port-id>\n"})}
1),"\n",(0,r.jsx)(n.p,{children:"Then the Calico agents will arrange that the floating IP is routed to the\ninstance's compute host, and then DNAT'd to the instance's fixed IP address."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"From a compute node, issue the following command."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"ip r\n"})}),"\n",(0,r.jsx)(n.p,{children:"It should return the routing table."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"default via 10.240.0.1 dev eth0\n10.65.0.13 dev tap9a7e0868-da  scope link\n10.65.0.14 via 192.168.8.4 dev l2tpeth8-3  proto bird\n10.65.0.23 via 192.168.8.4 dev l2tpeth8-3  proto bird\n10.240.0.1 dev eth0  scope link\n172.16.1.3 dev tap9a7e0868-da  scope link\n192.168.8.0/24 dev l2tpeth8-3  proto kernel  scope link  src 192.168.8.3\n192.168.122.0/24 dev virbr0  proto kernel  scope link  src 192.168.122.1\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Issue the following command to review iptables."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo iptables -L -n -v -t nat\n"})}),"\n",(0,r.jsx)(n.p,{children:"It should return something like the following."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"[...]\nChain felix-FIP-DNAT (2 references)\n pkts bytes target     prot opt in     out     source               destination\n    0     0 DNAT       all  --  *      *       0.0.0.0/0            172.16.1.3           to:10.65.0.13\n\nChain felix-FIP-SNAT (1 references)\n pkts bytes target     prot opt in     out     source               destination\n    0     0 SNAT       all  --  *      *       10.65.0.13           10.65.0.13           to:172.16.1.3\n\nChain felix-OUTPUT (1 references)\n pkts bytes target     prot opt in     out     source               destination\n    1    60 felix-FIP-DNAT  all  --  *      *       0.0.0.0/0            0.0.0.0/0\n\nChain felix-POSTROUTING (1 references)\n pkts bytes target     prot opt in     out     source               destination\n    1    60 felix-FIP-SNAT  all  --  *      *       0.0.0.0/0            0.0.0.0/0\n\nChain felix-PREROUTING (1 references)\n pkts bytes target     prot opt in     out     source               destination\n    0     0 felix-FIP-DNAT  all  --  *      *       0.0.0.0/0            0.0.0.0/0\n    0     0 DNAT       tcp  --  *      *       0.0.0.0/0            169.254.169.254      tcp dpt:80 to:127.0.0.1:8775\n[...]\n"})}),"\n"]}),"\n"]})]})}function h(e={}){let{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},3413(e,n,t){t.d(n,{R:()=>a,x:()=>s});var i=t(16645);let r={},o=i.createContext(r);function a(e){let n=i.useContext(o);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.