LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   VectorLinux (https://www.linuxquestions.org/questions/vectorlinux-36/)
-   -   How to set (or delete) default gateway at boot? (https://www.linuxquestions.org/questions/vectorlinux-36/how-to-set-or-delete-default-gateway-at-boot-737864/)

colucix 07-05-2009 11:32 AM

How to set (or delete) default gateway at boot?
 
Hi all.

I just installed VectorLinux 6.0 on an old machine. It works fast and good, but I have an issue with the ADSL connection: every time I use pppoe-start to connect, the connection is established but I cannot access internet. I found that I have to delete the default gateway - which is automatically set-up at boot to 192.168.1.1 - and let pppoe to set it for me (to 0.0.0.0).

Here's the question: since I'd like to avoid to run the route del default command every time, how can I set it up at boot time? I already tried to change the GATEWAY variable in /etc/rc.d/rc.route and /etc/rc.d/function-network, but it doesn't work (the defauly gateway is still 192.168.1.1).

Here's is another question: is there a tool to start the ADSL connection without running pppoe-start from the command line? Something like kinternet for KDE. I'm using XFCE4.

Thank you.

kirukan 07-05-2009 12:40 PM

route add -net 192.168.1.0/24 gw gatewayaddress
add this on /etc/rc.local
is this not suitable for your situation?

colucix 07-05-2009 01:03 PM

Nope. It doesn't work. I tried your command but the default gateway is still 192.168.1.1. At this point it looks like it is set after boot, but I cannot find where it is set up. Thanks anyway.

Uncle_Theodore 07-05-2009 02:13 PM

From what I see in Google, there are two commands to set up networking on Vector. One is netconfig and the other one is netset. Have you tried them?

colucix 07-05-2009 02:46 PM

In vectorlinux it is /sbin/vnetconf. There is also the good ol' netconfig command, but the functionality is exactly the same. It sets the hostname and configures the IP address. Since I have to use DHCP, because the IP address is dinamically assigned by the ADSL modem, I cannot setup a default gateway (and indeed I don't need it). What I need to know at this point is: which application/script is responsible to set-up the default gateway in VectorLinux/Slackware systems? So that I can override it...

Uncle_Theodore 07-05-2009 02:52 PM

On Slackware it's /etc/rc.d/rc.inet1

colucix 07-05-2009 03:15 PM

I tried to add the gateway 0.0.0.0 in /etc/rc.d/rc.inet1, but it still assigns 192.168.1.1. Anyway, I've just found out that on another system running Opensuse 11.1, the default gateway is assigned the same way at boot:
Code:

# route -n
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
192.168.1.0    0.0.0.0        255.255.255.224 U    0      0        0 eth0
169.254.0.0    0.0.0.0        255.255.0.0    U    0      0        0 eth0
127.0.0.0      0.0.0.0        255.0.0.0      U    0      0        0 lo
0.0.0.0        192.168.1.1    0.0.0.0        UG    0      0        0 eth0

and only when I connect to the ADSL using kinternet, it is changed to
Code:

# route -n
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
192.168.100.1  0.0.0.0        255.255.255.255 UH    0      0        0 dsl0
192.168.1.0    0.0.0.0        255.255.255.224 U    0      0        0 eth0
169.254.0.0    0.0.0.0        255.255.0.0    U    0      0        0 eth0
127.0.0.0      0.0.0.0        255.0.0.0      U    0      0        0 lo
0.0.0.0        0.0.0.0        0.0.0.0        U    0      0        0 dsl0

So the problem is: how can I set rp-pppoe to assign the correct (null) gateway address upon connection? I will further investigate this issue. Thank you, anyway.


All times are GMT -5. The time now is 07:09 AM.