Page 1 of 1

No DHCP request being sent

Posted: Thu Jul 26, 2012 4:20 am
by bradycl_98258
Hello!

I am trying to set up a simple bridged tunnel that will give clients addresses from the DHCP server on my network.

The openvpn installation is on my router (call it 192.168.0.1)
The dhcpd installation is on a separate internal server (call it 192.168.0.10)

Server config:
mode server
tls_server
client_to_client
port 1194
proto udp
dev tap0
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
keepalive 10 120
comp_lzo
persist_key
persist_tun
status openvpn-status.log
log openvpn.log
verb 3

Client config:
client
remote (router external interface IP)
ca ca.crt
cert me.crt
key me.key
comp-lzo
dev tap
proto udp
nobind
persist-key
persist-tun
route-delay 10

Client connects fine, but gets no IP address.
Server log reports: "MULTI: no dynamic or static remote --ifconfig address is available for Me/(Client Public IP):(Port)"
DHCP log shows no request for a lease having been received at all.

The same client connects to the same server just fine if I replace "mode server" and "tls-server" in the server config with a "server-bridge gateway netmask pool-start-IP pool-end-IP" statement (and then push the gateway and the dns server), but I want the DHCP to come from the DHCP server, provide ddns, bind, blah-blah-blah. I want my client on the lan. All the way.

Am I missing something obvious?

Thanks in advance!

Re: No DHCP request being sent

Posted: Fri Jul 27, 2012 10:07 am
by maikcat
please read documentation regarding server-bridge directive first..

Michael.

Re: No DHCP request being sent

Posted: Fri Jul 27, 2012 6:10 pm
by bradycl_98258
My understanding of server-bridge without arguments (since I want my dhcp server--not openvpn--to provide the network information to the client) is that it is equivalent to:
mode server
tls-server

Is that incorrect?

Re: No DHCP request being sent

Posted: Sat Jul 28, 2012 12:33 pm
by maikcat
to use bridging with external dhcp server add to your config:

server-bridge

with no parameters

keep in mind that if your dhcp server set default gateway to your clients also add

push "route 0.0.0.0 255.255.255.255 net_gateway"

to your server config as well.

also make sure that:

eth0 & tap0 are both in promisc mode
eth0 & tap0 are bridged together before openvpn comes up

Regards

Michael.

Re: No DHCP request being sent

Posted: Thu Sep 27, 2012 2:00 am
by brendan
also make sure that:

eth0 & tap0 are both in promisc mode
eth0 & tap0 are bridged together before openvpn comes up
i have a rather strange network setup and i think it might be affecting my ability to do external DHCP. I have a bond (bond0) of two interfaces (p1p1 and p1p3), with two vlans trunked across (bond0.50 and bond0.52). bond0.50 and tap0 are bridged together on br0 with an IP of 192.168.50.1.

of the interfaces:
physical - p1p1 and p1p3
bond - bond0
vlans - bond0.50 and bond0.52 (52 should not be relevant)
tap - tap0
bridge - br0

which have to be in promisc mode? can you explain why this is important?