Linux - Wireless NetworkingThis forum is for the discussion of wireless networking in Linux.

Notices

Welcome to LinuxQuestions.org, a friendly and active Linux Community.

You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

One thing that might be happening is that your router might be keeping those IP's checked out to the other machines. I think generally, the DHCP of the WRT54G logs the MAC address of the machine logging on and then assigns and IP. These are kept in the system for X amount of time before they're automatically recycled. So even though you've turned off the machines, their MAC is still registered with an IP. Then when you assign a static IP that was in use by another machine, it might not let you connect since the MAC doesn't match. That's mostly speculation by me, but you could verify it by releasing all the ip's before turning the machines off, and then trying it.

What I do with my home network is to use "static" DHCP. On my WRT54G there's a page where you can assign specific IP's to specific MAC addresses. So I entered all of my MAC's and assigned them an IP so they're always the same. Then it's easy for me to limit the available addresses to only fit the number of machines I connect.

DHCP assigns more than just the IP address. It also edits /etc/resolv.conf on the fly, sets the netmask, and gives the values for Default gateway and the nameservers. If you don't use DHCP, there is more you need to configure.

...
I know it looks like .104 is a natural assignment, but if I switch EVERY networked device off, then run my two PCs under Linux, why:

1. Can I not assign an IP statically to the two machines, and
2. Why are .100 and .101 not the first dhcpcd IP assignments
...

jschiwal pretty much answered #1, #2 is likely due to the way the DHCP server (the WRT54G) hands out leases. As an example Linux DHCP servers assign addresses from the top of their pool down, windows servers usually assign addresses from the bottom up. It's also good practice that if you are setting static IP addresses to make sure they are not in the DHCP range.

Oh, I thought my static IPs needed to be in the DHCP range; for some reason I thought anything outside of that range would not be served by the router.

Anyhow. If I do NOT use DHCPCD, I can not get an internet connection. Which of my config files should I post here in order to get help on assigning static IPs under Linux that match my statics under XP.

Then use the same values to statically configure you box when it is using Linux. The IP address could be any in the legal range of your subnet. Sometimes when you are running a certain type of server, a static IP address works best. I would pick one outside the range of address that the Router supplies. Or you could turn off the DHCP server function on the router also.
The DNS address is usually referred to as Nameserver in Linux. The two names are synonymous.

In the config files, lines that start with the octothorpe character are comments.

I don't use slackware so some of the items may go into different files.

/etc/resolve.conf contains the nameserver addresses (dns)

There may be an /etc/route.conf file. Or it may have moved to /etc/sysconfig/network/ and may not even be used. Sometimes this is entered dynamically during bootup based on other config files.

Try posting the output of "sudo /sbin/ifconfig" and "/sbin/route".

Also, if you are able to communicate between two local hosts, but not connect to the internet, the reason is usually either the gateway address is wrong (/etc/route.conf), or the nameserver addresses are wrong (/etc/resolve.conf).

From your post, I take it that slackware doesn't use interface config files in /etc/sysconfig/network/ with names like "ifcfg-eth0". In SuSE and others, a generalized startup service will source the config files in /etc/sysconfig/network/, instead of having the information explicitly entered. For example, each interface has its own config file; e.g. ifcfg-eth0. This makes the service scripts harder to follow, but is necessary if hotplugging is used. And there is a one-to-one mapping between gui configuration dialog and a particular config file.
If slackware supports network interface hotplugging, there may be a similar move to generalize the startup scripts. Please check if you have a /etc/sysconfig/network/ directory and look for any README files on changes, such as whether /etc/route.conf is still used.

If your system has both a NIC interface and a wireless interface, and they aren't assigned to different subnets, make sure the interface that you are not using is shut off.

Also, while this is unlikely, don't use any scripts or configuration files that were prepared in windows. Sed scripts and make files can fail due to invisible linefeeds for example.

I hope I gave you some ideas to try. Someone who actually uses slackware may be able to provide better specific slackware configuration help. Some slackware how-to's on the net may be helpful, but they could be dated. Look for documentation that comes with your system first.

/etc/rc.d/rc.inet1.conf
# /etc/rc.d/rc.inet1.conf
#
# This file contains the configuration settings for network interfaces.
# If USE_DHCP[interface] is set to "yes", this overrides any other settings.
# If you don't have an interface, leave the settings null ("").

## Some additional network parameters that you can use are explained below.
## Taking the configuration for wlan0 as an example:
#IFNAME[4]="wlan0" # Use a different interface name instead of
# the default 'eth4'
#HWADDR[4]="00:01:23:45:67:89" # Overrule the card's hardware MAC address
#MTU[4]="" # The default MTU is 1500, but you might need
# 1360 when you use NAT'ed IPSec traffic.
#DHCP_TIMEOUT[4]=15 # The default timeout for the DHCP client to
# wait for server resonse is 60 seconds, but
# you might want a shorter wait.
#DHCP_KEEPRESOLV[4]="yes" # If you dont want /etc/resolv.conf overwritten
#DHCP_KEEPNTP[4]="yes" # If you don't want ntp.conf overwritten
#DHCP_KEEPGW[4]="yes" # If you don't want the DHCP server to change
# your default gateway
#DHCP_IPADDR[4]="" # Request a specific IP address from the DHCP
# server
#WLAN_ESSID[4]=DARKSTAR # An example of how you can override _any_
# parameter defined in rc.wireless.conf, by
# prepending 'WLAN_' to the parameter's name.
# Useful with multiple wireless interfaces.
#WLAN_IWPRIV[4]="AuthMode=WPAPSK EncrypType=TKIP WPAPSK=thekey"
# Some drivers require a private ioctl to be
# set through the iwpriv command. If more than
# one is required, you can place them in the
# IWPRIV parameter (space-separated, see the
# example).
#WLAN_WPA[4]="wpa_supplicant" # Run wpa_supplicant for WPA support
#WLAN_WPADRIVER[4]="ndiswrapper"# Tell wpa_supplicant to specifically use the
# ndiswrapper driver
#WLAN_WPAWAIT[4]=30 # In case it takes long for the WPA association
# to finish, you can increase the wait time
# (defaults to 10 seconds)
#SCRIPT[4]="/etc/rc.d/ifcfg/ifmetric.sh"
# use a custom interface configuration script
# (example scripts are in the ifcfg directory)

spc,
From the output you posted above, it appears that you have a wired eth0 and the wireless wlan0 on the same IP subnet. If you have them both on the same LAN, the kernel will only use one of them to connect with, if you have eth0 unplugged but still "UP" this could be the cause of your network connectivity problems. This is confirmed by the routing table output, which shows two default routes.

The instructions for the wireless section [of rc.inet1.conf?] show, "Example config information for wlan0. Uncomment the lines you need and fill in your configuration settings." It appears that you have placed settings in there but forgot to uncomment the lines, do that by taking the hash mark # out from in front of the lines you are using. It also wouldn't hurt to take a peek at your rc.inet1 and see if/where it sets up wireless, with the extra settings it needs over wired interfaces. It may or may not try to start a 4th interface or start it as a wireless interface. In the case section at the bottom of rc.inet1 make sure that 'start' and * have an interface up and 'stop' has an interface down for your wireless. I don't have a slack 10 system I can peek at but if the wireless settings were already in your conf then there is probably a wlan_up section in inet1 that just needs to be set to use the 4th interface settings in the config file:

jschiwal et al,
Slackware places all the network interface config settings into /etc/rc.d/rc.inet1.conf which is a config file used by the /etc/rc.d/rc.inet1 script to start all network interfaces. It includes the default route (gateway= in rc.inet1.conf) although the nameservers are still listed in /etc/resolv.conf. Rather than a seperate readme, all the startup scripts in /etc/rc.d/ are very heavily documented so that once you realize it is BSD-style startup and not System V, it is (usually) incredibly easy to follow.

The instructions for the wireless section [of rc.inet1.conf?] show, "Example config information for wlan0. Uncomment the lines you need and fill in your configuration settings." It appears that you have placed settings in there but forgot to uncomment the lines, do that by taking the hash mark # out from in front of the lines you are using.

NB - Uncommentinmg these lines has no effect on my problem; under XP, eth0 and wlan0 are both on the same subnet...

Also, I tried asigning getting my router to assign IP address on the basis of NIC MAC address: I assigned .101 to my WiFi NIC, which is fine for XP, but resulted in .104 notbeing obtained under Linux, so no internet connection.

I then reassigned the WiFi NIC under XP to .104 to try and 'free-up' .101 for Linux... no dice!

What on earth is going on with Linux that it insists on obtaining .104?

Changing the third number would change your subnet, not the last one:
192.168.1 vs 192.168.0

Manually shutdown one of the interfaces and restart the second and see if you can access the internet.
Also after doing that, verify that you have a default gateway with the output of the route command.
Check the contents of /etc/resolv.conf. It should contain the DNS address. Both are required to access the internet.

With both of these interfaces up and on the same subnet, I can guarantee that you won't have internet access, unless you are running a bridge device.
I'm sure that is where your problem lies. If you need both interfaces, then one of them should be on a separate subnet, such as 192.168.0.

/etc/rc.d/rc.inet1.conf
# /etc/rc.d/rc.inet1.conf
#
# This file contains the configuration settings for network interfaces.
# If USE_DHCP[interface] is set to "yes", this overrides any other settings.
# If you don't have an interface, leave the settings null ("").