1

Basically what I believe the issue is, is that my Raspberry Pi [RP] won't generate a 192.xxx.xxx.xxx ip address. Instead, it generates a 10.0.0.85 ip.

I need the ip so that I can remote desktop connect from my windows PC via xrdp. I got it working using the 10.0.0.85 ip and then rebooted the RP. It wont work anymore. My remote desktop cant connect at all to the xrdp service. I am desperate for help and am on my last legs. Willing to try any damn method!

Model: Raspberry Pi 3 B

Reinstalled raspbian 3 times

Am I able to connect to my RB with VNC using remote desktop connection?

My PC has a 192.168.x.x ip.

I can get an IPv6 address though. Am I able to use this to remote desktop connect?

Might I have to port forward?

Using raspbian stretch, latest version. My raspberry pi and PC are connected via ethernet

Cheers

2
  • 2
    I don't know why you think 192.xxx.xxx.xxx is "a normal … ip address", the Pi will normally be allocated an IP address by your DHCP server. As you haven't specified what you have done, or what is connected, or even which OS no one can help.
    – Milliways
    Commented Jan 19, 2018 at 23:27
  • @Milliways My apologies, I am very new to all this. I have updated my main post. Basically, Both pc and raspberry pi are connected to the router via ethernet. Using the latest version of raspbian. All I have done is install xrdp and when that stopped working I have tried fixes. I am more than happy to provide more info
    – Larry
    Commented Jan 19, 2018 at 23:42

3 Answers 3

2

(3) Issues:

1. DHCP: Use Static IP:MAC Address Mapping

If your Pi is not maintaining a persistent IP address, you can create a static IP:MAC address mapping on the DHCP Server (probably your router). Then, every time the router see's your Pi's MAC address, it will assign the same IP.

2. DHCP: Wrong IP Pool being used by DHCP Server

If your Pi is being assigned an IP from a completely different subnet, check that the appropriate DHCP pool is being served on the router's interface the PI is getting IP addresses from.

3. Colliding Subnets:

Ensure that Your PC & and the Pi are on different subnets on each end of the RDP connection. For example, if your PC is on 192.168.1.0/24 and the Pi on the other side is also addressed on 192.168.1.0/24, things are going to get mightily confused....

Example:

I've got a small switch I connect my Pi's to. This switch is uplinked to a MikroTik router that has a DHCP server listening on ether2 which the switch uplinks to. The router issues IPs for PI's connected to that switch:

[Pi]-------------[8-port switch]-------------[MikroTik Router]

This is what it would look like in the MikroTik's Webfig interface:

I go to the "LEASES" section of the DHCP Server and find my Pi:

Screenshot1

After clicking the Pi's lease, I'm presented with the option to "Make Static":

Screenshot2

Having made the "IP:MAC Address" mapping static, I can change the properties of the lease if I care to:

Screenshot3

Now let's review the IP Pool being served by the DHCP Server listening on ether2 that the switch is connected to is serving 192.168 or 10.0 IPs:

Screenshot4

Conclusion:

Ensuring the Pi gets an IP from a correct range and the IP remains persistent are problems you can fix on the DHCP gears using the above as a template. Obviously your router's interface will be organized differently, but this should be enough to get you looking in the right places and knowing what you need to tweak. HTH- T

0

It generates a 10.x.x.x IP but your router is handing out 192.168.x.x addresses to devices on your network? Sounds like the RPi is configured with a static IP.

Log into the RPi and check your network configuration.

If you plan on using the RPi headless, only remote desktop'ing into it, then it will need to be a consistent IP address so you always know where to remote to. Either set the static IP address in the RPi yourself or go to your router and set the router up so that it will always assign the same IP to the RPi based on its MAC.

I have no idea what router you are using so I can't walk you thru anything there.

However, here's a link on how to setup a static IP in the RPi...

RPi-Static IP Setup

Good luck.

1
  • 1
    DO NOT follow that link! The file itself WARNS "For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'" If you really must set a Static IP Address see How to set up Static IP Address
    – Milliways
    Commented Jan 20, 2018 at 2:22
0

Out of the box, the Pi is configured to get it's address from a DHCP server, which should probably be your router. May be you should first have a glance at your router's DHCP server configuration.

If that doesn't work, you can set a static address without using DHCP. That process changed dramatically between 2015 (wheezy) and today (jessie, stretch), today, these things are done in the /etc/dhcpcd.conf. As you say, that you use the latest stretch, you might find https://electrondust.com/2017/11/25/setting-raspberry-pi-wifi-static-ip-raspbian-stretch-lite/ and https://www.domoticz.com/wiki/Initial_Raspberry_Pi_Setup#Set_Fixed_IP_address very helpful. You do not need to do that on the Pi itself, you can also simply edit the files on the SD card using another computer. After editing the dhcpcd.conf, you can put the SD card back into the Pi, boot it, and it should be available with the address you wrote in the dhcpcd.conf.

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