Here is how to get the current Windows network configuration.
Click on the Start button. Click "All Programs" or "Programs" to get a menu. Click "Accessories" in the menu.
On Windows 7 or Vista, click the right-hand mouse button on "Command Prompt" and then click the left-hand mouse button on "Run as administrator". Confirm that you want Command Prompt to be able to make changes to your computer (if you are asked). On earlier versions of Windows, click the left-hand mouse button on "Command Prompt".
You should now see a command prompt window. Type this command at the command prompt and press the "Enter" key.
You will see information for every Ethernet adapter on the computer. There may be more than one.
Here is an example.
Code:
Windows IP Configuration
Host Name . . . . . . . . . . . . : TheComputerName
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Desktop Adapter
Physical Address. . . . . . . . . : 08-00-12-AF-01-2E
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::518f:5c0b:7eb9:3206%11(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.100.22(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Saturday, April 20, 2013 4:36:22 PM
Lease Expires . . . . . . . . . . : Sunday, April 21, 2013 4:36:19 PM
Default Gateway . . . . . . . . . : 192.168.100.1
DHCP Server . . . . . . . . . . . : 192.168.100.1
DHCPv6 IAID . . . . . . . . . . . : 265407351
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-14-B8-07-3D-08-00-27-89-01-2D
Ethernet adapter Local Area Connection 2:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Marvell Yukon 88E8056 PCI-E Gigabit Ethernet Controller
Physical Address. . . . . . . . . : 00-C7-12-65-3F-7B
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 10.0.2.11(Preferred)
Subnet Mask . . . . . . . . . . . : 255.0.0.0
Default Gateway . . . . . . . . . : 10.0.2.1
DNS Servers . . . . . . . . . . . : 10.0.2.1
NetBIOS over Tcpip. . . . . . . . : Enabled
You need to identify the Ethernet adapter that is connected to your cable modem. You can ignore any Ethernet adapter with "0.0.0.0" for the "Default Gateway" or "IPv4" address, since it is not configured for communication. There will probably only be one Ethernet adapter with a non-zero "IPv4" and "Default Gateway". That is the Ethernet adapter connected to your cable modem.
The following information is important to know.
MAC (Physical Address) Example: 08-00-12-AF-01-2E
IP address (Ipv4 address) Example: 192.168.100.22
Subnet Mask (network mask) Example: 255.255.255.0
Default Gateway Example: 192.168.100.1
DHCP Enabled Example: Yes
The "MAC" address uniquely identifies every Ethernet adapter. It should never be the same on two different Ethernet adapters. This is helpful to know because it will let you identify the Ethernet adapter in Slackware that is connected to your cable modem.
Most people have their Windows Ethernet adapter set to "Obtain an IP address automatically". That is "Yes" for the "DHCP Enabled" setting. If "DHCP Enabled" is set to "No" then the IP address and other information was set manually.
The IP address is how the cable modem or other computers can send information to your computer. The IP address is usually assigned by the router on your network. In this case the router is the cable modem. It has a built in NAT router. If the IP address is not being assigned automatically then you have to assign an IP address that is available and correct for your network (or enable automatic assignment). The same thing is true for the network mask. The network mask (along with the IP address) helps your computer to tell which computers are on your local network, and which are on the Internet.
There are some standard IP addresses reserved for home networks. Your computers and your router will usually have one of these addresses.
192.168.xxx.xxx
10.xxx.xxx.xxx
172.16.xxx.xxx through 172.31.xxx.xxx
When Windows cannot obtain an address from any router, and Windows has been configured to assign its own addresses, then it uses one of these addresses.
169.254.xxx.xxx
When you see an address like the one above, it usually indicates that there is a problem. If you really have no router on your network to assign addresses then it is OK. All your computers will communicate if they all use similar addresses and there is no router.
On most home networks, the default gateway is the router. In this case it should be the address of the cable modem's built in router. When IP addresses are assigned automatically, usually the default gateway is also assigned automatically. The default gateway is where your computer sends information for a computer that is not on your local network. Without a default gateway your computer can only communicate with other computers on your local network. Most routers are set to an IP address ending in ".1" (the first available address) or ".254" (the last available address). So that is usually a hint that an address may be the default gateway.
Slackware supports automatic assignment of this information just like Windows. Like Windows, Slackware will ask your router (cable modem) for the information. To make that work, you have to make sure that there is a driver for your Ethernet adapter and the adapter is configured to enable DHCP.
Boot Slackware and start a root command shell. You can do that by logging in as "root" from the console. Or, you can start a terminal emulator program from the graphical desktop.
If you start a command shell or log in as a normal user, you can switch to a root shell by typing in this command.
Enter the password for "root".
The first thing to find out is if you have a driver for your Ethernet adapter. Type in this command to list the Ethernet adapters.
You should see something similar to this.
Code:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.100.22 netmask 255.255.255.0 broadcast 192.168.100.255
inet6 fe80::a00:27ff:fe01:66d8 prefixlen 64 scopeid 0x20<link>
ether 08:00:12:af:01:2e txqueuelen 1000 (Ethernet)
RX packets 2 bytes 1180 (1.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 13 bytes 1426 (1.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 16436
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 4 bytes 240 (240.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4 bytes 240 (240.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Your first (and usually only) Ethernet adapter is named "eth0". Look at the MAC address next to the word "ether". You can see that 08:00:12:af:01:2e matches the address 08-00-12-AF-01-2E that was displayed by Windows. The formatting is slightly different but they are the same address. The "ether" or "MAC" address is how you can tell that Slackware loaded a driver for your Ethernet adapter.
Look at the status for "eth0". It should be "UP" and have a valid IP address "inet 192.168.100.22". When your router is assigning IP addresses automatically, the IP address for Windows versus Slackware could be different, but it will usually be the same. Usually the router recognizes the MAC address and consistently assigns the same IP address each time one is requested.
If there is no driver loaded for the Ethernet card then you need to install one. I'm not going to go into details about that now, since it is unlikely that you will have that situation. First, lets look at some more common configuration issues.
Your adapter might have a different name than "eth0". Although that isn't a problem it can cause confusion editing network configuration files. For example, "eth2" is the third adapter in the network configuration files. Normally you would want the main Ethernet adapter to be "eth0" and the first entry in the configuration files. You can change the name assignments by editing a file.
Code:
cd /etc/udev/rules.d
nano 70-persistent-net.rules
Each Ethernet adapter can be identified by its MAC address. You can change the names, "eth0", "eth1", etc. but make sure that no two adapters have the same name. Here is an example of the file.
Code:
# PCI device 0x1022:/sys/devices/pci0000:00/0000:00:03.0 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:12:af:01:2e", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x1023:/sys/devices/pci0000:00/0000:00:04.0 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:24:32:6d:a8", ATTR{dev_id}=="0x1", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
The text following "ATTR{address}==" is the Ethernet address for each adapter. Change the text after "NAME=" to specify the name that you want in quotes. If you don't see your Ethernet adapter in this file then it is further confirmation that there is probably no driver loaded. If you delete "70-persistent-net.rules" then Slackware will create the file again on the next reboot.
After you have determined the name of your Ethernet adapter then you can edit the other configuration files. Here are the commands to edit the configuration file for the IP address, network mask and default gateway.
Code:
cd /etc/rc.d
nano rc.inet1.conf
There is a section in the file for each Ethernet adapter. Here is an example.
Code:
# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""
# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""
The above example, shows how to configure "eth0" to obtain an IP address automatically.
To configure an IP address manually, you would disable DHCP and provide the IPADDR and NETMASK.
Code:
# Config information for eth0:
IPADDR[0]="192.168.100.22"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]="no"
DHCP_HOSTNAME[0]=""
# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""
A different section of the same file has the setting for the default gateway.
Code:
# Default gateway IP address:
GATEWAY=""
When the default gateway is to be obtained automatically, leave the quotes empty. You must have USE_DHCP set to "yes" for the Ethernet adapter connected to the default gateway in order for that to be obtained automatically.
To manually set the default gateway, provide the IP address of the gateway inside the quotes. The default gateway is usually the IP address of your router (cable modem).
Code:
# Default gateway IP address:
GATEWAY="192.168.100.1"
Next, you may need to configure a Domain Name Server. When the IP address is obtained automatically, the name server is usually set automatically. When USE_DHCP is set to "no" then you have to edit a file to specify the name server.
Code:
cd /etc
nano resolv.conf
Here is an example of the configuration file.
Code:
nameserver 192.168.100.1
The address of the name server is usually the same as your router (cable modem). The contents of the "resolv.conf" file may automatically be changed or replaced when USE_DHCP is set to "yes" in the "rc.inet1.conf" file.
Assuming that you have made changes to the configuration files that I mentioned, you will probably want to test them. To avoid rebooting the computer, there are a few commands that will tell Slackware to use the current configuration files.
To re-assign the Ethernet device names use this command.
To restart an Ethernet adapter and use the current settings enter this command.
Code:
/etc/rc.d/rc.inet1 eth0_restart
You can change "eth0" to the name of any network device, such as "eth2" or "wlan0". You can also use these commands to stop and start an Ethernet adapter.
Code:
/etc/rc.d/rc.inet1 eth0_stop
/etc/rc.d/rc.inet1 eth0_start
The above commands can be helpful when you want to temporarily shut down a network adapter. For example, if you don't want to use the wireless LAN "wlan0" because you have an Ethernet adapter connected to the same network.
To verify that everything is working, start with "ifconfig" again.
Make sure that your Ethernet adapter is "UP" and it has the "inet" and "netmask" set to valid values.
Code:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.100.22 netmask 255.255.255.0 broadcast 192.168.100.255
inet6 fe80::a00:27ff:fe01:66d8 prefixlen 64 scopeid 0x20<link>
ether 08:00:12:af:01:2e txqueuelen 1000 (Ethernet)
RX packets 2 bytes 1180 (1.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 13 bytes 1426 (1.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
To check the default gateway address use this command.
You should see something similar to this.
Code:
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.100.1 0.0.0.0 UG 202 0 0 eth0
192.168.100.0 * 255.255.255.0 U 202 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
The line that starts with "default" is the default gateway. The address is listed under "Gateway".
To test communication with the default gateway, use "ping".
Use the correct address for your default gateway instead of "192.168.100.1". If there is no response then the gateway address may be incorrect. Some routers don't allow ping, but they should usually allow that from local network computers.
To test name service use this command.
Code:
nslookup google.com
You should get a response containing the addresses for GOOGLE. That is the information shown underneath "Non-authoritative answer".
Code:
Server: 192.168.100.1
Address: 192.168.100.1#53
Non-authoritative answer:
Name: google.com
Address: 74.125.130.113
Name: google.com
Address: 74.125.130.101
Name: google.com
Address: 74.125.130.102
Name: google.com
Address: 74.125.130.139
Name: google.com
Address: 74.125.130.138
Name: google.com
Address: 74.125.130.100
If all that looks good then your Internet should work.
Now, lets get back to the subject of network device drivers. When you're missing a driver for some hardware device it helps to identify the device. This command will list out PCI devices, including Ethernet adapters.
To just see Ethernet devices you can do this.
Code:
lspci | grep Ethernet
Sometimes a text description is not exact enough to find a driver. Every plug and play device has a vendor ID and a device ID code. The vendor ID identifies the company (EX: Intel or Marvell). The device ID code is assigned by a vendor to identify each of their devices. Sometimes companies just "glue" a chip onto a board and sell it, so you may find that a board identifies itself as a Marvell Ethernet chip rather than a Ginzu-Tech adapter card. You can usually use a generic driver for the chip if the vendor and device ID matches.
You can display the vendor and device IDs for PCI devices like this.
Here is an example of the information for an Ethernet controller with the vendor and device ID.
Code:
00:03.0 Ethernet controller [0200]: Intel Corporation 82540EM Gigabit Ethernet Controller [8086:100e] (rev 02)
The "[8086:100e]" is the vendor and device ID. Both numbers are hexadecimal. Intel has vendor code 8086. The device ID 100e was assigned by Intel, and some other vendor's device may also use device ID 100e but the vendor code will be different.
You can perform Internet searches for the vendor and device ID and sometimes find drivers or other information. Search for "8086:100e" for example.
Sometimes you have a driver, but the driver module is not being loaded. That can be because the driver is blacklisted or not being loaded automatically.
You can create or edit files in "/etc/modprobe.d" to control what modules are blacklisted. Normally you create a file for each device. The name is unimportant, as long as the file ends in ".conf". The defaults are located in "/lib/modprobe.d" but you should not change the files in "/lib/modprobe.d". Instead create a file in "/etc/modprobe.d" with the same name to override the default file.
Another function of the configuration files for modules is to set optional module parameters. Sometimes it is necessary to provide information such as I/O addresses, interrupt numbers, or even a device model number.
Use this command to get help for the commands in module configuration files.
That covers the basics of getting an Internet connection working with Slackware. Most of the time you just have to answer the questions during SETUP and tell Slackware to obtain an IP address automatically (enable DHCP).