MCM
Posts: 13
Joined: Sun May 19, 2013 7:50 pm

IP Address

Wed Jun 05, 2013 1:17 pm

Hello

I have a number of Raspberry pis. I mirrored one of the SD cards and everything is working fine.

Once i inserted the SD card into the raspberry pi, i connected remotely to it and I changed the IP address. Lets say i changed it to 10.1.6.10 for purposes of this discussion. I then had a problem with the one SD card so i took it out and i plugged it into another raspberry pi which i had previously assigned the op 10.1.6.25.

The problem is that when i went to check the ip of the box (which i thought was 10.1.6.25) after i inserted the SD card, it showed me that the IP was 10.1.6.10.

Am i missing something here? Why did the ip not remain 10.1.6.25?

User avatar
rpdom
Posts: 15209
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: IP Address

Wed Jun 05, 2013 1:25 pm

Are you saying that the IP address moved with the card, or that the address stayed the same even with the other card?

If the former, well that's to be expected. All the files - including the one to set the IP address are on that card. Move it to another Pi and the address goes with it.

User avatar
MattHawkinsUK
Posts: 538
Joined: Tue Jan 10, 2012 8:48 pm
Location: UK
Contact: Website

Re: IP Address

Wed Jun 05, 2013 1:28 pm

If you configure an SD card to use a fixed IP address it will use that address regardless of what Pi you stick it in.

I get my router to assign IP addresses to the Pi based on it's MAC address. That way each physical Pi gets a known IP address regardless of the SD card used.
My Raspberry Pi blog and home of the BerryClip Add-on board : http://www.raspberrypi-spy.co.uk/
Follow me on Google+, Facebook, Pinterest and Twitter (@RPiSpy)

MCM
Posts: 13
Joined: Sun May 19, 2013 7:50 pm

Re: IP Address

Wed Jun 05, 2013 1:31 pm

ok..i did not expect the ip to go with the card. Thank you for the information. It does make sense!

User avatar
RaTTuS
Posts: 10459
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: IP Address

Wed Jun 05, 2013 1:37 pm

MCM wrote:ok..i did not expect the ip to go with the card. Thank you for the information. It does make sense!
If you set a fixed IP on the card then it will move with the card,
if it is done on the router [the best way] they it stays with the machine and not card
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
rpdom
Posts: 15209
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: IP Address

Wed Jun 05, 2013 2:00 pm

The Pi has almost no internal storage (other than the RAM memory which forgets everything when you switch it off). What it does have is a few bits of write-once memory that are used to store the serial number, board version number and things like that. Everything else is stored on the card (like the hard disk on a PC).

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: IP Address

Wed Jun 05, 2013 2:17 pm

rpdom wrote:The Pi has almost no internal storage (other than the RAM memory which forgets everything when you switch it off). What it does have is a few bits of write-once memory that are used to store the serial number, board version number and things like that. Everything else is stored on the card (like the hard disk on a PC).
A good way to look at it is that, on the Pi, the SD card is the equivalent of the BIOS+the Hard Disk
on a PC.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

Return to “General discussion”