LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-04-2009, 11:04 AM   #1
sheep
LQ Newbie
 
Registered: Jun 2009
Distribution: Slackware 12.2
Posts: 10

Rep: Reputation: 0
No i-net although dhcp works


Hi folks,

I am quite new to slackware (v 12.2). I have a notebook and a wireless lan network at home. Although the set-up of the dhcp stuff seems to work fine, I do not get access to the internet. here is what i did:

> ifconfig wlan0 up
> iwlist scanning
## works fine and shows my w-lan network and some others

> iwconfig wlan0 essid MYWLAN key s:NONHEXCODE ##(128bit)
## seems to work too...

> dhclient wlan0
## seems to work as well. I get an IP number and an access point. However, when I start a browser I get no access to the net.
I am sure that there is something terribly stupid I've missed here. Any help is highly appreciated.

btw: I-net with a network cable at work runs just fine (using only "ifconfig eth0 up" and "dhclient eth0" --> browser works).

cheers,
sheep
 
Old 06-04-2009, 11:41 AM   #2
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
Can you post the results of `ifconfig -a` and `iwconfig` when you are connected via wireless?

What are the contents of `/etc/resolv.conf` after you have run dhclient?
 
Old 06-04-2009, 03:06 PM   #3
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Use dhcpcd instead of dhclient. dhclient does not ask for nameservers by default - you'd have to configure it to do so in /etc/dhclient.conf
 
Old 06-04-2009, 05:56 PM   #4
north49er
Member
 
Registered: Apr 2003
Location: 60.47'N lat
Distribution: fedora 15 x86_64
Posts: 156

Rep: Reputation: 18
In trying to get my wireless to work in slackware, things did'nt start to make sense until I read Slackware Essentail's treatment on Networking, and Alien Bob's networking (both found in the sticky above "So you want to be a Slacker").

In any case, try:
/sbin/dhcpcd
/etc/rc.d/rc.inet1
 
Old 06-13-2009, 03:15 AM   #5
sheep
LQ Newbie
 
Registered: Jun 2009
Distribution: Slackware 12.2
Posts: 10

Original Poster
Rep: Reputation: 0
Hey thanks for your suggestions and sorry for the late reply...
I have configured the file /etc/rc.d/rcinet1.conf - "seems" to work at startup and gets an IP. I am able to ping any computer on the local network (including the router) but I can not get out "in the wild".
okay, here is the result of "ifconfig wlan0" when connected:
Quote:
# ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:18:de:00:ae:64
inet addr:192.168.1.35 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::218:deff:fe00:ae64/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:59 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6950 (6.7 KiB) TX bytes:2260 (2.2 KiB)
I have really no idea why it still doesn't work. Again, any help would be great.
cheers

Last edited by sheep; 06-13-2009 at 03:17 AM.
 
Old 06-13-2009, 04:17 AM   #6
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 446

Rep: Reputation: 59
What does yout /etc/resolve.conf look like? Is the information correct? Can you ping sites on the Internet by IP-address instead of hostname? I.e. to ping google:
ping 74.125.67.100
 
Old 06-13-2009, 05:38 AM   #7
sheep
LQ Newbie
 
Registered: Jun 2009
Distribution: Slackware 12.2
Posts: 10

Original Poster
Rep: Reputation: 0
I cannot ping outside the local network (I tried several IPs). But I can ping inside. Hence, I think it is at the moment not a problem of resolving the names...
 
Old 06-13-2009, 05:58 AM   #8
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Possibly the default gateway then - give the output of :
Code:
/sbin/route -n
cat /etc/resolv.conf
For info..
 
Old 06-13-2009, 06:17 AM   #9
sheep
LQ Newbie
 
Registered: Jun 2009
Distribution: Slackware 12.2
Posts: 10

Original Poster
Rep: Reputation: 0
Sorry - I am currently not at home and I am connected to a wired network (which works fine). So the results of the command do not help at the moment since they refer to the present network and not to the wireless network at home. the input goes like:
search INTERNETADDRESS_OF_THE PRESENT_INSTITUT
nameserver IP_ADDRESS_1
nameserver IP_ADDRESS_2

Maybe you have an idea what should be there so I can check at home, e.g. the IP address I get from the router and/or some gateway stuff. SOrry - I am clueless.
 
Old 06-13-2009, 07:41 AM   #10
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
OK - here's my somewhat typical output of route -n. My subnet is 192.168.1.0/24 and my router is on 192.168.1.1. This means the actual IP I am given is usually (well actually always) 192.168.1.6 from my router. I set this to be always the same in the router.
Code:
Destination     Gateway  Genmask        Flags         
192.168.1.0     0.0.0.0  255.255.255.0   U
127.0.0.0       0.0.0.0  255.0.0.0       U
0.0.0.0     192.168.1.1  0.0.0.0         UG
The "Gateway" should be the router address. This is often the address of the DNS server as well so look in /etc/resolv.conf. This is mine :

Code:
nameserver 192.168.1.1
All these addresses are handed out by a DHCP server (the router in my case) or set by you. Check it out when you are home and let us know.
 
Old 06-13-2009, 08:57 AM   #11
sheep
LQ Newbie
 
Registered: Jun 2009
Distribution: Slackware 12.2
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks very much... I will try that and keep you posted.
cheers
 
Old 06-13-2009, 11:08 AM   #12
sheep
LQ Newbie
 
Registered: Jun 2009
Distribution: Slackware 12.2
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks!
that solved the problem - I added a new route using the IP of my browser as gateway and went online without any further problems.
cheers
 
Old 06-13-2009, 11:23 AM   #13
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
that solved the problem - I added a new route using the IP of my browser as gateway and went online without any further problems.
Well your gateway should be set by DHCP if you are on DHCP or in /etc/rc.d/rc.inet1.conf if static.
 
Old 06-13-2009, 11:37 AM   #14
sheep
LQ Newbie
 
Registered: Jun 2009
Distribution: Slackware 12.2
Posts: 10

Original Poster
Rep: Reputation: 0
ok... I may use the wrong term. I checked
# route -n
there were two lines and in column 'gateway' both had 0.0.0.0. I then
typed something like
# route add default gw 192.168.1.1
voila...
(I have additionally changed the nameserver in /etc/resolv.conf and set the routers IP address there) I do not understand how exactly this works together but as far as I see the system uses now the router IP as gateway to the interent...
In case you have any additional comments or suggestions I will be happy to hear them!
cheers

EDIT: I use DHCP and not a static IP

EDIT:
So you can see how route -n looks now:
Quote:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0

Last edited by sheep; 06-13-2009 at 11:47 AM. Reason: route output
 
Old 06-13-2009, 12:25 PM   #15
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Cool - your routes looks OK and DNS is set. However you may wish to have this all setup automatically - have a look at Alien Bob's wiki which is pretty much the standard on setting up your network.

Have a look at /etc/rc.d/rc.inet1.conf. Make a copy and you should have something like this set up :
Code:
#IFNAME[4]="wlan0"
#IPADDR[4]=""
#NETMASK[4]=""
#USE_DHCP[4]="yes"
The USE_DHCP="yes" means your routes and DNS will be automatically assigned via DHCP. Anyway - good luck with it all !

Oh - BTW there is now a different way to all this involving WICD which means you should not make changes to /etc/rc.d/rc.inet1.conf if following this method - this is a new less flexible way of doing it and the old way still works. Personally I recomend the manual configuration.

Last edited by bgeddy; 06-13-2009 at 12:27 PM.
 
  


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
dhcp works but static only talks to the local net thadeausmaximus Linux - Networking 7 10-30-2006 02:16 AM
cableone.net DHCP on SuSE 9.1 LUB997 Linux - Software 1 07-18-2005 12:15 AM
dhcp problem no net!! Nz_Boy_2004 Linux - Distributions 10 12-12-2004 10:14 PM
Net access only works from behind the router! McBrain Linux - Networking 5 04-11-2004 05:58 AM
DHCP / Net Card Problems musicnut01 Linux - Networking 1 06-28-2001 08:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:13 AM.

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