# Proxy ARP Bridging Windows XP style w/ DHCP?

## tipp98

This question is directed toward Jesu but please, anyone, feel free to comment.

I'm trying to get windows XP style "bridge" working so that I can get a computer with a wired card to connect to the wireless home router through a laptop running gentoo linux. I saw this quote in another post and it really helped out. *Quote:*   

> Windows XP Network Bridging is equivalent to Proxy ARP routing on linux, not to bridging. It's a question of levels. Linux bridging copies the raw ethernet frames which appear on either side to the other side, without looking at them at all. Thus, the linux box only needs IP address, because the two adapters are merged into one big one.
> 
> However, this doesn't work if the two sides have different raw ethernet standards - eg. 802.3 Ethernet and 802.11b Wireless Ethernet. So, Proxy ARP uses two seperate IP addresses for two interfaces, and you instruct it which IPs are on which interface. Then, for any packet which appears on one side (eg. eth0), if the machine recognises the IP as one of those on the other side (eg. eth1) it claims to be that machine, and passes it on through the other network layer. Because it's bridging at the IP layer, it cuts across different ethernet protocols. This is what Win XP does when it says 'Network Bridge'.

 

Ideally I'd like the laptop to have one IP, use dhcp, and allow the downstream computer to use the dhcp from the home router. No silly firewall, just function. Does anyone know of any good how-to's on how to do this, or could you give me some pointers. I can't seem to find squat

I've found some daemons that might help but I am still unsure of what course to take. parprouted claims dhcp is not supported. "This daemon can be used for unicast traffic only. I.e., DHCP is not supported. Use software such as dhcrelay to "bridge" DHCP ." Additionally, it is not in my gentoo repository. dhcrelay sounds like only a piece of the puzzle and does not sound like it supports bonded interfaces, am I wrong(parprouted + dhcrelay)? wifiroamd looks interesting as this laptop is somewhat mobile, although not from startup to shutdown. It claims it has the capacity to support dhcp and bonding.

Any help whatsoever would be much appreciated. I am currently stuck in trying the static route method here but not having much luck and it's really not what I want in the end.

----------

## Monkeh

Bridge driver in the kernel + net-misc/bridge-utils. Read /etc/conf.d/net for details (or man brctl to do it manually).

----------

## nusch

```
echo 1 > /proc/sys/net/ipv4/conf/all/proxy_arp
```

----------

## Monkeh

 *nusch wrote:*   

> 
> 
> ```
> echo 1 > /proc/sys/net/ipv4/conf/all/proxy_arp
> ```
> ...

 

Thoroughly incomplete solution..

The correct answer is bridging.

----------

## Jesu

Unfortunately, I haven't actually used Gentoo in about three years, so I'm not sure what the current way of setting up this stuff is, but I can maybe contribute to the general concepts.

Well, my tuppence worth is this: I don't think brctl will work, because one interface is wired, one is wireless - Monkeh, why do you think differently? 

So therefore use proxy arp - which I can't help with the details of - and your two interfaces on the laptop will get set up with different ips on the same subnet. 

parprouted + dhcrelay look like they might do what you want if you ask them nicely. I'd try getting parprouted up and running first, then add dhcp into the mix later - note that the dhcp for your laptop wireless interface should work as normal.

To bo honest, though, if it were me, I'd use the subnet method you were taking about from that other thread - although it all seems a bit confused there. To summarise:

router - internet & 192.168.0.1

laptop wireless - 192.168.0.2

    if you've a decent router you can tell it to reseve this ip address for your laptop's MAC address, 

    so you can use DHCP to set the laptop's ip address, but it always gets the same answer

laptop wired - 192.168.1.1

    set up as a static ip address

laptop default gateway: 192.168.0.1

downstream - 192.168.1.x

    configure dhcpd on the laptop to give out an address to this machine

downstream default gateway: 192.168.1.1

The two gotchas are enabling IP4 forwarding on the laptop, and adding a static route on the router with destination 192.168.1.255/255.255.255.0 using gateway 192.168.1.2 (this is where assigning the laptop wireless ip to MAC helps). 

Actually, I'd probably just buy a wireless card for the downstream machine and be done with it!

Hope this help in some way,

Jesu

----------

## Monkeh

 *Jesu wrote:*   

> I don't think brctl will work, because one interface is wired, one is wireless - Monkeh, why do you think differently?

 

Because I've done it the other way around (wireless AP to ethernet interface, instead of client) myself. The bridging code in the kernel transparently converts IP packets from one networking protocol to another. All wireless APs work this way. All wireless bridge devices work this way.

----------

## Jesu

Ah yeah - http://linux-net.osdl.org/index.php/Bridge#What_can_be_bridged.3F and http://linux-net.osdl.org/index.php/Bridge#It_doesn.27t_work_with_my_Wireless_card.21 - I stand corrected.

----------

## tipp98

Wow, thanks for the info guys. That link should really help. I have bridge-utils and will give it another shot. I know I was not in promiscuous mode so that would definitely have been an issue. Too tired to try now though. *Quote:*   

> Actually, I'd probably just buy a wireless card for the downstream machine and be done with it! 

  Oh how this has ran through my head. The problem is that I'm the stubborn type and if something should work but doesn't, well by golly I want to make it work.

----------

## echo6

Which package provides parprouted?

----------

