Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 29 Nov 2014, 04:44
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Improved Network Wizard (and rc.network)
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 36 of 40 [596 Posts]   Goto page: Previous 1, 2, 3, ..., 34, 35, 36, 37, 38, 39, 40 Next
Author Message
PaulBx1

Joined: 16 Jun 2006
Posts: 2308
Location: Wyoming, USA

PostPosted: Tue 30 Dec 2008, 00:39    Post subject:  

Quote:
Normally each interface is in a different network. Configure eth0 to be 192.168.2.1


Ah. Shoulda figured out that by myself. Rolling Eyes

I tried that. That is, I specified eth0 as 192.168.2.14, and the gateway as 192.168.1.1, which would be on the same network as the other interface, wlan0. Unfortunately the wizard complained that "Your gateway 192.168.1.1 is not on this network." Since as you say, each computer needs only one gateway, it appears the wizard is in error assuming the gateway must be on any particular network. In fact it looks like the wizard is assuming a gateway is on a per-network (per-interface) basis, which does in fact jive with the fact that gateways are specified on interface configurations, not computer-wide configurations. Your claim that gateways are a per-computer thing makes more sense to me, but something is off here...

BTW, a per-computer gateway would seem to imply that the wizard must include checks that the gateway on all interfaces is the same.

Maybe the network wizard is not really up to handling complex requirements. If I'm building a server, I should simply not use it.

Quote:
It's not clear what you want to achieve with eth0. If you want to attach other machines to it and have traffic pass through your Puppy machine to the internet, then you are trying to make your Puppy machine a router and there are quite a few more considerations. How do you intend to pass on the DNS addresses and you eth0 address as their gateway, (will you run a dhcp server on your Puppy machine). How is the upstream router 192.168.1.1 going to know about the network that is beyond your Puppy machine, (will you run a NAT firewall on your Puppy machine).


Yeah, I'm trying to make something like a proxy server including a NAT firewall and other such frills. I am a total newbie on networks so I don't even know if these things are possible. So your questions are mostly answered by "huh?" Guess I need to do a lot more reading. As to DHCP server, I tend to like things simple, don't like extraneous services and daemons running. Since these are small, static networks, it looks like DHCP should not be needed. I also don't see why it should have any connection at all to DNS, but then again, I don't know anything.

I'm thinking of making my server an OpenBSD rather than a Puppy one, since there seems to be a lot of know-how about this sort of application on the internet.
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 524
Location: Brisbane, Australia

PostPosted: Tue 30 Dec 2008, 12:37    Post subject:  

JMX wrote:
I simply run a script like this for the desired network device:


#!/bin/bash
ifconfig eth0 down
ifconfig eth1 down
rm /var/run/dhcpcd/*
rm /var/lib/dhcpcd/*
ifconfig eth1 192.168.0.71
route add default gw 192.168.0.1 eth1
echo nameserver 4.2.2.1 > /etc/resolv.conf
echo nameserver 66.243.243.101 >> /etc/resolv.conf
ifconfig eth1 up
That's pretty much what dhcpcd would do, only dynamically. (No hard coded addresses.)

JMX wrote:
The script seems to effectively clean out all prior “hidden” routing tables previously created by DHCP.
There are no "hidden" routing tables. "route -n" displays the whole routing table.

JMX wrote:
Apparently, my routing table quickly and effectively dictates the connection path through only the designated interface.
That's what the routing table does. Your script shuts down all devices and then brings up only one, the routing table should contain only routes that pertain to interfaces that are "up".

The problem you have had with the Puppy Network Wizard + rc.network, is not a limitation of the IP software, but rather it seems to be a limitation of the wizard and rc.network. It assumes that both interfaces need to be configured, and/or brought up, at the same time. The errors are caused by both devices defining the same network, and hence they are not meant to both be "up" at the same time. This situation can be avoided if one of the devices can be nobbled in some way, so that the wizard/rc.network will only activate the other.
(Or of course you can also avoid the wizard and hence rc.network.)

gyro
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 524
Location: Brisbane, Australia

PostPosted: Tue 30 Dec 2008, 13:19    Post subject:  

PaulBx1 wrote:
I tried that. That is, I specified eth0 as 192.168.2.14, and the gateway as 192.168.1.1, which would be on the same network as the other interface, wlan0. Unfortunately the wizard complained that "Your gateway 192.168.1.1 is not on this network." Since as you say, each computer needs only one gateway, it appears the wizard is in error assuming the gateway must be on any particular network. In fact it looks like the wizard is assuming a gateway is on a per-network (per-interface) basis, which does in fact jive with the fact that gateways are specified on interface configurations, not computer-wide configurations. Your claim that gateways are a per-computer thing makes more sense to me, but something is off here...
I think the wizard is only providing you with an opportunity to specify the gateway on each interface, since it does not know which interface connects to the up-stream network, and hence contains the address of the up-stream router. i.e. in your case you should only specify 192.168.1.1 as the gateway when configuring wlan0. When configuring eth0 as 192.168.2.14, leave the gateway field and dns fields blank. (In the eth0 network, you are the gateway, and the down-stream machines are going to have to specify 192.168.2.14, as their gateway.)

PaulBx1 wrote:
Yeah, I'm trying to make something like a proxy server including a NAT firewall and other such frills.
I'm not sure if there's proxy software available on Puppy, but it does have a NAT firewall which can be easily utilised to turn Puppy into an Internet connection sharing router. (Done that.)

PaulBx1 wrote:
As to DHCP server, I tend to like things simple, don't like extraneous services and daemons running. Since these are small, static networks, it looks like DHCP should not be needed. I also don't see why it should have any connection at all to DNS, but then again, I don't know anything.
DHCP makes networking a whole lot simpler, because it automatically passes on vital network information, (this is especially handy should any of that information change.)

If I were attempting to setup such a box I would use the dhcp client on the up-stream interface. This not only gives me an IP address that will work on the existing network, but it also sets up my box with a default gateway to the upstream router, and also configures my box to use the DNS servers that are used on the current network.
I would also run a dhcp server on my box so that down-stream machines can be automatically configured with a valid IP address, to use me as their gateway, and use the DNS server information that was given to me.
I would also enable NAT on my firewall, so I can use local/non-routing IP addresses on my down-stream network, and also avoid having to "tell" the up-stream router about my down-stream network.

Good luck with your box.

gyro
Back to top
View user's profile Send private message 
PaulBx1

Joined: 16 Jun 2006
Posts: 2308
Location: Wyoming, USA

PostPosted: Wed 31 Dec 2008, 14:13    Post subject:  

Unfortunately, I have gotten things in a state where I cannot change anything, at least over boot. Now, whenever I boot, my wireless interface wlan0 cannot find the internet. That is because it insists on using the static IP stuff I had set up previously (where eth0 grabbed the 192.168.1.1 gateway first, so wlan0 is stuck). Even if I reconfigure both interfaces using dhcp, so I can then get to the internet (and "ifconfig" shows the ipaddress I had assigned to wlan0, 192.168.1.15, has been replaced by one handed out by the router), when I reboot, the ipaddress is back to 192.168.1.15 and the gateway is borked.

Yes, I saved the configuration.

This sounds like other complaints I have heard, that changes done with the network wizard do not get saved. Has that problem been fixed already in this thread? I suppose I could plow through all 36 pages to find out... Sad

BTW, your recommendations are starting to make sense to me. Takes a while to sink in; I'm not as sharp as I used to be.
Back to top
View user's profile Send private message 
PaulBx1

Joined: 16 Jun 2006
Posts: 2308
Location: Wyoming, USA

PostPosted: Wed 31 Dec 2008, 15:24    Post subject:  

I tried to dig into why my config does not get saved over a boot. Here is the rxvt session of that. The original condition is just after a boot:

Code:
# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:13:A9:5F:3F:EA 
          inet addr:169.254.220.217  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1209 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:253646 (247.7 KiB)
          Interrupt:16

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:18:DE:62:8F:54 
          inet addr:192.168.1.15  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:274 errors:0 dropped:0 overruns:0 frame:0
          TX packets:96 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:98810 (96.4 KiB)  TX bytes:13060 (12.7 KiB)

wmaster0  Link encap:UNSPEC  HWaddr 00-18-DE-62-8F-54-00-00-00-00-00-00-00-00-00                                                                   -00 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

# cd /etc
# cd network-wizard/
# ls
network  wireless
# cd network/
# ls
interfaces
# cd interfaces/
# ls
00:13:A9:5F:3F:EA.conf  00:18:DE:62:8F:54.conf
#   
#           
# cat 00:13:A9:5F:3F:EA.conf

IS_WIRELESS=''
#
#
# cat 00:18:DE:62:8F:54.conf
IS_WIRELESS='yes'
#
# pwd
/etc/network-wizard/network/interfaces
#
# cd .. 
# ls
interfaces
# cd ..
# ls
network  wireless
# cd wireless/
# ls
interfaces  profiles  wpa_profiles
# cd interfaces/
# ls
00:18:DE:62:8F:54.conf
#                           
#
# cat 00:18:DE:62:8F:54.conf
INT_WPA_DRV='wext'
USE_WLAN_NG=''
#
#
# cd ..
# ls
interfaces  profiles  wpa_profiles
# cd profiles/
# ls
00:1A:70:65:23:4A.WPA.conf  autoconnect.conf  template.conf
#
# cat 00:1A:70:65:23:4A.WPA.conf
TITLE="OregonHome"
        WPA_DRV="wext"
        WPA_TYPE=""
        WPA_AP_SCAN="1"
        ESSID="OregonHome"
        NWID=""
        KEY=*CENSORED*
        MODE="managed"
        SECURE="open"
        FREQ="2.437G"
        CHANNEL="6"
        AP_MAC="00:1A:70:65:23:4A"
       
STATIC_IP='yes'
IP_ADDRESS='192.168.1.15'
NETMASK='255.255.255.0'
DNS_SERVER1='10.61.2.1'
DNS_SERVER2='216.166.159.6'
GATEWAY='192.168.1.1'
STATIC_IP='yes'
IP_ADDRESS='192.168.1.15'
NETMASK='255.255.255.0'
DNS_SERVER1='10.61.2.1'
DNS_SERVER2='216.166.159.6'
GATEWAY='192.168.1.1'
STATIC_IP='yes'
IP_ADDRESS='192.168.1.15'
NETMASK='255.255.255.0'
DNS_SERVER1='10.61.2.1'
DNS_SERVER2='216.166.159.6'
GATEWAY='192.168.1.1'
STATIC_IP='yes'
IP_ADDRESS='192.168.1.15'
NETMASK='255.255.255.0'
DNS_SERVER1='10.61.2.1'
DNS_SERVER2='216.166.159.6'
GATEWAY='192.168.1.1'
STATIC_IP='yes'
IP_ADDRESS='192.168.1.15'
NETMASK='255.255.255.0'
DNS_SERVER1='10.61.2.1'
DNS_SERVER2='216.166.159.6'
GATEWAY='192.168.1.1'
STATIC_IP='yes'
IP_ADDRESS='192.168.1.15'
NETMASK='255.255.255.0'
DNS_SERVER1='10.61.2.1'
DNS_SERVER2='216.166.159.6'
GATEWAY='192.168.1.1'


# pwd
/etc/network-wizard/wireless/profiles
#
# cat autoconnect.conf
TITLE="autoconnect"
        IP=""
        GATEWAY=""
        ESSID="any"
        NWID=""
        KEY="off"
        MODE="Managed"
        SECURE="open"
        FREQ=""
        CHANNEL=""
        AP_MAC=""
#
# cat template.conf
TITLE="template"
        IP="192.168.0.3"
        GATEWAY=""
        ESSID="hotspot"
        NWID=""
        KEY=""
        MODE="Managed"
        SECURE="open"
        FREQ="2.437G"
        CHANNEL=""
        AP_MAC=""
#
#
# #NOW I WILL RUN THE NETWORK WIZARD
#
#
# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:13:A9:5F:3F:EA 
          inet addr:169.254.2.209  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1602 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:336639 (328.7 KiB)
          Interrupt:16

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:18:DE:62:8F:54 
          inet addr:192.168.1.112  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:371 errors:0 dropped:0 overruns:0 frame:0
          TX packets:138 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:132743 (129.6 KiB)  TX bytes:18787 (18.3 KiB)

wmaster0  Link encap:UNSPEC  HWaddr 00-18-DE-62-8F-54-00-00-00-00-00-00-00-00-00-00 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

#


However the contents of none of the files were modified when I exited the wizard telling it to "save". What I had done with the network wizard was using dhcp for both interfaces, after which wlan0 now could get to the internet (until next boot).

Notice, the MAC of my interfaces are 00:13... and 00:18... However for some reason, down in the WPA directory, it is acting as if the interface has a MAC of 00:1A...

I suspect the old static IP stuff that is showing up in my ifconfig after boot comes from that strange-looking file, 00:1A:70:65:23:4A.WPA.conf. The addresses in there are the ones I assigned to wlan0 a couple days ago. I don't know what they are doing in a WPA configuration file anyway.
Back to top
View user's profile Send private message 
JMX

Joined: 29 Dec 2008
Posts: 23

PostPosted: Thu 01 Jan 2009, 02:55    Post subject:  

gyro wrote:
The problem you have had with the Puppy Network Wizard + rc.network, is not a limitation of the IP software, but rather it seems to be a limitation of the wizard and rc.network. It assumes that both interfaces need to be configured, and/or brought up, at the same time.


Okay. That would explain the symptoms I was seeing when I was relying exclusively on the network wizard. This is not a big issue because it has a simple solution. I was kinda excited when my first custom linux script actually solved the problem. I come from a 98SE and DOS environment so I have a learning curve ahead of me with all of this new fangled terminology.

The NOP remaster of Puppy with Xfce and Thunar is awesome and is going to make the transition a real pleasure. I was favoring Slackware distributions so when I came across Puppy with its thorough wireless card support and Slack12 package compatibility I was leashed. So now it looks like I will be searching this forum frequently. It looks like most everything is already answered. I just got to search.

I now have complete control of my network cards in real time, wired and wireless, within just a couple of clicks and without rebooting. I could not do that on the other OS.

Thanks!
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 524
Location: Brisbane, Australia

PostPosted: Thu 01 Jan 2009, 08:39    Post subject:  

PaulBx1 wrote:
I tried to dig into why my config does not get saved over a boot.
Sorry, I don't know why the wizard + rc.network is not restoring your configuration across a boot.

But I can explain a couple of minor points:
PaulBx1 wrote:
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:13:A9:5F:3F:EA
inet addr:169.254.220.217 Bcast:169.254.255.255 Mask:255.255.0.0
The IP address "169.254.n.n" is generated by the dhcp client when it failed to get one from a dhcp server.

PaulBx1 wrote:
# ls
interfaces profiles wpa_profiles
# cd profiles/
# ls
00:1A:70:65:23:4A.WPA.conf autoconnect.conf template.conf
The MAC address here is that of your wireless Access Point (router), not the MAC address of your interface.

Also looking in "/tmp/bootsysinit.log" will often show if anything is failing during boot, (hint from Dougal if my memory serves correctly)

gyro

PS: Looking at "cat 00:1A:70:65:23:4A.WPA.conf ", maybe it's time for a fresh start.
Back to top
View user's profile Send private message 
edoc


Joined: 07 Aug 2005
Posts: 4394
Location: Southeast Georgia, USA

PostPosted: Fri 02 Jan 2009, 11:36    Post subject:  

Sorry to pile-on but ...

When I use Menu-Setup-NetworkWizard, then choose ath0 for wireless, then click on Wireless, then select Draft-N as the previously saved connection and Load it I always get an error saying there was no connection.

When I press Test ath0 I then always get an OK and may proceed to Auto DHCP.

Because of this xautoconnect cannot be used.

_________________
Thanks! David
Home page: http://nevils-station.com
Don't google Search! http://duckduckgo.com
Puppy upup Raring 3992 & Lighthouse64-b602
Back to top
View user's profile Send private message Visit poster's website 
OldTxPup

Joined: 01 Feb 2009
Posts: 1

PostPosted: Sun 01 Feb 2009, 21:01    Post subject: Got connection on boot to work  

I recently discovered Puppy Linux and loaded it on a Gateway Solo 3350 laptop. I was happy to see that my D-Link DWL-G630 wireless card worked using a WPA2/AES connection with a hidden SSID. The module being used is the ath_pci module.

I ran into the problem of the connection not automatically establishing itself on boot up. So I decided to throw in some debug echo statements in rc.network and wga-profiles.sh to see what is happening. I manage to determine that it would timeout in validateWpaAuthentication.

By chance I decided to perform an 'ifconfig ath0 up' through the console window and happened to notice that my wireless card started its scan and then established a connection in a about 2 seconds. So I decide to throw in an 'ifconfig $INTERFACE down' followed immediately by an 'ifconfig $INTERFACE up' just prior to the validateWpaAuthentication. Sure enough on reboot the connection worked and the interface acquired an IP Address.

Having achieved success, I decided to see if I could localize how far back in the process that this trick would no longer work and possibly give a hint as to what might be the problem area. It turns out that it has to do with the iwlist scan. If I move the ifconfig down/up statements prior to the iwlist scan the trick no longer works. So I suspect that the iwlist scan leaves either the ath_pci driver or the wireless card in some state that does not allow the authentication to complete. Apparently the ifconfig down/up sequence clears out that state and allows the WPA Authentication process to go on and work as it should.

So my current working configuration has the ifconfig down/up statements just after the last iwlist scan on line 441 of /etc/rd.d/rc.network.
Back to top
View user's profile Send private message 
PaulBx1

Joined: 16 Jun 2006
Posts: 2308
Location: Wyoming, USA

PostPosted: Thu 05 Feb 2009, 19:17    Post subject:  

I found the line that creates files like this:
Code:
TITLE="Cody"
        WPA_DRV="wext"
        WPA_TYPE=""
        WPA_AP_SCAN="1"
        ESSID="BrownieNet"
        NWID=""
        KEY="CENSORED"
        MODE="managed"
        SECURE="open"
        FREQ="2.437G"
        CHANNEL="6"
        AP_MAC="00:1A:70:6B:AE:BE"
       
STATIC_IP='yes'
IP_ADDRESS='192.168.1.11'
NETMASK='255.255.255.0'
DNS_SERVER1='216.166.159.7'
DNS_SERVER2='216.166.159.6'
GATEWAY='192.168.1.1'
STATIC_IP='yes'
IP_ADDRESS='192.168.1.11'
NETMASK='255.255.255.0'
DNS_SERVER1='216.166.159.7'
DNS_SERVER2='216.166.159.6'
GATEWAY='192.168.1.1'


It is this line in net-setup.sh:
Code:
echo -e "${MODECOMMANDS}" >>"${PROFILES_DIR}/${PROFILE_AP_MAC}.${PROFILE_ENCRYPTION}.conf"


It seems this code can be executed more than once, for a given interface configured, if one goes into the static IP selection more than once (for example, when changing an address). However it is more ugly than disfunctional, since it appears the last entry is the one that is used.

One problem though; if you ever set up something with a static IP address, it looks like it can never be changed back to DHCP, because the variable assignment "STATIC_IP='yes'" never gets reset anywhere.

On another subject, I found why there are so many /etc/resolv.conf backup files. I reported it elsewhere and repeat it here:
Quote:
The net-setup.sh script contains this line:

Code:
mv -f /etc/resolv.conf /etc/resolv.conf.$$


Unfortunately, over time that causes /etc to fill up with piles of resolv.conf files. A better way to do it would be this:

Code:
if [ -f /etc/resolv.conf.-2 ]; then mv -f /etc/resolv.conf.-2 /etc/resolv.conf.-3; fi
if [ -f /etc/resolv.conf.-1 ]; then mv -f /etc/resolv.conf.-1 /etc/resolv.conf.-2; fi
if [ -f /etc/resolv.conf ]; then mv -f /etc/resolv.conf /etc/resolv.conf.-1; fi


Three backups should be enough.
I will post this in the network wizard thread too.

<later>
I just noticed rc.network has this same bit of code. In other words, when booting, rc.network may create another backup resolv.conf file. This seems to be an error. rc.network should execute the files created by the network wizard, not generate more of them. The comment there said the routine setupStaticIP was a hacked version of the same routine in net-setup.sh, however it appears it was not hacked enough!



Oh, and one more item. If you search for the file net-setup.sh, you find the usual one in /usr/sbin, and another, older copy in /usr/local/net-setup/usr/sbin. And there is some other old stuff down there. It seems this should be cleaned out.
Back to top
View user's profile Send private message 
Dougal


Joined: 19 Oct 2005
Posts: 2505
Location: Hell more grotesque than any medieval woodcut

PostPosted: Sun 08 Feb 2009, 17:53    Post subject: Re: Got connection on boot to work  

OldTxPup wrote:
So my current working configuration has the ifconfig down/up statements just after the last iwlist scan on line 441 of /etc/rd.d/rc.network.

Ok, I've added that. Nice catch.

_________________
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind
Back to top
View user's profile Send private message 
Dougal


Joined: 19 Oct 2005
Posts: 2505
Location: Hell more grotesque than any medieval woodcut

PostPosted: Sun 08 Feb 2009, 18:03    Post subject:  

PaulBx1 wrote:
It is this line in net-setup.sh:
Code:
echo -e "${MODECOMMANDS}" >>"${PROFILES_DIR}/${PROFILE_AP_MAC}.${PROFILE_ENCRYPTION}.conf"


It seems this code can be executed more than once, for a given interface configured, if one goes into the static IP selection more than once (for example, when changing an address). However it is more ugly than disfunctional, since it appears the last entry is the one that is used.

One problem though; if you ever set up something with a static IP address, it looks like it can never be changed back to DHCP, because the variable assignment "STATIC_IP='yes'" never gets reset anywhere.

Ok, I've added cleaning up the old info.

Quote:
On another subject, I found why there are so many /etc/resolv.conf backup files.

This was reported already and cleanup code added in November, according to the changelog.


Quote:
<later>
I just noticed rc.network has this same bit of code. In other words, when booting, rc.network may create another backup resolv.conf file. This seems to be an error. rc.network should execute the files created by the network wizard, not generate more of them. The comment there said the routine setupStaticIP was a hacked version of the same routine in net-setup.sh, however it appears it was not hacked enough!

No. If I'm not mistaken, the backing up of resolve.conf was always done in rc.network, since dhcpcd also re-generates it.
setupStaticIP must re-generate it since rc.network has no idea where you booted last time! So the existing resolve.conf could have been generated on a different computer and either for a static IP of by dhcpcd.

Quote:
Oh, and one more item. If you search for the file net-setup.sh, you find the usual one in /usr/sbin, and another, older copy in /usr/local/net-setup/usr/sbin. And there is some other old stuff down there. It seems this should be cleaned out.

Barry added that in 4.12. It's the old wizard, before I updated it, in case people want to use it instead.

_________________
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind
Back to top
View user's profile Send private message 
Dougal


Joined: 19 Oct 2005
Posts: 2505
Location: Hell more grotesque than any medieval woodcut

PostPosted: Sun 08 Feb 2009, 18:05    Post subject:  

OK, finally another update (in parent post).

Changes:
rc.network:
- Add rerwin's "sleep 1" (I used his first, more general solution, in testInterface)
- implement suggestion from OldTxPup: ifconfig down/up after wireless scan
- don't bring down at shutdown interfaces with wake-on-lan enabled (requested by ferikenagy)
- when running the wireless scan, first do a "dry run" (some people reported that, with the wizard, sometimes not all networks appear in the scan dialog, so maybe giving it a "warmup" helps...)
- if wireless scan found nothing, try ejecting/inserting pcmcia card before scanning again (this is already done in the wizard)

Wizard:
- add the code for handling special characters in wireless encryption key
- when updating an existing profile, clean out old static IP info (problem reported by PaulBx1)

_________________
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 524
Location: Brisbane, Australia

PostPosted: Tue 10 Feb 2009, 11:18    Post subject: Re: Improved Network Wizard (and rc.network)
Subject description: New Configuration Infrastructure
 

Dougal wrote:
Could a user run more than one instance of dhcpcd at once, connecting via more than one interface?
Theoretically, it might be possible, but extremely unlikely.
If more than one interface is active, then puppy is most likely a router, in which case it is sensible to use dhcp on the Internet side, but static on the local side.
There is also a problem with more than one dhcpcd, i.e. the lottery as to which dhcpcd rewrites /etc/resolv.conf last.

Dougal wrote:
Do people ever use static ip addresses with wireless??
Yes, I do sometimes.
When we travel, our Internet connection is via a 3G mobile phone connected with a USB cable. On puppy this ends up being a "ppp0" interface. But we have 2 computers. Since it's convenient if both of us can access the Internet at the same time, I setup puppy as a router. I use the inbuilt wifi as the local network. Since puppy is the only router/gateway on the local network, I configure the wifi interface with a static IP address, and run dnsmasq on it to provide a dhcp service to the laptop, which is usually running windows XP.
(My wireless access point, is quite a small box to pack, and we usually setup camp on a powered site.)

gyro
Back to top
View user's profile Send private message 
PaulBx1

Joined: 16 Jun 2006
Posts: 2308
Location: Wyoming, USA

PostPosted: Thu 12 Feb 2009, 00:18    Post subject:  

Quote:
No. If I'm not mistaken, the backing up of resolve.conf was always done in rc.network, since dhcpcd also re-generates it. setupStaticIP must re-generate it since rc.network has no idea where you booted last time! So the existing resolve.conf could have been generated on a different computer and either for a static IP of by dhcpcd.


Hmmm, well, I guess I am missing the big picture about this. Seems like in other distros, this is just a static file, changed manually with an editor. Seems weird the way Puppy does it. Oh well, if you say so...

Anyway, you probably don't need a hundred copies of backup, do you? Last time I cleaned them out, there must have been a hundred copies in /etc. Take a look at that code I supplied to limit it to 4 copies. Seems like that should be enough.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 36 of 40 [596 Posts]   Goto page: Previous 1, 2, 3, ..., 34, 35, 36, 37, 38, 39, 40 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1769s ][ Queries: 12 (0.0122s) ][ GZIP on ]