LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 01-25-2005, 10:30 AM   #1
Reekkor
LQ Newbie
 
Registered: Jan 2005
Posts: 8

Rep: Reputation: 0
Static IP problem with ndiswrapper + Slackware 10


Hi there

My problem is, that i can't access the internet, when in school. I am using Slackware 10, with some Asus wireless card, which has to use ndiswrapper to work. I can access the internet at home, by using dhcp, but i don't know how to configure wlan0 so i can use the following settings:

IP: 192.168.110.xxx
Subnet mask: 255.255.255.128
Default gateway: 192.168.0.1

Primary DNS server: 195.231.241.125
Secondary DNS server: 130.226.1.2

These settings work fine in windows, but i just don't know how to configure Slackware to use them. Can anyone help me?

Last edited by Reekkor; 01-25-2005 at 10:32 AM.
 
Old 01-26-2005, 02:41 AM   #2
Reekkor
LQ Newbie
 
Registered: Jan 2005
Posts: 8

Original Poster
Rep: Reputation: 0
Someone in #linux on freenode helped me, so now i'm a bit further, though it doesn't really work yet. Instead of me talking, let me show you what i do, and what it results in:

Code:
bash-2.05b# insmod ndiswrapper

Using /lib/modules/2.4.26/misc/ndiswrapper.o

bash-2.05b# ifconfig wlan0 up

bash-2.05b# ifconfig wlan0 up 192.168.110.108

bash-2.05b# ifconfig wlan0 netmask 255.255.255.128


bash-2.05b# ifconfig wlan0

wlan0     Link encap:Ethernet  HWaddr 00:0C:6E:74:58:CF

          inet addr:192.168.110.108  Bcast:192.168.110.255  Mask:255.255.255.128
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:1742 errors:0 dropped:0 overruns:0 frame:0

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

          collisions:0
          RX bytes:198384 (193.7 Kb)  TX bytes:2454 (2.3 Kb)




bash-2.05b# iwconfig wlan0

wlan0     IEEE 802.11b  ESSID:"My Wireless Network B"

          Mode:Managed  Frequency:2.422GHz  Access Point: 00:02:2D:4E:C4:DB
          Bit Rate:11Mb/s   Tx-Power:16 dBm
          RTS thr:2346 B   Fragment thr:2346 B

          Encryption key:off
          Power Management:off
          Link Quality:100/100  Signal level:-40 dBm  Noise level:-256 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:2151   Missed beacon:0



/etc/rc.d/rc.inet1.conf:

# Config information for eth0:
IPADDR[0]=""

NETMASK[0]=""

USE_DHCP[0]=""

DHCP_HOSTNAME[0]=""



# Config information for eth1:

IPADDR[1]=""

NETMASK[1]=""

USE_DHCP[1]=""

DHCP_HOSTNAME[1]=""



# Config information for eth2:

IPADDR[2]=""

NETMASK[2]=""

USE_DHCP[2]=""

DHCP_HOSTNAME[2]=""



# Config information for eth3:

IPADDR[3]=""

NETMASK[3]=""

USE_DHCP[3]=""

DHCP_HOSTNAME[3]=""



# Default gateway IP address:

GATEWAY="192.168.0.1"



# Change this to "yes" for debugging output to stdout.  Unfortunately,

# /sbin/hotplug seems to disable stdout so you'll only see debugging output

# when rc.inet1 is called directly.


DEBUG_ETH_UP="no"


/etc/resolv.conf:

nameserver 195.231.241.125

nameserver 130.226.1.2
Yeah, well, problem is: I still can't access any sites. I can't even ping anything (IP or hostname, doesn't matter).
 
Old 01-26-2005, 02:58 AM   #3
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 9,608

Rep: Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004
Try to run the following commands after all the others:
Code:
route add -host 192.168.110.108 dev wlan0
route add default gw 192.168.0.1
 
Old 01-26-2005, 03:21 AM   #4
Reekkor
LQ Newbie
 
Registered: Jan 2005
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks for your reply. I tried as you suggested, and the first command worked fine. The second though, didn't work out:

Code:
bash-2.05b# route add default gw 192.168.0.1
SIOCADDRT: Network is unreachable
When i do route now, i see the following, which is kinda weird:

Code:
bash-2.05b# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.110.108 *               255.255.255.255 UH    0      0        0 wlan0
192.168.110.0   *               255.255.255.128 U     0      0        0 wlan0
loopback        *               255.0.0.0       U     0      0        0 lo
Huh? Maybe i'm just downright stupid, but can you tell me what's going on?
 
Old 01-26-2005, 03:46 AM   #5
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 9,608

Rep: Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004Reputation: 1004
Perhaps your card is not working properly. Try the next command before adding the gateway:
Code:
route add -net 192.168.0.0 netmask 255.255.255.128 dev wlan0
Are you sure about your gateway IP, since it's on a different subnet(192.168.0.1 and your IP is 192.168.110.168)?
 
Old 01-26-2005, 03:58 AM   #6
Reekkor
LQ Newbie
 
Registered: Jan 2005
Posts: 8

Original Poster
Rep: Reputation: 0
Woohoo! It works! It finally works. Thanks a huge lot bathory, you're the greatest!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Static Routing in Slackware 10.0 using Linksys kosmonaft Linux - Networking 16 03-26-2005 03:36 PM
problem connecting wireless to DLINK DI-524 using ndiswrapper/BCM94306/Slackware 10 kirkross Linux - Wireless Networking 17 12-07-2004 10:18 PM
How do I set up Slackware 9.1 to use DHCP with a static DNS? h00chman Linux - Newbie 1 05-02-2004 11:36 PM
Changing from static IP to DHCP in Slackware vipermuffin Linux - Networking 2 02-03-2004 01:03 AM
ADSL Static IP setup in Slackware Nic Slackware 1 03-10-2003 05:12 PM


All times are GMT -5. The time now is 07:59 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration