4

I have my RPi running connected to a Windows 7 machine with a crossover cable - that W7 machine itself is connected to the internet (DSL) via WiFi. Originally I simply configured Internet Connection Sharing (ICS) and set its IP as gateway. This worked. However, I would rather prefer my WiFi router to issue an IP to the RPi. So I changed my /etc/network/interfaces to autostart the connection with DHCP.

Then I bridged my ethernet socket (the one the RPi is connected to) and the WiFi adapter. The connection received the IP 192.168.1.6 from the WiFi router.

When restarting my network connection on the RPi, it turns out I also get 192.168.1.6 as my IP. And that's the problem.

How comes that the RPi identifies the WiFi router correctly, but then offers the same IP for lease again. Any ideas how to resolve the issue on the RPi?


In a packet sniffer I see the packets from the RPi when I run a traceroute or ping, but it never makes it across the bridge.

1

If you request an IP via DHCP your standard GW will also be the IP of the DHCP server which is your router.

So if you request an IP from the RPi over the WinBox to the Wifi router, it might go well, but the standard gw will be the IP from the router, but it should be the IP of the WinBox, because it shares the only direct internet connection to the RPi.

I had the exact same setup as you had. The best way to get satisfied and to start working on your RPi is to set static IP addresses on the WinBox Ethernetcard and on the RPi. Additionally add the WinBox as standard GW to the RPi.

Example: Router: 192.168.1.1 WinBox Wifi: 192.168.1.2 (from DHCP) WinBox Eth: 192.168.2.1 (static. I would recommend a different network from 192.168.1.0) Raspberry: 192.168.2.2 (static, with default GW 192.168.2.1) don't forget to add a nameserver (8.8.8.8 is Google's NS) to your /etc/resolv.conf

0

Your rpi is probably working fine, the problem is one of two things:

  1. that either windows or one of the net work adapters on it (probably the wireless one) is using its own mac address in your dhcp packets, or

  2. your dhcp server is not using mac addresses but some characteristic of the wireless link as unique identifiers, and since you are using the same link ...

good luck.

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.