Network Bridging CentOS 7 In DHCP Mode
For live example please visit our Youtube channel https://youtu.be/hjk8Uy7vb3s
Below steps will help you to bridge CentOS 7 network in DHCP mode,
Any doubts and suggestion feel free to comment,
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 (here directory created in /) using
"mkdir /backup"
step 3. This step is optional but i have always recommend 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 and 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.
0 comments:
Post a Comment