# How correctly set up a network?

**URL:** <https://forum.opennebula.io/t/how-correctly-set-up-a-network/8246>\
**Category:** Product Support\
**Created:** [March 24, 2020, 2:38pm UTC](https://forum.opennebula.io/t/how-correctly-set-up-a-network/8246 "2020-03-24T14:38:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![define](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@define](https://forum.opennebula.io/u/define)\
**Post date:** [March 24, 2020, 2:38pm UTC](https://forum.opennebula.io/t/how-correctly-set-up-a-network/8246/1 "2020-03-24T14:38:28Z")

</div>

Hello.  
I have some problem with a network on kmv virtual machines.  
On a node (Centos7) i created bridge:

> NAME=“eth0”  
> DEVICE=“eth0”  
> ONBOOT=yes  
> BRIDGE=br0  
> TYPE=Ethernet

> DEVICE=“br0”  
> ONBOOT=yes  
> NETBOOT=yes  
> BOOTPROTO=static  
> TYPE=“Bridge”  
> IPADDR=10.10.1.10  
> PREFIX=22  
> GATEWAY=10.10.1.1  
> DNS1=10.10.1.2  
> DNS2=10.10.1.3

Via a frontend i added the virtual network with range of ip address 192.168.1.10 - 192.168.1.20:  
 ![Снимок экрана в 2020-03-24 16-24-47](https://canada1.discourse-cdn.com/flex031/uploads/opennebula/original/2X/c/c98c3ced148ce044d2e4ab87c2637b48bd1163d5.png)

And added the virtual network to my virtual machine.  
But the virtual machine received a IP from dhcp the network where is the node.  
Why it happened? And how correctly set up network with IPs from the virtual network? Thank you.

---

<div class="post-metadata">

**Author:** ![dclavijo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/dclavijo/32/5265_2.png) [@dclavijo](https://forum.opennebula.io/u/dclavijo)\
**Post date:** [March 24, 2020, 3:46pm UTC](https://forum.opennebula.io/t/how-correctly-set-up-a-network/8246/2 "2020-03-24T15:46:29Z")

</div>

Hello, you need to [setup contextualization](http://docs.opennebula.io/5.10/operation/vm_setup/context_overview.html) on your VMs in order for OpenNebula to control it’s internal IP address assignment, among other things. The images from the marketplace already have the contextualization package installed.

---

<div class="post-metadata">

**Author:** ![define](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@define](https://forum.opennebula.io/u/define)\
**Post date:** [March 25, 2020, 7:47am UTC](https://forum.opennebula.io/t/how-correctly-set-up-a-network/8246/3 "2020-03-25T07:47:05Z")

</div>

Thank you so much.
