LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-26-2005, 06:51 PM   #1
Ryan450
Member
 
Registered: May 2004
Distribution: Doing the Distro Hop
Posts: 160

Rep: Reputation: 30
Getting an IP address in linux


hey gang,

I just configured my wireless internet card and got it to connect successfully with encryption.. but I'm having a hard time getting an ip address assigned to it from my router.. heres what I've tried so far

root@1[ryan450]# ifconfig ath0 192.168.0.26 netmask 255.255.255.0 up
root@1[ryan450]# ifconfig
ath0 Link encap:Ethernet
HWaddr 00:0F:3D:04:02:EF

inet addr:192.168.0.26 Bcast:192.168.0.255 Mask:255.255.255.0

inet6 addr: fe80::20f:3dff:fe04:2ef/64 Scope:Link

UP BROADCAST MULTICAST MTU:1500 Metric:1

RX packets:1042 errors:3479 dropped:0 overruns:0 frame:3479

TX packets:10 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:199

RX bytes:315676 (308.2 KiB) TX bytes:2512 (2.4 KiB)

Interrupt:10 Memory:f8f20000-f8f30000

IWCONFIG is HERE

ath0 IEEE 802.11g ESSID:"Fletcher"
Mode:Managed Frequency:2.437 GHz Access Point: 00:0D:88:97:C4:7E
Bit Rate:36 Mb/s Tx-Power:50 dBm Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Encryption key:0543-21 Security mode:open
Power Management:off
Link Quality=28/94 Signal level=-67 dBm Noise level=-95 dBm
Rx invalid nwid:13 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0


the iwconfig is up there for the sake of it being up there... the card is configured properly I believe but if anyone sees a fluke please let me know. not sure whats going wrong with this, but when I try to connect to my router it says connection refused, and when i try any other site, not found..

Last edited by Ryan450; 05-27-2005 at 01:21 PM.
 
Old 05-27-2005, 07:09 PM   #2
jedediah
LQ Newbie
 
Registered: Sep 2004
Location: Oregon
Distribution: Slackware 10
Posts: 21

Rep: Reputation: 15
I've got a few thoughts:

Since you're not using dhcp, can you verify that the correct DNS entries are in the file /etc/resolv.conf? (try `cat /etc/resolv.conf`)

Also, does the router filter MAC addresses? I know mine does, so you'd have to authorize your specific card with your network.

Hope this helps.
 
Old 05-27-2005, 07:17 PM   #3
Ryan450
Member
 
Registered: May 2004
Distribution: Doing the Distro Hop
Posts: 160

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by jedediah
I've got a few thoughts:

Since you're not using dhcp, can you verify that the correct DNS entries are in the file /etc/resolv.conf? (try `cat /etc/resolv.conf`)

Also, does the router filter MAC addresses? I know mine does, so you'd have to authorize your specific card with your network.

Hope this helps.
Alrighty.. turns out I was wrong :P.. I disabled the encryption on my router and tried to connect without encryption via my wireless card through linux.. and amazingly it did connect and worked beautifully (with DHCP)

so then, that can only mean one thing.. my encryption setting on linux was wrong.. I'm using a 64-bit WEP encryption, which is a 5 digit number that I put into my router.. now lets say that the number i specified to act as my key was 12345.. (note, I'm not using HEX numbers, my router lets me switch it over to ASCII)

in windows I just set the encryption key to that exact number 12345 and it works flawlessly.. how do you set it in linux?

Last edited by Ryan450; 05-27-2005 at 07:21 PM.
 
Old 05-28-2005, 05:13 PM   #4
jspsandhu
Member
 
Registered: Dec 2004
Location: Slough, UK
Distribution: Fedora, FreeBSD, RHEL
Posts: 85

Rep: Reputation: 15
Which windows do u use that allows you to enter ascii keys 12345 on the wireless card on 64 bit

WEP or do use a wireless utility that allows you to do that. Because XP uses HEX keys

64 bit encryption is equal to 10 hex characters or 5 ASCII characters

Can try HEX to ASCII and ASCII to HEX converters available on google and try to convert ur key

to HEX as it seems linux takes it in HEX.
 
Old 05-28-2005, 05:46 PM   #5
Ryan450
Member
 
Registered: May 2004
Distribution: Doing the Distro Hop
Posts: 160

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by jspsandhu
Which windows do u use that allows you to enter ascii keys 12345 on the wireless card on 64 bit

WEP or do use a wireless utility that allows you to do that. Because XP uses HEX keys

64 bit encryption is equal to 10 hex characters or 5 ASCII characters

Can try HEX to ASCII and ASCII to HEX converters available on google and try to convert ur key

to HEX as it seems linux takes it in HEX.
windows XP allows you to use 5 ascii characters.. I just figured out how to enter ascii characters into linux's iwconfig.. its like this

iwconfig ath0 key s:"12345"

that takes the ascii value and turns it into a hex value auto for you..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
API for mapping Physical Address to Virtual Address Lakshman_smt Linux - Software 2 10-15-2006 09:08 PM
dhcp no ip address and netmask dont match route address pengy666 Linux - Wireless Networking 1 05-08-2005 09:33 AM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM
DHCP Server MAC Address found, IP address not assigned wmburke Linux - Wireless Networking 17 11-17-2004 10:33 AM
problem to print source address and destination address jooboo Programming 2 11-26-2003 03:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration