Changes

Jump to: navigation, search

VirtualBox Network Configuration

1,050 bytes added, 17:11, 8 February 2021
VirtualBox Network Configuration Primer
=== VirtualBox Network Configuration Primer ===
VirtualBox networking supports different configurationconfigurations. For a in-depth discussion regarding virtual networking see VBox official documentation [http://www.virtualbox.org/manual/ch06.html here].
For developing purpose, we are interested in two configuration:
</pre>
After installing it, please reboot the MVM in order to make the changes to take effect.
==== VBox VirtualBox Bridged configuration ====
It's easy to change Virtual Box Network configuration:
* That's all, click Ok to apply changes.
==== Guest (Ubuntu) Network Configuration ====----
An advanced setup is to add another network adapter to be used as ''Bridged Adapter'', while keeping the first network interface with NAT
 
This is a useful setup, for example if your're working on a laptop connected to Internet via Wi-Fi, while you're developing using the bridged network adapter on Ethernet. In this case the VM will be able to access the public network using the NATed interface (via host WiFi) while serving TFTP/NFS file to the Embedded Linux system
 
To add a new network adapter:
* shutdown the VM
* open the VM <code>Settings</code> dialog
* go to the <code>Network</code> page
* select <code>Adapter 2</code> tab
* tick the <code>Enable Network Adapter</code> checkbox
* select the host network interface to bridge to in the <code>Name</code> dropdown
* hit <code>OK</code>
[[File:DVDK adding network adapter.png|none|thumb|699x699px]]
 
==== Network Configuration of the VM (guest) ====
By default, the virtual machine image provided with DVDK is configured with DHCP. If you don't have a DHCP server available on your network, you should configure the interface manually.
=====Creation of the network connection=====
The procedure may differ from one graphical environment to the other.
======Unity======
Once the graphical interface is ready, right-click on the NetworkManager Applet on the top Panel and choose ''Edit Connections''
[[File:DVDK_Ubuntu_Network_Configuration_1.png]]
 
 
Now ''Add'' new connection
[[File:DVDK_Ubuntu_Network_Configuration_2.png]]
 
 
Fill all the required fields (name and IPv4 configuration) and hit ''Apply'' button.
[[File:DVDK_Ubuntu_Network_Configuration_3.png]]
 
 
Now the new configuration is added and the Network Manager Applet should tell you that the connection with your network is established
For more information about ubuntu take a look at its [https://help.ubuntu.com/10.04/index.html official documentation]
======LXDE======
To configure the network connection, the following approaches are available:
*Edit the configuration files as described [https://help.ubuntu.com/community/NetworkConfigurationCommandLine here]
*Using a script like the following:
<pre>
#!/bin/bash
ifconfig eth0 192.168.0.82 netmask 255.255.255.0 up
route add default gw 192.168.0.254 eth0
echo "nameserver 8.8.8.8" > /etc/resolv.conf
echo "nameserver 8.8.4.4" >> /etc/resolv.conf
</pre>
===== NFS Configuration =====
 
{{ImportantMessage|text=Latest DVDK/MVM use a different default configuration which exports <code>/home</code> directory for all IPs. Even if this is a security hole, it allows using NFS without changing the default configuration on any network
<pre>
/home 0.0.0.0/0.0.0.0(rw,sync,no_root_squash,no_subtree_check,crossmnt)
</pre>
}}
[[w:Network_File_System|NFS]] is commonly used to network mount the target root file system. NFS Server is already installed on [[:Category:DVDK|DVDK]] but needs to be configured before using it.
User just need to edit <code>/etc/exports</code> file to allow the local network to mount NFS shares.
The If the default configuration provided with DVDK allow mounting all subdirectory of ''/home/shared'' by the default class C private network 192.168.0.0/24, but is disabled. does not fit your needs just edit <pre class="workstation-terminal"code>nelk@nelk-desktop:~$ cat /etc/exports # /etc/exports: the access control list for filesystems which may be exported# to NFS clients. See exports(5).## Example for NFSv2 and NFSv3:# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)## Example for NFSv4:# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)# #/home/shared 192.168.0.0/24(rw,sync,no_subtree_check,no_root_squash,no_all_squash) nelk@nelk-desktop:~$ </pre> If you are on the default network just remove the <code>#</code> at the beginning of and update the last latest line. If you are on a different network, e.g. if you're on a private class A network 10.0.0.0/8, change the line in;as:
<pre>
/home/shared 10.0.0.0/8(rw,sync,no_subtree_check,no_root_squash,no_all_squash,crossmnt)
</pre>
4,650
edits

Navigation menu