Static IP address has to be re-entered after every boot

Using applications, configuring, problems
Post Reply
Message
Author
ccaaee
Posts: 48
Joined: Sat 27 Feb 2010, 17:10

Static IP address has to be re-entered after every boot

#1 Post by ccaaee »

This concerns 18.05 HD install frugal

I'm using net-setup.sh (network wizard) as I need a static IP address. After every reboot I always end up with a dhcp attributed address.
Any ideas ????

Thanks
ccaaee

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#2 Post by bigpup »

What specifically is 18.05?
Is that a Puppy version?

I assume you have made a save and are booting using it?
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#3 Post by jafadmin »

I ALWAYS set up my usual networks with scripts. I use this one to set a static network:

Code: Select all

#!/bin/bash
# 	A script to set lan network
#
## Edit these to suit your needs ##
NIC="eth0"
IPADDR="192.168.100.231"
NETMASK="255.255.255.0"
GATEWAY="192.168.100.1"
DNS="64.6.64.6"
###################################
killall dhcp
ifconfig $NIC down
ifconfig $NIC "$IPADDR" netmask "$NETMASK"
ifconfig $NIC up
route add default gw "$GATEWAY"
echo "nameserver $DNS" > /etc/resolv.conf
Add a link to this script to your "Startup" folder, and Robert is your mother's brother ..

BeeJay
Posts: 43
Joined: Wed 27 Feb 2013, 22:41
Location: Solihull, UK

#4 Post by BeeJay »

If possible set static addresses through the router config, not through the OS.

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#5 Post by vtpup »

bigpup wrote:What specifically is 18.05?
Is that a Puppy version?

I assume you have made a save and are booting using it?
Sounds like an Ubuntu version. 18.05 would be Bionic, so maybe BionicPup?

ccaaee: I agree with BeeJay, just set the router to recognize and reserve the desired static address for the client computer's MAC address. Then DHCP will automatically give it the desired address.

Otherwise there can be conflicts if both DHCP and static addresses are used in the same address range on the same router. Which might account for why the OP is sometimes having the problem in the first place.

Other points re. Puppys wireless setup:

Like Bigpup said -- you need a savefile, and also, if using the old standard wifi wizard, you also need to save the wireless profile before using it. Also, be sure to delete any uneeded or duplicate profiles.
[color=darkblue]Acer Aspire 5349-2635 laptop Tahrpup.[/color]
[color=blue]Acer R11 and C720 Chromebks Bionicpup64[/color]
[color=olive]Acer Iconia A1-830 tablet no pup[/color]
[color=orange]www.sredmond.com[/color]

ccaaee
Posts: 48
Joined: Sat 27 Feb 2010, 17:10

#6 Post by ccaaee »

18.05=upupbb.
I'd quite like to know why, even if I use the network wizard and specify a static that it keeps coming back DHCP. Necessity is the Mother...(see the script later on.)
As for doing this in the router --- I don't want to and shouldn't have to if there are tools available directly in Puppy which are meant to give me a static IP.

Here's the (ugly) wifi script I cobbled together to setup my statc:

killall wpa_supplicant
INTERFACE=`iw dev | grep Interface | awk '{print $2}'` ; echo $INTERFACE
\rm /var/run/wpa_supplicant/$INTERFACE
ip link set $INTERFACE up
### wpa_passphrase "SSID_NAME" "PASS" >> /etc/wpa_supplicant.conf
wpa_supplicant -B -D wext -i $INTERFACE -c /etc/wpa_supplicant.conf
ifconfig $INTERFACE 192.168.1.11 up
route add default gw 192.168.1.1
echo "nameserver 192.168.1.1" > /etc/resolv.conf

Post Reply