0

So with a little help I figured out how to setup these routes and I can set them in rc.local

route add -net 208.82.236.0 netmask 255.255.255.0 dev ppp0 metric 1

route add -net 208.82.236.0 netmask 255.255.255.0 dev eth0 metric 10

my question is being that the first route is ppp0 as soon as I disconnect the modem the route is dropped how do I maintain the route or make it permanent so that next time the modem connects it will follow the route.

Currently after ppp0 disconnects the route is dropped

netstat -r Kernel IP routing table

Destination Gateway

Genmask Flags MSS Window irtt Iface laxapx03.o1.com *

255.255.255.255 UH 0 0 0 ppp0

208.82.236.0 * 255.255.255.0 U 0 0 0 eth0

10.0.1.0 * 255.255.255.0 U 0 0 0 eth0

169.254.0.0 * 255.255.0.0 U 0 0 0 eth0

default 10.0.1.1 0.0.0.0 UG 0 0 0 eth0

user65053
  • 5
  • 1
  • How are you establishing the modem connection? That's going to determine what you hook into to re-establish your routes. – jgoldschrafe Dec 31 '10 at 04:17
  • wvdial &[Modem0] Modem = /dev/ttyS0 Baud = 115200 SetVolume = 1 Dial Command = ATDT Init1 = ATZ Init3 = ATM1L1 FlowControl = CRTSCTS [Dialer Defaults] Modem = /dev/ttyS0 Baud = 115200 Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 ISDN = 0 Modem Type = Analog Modem Phone = 2090177 Username = user Password = pass – user65053 Dec 31 '10 at 04:34
  • Do I just add the route to /etp/ppp/ip-up/ – user65053 Dec 31 '10 at 04:39

1 Answers1

0

Create executable script in /etc/ppp/ip-up.d/ for example - setroute

!/bin/sh

route add -net 208.82.236.0 netmask 255.255.255.0 dev ppp0 metric 1

Vitaly Nikolaev
  • 386
  • 1
  • 6