Configuring a static IP address bridge

If your network configuration is not controlled by a DHCP server, perform this task to configure a static IP address bridge.

  1. (If required) To retrieve the IP address and the netmask, enter ifconfig interface_name.
  2. Enter ifconfig -a to verify that the Ethernet interface is up.
    user@ubuntu:~$ ifconfig -a
  3. Enter the ping command—specifying a known URL—to verify that you have internet connectivity.
    user@ubuntu:~$ ping example.com
  4. Install bridge-utils, using the following commands:
    user@ubuntu:~$ sudo apt-get update
    user@ubuntu:~$ sudo apt-get install bridge-utils
  5. Enter sudo vi /etc/network/interface to modify the following interfaces example with the values you retrieved, replace "eth0" with the actual server external interface, and replace all other < > with your values.
    auto lo
    iface lo inet loopback
    
    auto eth0
    iface eth0 inet static
    address 0.0.0.0
    
    auto br0
    iface br0 inet static
    address <ip-address>
    netmask <net-mask>
    gateway <gateway-ip-address>
    dns-nameserver <dns-nameservers> 
    dns-search <search-domains>
    bridge_ports <eth0>
    bridge_stp off
    bridge_fd 0
    bridge_maxwait 0
  6. Save and close the file.
  7. Reboot the server.
    user@ubuntu:~$ sudo reboot