Skip to content

Instantly share code, notes, and snippets.

@rsmontero
Last active October 6, 2016 08:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rsmontero/9f958d1b9700adc54639524e8a851143 to your computer and use it in GitHub Desktop.
Save rsmontero/9f958d1b9700adc54639524e8a851143 to your computer and use it in GitHub Desktop.
  • Step 1: Create a VNET using the IPAM:
NAME   = all_net
BRIDGE = br0
VN_MAD = dummy
AR = [ TYPE=IP4, SIZE=64, IPAM_MAD = dummy ]
AR = [ TYPE=IP4, SIZE=250, IP=192.168.0.1, IPAM_MAD=dummy ]
AR = [ TYPE=IP4, SIZE=128, IP=172.16.0.2 ]

IPAM module is contacted to register the new network:

Thu Oct  6 10:41:14 2016 [Z0][ReM][D]: Req:1600 UID:0 VirtualNetworkAllocate invoked , "         NAME   = al...", -1
Thu Oct  6 10:41:14 2016 [Z0][IPM][D]: Message received: REGISTER_ADDRESS_RANGE SUCCESS 0 ICAgICAgICBBUj1bCiAgICAgICAgICBUWVBFPSJJUDQiLAogICAgICAgICAgSVAgID0iMTAuMC4wLjEwIiwKICAgICAgICAgIFNJWkU9IjEwMCIsCiAgICAgICAgICBORVRXT1JLX01BU0s9IjI1NS4yNTUuMjU1LjAiLAogICAgICAgICAgR0FURVdBWT0iMTAuMC4wLjEiLAogICAgICAgICAgRE5TPSIxMC4wLjAuMSIsCiAgICAgICAgICBJUEFNX01BRD0iZHVtbXkiCiAgICAgICAgXQo=

Thu Oct  6 10:41:14 2016 [Z0][ReM][D]: Req:1600 UID:0 VirtualNetworkAllocate result SUCCESS, 3
  • Step 2:Create a VM using the VNET
onevm create --name ipam_test --cpu 1 --memory 64 --nic all_net

And in oned.log:

Thu Oct  6 10:41:32 2016 [Z0][ReM][D]: Req:7344 UID:0 VirtualMachineAllocate invoked
 , "NAME="ipam_test"...", false
Thu Oct  6 10:41:32 2016 [Z0][IPM][D]: Message received: GET_ADDRESS SUCCESS 1 QUREU
kVTUyA9IFsgSVA9MTAuMC4wLjUzLCBTSVpFPTEgXQo=

Thu Oct  6 10:41:33 2016 [Z0][ReM][D]: Req:7344 UID:0 VirtualMachineAllocate result 
SUCCESS, 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment