Open akry opened 8 years ago
$ vnctl translations static_address add tr-saddr \
--ingress-ipv4-address 192.168.2.5 \
--egress-ipv4-address 10.100.0.20 \
--ingress-network-uuid nw-global \
--egress-network-uuid nw-vnet
---
:id: 3
:translation_id: 1
:route_link_id: 1
:ingress_ipv4_address: 192.168.2.5
:egress_ipv4_address: 10.100.0.20
:ingress_port_number:
:egress_port_number:
:created_at: 2016-xx-yy 00:16:55.000000000 Z
:updated_at: 2016-xx-yy 00:16:55.000000000 Z
:deleted_at:
:is_deleted: 0
Current implementation requires users a bit cumbersome operations for NAT through wanedge. When the users create a NAT rule they need to know the
mac_lease_uuid
of a specific simulated interface and theroute_link_uuid
that links a virtual network and a physical network.What I did is the following:
1) initial db setup (these are passed to vnctl)
memorize
route_link_uuid
:rl-vnet1link1
2) lookup
mac_lease_uuid
ofif-glo2vnetgw
with either vnctl or mysqlor
memorize
mac_lease_uuid
:ml-ecil1m8s
3) create a nat rule with
route_link_uuid
andmac_lease_uuid
We need a sort of interface with which the users specify only
ingress_ipv4_address
andegress_ipv4_address
like the followingHere vnmgr selects the proper uuid of route_link and create ip_lease for if-glo2vnet based on the parameters passed to vnctl. We might need more information otherwise it's very hard to guess.