-
problems with gateway after rebooting
I am running slackware-current and I have to put in the command "route add -net 0.0.0.0 gw 192.168.1.1" everytime I reboot just to get back online. I have run "netconfig" and set in the gateway. And I have editted "/etc/rc.d/rc.inet1.conf" and the gateway address is there.
Where can I set the gateway to be there when I reboot?
Thx,
William
-
You can put your gateway's IP in /etc/rc.d/rc.inet1 or you can write the whole command in /etc/rc.d/rc.local.
-
the gateway address was already in the /etc/rc.d/rc.inet1.conf file. I will try the whole command in the rc.local file.
Thx,
William
hp_printerguy@yahoo.com
-
the gateway address was already in the /etc/rc.d/rc.inet1.conf file
Not in rc.inet1.conf, just in the plain rc.inet1 (without the .conf)
-
I got that file name from the slackware book 2.
Anyway, I assume putting the gw address in where it states: 0.0.0.0 in a couple of places of the gateway section?
William
hp_printerguy@yahoo.com
-
I am not for sure where to put the gw address.
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
In the brackets {} I would put the gw address?
-
i don't know slack, but why do you need to make a change somewhat post boot to get a gateway?
Debian has /etc/network/interfaces, Redhat has /etc/sysconfig/network-scripts/ifcfg-eth0 where you put IP, gateway, netmask, etc etc so when the interface turns on, it has all that info.
Where does slack keep its nic's IP info? Can't you just put the right gateway there?
Here it is:
http://www.slackware.com/config/network.php
you're on the right track, but I guess your file looks different than the example?
-
Because when I run "netconfig" in slackware it doesn't find the gateway that I set into "netconfig". I have to manual add it everytime.
In the file /etc/rc.d/rc.inet1.conf, the gw is there. Which file /etc/rc.d/rc.inet1 is suppose to read and get it's info. (I think)
-
/etc/rc.d/rc.inet1 is the script that executes when your box boots. It's supposed to read it's config from /etc/rc.d/rc.inet1.conf (which in your case for some reason it doesn't). Are you sure that the gateway is in the same subnet as your box?
You can edit directly /etc/rc.d/rc.inet1 and add your IP, netmask and gateway there.
-
yes, it is on the same subnet.
I posted the gw area of the file and was wondering where to put the gw address. (See Previous Post)
Wait a minute. I am going to try to put in the Quotation Marks "".
if [ ! "$GATEWAY" = "" ]; then
correct me if I am wrong.
Thx,
William
Last edited by keywi; 08-18-2005 at 10:06 AM.
-
Well, that didn't work.
screw it, i am going to put the whole command in the rc.local file.
I am just wondering what is wrong or if I am doing something wrong.
Thx for your help
William
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|