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 Wed 30 Jul 2014, 07:12
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 5 of 40 [596 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, ..., 38, 39, 40 Next
Author Message
Dougal


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

PostPosted: Wed 30 Jul 2008, 13:45    Post subject:  

BarryK wrote:
In my case, I was in Perth at a relative's place, then I came home, but the same profile worked at home. The wireless networks are open at both places.

What do you mean by "the same profile worked"? You mean the same MAC address existed in both cases?
I already mentioned in this thread that I could easily add the SSID, too, but figured people might change it sometimes on their router.

In any case, the way it currently works is that if it wasn't able to connect to any network that has a profile, it will try each of the (non-profiled) open networks available.

_________________
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 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Wed 30 Jul 2008, 22:27    Post subject:  

Correct me if I'm wrong, but isn't the MAC address simply the hardware address of the network interface device.

In my case, I'm using the same wireless hardware, so of course the address will be the same whereever I take my laptop.

A side note, I'm using a D-Link DWA-110 USB wireless unit with my laptop, as I could never get the internal wireless hardware to work.

Therefore, the problem as I asked in my previous question, still remains. The MAC address is a constant whereever I take my laptop, but I need to connect to different wireless networks.

Actually, do you need to use the MAC address at all in the profile name -- why not a random number? or the date? The MAC address, can be inside the profile file.

The thing is, I need to create a profile for each of the places I go to, so the profile file must have a different name for each. I imagine a lot of people would have the same situation as me.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
Dougal


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

PostPosted: Thu 31 Jul 2008, 04:18    Post subject:  

BarryK wrote:
Correct me if I'm wrong, but isn't the MAC address simply the hardware address of the network interface device.

As far as I understand it, the MAC address is the HW address of the network you connect to, i.e. the router. Thus (as I explained in the parent post) I used it as a unique identifier of the network (since, as I explained in another post, I've seen cases where the SSID is "default" and such).

If you run a wireless scan somewhere where there are a few networks, you see that each has its own address.

I may be wrong, of course, but I asked an no-one bothered to correct me.

_________________
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 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Thu 31 Jul 2008, 06:59    Post subject:  

Dougal,
No, the MAC address is the hardware address of the actual network card/hardware on your PC, not the external thing that you connect to.

That's what I always understood, so I was puzzled about the choice of MAC address for the profile files in the new Wizard.

I can prove it right now. If I run ifconfig, and look at the wlan1 information, it shows eactly the same MAC address as when I was at my relative's place:

wlan1 Link encap:Ethernet HWaddr 00:1C:F0:0A:53:F8

They refer to it as the HW (hardware) address, which is a far less confusing name than "MAC".

Perhaps name the profile as a combination:
<mac address>_<date>.profile.
...although, it would be nice to have a more meaningful name...
er, why not just ask the user for a simple name to uniquely identify the connection, like, in my case:
perenjori_internet.profile
relative_1_internet.profile

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
nic2109

Joined: 01 Jan 2007
Posts: 406
Location: Hayslope, near Middlemarch, Midlands, England

PostPosted: Thu 31 Jul 2008, 08:39    Post subject:
Subject description: MAC and I/P Addresses
 

Barry's correct.

Every Ethernet device has its own unique "hard wired" MAC address. The Router associates the MAC address to the I/P address either via DHCP or manual assigments. The Router will of course have its own MAC address but that's irrelevant.

_________________
Nick
Back to top
View user's profile Send private message 
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Thu 31 Jul 2008, 09:22    Post subject:  

Barry is right about the mac address. However, it should be possible to use the mac address of the gateway that you are connected to.

When the wireless connection is complete it most likely would have a default gateway for the assigned interface. You would need to determine the ip of the gateway and then use that to get the mac address for it. To determine the mac you need the arp binary, which is small ~40k, and would be nice to have in the default puppy Wink.

You can use something like this:

Code:
INTERFACE="wlan0"
GW_IP=` route -n | grep ^0.0.0.0.*$INTERFACE$ | gawk '{ print $2 }'`
GW_MAC=` arp | grep  $GW_IP | gawk '{ print $3 }'`


Of course you would need to use the appropriate code for INTERFACE=""
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: Thu 31 Jul 2008, 14:45    Post subject:  

BarryK wrote:
I can prove it right now. If I run ifconfig, and look at the wlan1 information, it shows eactly the same MAC address as when I was at my relative's place:

wlan1 Link encap:Ethernet HWaddr 00:1C:F0:0A:53:F8

They refer to it as the HW (hardware) address, which is a far less confusing name than "MAC".

That it the HW address of your NIC, which I use to identify it, for configuring the different interfaces (in the network/interfaces and wireless/interfaces dirs).
What is referred to as the MAC address in the wizard (PROFILE_AP_MAC) is what I use for the profile name and is obviously the MAC address of the Access Point, aka the HW address of your router's interface (so that if you set up your computer as a router, your HW address will be that AP_MAC) -- at least that's they way I understand it.

_________________
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 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Thu 31 Jul 2008, 22:46    Post subject:  

Dougal,
No, the MAC address that you are using for the profile names is that of the network card, not the access point.

I just checked. I reran the Wizard. Here at home I have a different router, my "profile name" is "belkin45g", in Perth it was "WLAN", these are how the networks have identified themselves when scanned.

Anyway, the point is, the .conf files are named with the MAC address of the card, not the access point.

Question for the experts: isn't it possible that the MAC address of the access point could change, in cases where you are connecting via some kind of wireless network provided by the ISP? They might have a sophisticated router system where you might connect to a different MAC address each time. Just a thought.

Oh yes, your comment that the MAC address will be that of the access point if your computer is setup as the router is correct, but that is not how most people connect. I have an external router/modem and in my case the MAC address that you are using for the .conf file names is not that of the router/modem, it is that of the USB D-Link wireless thingy that is plugged into my laptop.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
PaulBx1

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

PostPosted: Fri 01 Aug 2008, 01:15    Post subject:  

Starts to sound like the files ought to be identified by the ESSID, not the MAC address.

ESSID is after all an identifier. It should be usable as such. It is not our problem if a certain user has an ESSID of "linksys" both at work and at home; it's up to him to configure his router to have a usable, unique (for him) identifier (and very few company admins are going to leave a default ESSID on a router anyway).

Of course, there is still the support issue here. We will run into users who do have the same ESSID on two different APs and who won't know why one of their internet connections don't work. How is the network wizard to tell him to set him straight? Should we just have some text that says so? Should we have a text box warning if two profiles are created with the same ESSID?

On reflection, I can see the appeal of the MAC address; it requires nothing like the configuration of a router, which is beyond some users. But there has to be a way to get the address of the AP. What's the deal here, is this simply not available, or does it need a working connection to be established first (chicken or egg problem)? I guess the network scan does not provide it?

There is also a possible fallback for the sort of people who use default values in their routers. These people could switch networks the same way I do it in 2.16: going into the network wizard and simply telling it which profile to use.

Which makes me wonder. Why after all do the different files need to be named with MAC address or ESSID? Why not just let the user supply the name, just like in earlier versions of the network wizard, and the boot code simply compares the values found in the scan with every file's contents in that directory? It can't take that long to scan through a few short text files. That way, a naive user really could have a profile that worked for two different APs. Buy two linksys routers, plug 'em in, and bang, they both work, without configuration. Why is this a bad thing? Outside of being dumb, because not using encryption?
Back to top
View user's profile Send private message 
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Fri 01 Aug 2008, 09:06    Post subject:  

BarryK wrote:
isn't it possible that the MAC address of the access point could change, in cases where you are connecting via some kind of wireless network provided by the ISP? They might have a sophisticated router system where you might connect to a different MAC address each time. Just a thought.


If it's the same access point then it should have the same MAC. However, it is possible for a particular network/isp/ESSID to have have multiple access points (and hence multiple MACs). It would prob be best to use a compound id something like MAC-ESSID-ISP.

It would work something like this
Code:
Check for MAC
If found
   retrieve associated details
   use associated details
else
   check for ESSID

   # here we assume that duplicate ESSIDs exists
   if found
      repeat
         retrieve ESSID assoicated details
         try ESSID assoicated details
      until (all essids exhausted ) or (success using details)
   else
      get details from users
      associate details with ESSID
   fi
fi
Back to top
View user's profile Send private message 
dogone


Joined: 21 Apr 2008
Posts: 202
Location: Arizona, USA

PostPosted: Fri 01 Aug 2008, 10:49    Post subject: MAC address vs ESSID vs both  

Time to throw in my 2 (your currency)'s worth.

As to "what is a MAC address", Wiikipedia has an excellent, if somewhat technical explanation: http://en.wikipedia.org/wiki/MAC_address.

The current convention is to identify wireless networks by ESSID only. This generally works well but depends upon the owner/operator assigning a unique (to his area only) ESSID and broadcasting the ESSID (the default, but optional). Any number of networks can employ the same ESSID however, at the same location or at many. Bottom line - the ESSID does not positively identify a network.

Unlike the ESSID, a MAC address is unique in the world. It identifies one and only one piece of network equipment. Replace your AP and systems configured to seek out that MAC address will fail to find your network.

Employing MAC addresses to identify a network is also problematic where several pieces of hardware serve one wireless network. Say you are at the north end of you airport and find an airport wireless AP. You save the profile "airport" based on the AP's MAC address. You now walk to the south end of this big airport and attempt to re-establish the connection. You laptop fails to find the "airport" connection simply because the AP identified by that MAC is out of range. The several closer airport APs are ignored.

Many wireless scanning utilities, including Pwireless, address this problem by displaying both the ESSID and the MAC address. The careful user can then correctly identify any wireless network, no matter the network's ESSID or the equipment it employs (MAC).

The best solution in Puppy's case may be to track networks by both ESSID and MAC and to, for security purposes, inform the user when these no longer match those on file. Thus, if Barry swaps out his faulty AP or changes it's ESSID, we still stand some chance of finding his network. We also stand a good chance of detecting a pirate AP (Ubuntu spies) using Barry's ESSID.

Last edited by dogone on Fri 01 Aug 2008, 10:58; edited 1 time in total
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: Fri 01 Aug 2008, 10:56    Post subject:  

BarryK wrote:
Anyway, the point is, the .conf files are named with the MAC address of the card, not the access point.

If that is, indeed, the case, then it's a mistake. But I'm quite positive it is the PROFILE_AP_MAC that is used for profiles, while the HWADDRESS (i.e. MAC of your device) is only used for the interface configurations.
I'll go over the script and report later.

_________________
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 
erikson


Joined: 27 Feb 2008
Posts: 735
Location: Ghent, Belgium

PostPosted: Fri 01 Aug 2008, 11:41    Post subject:  

Re MAC addresses:

To the best of my understanding, ifconfig returns the MAC address of your PC's interface, while iwlist returns the MAC address(es) of the wireless access point(s). For my network at home:
Code:
1# ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:0E:35:C1:EA:D7 
          inet addr:192.168.1.65  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3872 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2063 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:18731879 (17.8 MiB)  TX bytes:1256325 (1.1 MiB)
          Interrupt:11 Base address:0x4000 Memory:e0204000-e0204fff

1# iwlist eth1 scan
eth1      Scan completed :
          Cell 01 - Address: 00:12:17:E5:0A:B2
                    ESSID:"linksys"
                    Protocol:IEEE 802.11bg
                    Mode:Master
                    Channel:11
                    Encryption key:on
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
                              11 Mb/s; 12 Mb/s; 18 Mb/s; 22 Mb/s; 24 Mb/s
                              36 Mb/s; 48 Mb/s; 54 Mb/s
                    Quality=59/100  Signal level=-65 dBm 
                    Extra: Last beacon: 240ms ago

1#

You can also see that I'm just one of those guys who never bothered to change the default ESSID.

_________________
If it ain't broke, don't fix it. --- erikson
hp/compaq nx9030 (1.6GHz/480MB/37.2GB), ADSL, Linksys wireless router
http://www.desonville.net/
Puppy page: http://www.desonville.net/en/joere.puppy.htm

Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Sat 02 Aug 2008, 06:36    Post subject:  

The idea of using a unique custom name that you yourself create, seems nice, but I am reminded of a situation awhile back. I was helping someone on a Windows XP system to get their external USB wireless unit working, and if I recall rightly it came up with a window asking the user to type in a name for the profile -- and that is one place where he was confused -- what should he type in there? That's what he asked me. It could be any name he desired, but that was not explained by the Windows setup program.

The wireless setup program in that case, came on a CD and was not the built-in Windows wireless setup.

So, if we can eliminate that step, that's one less thing to cause any possible confusion. Unless the custom name is explained very clearly.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
Aitch


Joined: 04 Apr 2007
Posts: 6825
Location: Chatham, Kent, UK

PostPosted: Sat 02 Aug 2008, 10:26    Post subject:  

FWIW - I'm with erikson

that's what I use

in windoze from run/cmd

ipconfig /all

is the same as ifconfig in linux

useful iwlist info may help clear up confusion [can use in win & lin]

http://www.newlinuxuser.com/howto-use-iwlist/

Aitch
Edit:
I trust you've seen urban's autoconnect, dougal et al?

http://www.murga-linux.com/puppy/viewtopic.php?p=179387&sid=13dd751ee9c77f1b130fcfe457c352b9
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 5 of 40 [596 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, ..., 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.1180s ][ Queries: 12 (0.0077s) ][ GZIP on ]