Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
After using fedora core 4. i installed Slackware 10.2.Everything was ok with fedora core 4.Now,with slackware,i have a problem with network configuration. The problem is internet is not working with slackware. i can't enter any web-sites and i can't use gaim. nothing works.
Here're my adresses. These are correct and i was using them with fedora core 4. Everthing was ok.
(no dhcp)static ip
ip :10.10.1.190
netmask :255.255.255.0
gateway :10.10.10.1
DNS :193.140.41.90
But when i apply this settings to slackware and when i try some commands at terminal,it gives me the following messages :
ping www google com ( it does not let me to write with dots )
ping : unknown host www google com
and when i write " ping 123.123.123.123 " .. here, what happens ;
ping 123.123.123.123
connect : Network is unreachable
---------- And here are my Slackware settings ----------
i can't find what the problem is
here is my " /etc/rc.d/rc.inet1.conf " file
lo Link encap:Local loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 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.0b) Tx bytes:0(0,0)
Please help me. This is the 6th time i m installing slackware in 2 days. I can't find what the problem is. why i can't connect to internet ? .. what should i do to enter any web-site.. ?
Thank you in advance..
and i'm sorry for my bad english..
IP = 10.10.1.190
Mask = 255.255.255.0
Gateway = 10.10.10.1
DNS = 193....
Your computer only knows about devices in the 10.10.1.0/24 range, which the gateway device is not in. The DNS server is also (far) outside that range. Your PC can't see the gateway and therefore can't route packets to the DNS server. Hence the unknown host when trying to ping google.
Try sticking in a static route to the gateway device.
Code:
#route add 10.10.10.1 dev eth0
#route add default gw 10.10.10.1
This change isn't permanent yet, but try it out and tell us if it works and we can look at making the changes you need. If there are any errors, post them and we'll try to help.
yeap .. thank you so much kakariko81280 !!!!!.. thanx thanx thanx ..
now it works..
but i have another problem .. i wrote " route add default gw 10.10.10.1 " and i turned off my computer and when i turned it on again, nothing worked..my settings were lost.And now i wrote that commmands again.. do i have to write this all the time when i turn on my computer ? .. is there any route'file that i can write this settings on?? ( now i m on Slackware but i dont want to write this everytime.. )
I'm glad that worked out, although I probably should have mentioned that the changes wouldn't be permanent (in case it all went horribly wrong).
Slackware isn't really set up for this sort of thing because it's a fairly rare setup. This means we will have to do a spot of script editing.
The one you are interested in is /etc/rc.d/rc.inet1. Here is how mine looks just now:
Code:
#####################
# GATEWAY FUNCTIONS #
#####################
# Function to bring up the gateway if there is not yet a default route:
gateway_up() {
if ! /sbin/route -n | grep "^0.0.0.0" 1> /dev/null ; then
if [ ! "$GATEWAY" = "" ]; then
echo "/etc/rc.d/rc.inet1: /sbin/route add default gw ${GATEWAY} metric 1" | $LOGGER
/sbin/route add default gw ${GATEWAY} metric 1 2>&1 | $LOGGER
fi
fi
}
# Function to take down an existing default gateway:
gateway_down() {
if /sbin/route -n | grep "^0.0.0.0" 1> /dev/null ; then
echo "/etc/rc.d/rc.inet1: /sbin/route del default" | $LOGGER
/sbin/route del default
fi
}
You need to set up the static route before setting up the default gateway. Changes are highlighted
Code:
#####################
# GATEWAY FUNCTIONS #
#####################
# Function to bring up the gateway if there is not yet a default route:
gateway_up() {
if ! /sbin/route -n | grep "^0.0.0.0" 1> /dev/null ; then
if [ ! "$GATEWAY" = "" ]; then
echo "/etc/rc.d/rc.inet1: /sbin/route add default gw ${GATEWAY} metric 1" | $LOGGER
/sbin/route add ${GATEWAY} dev eth0
/sbin/route add default gw ${GATEWAY} metric 1 2>&1 | $LOGGER
fi
fi
}
# Function to take down an existing default gateway:
gateway_down() {
if /sbin/route -n | grep "^0.0.0.0" 1> /dev/null ; then
echo "/etc/rc.d/rc.inet1: /sbin/route del default" | $LOGGER
/sbin/route del default
/sbin/route del ${GATEWAY}
fi
}
Test the changes and if it all looks good you should be good to go. Don't forget to backup the rc.inet1 file before editing it.
aww god ....thank you Chris ! . You're the biggest coder i have ever seen..i was busy with this for about 4 days .. and i hv installed slackware for about six times and i have wrote this topic to 3 linux forums. Noone can solved...i was near to kill myself.. thank you again.. now it works.. no problem ... .. if you were here i can buy a beer 2 u ... thanx !!
Hi guys, I`ve been reading around and i found out that this problem that rommeo had is the same as mine, although the solution is not. Can you guys give me any hints on how to setup a network and an internet connection ?
firstly ... open terminal .. be root.. then write netconfig... apply your settings .. then write " route - n " .. u have to see " UG " at " flags " column.if u dont see check your fstab.. then if u have a gateway as mine .. do what kakoriko said.. reboot ur computer.. that s all i think...
A Newbie's Getting Started Guide to Linux
Learn the basics of the Linux operating systems. Get to know what it is all about, and familiarize yourself with the practical side. Basically, if you're a complete Linux newbie and looking for a quick and easy guide to get you started this is it. subscribe
Open Source Security Myths Dispelled Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization subscribe
InformationWeek InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology. subscribe