LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   connect: Network is unreachable (https://www.linuxquestions.org/questions/slackware-14/connect-network-is-unreachable-4175448424/)

clubslacker 02-03-2013 12:10 AM

connect: Network is unreachable
 
I just installed slackware on my dell dimension 4300 that previously had a working copy of ubuntu on it. I didn't have any problems going through the install process. I have been following this guide: http://docs.slackware.com/slackware:beginners_guide and i'm at the part where where it tells me to do run these commands:
# slackpkg update gpg
# slackpkg update

and i get "unable to resolve host address 'ftp.mirrorservice.org'" and so I tried re-editing /etc/slackpkg/mirrors file again to choose a different mirror and it still doesn't connect to any mirrors. So I tried pinging a random ip and get "connect: Network is unreachable"

so I ran netconfig and set it up as:
hostname: dim4300
domainname: localhost
configuration type: DHCP
set DHCP hostname:

and that didn't fix anything at all.

Now i'm beyond my abilities. I do know that the internet worked in ubuntu, nothing has changed.

I am trying to connect through a wired, DSL connection from a router.

Thanks to anyone who can help.:D

allend 02-03-2013 12:25 AM

Quote:

domainname: localhost
Likely to be a DNS problem caused by the choice of domain name. 'localhost' is a special name that is set to '127.0.0.1'.
Re-run netconfig using a different domain name (I use home.net.au, but the choice is yours).

volkerdi 02-03-2013 12:31 AM

Rerunning netconfig changes the config files, but the changes won't actually take effect until you reboot, or run: sh /etc/rc.d/rc.inet1 restart

If that still doesn't do the trick, it's worth trying the NetworkManager option in netconfig. It works here. :)

allend 02-03-2013 12:34 AM

^^ :-)
Thanks boss!

@clubslacker - You are very privileged. That is "The Man" himself.

clubslacker 02-03-2013 12:41 AM

@volkerdi, wow thank you for stopping by :D

ok i changed in netconfig:
hostname: dimhostname
domain name: dimdomain
teh rest: use DHCP server

then i ran "sh /etc/rc.d/rc.inet1 restart"

I still get:
failed: temporary failure in name resolution.
wget: unable to resolve host address 'ftp.mirrorservice/org'

thank you guys for fast replies

clubslacker 02-03-2013 12:44 AM

ok, now i have tried the networkmanager option in netconfig, and i did sh /etc/rc.d/rc.inet1 restart again after i changed the setting. Still no cigar.

allend 02-03-2013 12:45 AM

Try re-booting so that the hardware is reinitialised.

clubslacker 02-03-2013 12:53 AM

Quote:

Originally Posted by allend (Post 4883428)
Try re-booting so that the hardware is reinitialised.

ok melbourne i just tried setting netconfig to networkmanager >reboot still not connection. Then i tried setting the option back to DHCP>reboot and still no connection.

allend 02-03-2013 01:01 AM

Can you ping your router?
Code:

ping -c2 <IPaddress of router>
What is the content of /etc/resolv.conf?
On my setup I see
Code:

nameserver 10.1.1.1
where 10.1.1.1 is the IP address of my ADSL modem/router.

Has your network card got an IP address?
Code:

/sbin/ifconfig

clubslacker 02-03-2013 01:13 AM

stand by

clubslacker 02-03-2013 01:24 AM

1.
i ping -c2 192.168.1.1 and got:
connect: Network is unreachable

(i tested simply pinging 192.168.1.1 from my windows 7 laptop and it works fine.)

2.
i ran # nano /etc/resolv.conf and all it says is "search dimdomain"

3.
i ran /sbin/ifconfig...
I do not really see where it does, or does not show my network card ip address? I can see stuff, but I don't know what most of it means.... I do not see any 192.x.x.x. numbers. I do see 127.0.0.1 netmask 255.0.0.0 inet6 ::1 etc

allend 02-03-2013 01:35 AM

Quote:

do not really see where it does, or does not show my network card ip address? I can see stuff, but I don't know what most of it means.... I do not see any 192.x.x.x. numbers. I do see 127.0.0.1 netmask 255.0.0.0 inet6 ::1 etc
Don't worry. We could make a Slacker of you yet.

It appears that your network card is not up and working.
The output of ifconfig should show lines like this
Code:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.1.1.2  netmask 255.255.255.0  broadcast 10.1.1.255
        inet6 fe80::219:d1ff:fe2d:7748  prefixlen 64  scopeid 0x20<link>
        ether 00:19:d1:2d:77:48  txqueuelen 1000  (Ethernet)
        RX packets 45977  bytes 55925851 (53.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 32480  bytes 3168315 (3.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 21  memory 0xdffe0000-e0000000

The eth0 is your network card.
The next line starting inet are network parameters that should be supplied by DHCP from your router.

Please post the output of
Code:

/sbin/ifconfig -a
This should show your network card even if it is not up.

Also please post the output of
Code:

/sbin/lspci | grep Ethernet
This should show details of your network card if it is PCI based.

clubslacker 02-03-2013 01:51 AM

please keep in mind i am transcribing these out by hand: :D

root@dimhostname:~# /sbin/ifconfig -a
lo: flags=73<UO,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 0 bytes 0 overruns 0 frame 0
tx packets 0 bytes 0 (0.0B)
tx errors 0 droppped 0 overruns 0 carrer 0 colisions 0

root@dimhostname:~# /sbin/lspci | Ethernet
02:09.0 Ethernet controller: Davicom Semiconductor, Inc. 21x4x DEC-Tulip compatible 10/100 Ethernet (rev31)

allend 02-03-2013 02:06 AM

Quote:

02:09.0 Ethernet controller: Davicom Semiconductor, Inc. 21x4x DEC-Tulip compatible 10/100 Ethernet (rev31)
That device is supported by the dmfe.ko kernel module.

Check the output of 'lsmod'. It may be that the tulip.ko kernel module is being loaded. If you see 'tulip' then try
Code:

rmmod tulip
modprobe dmfe
sh /etc/rc.d/rc.inet1 restart

If that works, then you will need to blacklist the tulip.ko kernel module so that it is not loaded at boot.

allend 02-03-2013 02:18 AM

It seems that the dmfe.ko kernel module is blacklisted in Slackware by default.
From /lib/modprobe.d/tulip.conf
Code:

##############################################################################
# Do not edit this file; instead, copy it to /etc/modprobe.d/ and edit that
##############################################################################

# tulip ... de4x5, xircom_tulip_cb, dmfe (...) handle same devices
blacklist de4x5

# At least 2.4.3 and later xircom_tulip doesn't have that conflict
# xircom_tulip_cb
blacklist dmfe

Try copying the above file to /etc/modprobe.d/tulip.conf and comment out the line that blacklists dmfe i.e.
Code:

# blacklist dmfe
It is probably best to reboot to test this.

clubslacker 02-03-2013 02:42 AM

ok so i checked lsmod | less and did not see anything 'tulip' anywhere.

however i did do this:
cp /lib/modprobe.d/tulip.conf /etc/modprobe.d/tulip.conf
and then did
nano /etc/modprobe.d/tulip.conf and commented out
#blacklist dmfe

saved computer restarted and it is working! THANK U

ps. do u know why it was blacklisted?

allend 02-03-2013 03:43 AM

Glad it all worked out for you.
I do not know why it was blacklisted, but the likely reason is that it causes conflicts with other modules.

clubslacker 02-04-2013 01:37 PM

Quote:

Originally Posted by allend (Post 4883472)
Glad it all worked out for you.
I do not know why it was blacklisted, but the likely reason is that it causes conflicts with other modules.

websites are working slow / timing out 90% of the time.

I tried setting resolve.conf to use opendns and that fixed the problem immediately, however the fix was temporary??? because when i restart my pc it reverts back to the old resolv.conf file.

1. is there a way to make my internet run properly with my normal DNS settings?
2. if no, then how do i make it remember to use opendns or google dns settings so that my internet is not broken every time i restart the computer.

thanks... :D

edit:
so my current resolv.conf file looks like this:
Quote:

# Generated by Network Manager
domain ftrdhcpuser.net
search ftrdhcpuser.net
nameserver 192.168.1.1
nameserver 68.238.0.14
and when i change it to the following my internet works great, until i restart the pc:
Quote:

# Generated by Network Manager
domain ftrdhcpuser.net
search ftrdhcpuser.net
nameserver 208.67.222.222
nameserver 208.67.220.220

NeoMetal 02-04-2013 02:05 PM

Network manager is overwriting the dns configuration so you could either,
reconfigure the network without networkmanager now that you've got the driver problem taken care of so it will keep your settings, or tell network manager which servers to try.

I think to configure dns in network manager the GUI way is right click on the networkmanager icon - click edit connections - click your connection in the appropriate tab and select edit -> go to the ip{4,6} settings tabs and set method to dhcp/automatic addresses only -> the dns server box ungreys and you can add them there. (I don't know how to configure network manager via CLI/conf files off the top of my head)

clubslacker 02-04-2013 02:09 PM

i see... does anyone know why my default dns settings are not working on linux, though? seems strange to me

jostber 02-04-2013 02:11 PM

Some nice tips here as well:

https://wiki.archlinux.org/index.php/Resolv.conf

NeoMetal 02-04-2013 02:37 PM

Quote:

Originally Posted by clubslacker (Post 4884316)
i see... does anyone know why my default dns settings are not working on linux, though? seems strange to me


I'm not sure - maybe check out the router config, ping those isp dns servers to verify they are all up, maybe reboot the router. Those dns servers are working OK on other setups?

clubslacker 02-04-2013 02:56 PM

Quote:

Originally Posted by NeoMetal (Post 4884332)
I'm not sure - maybe check out the router config, ping those isp dns servers to verify they are all up, maybe reboot the router. Those dns servers are working OK on other setups?

i tried rebooting the router. i tried pinging the dns servers. everything works fine on my other windows systems. ubuntu worked fine before. something is goofed up in my settings it has to be i just dont know...

jostber 02-04-2013 03:03 PM

Can you post the output of these as root?

traceroute 192.168.1.1
traceroute 68.238.0.14
nmap -sS 192.168.2.1-3

Try to mark the output with your mouse and then use the middle button to paste it in.

n1x4 02-04-2013 03:10 PM

Try making rc.networkmanager non-executable.
Code:

chmod -x /etc/rc.d/rc.networkmanager
Also helps to remove/comment out the 'search' parameter in resolv.conf

T3slider 02-04-2013 03:59 PM

I don't know much about networkmanager but if you are back to using the stock DHCP options from netconfig then you will need to edit /etc/rc.d/rc.inet1.conf to add
Code:

DHCP_KEEPRESOLV[0]="yes"
under the 'Config information for eth0' section. This will prevent /etc/resolv.conf from being overwritten by the DHCP lease and you will be able to permanently use an external DNS server there.

clubslacker 02-04-2013 04:58 PM

Quote:

Originally Posted by jostber (Post 4884317)

thank you all for your help i wouldn't have figured this out without you guys.

i double checked everything 3x and the exact same DNS settings that my windows computers got from the router are what linux was set up to use too, but they just didn't want to work with linux. all i did was edit my resolv.conf file to use the google dns servers how it shows in the link above, and i locked the file with chattr +i /etc/resolv.conf and the internet is working beautifully. strange, but solution works. it does bother me a little that I can't get it to run with my own stock DNS nameservers but I CBF to work on this anymore


All times are GMT -5. The time now is 04:54 AM.