Koozali.org: home of the SME Server

Manually bring PPP connection up/down <Resolved...I think

Lucky Dragon

Manually bring PPP connection up/down <Resolved...I think
« on: April 18, 2007, 01:50:39 PM »
Can someone tell me what the relevant commands are to accomplish this? My guess is:

service wan stop to take it down

and
service wan start to bring it back up.

As the modem dials once the wan service starts on boot... but I could be wrong, and haven't had a chance to test it yet...

Lucky Dragon

Manually bring PPP connection up/down <Resolved...I think
« Reply #1 on: April 20, 2007, 09:43:20 PM »
After more poking around, i discovered another possibility for bringing the modem link up/down:
The /etc/sysconfig/network-scripts directory contains various scripts and config files for pppd and diald... It seems that these might work.
ifup ppp0 and ifdown ppp0

Since I don't currently have access to the server, I can't test this. Can anyone tell me for sure what commands I need?

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Manually bring PPP connection up/down <Resolved...I think
« Reply #2 on: April 20, 2007, 11:54:09 PM »
Quote from: "Lucky Dragon"
It seems that these might work.
ifup ppp0 and ifdown ppp0


They won't. The ones given earlier should.

Lucky Dragon

Works, but...
« Reply #3 on: May 13, 2007, 08:45:11 PM »
This connects/disconnects as expected, but occasionally, I'm seeing the WAN service get restarted by some other service. When I take it down, I need it to STAY down until I bring it up again, so it doesn't interfere with voice calls on this line. What other services do I need to disable along with WAN to achieve this? Note that I still want the server to be able to communicate on the LAN side, just don't want it automatically pulling up the modem link, EVER.

Lucky Dragon

Probable solution
« Reply #4 on: May 13, 2007, 10:49:30 PM »
So I got to thinking, and realized that for the server to dial, it needs to have the phone number, modem initialization string, etc. So I created two scripts (wanup and wandown). Now /etc/e-smith/templates/etc/sysconfig/network-scripts/chat-ppp0 gets renamed to chat-pppx whenever I stop the WAN service. If I'm not missing anything, this should prevent any other service from bringing it back up again (as the config file is now "missing") ...and when I need it back up, I execute wanup, which renames it back to chat-ppp0 and starts the WAN service.

Further updates if this is not the case...