# bridge not forwarding dhcp requests

## cazze

Hi,

i have set up a bridge on a gentoo box with 3 ethernet cards. The first eth0 has a static ip address, the other 2 interfaces are placed in a bridge configuration without ip address

Here is my net.conf for the bridge:

config_eth0=( "172.16.150.1" )

config_eth1=( "null" )

config_eth2=( "null" )

brctl_br0=( "setfd 0" "stp off")

bridge_br0=( "eth1 eth2" )

config_br0=( "null" )

The client pc is running gentoo also.

Case 1:     client ======= switch ======= dhcp server

If i connect the client pc direct to the switch and run /etc/init.d/net.eth0 start, i get an ip address from my DHCP server.

Case 2:     client ===x=== bridge ======= switch ========= dhcp server (x = cross cable) 

In this case, i don't get an ip address from the dhcp server.

If connected the eth0 of my bridge on the same network segment as the dhcp-server, and i snif with ethereal on the eth0 interface, in case 1 i see the dhcp discover and the dhcp request packages on the snif. In case 2 i don't see them.

Any id what the problem could be?

Regards,

Cazze

----------

## rokstar83

You should check to see if you actually need a cross-over cable.  While it might logically make sense many newer NIC's autodetect the need for a cross over connection.  This could in theory cause confusion.  Also what are you using as the proxy?  Gentoo wiki has good instructions for proxying in the "home server" wiki.  It also has some kernel level ip settings that you may need.

Good luck

----------

## lbrtuk

Have you tried temporarily giving eth1 (or whichever it is) an ip address to test whether the

 *Quote:*   

> client ===x=== bridge

 

link is working at all?

----------

## jmbsvicetto

Hi.

 *cazze wrote:*   

> 
> 
> Case 2:     client ===x=== bridge ======= switch ========= dhcp server (x = cross cable) 
> 
> In this case, i don't get an ip address from the dhcp server.
> ...

 

If I understand correctly, your 2nd scenario works as long as the bridge eth0 is in the same subnet as the dhcp server. Am I right?

If so, have you created a scope in the dhcp server for the desired network subnet? Are you using a layer 3 switch? You will have to configure the dhcp server to handle requests on the different subnet and to configure the switch/host to forward requests for dhcp (UDP ports 68 and 69) to the server's ip address. 3Com switches call it helper applications configuration or something similar.

----------

## think4urs11

Might be obvious, but ... did you actually check that both NICs used for the bridge are up?

 *jmbsvicetto wrote:*   

> ...configure the switch/host to forward requests for dhcp (UDP ports 68 and 69) to the server's ip address

 

actually those are 67/udp and 68/udp

----------

## cazze

First of all, thx for all the response   :Smile: 

To make things clear about the topology and the cross cable, i did some tests and a cross cable IS needed in the setup.

I did the following tests to be sure:

Connect client directly on switch and request ip address => ok, so dhcp server works

Make client have a static ip address, connect behind the bridge ( client==x==bridge====switch====dhcp server) and ping to the dhcp-server => ok, so cross cable is needed

And now, request dynamic ip address on client in previous config ..... works too  :Sad: 

Now or a cable was badly inserted (but i reinserted the cables 20 times yesterday so it should have been good at least 1 time, no?) or there is somthing other that prevented the dhcp requests.

Can it be STP in some or other way in the bridge or the switch? Can it be an arp cash on the switch or bridge or ....?

If i hate something, then it is when it didn't work and on some place in time it starts working without knowing why  :Sad: 

cazze

----------

