LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-19-2007, 03:06 AM   #1
ShellyCat
Member
 
Registered: Jul 2007
Distribution: Slackware 13
Posts: 178

Rep: Reputation: 29
(newbie) Cannot access Internet: Slackware 12, Ethernet: Realtek


Hello, my exact system is in my sig. I can use static or dyanmic IP, because I am behind a Linksys router/switch. My Windows computer can access Internet just fine, and so could my laptop before removing Windows. I cannot access any website. I thought it would work out-of-the-box, but it does not even after attempting to configure. I installed Slackware off the DVD, only networking packages I did not install are things definitely not needed, like "bootp" (diskless workstations), "snmp" (insecure protocol used in some business networks), etc.

I should note that I have no other available network connection, so I am hand-typing all this on my PC.

What I want to do: get my laptop to connect to the Internet, laptop is one of 3 computers behind a Linksys router/switch. Static IP should work, it works on my other machines, since they are private IPs behind my router, and it worked when this laptop had Windows.

********** BEFORE CONFIGURATION ************

Using KInfoCenter (on KDE):
Quote:
Ethernet controller Realtek Semiconductor Co., Ltd. RTL8101E PCI Express Fast Ethernet controller (rev 01)
Subsystem: Toshiba America Info Systems Unknown Device ff10
Flags: bus master, fast devsel, latency 0, IRQ 21
I/O ports at 2000 [size=256]
Memory at d0000000 (64-bit, non-prefetchable) [size=4K]
[virtual] Expansion ROM at 34000000 [disabled][size=128k]
Capabilities: <access denied>
Icon in tray (configured KDE to show it):

Confirms that eth0 status is that it is not up.

From dmesg (tailed to a text file):
Quote:
r8169 Gigabit Ethernet driver 2.2LK loaded
ACPI: PCI interrupt 0000:02:00.0[A] -> GSI 16 (level, low) -> IRQ 21
PCI: Setting latency timer of device 0000:02:00.0 to 64
eth0: RTL8101e at 0xe0484000, 00:a0:d1:63:46:8d, IRQ 21
es: IO port probe 0xc00-0xcff: clean.
es: IO port probe 0x820-0x8ff: clean.
es: IO port probe 0x800-0x80f: clean.
es: IO port probe 0x3e0-0x4ff: excluding 0x400-0x407 0x4d0-0x4d7
es: IO port probe 0x100-0x3af: clean.
es: IO port probe 0xa00-0xaff: clean.
Output of lspci:
Quote:
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E PCI Express Fast Ethernet controller (rev 01)
Output of ifconfig -a:
Quote:
eth0 Link encap: Ethernet HWaddr 00:A01:63:46:8d
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:21 Base address:0x8000
Content of /proc/interrupts:
Quote:
CPU1 CPU2
0: 95 0 IO-APIC-edge timer
1: 802 0 IO-APIC-edge i8042
8: 3 0 IO-APIC-edge rtc
9: 23 0 IO-APIC-fasteoi acpi
12: 61 0 IO-APIC-edge i8042
14: 9660 0 IO-APIC-edge libdata
15: 26428 0 IO-APIC-edge ide1
16: 267 0 IO-APIC-fasteoi ohci1394, HDA Intel
17: 0 0 IO-APIC-fasteoi sdhci:slot0
18: 54 0 IO-APIC-fasteoi uhci_hcd: usb4, yenta
19: 0 0 IO-APIC-fasteoi uchi_hcd: usb3
20: 2 0 IO-APIC-fasteoi echi_hcd: usb1, uhci_hcd:usb2
21: 0 0 IO-APIC-fasteoi uhci_hcd: usb5
NMI: 0 0
LOC: 54645 25372
ERR: 0
MIS: 0
********** WHAT I DID TO CONFIGURE ************

I used this page as a guide:
http://www.linuxhomenetworking.com/w...nux_Networking

I did:
ifconfig eth0 192.168.1.101 netmask 255.255.255.0 up

The guide also said to put the line permanently in /etc/rc.local in order to apply settings at boot, but no such file or directory exists on my machine. Where do I put it (assuming it worked, which it didn't anyway)?

There are also a lot of special configurations shown, please let me know if any of them should apply to me!

********** AFTER CONFIGURATION ************
(without reboot)

Output of ifconfig -a:
Quote:
eth0 Link encap: Ethernet HWaddr 00:A01:63:46:8d
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::2a0:diff:fe63:468d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1860 (1.8 KiB) TX bytes:468 (468.0 b)
Interrupt:21 Base address:0x8000
Icon in tray (KDE):

Confirms that eth0 status is that it now IS up. However, attempts to view any page results in unable to find host, for example, "Firefox could not find the server at www.linuxquestions.org".

When starting KDE's "Network Settings" applet:

I get a dialogue titled "Unsupported Platform", with a list of supported platforms to choose. Only includes up to Slackware 10.0.1, warns to be sure platform is the right one or could damage network configuration.

(Of course, if I reboot, settings are back to what they were.)


Edit: part of my hardware address is getting replaced by a smiley!
Here, I will add spaces:
00 : A0 : D1 : 63 : 46 : 8d

Last edited by ShellyCat; 07-19-2007 at 03:15 AM.
 
Old 07-19-2007, 08:05 AM   #2
emi_ramo
Member
 
Registered: Apr 2007
Location: Barcelona, Spain
Distribution: Debian, KUbuntu
Posts: 213

Rep: Reputation: 36
Hi ShellyCat!
In your network configuration you also need to add the gateway and the DNS. The DNS should be added forever into /etc/resolv.conf (add a line like "NameServer YourDNS_IP_Here"). The gateway is a little bit more complicated. You'd use the route command as follows (use your own network device instead of eth0, and your gateway IP address instead of 192.168.0.1):
Code:
route add default gw eth0
route add -host 192.168.0.1 eth0
I think this is the correct syntax, but I'm not sure. type man route to get the entire linux manual for route command. And also you can google it to catch the exact use of it.

Wishing it's useful for you,
emi
 
Old 07-20-2007, 12:37 AM   #3
ShellyCat
Member
 
Registered: Jul 2007
Distribution: Slackware 13
Posts: 178

Original Poster
Rep: Reputation: 29
Got Ethernet to work, until reboot? Where to save for all reboots?

Here is everything I did:

Entered these commands:
Quote:
> ifconfig eth0 192.168.1.101 netmask 255.255.255.0 up
> ifconfig -a
> route add default gw 192.168.1.1 eth0
Checked the content of these files:
Quote:
/etc/sysconfig/network:
HOSTNAME=MYMACHINENAME
GATEWAY=192.168.1.1
GATEWAYDEV=eth0

/etc/HOSTNAME:
darkstar.example.net (I don't need this, but connection worked (later) without erasing example!)

/etc/sysconfig/network-scripts/ifcfg-eth0:
BOOTPROTO=none
ONBOOT=yes
NAME=eth0
DEVICE=eth0
IPADDR=192.168.1.101
NETMASK=255.255.255.0
BROADCAST=192.168.1.255
NETWORK=192.168.1.0
GATEWAY=192.168.1.1
Edited these files as needed:
Quote:
/etc/sysconfig/network-scripts/ifcfg-eth0:
BOOTPROTO=static
(Everything else stays the same!)

/etc/resolv.conf:
nameserver 66.189.0.5
nameserver 66.189.0.30
nameserver 66.189.0.29
Checked my kernel routing table:
Quote:
> netstat -r
Destination Gateway Genmask Flags MSS Window irrt iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
Then I pinged www.yahoo.com. Success!


As expected, Kernel routing table wasn't saved; on reboot, ifconfig -a shows my eth0 device is not up again, and routing table only has "lo" device. I do not have /etc/rc.local file! Where do I save my "ifconfig..." and/or "route..." lines so they will be applied at every boot?

None of the books I consulted had the correct config file for Slackware 12. Also, the man pages for ifconfig and route did not talk about saving the info for next reboot at all!

Last edited by ShellyCat; 07-20-2007 at 02:11 AM. Reason: Exactly what I did. What next?
 
Old 07-24-2007, 07:36 AM   #4
emi_ramo
Member
 
Registered: Apr 2007
Location: Barcelona, Spain
Distribution: Debian, KUbuntu
Posts: 213

Rep: Reputation: 36
I don't use Slackware. I'm debian user from far ago, and let Slackware over it's 6 (!) version. So I can't help you on that issue. But you can try looking if you have the /etc/network/interfaces file. Here is where debians (and may be other distros) put their net config.

If you don't have this directory, try making a NetworkStartUp script and put it into system starting up scripts (I don't know how slackware handles this).

I wish it'll be useful for you.

emi
 
Old 07-24-2007, 04:23 PM   #5
ShellyCat
Member
 
Registered: Jul 2007
Distribution: Slackware 13
Posts: 178

Original Poster
Rep: Reputation: 29
Thank you, Emi, I will try that one. Only reason I didn't answer right away is because I haven't been able to get online (time constraints) during the last few days.
 
Old 07-24-2007, 05:02 PM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,757

Rep: Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839
The best thing you can do is to run
Code:
netconfig
that will take care of the init files.

Regards
 
Old 07-24-2007, 05:23 PM   #7
ShellyCat
Member
 
Registered: Jul 2007
Distribution: Slackware 13
Posts: 178

Original Poster
Rep: Reputation: 29
Smile

Quote:
Originally Posted by bathory
The best thing you can do is to run
Code:
netconfig
that will take care of the init files.

Regards
Thanks, I will look at the man pages for that, in a bit...after I get done surfing around here a bit.
 
Old 07-25-2007, 07:08 AM   #8
ShellyCat
Member
 
Registered: Jul 2007
Distribution: Slackware 13
Posts: 178

Original Poster
Rep: Reputation: 29
Quote:
Originally Posted by emi_ramo
But you can try looking if you have the /etc/network/interfaces file. Here is where debians (and may be other distros) put their net config.
Thanks, emi...unfortunately I don't have that...though I hear Slackware is "Debian-based". I don't know where the rest of my startup scripts are yet, either.

Quote:
Originally Posted by bathory
The best thing you can do is to run
Code:
netconfig
that will take care of the init files.
netconfig seems to only be for a domain environment. It asks you for 1) the "host" (ok, that's the same as a "workstation" on Windows) and then for 2) the "domain name" (I am not in a domain environment, I'm at home). Unfortunately, the script will not run if you don't enter a domain name. If you select "Cancel", the entire netconfig exits. If you leave it blank and select "Enter", it just keeps popping up the same dialog.
 
Old 07-25-2007, 08:29 AM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,757

Rep: Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839Reputation: 1839
Quote:
netconfig seems to only be for a domain environment
You can use a fake domain (localdomain for example) and continue answering the rest of the questions. Or else you can edit /etc/rc.d/rc.inet1.conf which is the primary file that netconfig changes (another is /etc/resolv.conf)

Regards
 
Old 07-25-2007, 09:22 PM   #10
ShellyCat
Member
 
Registered: Jul 2007
Distribution: Slackware 13
Posts: 178

Original Poster
Rep: Reputation: 29
Thanks.

The Slackbook site is back up, and I'm trying to read that first to see if it has more detail than the man pages. It can be confusing with so many scripts.
 
Old 07-26-2007, 01:24 AM   #11
ShellyCat
Member
 
Registered: Jul 2007
Distribution: Slackware 13
Posts: 178

Original Poster
Rep: Reputation: 29
Thumbs up Worked when I modified those 2 files [SOLVED]

Quote:
Originally Posted by bathory
Or else you can edit /etc/rc.d/rc.inet1.conf which is the primary file that netconfig changes (another is /etc/resolv.conf)
Notes about documentation conflicts, for others' convenience:
  1. Slackbook says that PCMCIA are recognized by the "generic software" that comes with Slackware, but you will need to enable the kernel module for your card.
  2. It says you enable these in "/etc/pcmcia/network.opts" and/or "/etc/pcmcia/wireless.opts", which do not actually exist in Slackware 12. Instead, there is a "/etc/pcmcia/config.opts". That is if you need the modules.
  3. The Realtek RTL 8193/810x Family Fast Ethernet NIC actually does work "out-of-the-box", no module needed. ...
  4. ...therefore, do not have to mess with any "rc." or per-user startup scripts unless you have a compelling reason to do so!

This is all I needed to do for Static IP:
  1. ifconfig -a (To make sure the eth0 device is recognized.)
  2. Edited "/etc/rc.d/rc.inet1.conf":
    Code:
    IPADDR[0]="192.168.1.101"
    NETMASK[0]="255.255.255.0"
    USE_DHCP[0]="no"
    DHCP_HOSTNAME="MYCOMPUTERNAMEHERE"
    
    GATEWAY="192.168.1.1"
    
    DEBUG_ETH_UP="yes" (Not strictly necessary, but outputs any messages to stdout,)
  3. Edited "/etc/resolv.conf":
    Code:
    nameserver 66.189.0.5
    nameserver 66.189.0.29
    nameserver 66.189.0.30
  4. reboot
  5. ficonfig -a (See if eth0 device was updated with IP, netmask, gateway, broadcast addresses.)
  6. ping -c 3 www.yahoo.com (Without "-c" parameter (# of packets to send), will ping forever and never stop!)

Last edited by ShellyCat; 07-26-2007 at 01:28 AM.
 
Old 09-28-2007, 09:47 PM   #12
o2bfishn
Member
 
Registered: Dec 2005
Location: Kannapolis, NC USA
Distribution: learning ubuntu
Posts: 46

Rep: Reputation: 15
Quote:
Originally Posted by ShellyCat View Post
though I hear Slackware is "Debian-based"
where did you hear that? slackware is slackware based.
 
Old 09-30-2007, 08:48 AM   #13
emi_ramo
Member
 
Registered: Apr 2007
Location: Barcelona, Spain
Distribution: Debian, KUbuntu
Posts: 213

Rep: Reputation: 36
netconfig is the better choice

Hi again,
netconfig is a very good tool to manipulate network configuration. Only if you are grateful scripting and editing options directly that's not for you. As said before by someone, you'd use a fake domain (as myhome, local, localdomain, ...) for domain name. That's the way all local networks work (with window$, you don't see that, but it's there).

See you.

emi
 
  


Reply

Tags
access, internet, slackware


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Realtek Gigabyte Ethernet problems on Slackware 11 install nemestrinus Linux - Networking 1 05-02-2007 10:36 AM
Realtek Gigabyte Ethernet problems on Slackware 11 install nemestrinus Linux - Networking 5 01-10-2007 12:25 AM
Can't get internet working on Slackware 9.1, kernel 2.4.22, realtek 8139 with dhcp ygnas Slackware 6 03-02-2004 11:06 AM
Ethernet Card = Internet Access? tattooedpierre Linux - Hardware 6 06-08-2003 02:09 PM
slackware 9 realtek ethernet cowboy_ein Linux - Hardware 1 04-16-2003 04:12 PM

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

All times are GMT -5. The time now is 06:30 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