Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
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 4: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 4:34
    
Do I just add the route to /etp/ppp/ip-up/ –  user65053 Dec 31 '10 at 4:39

1 Answer 1

up vote 0 down vote accepted

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

share|improve this answer
    
Thanks got it, I was adding it to ip-up.local but it wasn't executable, Thanks! –  user65053 Dec 31 '10 at 6:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.