Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to put DHCP server on Ubuntu server to listen on 10.0.0.1 (internal network). I also need to configure OpenVPN server on Ubuntu server (DHCP is going to lease addresses to OpenVPN clients), therefore I need to bridge one hardware interface (eth1) and one virtual interface (TAP from OpenVPN) in bridge mode (br0).

Where should I put DHCP to listen (on br0 or on eth1) ? Should I put a gateway in the following configuration or not (if the DHCP listens on that interface) ?

I have the following configuration (/etc/network/interfaces):

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth2
iface eth2 inet dhcp

# Other interfaces - not used
#auto eth0

# Internal interface - is now in bridge
#auto eth1 iface eth1 inet static
#     address 10.0.0.1
#     netmask 255.255.0.0

# Bridge
auto br0
iface br0 inet static
#ip, netmask, gateway
address 10.0.0.1
netmask 255.255.0.0
#gateway 10.0.0.1
#network interfaces on which to enable the bridge
bridge_ports eth1
#optional configuration if the machine is VM
#bridge_fd 9
#bridge_hello 2
#bridge_maxage 12
#bridge_stp off
share|improve this question

1 Answer 1

up vote 0 down vote accepted

DHCP needs to listen on the bridge interface.

share|improve this answer
    
Do I need to setup an gateway on that interface br0 ? –  dajuric May 22 '13 at 8:46
    
If you want to communicate outside the 10.0.0.0/16 network, yes. The bridge interface needs to be configured with the same parameters as a "normal" interface. –  SvW May 22 '13 at 9:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.