[PD] [OT] Portable webserver with static IP
czhenry at gmail.com
Mon Sep 10 21:56:23 CEST 2012
On Mon, Sep 10, 2012 at 2:32 PM, Pierre Massat <pimassat at gmail.com> wrote:
> Ok, so the static IP is the way to go.
Actually, Mr Goyard's suggestion is more like what you described. A
static IP won't let you just set it up and go.
> Can I choose x and y arbitrarily ? How do I know what value of x will match
> my subnet ? As for the value of y, I guess any value high enough (say, 50)
> in a small home network will do, right?
You have to get this information about the network by being connected
to it. Choosing the right value for a static IP means that you have
to know the DHCP range on the router, and that no IP is already
assigned to the address you picked. You can get this information from
the configuration of the router--my guess is that you won't have
access to it, when you go somewhere else.
The static IP option is going to be the most labor/time intensive. It
would generally be better to be ~lazy, and just get the IP once you've
connected via DHCP, or follow through the steps to setup zeroconf so
you just use the same name every time (and disregard the network/IP).
> Thank you all for your help!
> 2012/9/10 Andy Farnell <padawan12 at obiwannabe.co.uk>
>> The simplest and most direct way is to go into
>> and change the first entry for the interface you
>> want to use (presumably wired ethernet eth0) to
>> iface eth0 inet static 192.168.x.y
>> netmask 255.255.255.0
>> broadcast 192.168.x.255
>> gateway 192.168.x.z
>> Your choice of x and y shoud match your subnet and a free
>> IP address. The value for z will be the router. BTW don't end your
>> address with 255 as you suggested :) that is reserved for
>> broadcast address, see the third line.
>> The router should see this via gratuitous ARP quite quickly,
>> no need for any other fancy announcements unless you are in
>> a big and complicated network.
>> Check it after reboot using
>> ifconfig eth0
>> On Mon, Sep 10, 2012 at 04:41:33PM +0200, Pierre Massat wrote:
>> > Dear Pd-Listers,
>> > Sorry this obviously OT question.
>> > I'm trying to use my Raspberry Pi (yes I know, i'm also beginning to get
>> > fed up with its apparent ubiquity...) as by portable webserver. By
>> > portable
>> > I mean that i could carry it with me and plug it into any home router
>> > and
>> > make it accessible to every machine in the local network.
>> > The obvious problem i'm currently faced with is that of the IP given by
>> > the
>> > router to the RPi. I think it's possible to configure the RPi to have a
>> > static IP, but I have no idea how "portable" this solution is. Say, if I
>> > configured my RPi to alsways show up as 192.168.0.255, would this
>> > address
>> > work with every home router?
>> > Another option, perhaps : use the unique MAC address of my RPi ? I have
>> > no
>> > clue whether it is possible at all to connect to a local webserver using
>> > the MAC of its host.
>> > Any clue is more than welcome, i know practically nothing about
>> > networks.
>> > Cheers,
>> > Pierre.
>> > _______________________________________________
>> > Pd-list at iem.at mailing list
>> > UNSUBSCRIBE and account-management ->
>> > http://lists.puredata.info/listinfo/pd-list
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
More information about the Pd-list