Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Possibly you could write a one-line script with your 'route add' command and put it in /etc/init.d/
Then create a symbolic link to your runlevel (assuming that you boot into runlevel 5)
I'm not sure if you can have 2 entries with the same number, so if you already have some other script starting with S40,
change the name of your script to e.g. S41.
It may not be the best solution, but it SHOULD work
here is the specific configuration
eth0: dhcp cable modem connection
eth1: local static connection
ppp0: pptp on top of cable connection
I have set defaultroute in my ppp file but it maybe effective only when the connection starts, it apperantly does not re-set it if it disappears
will what you are suggesting means that it will just override the default gateway even if it fails ? or run only once ? I have perhaps done better than that, I have added that to rc.sysinit, but the problem is that it re-deletes itself every time every 10 or so minutes
I have an alternative temporary method by adding a cron job to run that command every minute, but I hope someone could help me avoid it
Well, I have this in my root crontab: */12 * * * * /usr/local/sbin/renew-default-route
and /usr/local/sbin/renew-default-route contains this:
#! /bin/sh
# Make sure the default route to our dsl router is set
# Our dsl network (static) is: 64.216.205.120/29 (gw == 126)
# D.R. Forrest 9/14/08
This places a default route if missing (several times a minute) and sends me an email. It's been running for a couple of weeks and no mail yet. But the route was lost in a momentary power glitch during the passage of the storm Ike, and caused me some grief. I've tested the script by bringing my modem down and it seems to work. But no promises given here.
how could both cables be bad ? http://linux.derkeiler.com/Newsgroup.../msg01524.html
this may be relevant, it's possible that because I used ethtool to set the necessary modes, the auto negotiation in the switch is not off, I suspect that if that is the case, it is nothing to be concerned about, because this is unlikely the reason for the disconnection of the pptp connection, the eth1/0 interfaces never disconnected before, but I was worried that this was an error in the packets themselves.
where can I see the number of retransmissions of packets on each interface ?
It could be both cables. Most folks don't know there are very tight requirements for Ethernet cables. They crimp, kink, crush, or buy poorly built cables and have unexplained networking problems. I've had clients who literally had cables all over the floor, crushed, tightly folded, and couldn't understand why there were so many Ethernet errors! I ultimately setup an entire server data center for one client.
Your errors should be essentially 0, even after months of uptime.
Settings for eth1:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised auto-negotiation: No
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 32
Transceiver: internal
Auto-negotiation: off
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: yes
if thee problem is really in the cables, why are there 0 TX errors on both interfaces ? wouldn't it be right to assume that because I turned off auto negotiation the switch and the modem are sending auto negotiation frames and the interface does not receive them ? I can try to turn on auto negotiation and see the effect it has on the errors
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.