Solved

Routing Problem with dynamic IP

Posted on 1997-05-12
6
220 Views
Last Modified: 2010-03-18
Hi guys,

i setted up my system with Ip-Masquerading and a ISDN dialup to my host.
the only problem is that when the route is added via:
"route add default ippp0"
in my script i have to do it after i made the connection to my server once again, because i only have a dynamic IP address from my ISP so i have to use 0.0.0.0 in my script.
But this way i can´t get the dial on demand on work without first establishing the connection through the Linux Box.

I really hope one of you guys can help me!

Cya,

            Chris
0
Comment
Question by:black_
6 Comments
 
LVL 1

Expert Comment

by:bcook
ID: 1584636
Add the switch "defaultroute" to the ppp command line or
/etc/ppp/options.

This will set the default route automatically once the connection is made.  This is how I do my setup with dynamic IP addresses and PPP. (This is going through a Linux Masq router with that setup)


0
 

Author Comment

by:black_
ID: 1584637
That is what i´ve already done, but is everytime deleted then after the box has connected!!
What should i do now??
0
 
LVL 1

Expert Comment

by:bcook
ID: 1584638
Do you have a default route already set - what does
route say.

Your message says that you set the default route in your
script. This should not be the case, maybe you could explain the
steps you go through when connecting.

0
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 

Expert Comment

by:Hal9k
ID: 1584639
You should use the "defaultroute" option at the commandline of ipppd. This tells ipppd to add the default route itself.
However you have to make sure that there is not already a
default route set !

You may also want to ensure that the network part of your local IP-address of your ehternet card is different fron the network address used by your dial-up server.
(i.e. if your server assings addresses to you from the range:
123.45.67.xxx (xxx is a number between 1 and 253) then you
must not use the first 3 bytes (123.45.67.) for your local
ethernet card. Otherwise routing might get confused.
0
 

Author Comment

by:black_
ID: 1584640
I really know that the defaultroute is set by itself, but the problem is that it is deleted after i received my dynamic Ip. Thats what confuses me!
Doesn´t have anyone the sam problem as i, or some scripts that may work for me???
0
 
LVL 19

Accepted Solution

by:
xterm earned 100 total points
ID: 1584641
Add these lines to your script (admittedly it's a little bit
of a hack, but it works):

sleep 5
IP=ifconfig ippp0 | grep inet | awk '{print $2}'| tr -d "addr:"
route add default gw $IP

You may have to adjust it a little depending on how your ifconfig
formats it's output, but you get the idea.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now