On 05/20/2011 03:21 PM, Ashish Jain <[email protected]> wrote:
I am implementing virtual machine in Linux and want to configure a NAC
software, for which I need to create virtual interface in Linux/ubuntu and
want to assign ip's through dhcp server, and want to use them as a nodes.
Plz help me how to do this.
For example :
eth0 -> is my real ethernet card.
virtual interfaces :
eth0:0 -> dhcp server
eth0:1 -> get ip from dhcp server.
eth0:2 -> get ip from dhcp server.
Which virtualization software are you using? If you're using KVM, then
the best way to do it is by using a bridge. In Ubuntu/Debian you can do this
# apt-get install bridge-utils
Modify /etc/network/interfaces, remove the entries of eth0 or comment
them, and put something like the following as per your network configuration
auto br0
iface br0 inet static
bridge_ports eth0
bridge_maxwait 2
address 192.168.1.154
netmask 255.255.255.0
gateway 192.168.1.1
Reboot preferably (or do ifup br0 - but it would require eth0 to be
ifdown prior to that). Now you can create a virtual machine and specify
br0 as the shared physical network. You can run dhcp server bound to br0
and your virtual machines would automatically be assigned the IP
addresses which are reachable from other machines.
I think by default their network interfaces be called vnet0, vnet1 and
so on which you can change by modifying
/etc/libvirt/qemu/machinename.xml file's (only if there's an absolute need)
<target dev='vnet0'/>
Use ifconfig to see those network interface. I don't think you'll
require virtual interfaces such as eth0:1 as the virtualization software
would automatically handle those for you.
Check this out too
https://help.ubuntu.com/community/KVM/Installation
Regards
Vivek Kapoor
http://exain.com
_______________________________________________
Ilugd mailing list
[email protected]
http://frodo.hserus.net/mailman/listinfo/ilugd