LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   (newbie) Cannot access Internet: Slackware 12, Ethernet: Realtek (https://www.linuxquestions.org/questions/linux-networking-3/newbie-cannot-access-internet-slackware-12-ethernet-realtek-570611/)

ShellyCat 07-19-2007 03:06 AM

(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:A0:D1: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:A0:D1: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

emi_ramo 07-19-2007 08:05 AM

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

ShellyCat 07-20-2007 12:37 AM

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!

emi_ramo 07-24-2007 07:36 AM

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

ShellyCat 07-24-2007 04:23 PM

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.

bathory 07-24-2007 05:02 PM

The best thing you can do is to run
Code:

netconfig
that will take care of the init files.

Regards

ShellyCat 07-24-2007 05:23 PM

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.

ShellyCat 07-25-2007 07:08 AM

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.

bathory 07-25-2007 08:29 AM

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

ShellyCat 07-25-2007 09:22 PM

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.

ShellyCat 07-26-2007 01:24 AM

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. :D ...
  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!)

o2bfishn 09-28-2007 09:47 PM

Quote:

Originally Posted by ShellyCat (Post 2836079)
though I hear Slackware is "Debian-based"

where did you hear that? slackware is slackware based.

emi_ramo 09-30-2007 08:48 AM

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


All times are GMT -5. The time now is 02:15 PM.