'route add default gw ...' not working

Dieses Thema im Forum "Internet, lokale Netzwerke und Wireless Lan" wurde erstellt von transmogrifier, 13.09.2003.

  1. #1 transmogrifier, 13.09.2003
    transmogrifier

    transmogrifier Grünschnabel

    Dabei seit:
    13.09.2003
    Beiträge:
    3
    Zustimmungen:
    0
    Hi,
    I have a newly installed Knoppix/Debian.

    My problem: I can't reach any IP outside my network - this is probably because there is no route:
    #route
    192.168.1.0 * 255.255.255.0 U 0 0 0 eth0

    My DSL-Router is 192.168.1.1 and I can it ping it without any problem.
    But when I try
    (after: ifconfig eth0 down - and also up)

    route add default gw 192.168.1.1

    I always get the message:
    network is unreachable

    What is specially terrible: it worked today already!
    I followed the same steps (after some trouble to find the route command) and suddenly everything worked fine!
    So I know that the card, cables, drivers and whatever is o.k.
    - has anybody any hint?
    But now it won't anymore.

    I would be really, really glad!
     
  2. Anzeige

    Schau dir mal diese Kategorie an. Dort findest du bestimmt etwas.
    Registrieren bzw. einloggen, um diese und auch andere Anzeigen zu deaktivieren
  3. Andre

    Andre Foren Gott
    Moderator

    Dabei seit:
    01.04.2002
    Beiträge:
    3.876
    Zustimmungen:
    0
    Hi!
    Try to use (as root) "netenv" to set up your network.
    that should solve your Problem....

    Another way is to edit the necessary files directly..
    greetz Andre ;-)
     
  4. #3 transmogrifier, 13.09.2003
    transmogrifier

    transmogrifier Grünschnabel

    Dabei seit:
    13.09.2003
    Beiträge:
    3
    Zustimmungen:
    0
    netenv doesn't help

    Hi Andre,
    thank's for your answer!
    - but netenv doesn't seem to change anything.

    I would be very glad to insert my defaultroute directly - but which f..ng file is it???

    Everybody is always speaking about the routing table but I can't find it - is it possible to edit it directly?
    And what do I have to insert to have the analogue for:
    route add default gw 192.168.1.1 ?

    BTW: Do you have an idea where the problem comes from?
    I suppose normally linux would find the network during the boot process - but it doesn't. There is already the message "The network is unreachable".
    But nevertheless I can ping any pc in my network.

    Thank's a lot for your help!
     
  5. Andre

    Andre Foren Gott
    Moderator

    Dabei seit:
    01.04.2002
    Beiträge:
    3.876
    Zustimmungen:
    0
    I think "etc/network/interfaces" is what you are looking for ;-)


    Code:
    linus@FuckUp:~$ cat /etc/network/interfaces
    # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
    
    # The loopback interface
    auto lo
    iface lo inet loopback
    
    # The first network card - this entry was created during the Debian installation
    # (network, broadcast and gateway are optional)
    auto eth0
    iface eth0 inet static
            address 192.168.0.8
            netmask 255.255.255.0
            network 192.168.0.0
            broadcast 192.168.0.255
            gateway 192.168.0.3
    
    
    I hope that helps...

    ?(
     
  6. #5 transmogrifier, 14.09.2003
    transmogrifier

    transmogrifier Grünschnabel

    Dabei seit:
    13.09.2003
    Beiträge:
    3
    Zustimmungen:
    0
    Hi Andre,
    this wasn't the problem either.

    Now I removed Knoppix and installed pure Debian and everything was immediatly working well.

    Anyway, thank's a lot for your help.
     
  7. MTS

    MTS Kaiser

    Dabei seit:
    09.11.2002
    Beiträge:
    1.242
    Zustimmungen:
    0
    Ort:
    NRW, Bochum
    I would guess that the whole thing is a iptables problem!
    I dont exactly know the Knoppix Distribution. But my Redhat for example had a automatically configured firewall that always caused this problem.

    Just do a iptables -F to delete the rules and then try again ...
     
  8. Anzeige

    Vielleicht findest du HIER Antworten.
    Registrieren bzw. einloggen, um diese und auch andere Anzeigen zu deaktivieren
Thema:

'route add default gw ...' not working

Die Seite wird geladen...

'route add default gw ...' not working - Ähnliche Themen

  1. Großbritannien fördert Bürgerbeteiligung durch die Initiative »Digital by Default«

    Großbritannien fördert Bürgerbeteiligung durch die Initiative »Digital by Default«: Großbritanniens Government’s Digital Service (GDS) hat 2015 die Initiative »Digital by Default« gestrafft, um Richtlinien zur Erstellung...
  2. default befehle in der bash

    default befehle in der bash: Hallo! Ich suche eine Lösung die vor ALLEN bash Befehlen "time ionice -c3" setzt. deb6, .bashrc? Vielen Dank für Eure Hilfe, Manfred
  3. Linux Nmap Default Router Services Scan Shellcode

    Linux Nmap Default Router Services Scan Shellcode: 73 bytes small Linux/x86 Nmap default router services scan shellcode. Weiterlesen...
  4. iptables - default policy - Server macht dicht

    iptables - default policy - Server macht dicht: Moin zusammen, beisse mir hier seit etwa drei Tagen die Zähne an iptables aus. Hier die Regeln, die beim Booten (oder manueller...
  5. Liferay 6.1 Default Configuration Compromise

    Liferay 6.1 Default Configuration Compromise: By utilizing the json webservices exposed in Liferay Portal version 6.1 you can register a new user with any role in the system, including the...