I have an embedded system running Angstrom just fine. This platform has multiple uses, one of which is to act as a home router, so it has wireless and wired network interfaces, which work correctly. I'm trying to configure DHCPD so that each interfaces hands out IP addresses from the same range, for instance -, and I can't figure this out. Everything works fine if the interfaces handle different subnets, but when both interfaces are on the same subnet, things don't work. I've seen conflicting answers out there about whether this is even possible - but all home routers do this exact scenario, so there must be a way. I don't have my config files right now - will post them later. So I'm looking for advice if this is even possible. Tnanks!

Update: here's the script that worked - thanks Bill

# route all packets between all interfaces
iptables -t nat -A POSTROUTING -s -d -j ACCEPT
iptables -t nat -A POSTROUTING -s -j MASQUERADE

# set the MAC address 

ifconfig eth0 0
ifconfig eth0 down
ip link set eth0 address 00:80:44:0F:06:C7

# setup the bridge

brctl addbr br0
brctl stp br0 off
brctl addif br0 eth0

# hostapd sets up the wireless before it is added to bridge
  hostapd -B /etc/hostapd/hostapd.conf
  brctl addif br0 wlan0
  ifconfig wlan0 up
  ifconfig wlan0 0

  ifconfig eth0 up
  ifconfig br0 netmask up
  route add default gw br0
  • BillThor was right on the money - I've added the script that worked for me – Jeff Jan 24 '12 at 15:49

If you look at the hardware for a home router you will find that all the ports exist on the same interface. On my OpenWRT system the WLAN interface is identified by using a different VLAN for it.

Handing out addresses from the same pool between Wifi and the ports is done by bridging the interfaces. Addresses are then handed out to devices connected to the bridge. Without the bridge there are two separate devices which require different ranges.

As your device appears to have separate interfaces for each port create a bridge containing all the ports connected to the same network. Provide DHCP services to the bridge rather than the interfaces.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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