2

I am trying to configure bridge network in the HP server. I dont have console access. I am connected using ssh to the server remotely. The configuration files have been placed in the proper location /etc/sysconfig/network-scripts

cat ifcfg-eth0 
DEVICE=eth0
ONBOOT=yes
TYPE=Ethernet
IPV6INIT=no
USERCTL=no
BRIDGE=br0

cat ifcfg-br0
DEVICE=br0
TYPE=Bridge
BOOTPROTO=static
IPADDR=IP of the server
NETMASK=255.255.255.0
ONBOOT=yes

When I restart the network service after configuring this /etc/init.d/network restart, I am getting disconnected from the terminal. What is the proper way to do this configuration?

The above configuration works perfectly on the virtualbox setup, but when I try to implement the same to a physical server, it fails to set up the bridge.

I am using Centos 6.8 OS.

1 Answer 1

1

I finally figured out on this.

During the bridge configuration,

  • For bridge interface (br0) you need to mention the actual Hardware Address, disable NetworkManager control and enable the onboot.
  • For ethernet interface (eth0), you need to mention a different Hardware Address (last digit can be changed), disable NetworkManager control and enable the onboot.

Example configuration

ifcfg-br0
=========
DEVICE=br0
TYPE=Bridge
GATEWAY=192.168.1.1
HWADRESS=00:1C:23:59:5A:92
IPADDR=192.168.1.109
#NETMASK=255.255.255.0
ONBOOT=yes
#BOOTPROTO=dhcp
NM_CONTROLLED=no
DELAY=0

ifcfg-eth0
==========
DEVICE=eth0
TYPE=Ethernet
HWADRESS=00:1C:23:59:5A:93
BOOTPROTO=dhcp
ONBOOT=yes
NM_CONTROLLED=no
BRIDGE=br0

you can create a shell script and run it in nohup mode.

$ echo  "service network restart" > restart_network.sh
$ chmod u+x restart_network.sh
$ nohup ./restart_network.sh &

I was able to configure the bridge network on multiple physical servers without the network getting disconnected. I did not have console or physical access to server, but used only remote connection via ssh.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .