Slackware This Forum is for the discussion of Slackware 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-26-2014, 02:47 PM
|
#1
|
LQ Newbie
Registered: Mar 2014
Posts: 4
Rep:
|
Slackware 14 Gateway Unreachable Issue
Hi all,
I'm new to LQ so firstly i'd like to say Hi to everyone here
I've been playing with Slackware 14 for a couple of weeks now on my pc at home, and i have no issues there.
However, i decided to try virtualizing Slack 14,using Proxmox, as a KVM guest on my dedicated server at online.net. I start the installation via the ISO and it completes successfully, i then go about setting up the network via "netconfig". After i reboot the guest i'm unable to ping any ip or hostname out on the internet, doing so just returns "network is unreachable"
Below is my /etc/rc.d/rc.inet1.conf file:
http://imgur.com/FZ3Cp3t
I know for sure that the IP and Gateway addresses are correct as i have a couple of Debian 7 KVM guests running on the same machine and have no issue with the network connection on those. I have assigned a virtual MAC address to the IP 212.83.178.92 also.
Below is some output from cat /var/log/messages :
http://imgur.com/IgUN72K
I can see here that it appears to be trying to assign the gateway before the link is actually ready but i'm not sure if this is the actual problem. Ethtool eth0 returns:
http://imgur.com/nlwTvA5
lspci returns:
http://imgur.com/6xfKm7h
route returns:
http://imgur.com/uir0iDw
I'm really lost as to why it refuses to reach the gateway and i know thats the gateway address is correct because my Debian KVM guests have no problems with network connections at all.
I hope i haven't left out any important information, but if i have then please just ask and i'll provide what you need. Please help a slackware noob to figure out this issue
Regards,
Iain
|
|
|
03-26-2014, 05:00 PM
|
#2
|
Senior Member
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Rep:
|
Uh...
local subnet 212.83.178.255
default gateway 62.210.142.1
No. That's just wrong.
Without something fancy, the default gateway has to be reachable from the local subnet, i.e. it has to be 212.83.178.something. "SIOCADDRT: Network is unreachable" is telling you that you can't reach 62.210.142.1 from 212.83.178.92/255.255.255.0. Think about it. Where should the packets go?
As a wild guess, is 62.210.142.1 actually the *nameserver*?
Quote:
Originally Posted by ZombieKillah
I'm really lost as to why it refuses to reach the gateway and i know thats the gateway address is correct because my Debian KVM guests have no problems with network connections at all.
|
It may be that your Debian guests are ignoring your addresses and using DHCP and getting correct addresses that way...
I remember someone coming into my office complaining that the University mainframe gave him a divide by zero error, he insisted the mainframe was faulty because "my calculator can do that without giving any error"
|
|
|
03-26-2014, 06:01 PM
|
#3
|
LQ Newbie
Registered: Mar 2014
Posts: 4
Original Poster
Rep:
|
Hi,
First of all thanks for your reply
Unfortunately there is no DHCP server involved in this setup, all of the IP's assigned to me by my dedi provider are static
62.210.142.1 is the default gateway for the main IP of my server (62.210.142.183) This works as expected for the main IP on the server.
I also have extra "failover" IP's assigned to me by my server provider:
212.83.178.92 - Slackware KVM Guest
212.83.178.95 & 212.83.178.96 - Debian KVM Guest. Both of these IP's work nicely on the debian guest.
On debian - cat /etc/network/interfaces:
Code:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 212.83.178.95
netmask 255.255.255.255
broadcast 212.83.178.95
post-up route add 62.210.142.1 dev eth0
post-up route add default gw 62.210.142.1
post-down route del 62.210.142.1 dev eth0
post-down route del default gw 62.210.142.1
auto eth0:0
iface eth0:0 inet static
address 212.83.178.96
netmask 255.255.255.255
route:
Code:
root@inferno:~/isolinux/tmp# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 62-210-142-1.re 0.0.0.0 UG 0 0 0 eth0
62-210-142-1.re * 255.255.255.255 UH 0 0 0 eth0
ip route
Code:
default via 62.210.142.1 dev eth0
62.210.142.1 dev eth0 scope link
route -n
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 62.210.142.1 0.0.0.0 UG 0 0 0 eth0
62.210.142.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
This all works fine in the debian KVM. I can only guess that slackware network must be different somehow, and although i've read an insane amount of forums posts on various sites, i can't figure this out
Yes i am relatively new to this just i can't this out.. Some guidance from fellow LQ'ers would be most appreciated
Regards,
Iain
|
|
|
03-26-2014, 06:18 PM
|
#4
|
Member
Registered: May 2008
Location: Republic of Texas
Posts: 393
Rep:
|
Try networkmanager or wicd instead - ie you leave everything in /etc/rc.d/rc.inet1.conf 'blank'
Your problem is basically that a virtual guest has a completely different network-setup than the host - but the two are _connected_ (excuse the (more or less) intentional pun)
|
|
|
03-26-2014, 07:06 PM
|
#5
|
Senior Member
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Rep:
|
Quote:
Originally Posted by ZombieKillah
post-up route add 62.210.142.1 dev eth0
post-up route add default gw 62.210.142.1
|
*aaaah* Ok, that is clear now. Sorry.
The above does *two* things, the first one is to set up a static host route to 62.210.142.1 via eth0, which is a prerequisite for the default gateway. That's what's missing from your Slackware setup. To do that, create a file /etc/rc.d/rc.firewall containing:
Code:
#!/bin/sh
case "$1" in
'start')
route add 62.210.142.1 dev eth0
route add default gw 62.210.142.1
;;
'stop')
route del default gw 62.210.142.1
route del 62.210.142.1 dev eth0
;;
'restart')
route del default gw 62.210.142.1
route del 62.210.142.1 dev eth0
route add 62.210.142.1 dev eth0
route add default gw 62.210.142.1
;;
*)
echo "usage $0 start|stop|restart"
esac
and then do 'chmod ugo+x /etc/rc.d/rc.firewall' to make it executable. You should also remove the default gateway setup from /etc/rc.d/rc.inet1.conf. Then you can restart your network with '/etc/rc.d/rc.inet1 restart'. I *think* that'll do the trick, unless anyone else has any refinements. The rc.firewall idea came from this thread. Adding the 'route add' commands to /etc/rc.d/rc.local is a lightweight alternative.
|
|
2 members found this post helpful.
|
03-26-2014, 07:08 PM
|
#6
|
LQ Newbie
Registered: Mar 2014
Posts: 4
Original Poster
Rep:
|
Hi Perbh,
Unfortunately i can't install wicd from slackbuilds.org as i don't have network access and on aliens wiki is says that K Network Manager is not compatible with Slack ?
Regards,
Iain
Quote:
Originally Posted by perbh
Try networkmanager or wicd instead - ie you leave everything in /etc/rc.d/rc.inet1.conf 'blank'
Your problem is basically that a virtual guest has a completely different network-setup than the host - but the two are _connected_ (excuse the (more or less) intentional pun)
|
|
|
|
03-26-2014, 08:19 PM
|
#7
|
Member
Registered: May 2008
Location: Republic of Texas
Posts: 393
Rep:
|
Quote:
Originally Posted by ZombieKillah
Hi Perbh,
Unfortunately i can't install wicd from slackbuilds.org as i don't have network access and on aliens wiki is says that K Network Manager is not compatible with Slack ?
Regards,
Iain
|
Well, _I_ am using networkmanager with 14.1 (and 14.0 for that matter) with no problems at all! And - it's included in slackware!
'wicd' is indeed part of slackware proper - if you look in the 'extra' directory ... (as far as 'extra' is part of slackware proper) - no need for slackbuild if you have the full iso-image.
Last edited by perbh; 03-26-2014 at 08:21 PM.
|
|
|
03-27-2014, 07:17 AM
|
#8
|
LQ Newbie
Registered: Mar 2014
Posts: 4
Original Poster
Rep:
|
Quote:
Originally Posted by 55020
*aaaah* Ok, that is clear now. Sorry.
The above does *two* things, the first one is to set up a static host route to 62.210.142.1 via eth0, which is a prerequisite for the default gateway. That's what's missing from your Slackware setup. To do that, create a file /etc/rc.d/rc.firewall containing:
Code:
#!/bin/sh
case "$1" in
'start')
route add 62.210.142.1 dev eth0
route add default gw 62.210.142.1
;;
'stop')
route del default gw 62.210.142.1
route del 62.210.142.1 dev eth0
;;
'restart')
route del default gw 62.210.142.1
route del 62.210.142.1 dev eth0
route add 62.210.142.1 dev eth0
route add default gw 62.210.142.1
;;
*)
echo "usage $0 start|stop|restart"
esac
and then do 'chmod ugo+x /etc/rc.d/rc.firewall' to make it executable. You should also remove the default gateway setup from /etc/rc.d/rc.inet1.conf. Then you can restart your network with '/etc/rc.d/rc.inet1 restart'. I *think* that'll do the trick, unless anyone else has any refinements. The rc.firewall idea came from this thread. Adding the 'route add' commands to /etc/rc.d/rc.local is a lightweight alternative.
|
You sir, are a lifesaver !! Your suggestion worked perfectly. Thank you so much for helping me
Quote:
Well, _I_ am using networkmanager with 14.1 (and 14.0 for that matter) with no problems at all! And - it's included in slackware!
'wicd' is indeed part of slackware proper - if you look in the 'extra' directory ... (as far as 'extra' is part of slackware proper) - no need for slackbuild if you have the full iso-image.
|
My apologies, I didn't even think to look there !!
All sorted now anyway
|
|
|
All times are GMT -5. The time now is 02:20 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|