Visualizzazione dei risultati da 1 a 4 su 4

Discussione: Comando route

  1. #1

    Comando route

    Sotto Debian (venerando server con Woody) come posso rendere definitive le modifiche apportate da route?
    Mi spiego meglio con un esempio:aggiungo la seguente rete (192.168.101.0)
    # route
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    localnet * 255.255.255.0 U 0 0 0 eth0
    default FW_QPB 0.0.0.0 UG 0 0 0 eth0
    # route add -net 192.168.101.0 netmask 255.255.255.0 gw 192.168.1.199 dev eth0
    # route
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    192.168.101.0 192.168.1.199 255.255.255.0 UG 0 0 0 eth0
    localnet * 255.255.255.0 U 0 0 0 eth0
    default FW_QPB 0.0.0.0 UG 0 0 0 eth0

    Se pero' riavvio la macchina l'ultima impostazione viene persa e l'otuput torna quello di prima:
    # route
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    localnet * 255.255.255.0 U 0 0 0 eth0
    default FW_QPB 0.0.0.0 UG 0 0 0 eth0

    Come posso rendere definitiva la modifica?
    Grazie per l'aiuto.
    It's just another bombtrack...
    Ogni can mena la coa, ogni coion vö gi' la soa!

  2. #2
    Utente di HTML.it L'avatar di indre
    Registrato dal
    Jan 2002
    Messaggi
    2,735

    re

    se non ricordo male va creato un file dentro qui
    /etc/network/if-up.d
    When I was young I used to pray for a bike. Then I realized that God doesn't work that way. So I stole a bike and prayed for forgiveness.

  3. #3
    Ok, che file?
    It's just another bombtrack...
    Ogni can mena la coa, ogni coion vö gi' la soa!

  4. #4
    Funziona, basta inserire uno script coi comandi route che servono.
    Ho trovato anche un altro modo, basta modificare direttamente /etc/networks/interfaces come segue:
    iface eth0 inet static
    address 192.168.0.111
    netmask 255.255.255.0
    gateway 192.168.0.1
    up route add -net 10.0.0.0 netmask 255.0.0.0 gw 192.168.0.2 dev eth0
    It's just another bombtrack...
    Ogni can mena la coa, ogni coion vö gi' la soa!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.