problems with gateway after rebooting


Results 1 to 11 of 11

Thread: problems with gateway after rebooting

  1. #1
    Join Date
    Nov 2002
    Location
    Arkansas
    Posts
    146

    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
    www.keywi.org

    Folding@Home

    Slackware-Current

  2. #2
    Join Date
    Nov 2003
    Posts
    105
    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.

  3. #3
    Join Date
    Nov 2002
    Location
    Arkansas
    Posts
    146
    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
    www.keywi.org

    Folding@Home

    Slackware-Current

  4. #4
    Join Date
    Nov 2003
    Posts
    105
    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)

  5. #5
    Join Date
    Nov 2002
    Location
    Arkansas
    Posts
    146
    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
    www.keywi.org

    Folding@Home

    Slackware-Current

  6. #6
    Join Date
    Nov 2002
    Location
    Arkansas
    Posts
    146
    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?
    www.keywi.org

    Folding@Home

    Slackware-Current

  7. #7
    Join Date
    Jan 2004
    Location
    boston, mass USA
    Posts
    1,878
    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?

  8. #8
    Join Date
    Nov 2002
    Location
    Arkansas
    Posts
    146
    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)
    www.keywi.org

    Folding@Home

    Slackware-Current

  9. #9
    Join Date
    Nov 2003
    Posts
    105
    /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.

  10. #10
    Join Date
    Nov 2002
    Location
    Arkansas
    Posts
    146
    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.
    www.keywi.org

    Folding@Home

    Slackware-Current

  11. #11
    Join Date
    Nov 2002
    Location
    Arkansas
    Posts
    146
    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
    www.keywi.org

    Folding@Home

    Slackware-Current

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •