rpi_ayu
Posts: 30
Joined: Tue Sep 24, 2013 10:55 am
Location: Bhopal
Contact: Website

Defualt ip-address for Rpi [Like a Router]

Fri Oct 04, 2013 1:35 pm

i am using raspberry-pi in my project which required some n/w config. so that i want to setup ip-address of Rpi for that i have written a php script which will do changes in network script /etc/network/interfaces & successfully configuration is done from a php page [using php as per gui friendly environment for user ] this php page simply asking for which n/w configuration like wireless / LAN and also for mode like DHCP/Static for that one i have done correctly :) but after that i have disabled the gui from rpi as per requirement and i want to setup ip from another system from here problem is actually came into picture.
when i have gui with me on raspi i have done simply /local/my_script.php on midori

but if i don't have gui mode so how should i have done this ? :?
can we setup default ip-address just like a router ?
so my simple question is can we set default ip-address as like router ......finally can we made our rpi as a router with default ip
Last edited by rpi_ayu on Sat Oct 05, 2013 5:07 am, edited 1 time in total.

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: Defualt ip-address for Rpi [Like a Router]

Fri Oct 04, 2013 1:43 pm

Its appropriate for the standard use of a router to have a static IP address, since that IP address typically governs all the other IP addresses on the local network. With most uses of a Pi, it isn't in a position to govern all the other IP addresses on a LAN, unless of course you're using the Pi as a router (which is well within its capabilities).
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

rpi_ayu
Posts: 30
Joined: Tue Sep 24, 2013 10:55 am
Location: Bhopal
Contact: Website

Re: Defualt ip-address for Rpi [Like a Router]

Sat Oct 05, 2013 5:17 am

ya static ip is best solution for this but how to manage it
you said something like this i have to do in /etc/network/interfaces

allow hot-plug wlan0
auto wlan0
iface wlan0 inet dhcp
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant .conf
address $.$.$.$
netmask $.$.$.$
gateway $.$.$.$
:roll: :?:


Return to “General discussion”