How to add bridge network

Problem Statement:
You might have created VM in your laptop which is running on different network segment 10.x.x.x. your laptop is running on wired/wireless network on different segment 192.168.x.x. Now we need to bridge these two network to transfer files and access internet. How to achieve it?
Solution:
In your VM add another network interface as bridged network device name is eth1 and make a note of HWaddr.
Reboot the VM generally allow you to bring eth0 and eth1 both interfaces on by default. now you can access your laptop/pc through the second interface IP segment will be same as your Laptop/PC segement

if not we can manually add the device file and update as below

[root@localhost network-scripts]# pwd
/etc/sysconfig/network-scripts
[root@localhost network-scripts]#

[root@localhost network-scripts]# cat ifcfg-eth0
DEVICE=”eth0″
BOOTPROTO=”dhcp”
HWADDR=”08:00:27:yy:yy:yy”
NM_CONTROLLED=”yes”
ONBOOT=”yes”
[root@localhost network-scripts]# cat ifcfg-eth1
DEVICE=”eth1″
HWADDR=”08:00:27:xx:xx:xx”
ONBOOT=”yes”
NM_CONTROLLED=”yes”
BOOTPROTO=”dhcp”
[root@localhost network-scripts]#
eth0 Link encap:Ethernet HWaddr 08:00:27:yy:yy:yy
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0

eth1 Link encap:Ethernet HWaddr 08:00:27:xx:xx:xx
inet addr:192.168.100.106 Bcast:192.168.100.255 Mask:255.255.255.0

Leave a Reply

Your email address will not be published. Required fields are marked *