How To Bridge Network In Linux In DHCP Mode – CentOS7
Visit my blog – http://www.rastricks.com
http://www.rastricks.com/2016/04/network-bridging-centos-7-in-dhcp-mode.html
LIKE !!!!! SHARE!!!!!! SUBSCRIBE!!!!!!
Any doubts and suggestion feel free to comment,
Below steps will help you to bridge CentOS 7 network in DHCP mode,
Step 1. Check which interface you want to bridge using “ifconfig”
In this example interface name is “enp0s3” in dhcp mode
Step 2. Install bridge-utils package using cmd
“yum install bridge-utils”
After installation restart network service using cmd
“systemctl restart network.service”
Step 3. Create backup directory (herr i have create directory in /) using
“mkdir /backup”
Note : step3 is optional but i have always recomand to do that because
anything goes wrong you got disconnected from network so better to
take backup and edit.
Step 4. Copy interface config to backup directory using cmd
“cp /etc/sysconfig/network-scripts/ifcfg-enp0s3 /backup”
Step 5. Change directory to /backup using cmd
“cd /backup”
Step 6. Copy ifcfg-enp0s3 to ifcfg-br0 using cmd
“cp ifcfg-enp0s3 ifcfg-br0”
Step 7. Edit ifcfg-br0 using cmd
“vi ifcfg-br0”
Step 8. Make changes as mention below
TYPE=Bridge
NAME=br0
DEVICE=br0
Comment (#) UUID & HWADDR
Note : Different interface having different settings but by default you
have to disable HWADDR & UUID
Step 9. copy ifcfg-br0 to /etc/sysconfig/network-scripts/ using cmd
“cp ifcfg-br0 /etc/sysconfig/network-scripts/”
Step 10. Edit ifcfg-enp0s3 inside /etc/sysconfig/network-scripts/
“vi /etc/sysconfig/network-scripts/ifcfg-enp0s3”
Step 11. Make changes as below
BRIDGE=br0 (add this line)
Comment (#) lines as per video
NOTE :- different interface having different settings but by default
you have to disable ipaddr, subnet, gateway and add line “BRIDGE=br0
(where br0 is your bridge interface)
Step 12. After saving configuration restart network service using cmd
“systemctl restart network.service”
Step 11. Check ifconfig you can see bridge interface “br0” with ip address.
by Linchpin
linux dhcp server
much appreciated for your video, I'd been search for a lots of how to created bridge but not a single one worked, Thank you much!
Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.
So you forgot to cover how to add other networks to the bridge… EX: bridging eth0 to eth1…
thanks for the video . I am using cloud server with Centos rented from http://www.datasoft.ws
Are all software programmers from planet X?
What kind of monsters decide eth0 (i.e. one network interface) needs to now be referred to as enp0s3
Oh, apparently. eth0 = unpredictable kernel-native ethX naming
eth0, eth1, eth2, etc seemed fine to me.