I've been using Virtual Box for a while and love it. But the downside of vbox is you can not use your NIC's alias as the bridge or interface. So, I found out a way to add a bridge NIC in pure command mode. Since there is no such tutorial online, I would love to write this down and share with you. This is just a short tutorial that to show you create a virtual NIC in command lines only.
========================================================================
brctl addbr virbr2
ifconfig virbr2 up
ifconfig virbr2
# now, record the MAC address of your Virtual NIC
vi /etc/sysconfig/network-scripts/ifcfg-virbr2
# and type all following lines in there,
# but modify 'HWADDR' as the MAC address
# and change the IP as you want.
TYPE=Ethernet
DEVICE=virbr2
HWADDR=B6:9F:39:E6:DC:64
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
PEERDNS=yes
IPV6INIT=no
NM_CONTROLLED=no
NETMASK=255.255.255.0
IPADDR=192.200.200.2
# now, check if it's really working
# if it's successfull, the ip you typed before should be assigned
service network restart
ifconfig virbr2
========================================================================
then, your virtual NIC should be up and running after restart.
PS: i put a long title on purpose, so other people can google it. :-)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment