How Do I Config Static Route Permanent On Fedora

Discussion in 'Linux Networking' started by mpanlop, Apr 15, 2004.

  1. mpanlop

    mpanlop Guest

    I want to add routing path permanent on linux but when linux restart
    or service network restarted my routing path was deleted. How do I
    config it permanent everytime
    service network was restarted. please advise me which files I can add
    command to setup my routing path.
     
    mpanlop, Apr 15, 2004
    #1
    1. Advertisements

  2. create a /etc/sysconfig/network-scripts/route-eth0
    with the following content:

    GATEWAY0=10.0.0.254
    NETMASK0=255.255.255.255
    ADDRESS0=192.168.1.10

    This will add the static route for host 192.168.1.10 over gw 10.0.0.254.

    (if the interface is any other than eth0, ppp0 for example, the file
    should be named /etc/..../route-ppp0)
     
    David Lesaffre, Apr 15, 2004
    #2
    1. Advertisements

  3. mpanlop

    vom Guest

    FYI, it also supports this format:

    # <prefix/bits> via <gateway>
    10.0.0.0/8 via 192.168.0.1

     
    vom, Apr 15, 2004
    #3
  4. Indeed, it does.
    And it looks a lot cleaner too.
     
    David Lesaffre, Apr 15, 2004
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.