Edit /etc/network/interfaces
in a text editor.
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto br0
iface br0 inet dhcp
bridge_ports eth0
iface eth0 inet manual
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto br0
iface br0 inet static
address 192.168.0.44
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8 8.8.4.4 #google-dns
dns-search localdomain.local #optional-line
# bridge options
bridge_ports eth0
iface eth0 inet manual
Restart the interfaces. Note that this will disconnect SSH sessions, so physical access to the machine/VM is required.
sudo ifdown eth0 && sudo ifup eth0 && sudo ifup br0
To restart networking without disconnecting the SSH seesion, try:
sudo /etc/init.d/networking restart
Run ifconfig
on the CLI to confirm the changes have been applied.