Re: Forcing a packet through an interface (OT?)
On Tue, Jul 12, 2005 at 09:45:21AM -0600, Chad Leigh -- Shire.Net LLC wrote: On Jul 12, 2005, at 5:38 AM, Mario Lobo wrote: First, thanks to all for the suggestions. Now, using the same scenario, 1) rl0 (real.ip.no.1) --- ISP x 2) rl1 (real.ip.no.2) --- ISP y Suppose 1) is down and I?m using 2). If I ping www.google.com, it will go out through 2). What I really need to do is to issue the same ping www.google.com but make go out through 1) !! Nom what you want to do is ping isp1.router.net no, ping -r isp1.router.net -r Bypass the normal routing tables and send directly to a host on an attached network. If the host is not on a directly-attached network, an error is returned. This option can be used to ping a local host through an interface that has no route through it (e.g., after the interface was dropped by routed(8)). or maybe have a look at the -S flag smime.p7s Description: S/MIME cryptographic signature
Re: Forcing a packet through an interface (OT?)
First, thanks to all for the suggestions. Now, using the same scenario, 1) rl0 (real.ip.no.1) --- ISP x 2) rl1 (real.ip.no.2) --- ISP y Suppose 1) is down and I´m using 2). If I ping www.google.com, it will go out through 2). What I really need to do is to issue the same ping www.google.com but make go out through 1) !! Of course I could switch the default route to 1), test, then switch it back to 2), but I can´t do it this way because internet traffic should remain undisturbed. That is why the Forcing a packet... subject. thanks -- //| //|| // | // || -//--//---|| ARIO LOBO // //|| - [EMAIL PROTECTED] http://www.ipad.com.br ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Forcing a packet through an interface (OT?)
Yeah Stefan. They do take the default route. That is what I am already doing. I even wrote a little prog using a variation of ping to do just that. The problem lies with the fact that, there is a router between my rl0 and the internet. 1) rl0 --- router -- antenna -- ISPx -- internet So the fact that i can ping the hop next to rl0 doesn´t mean the link is up :(. That is why I NEED to ping something on the internet. Thanks, -- //| //|| // | // || -//--//---|| ARIO LOBO // //|| - [EMAIL PROTECTED] http://www.ipad.com.br On 12 Jul 2005 at 15:48, [EMAIL PROTECTED] wrote: In case you got a static IP on rl0 from ISP x (and rl0 is up), ping -I IP of rl0 www.google.com might help. Just a guess though. Packets might still take the default route, even with -I. Good luck, -- stefan http://stsp.in-berlin.de PGP Key: 0xF59D25F0 ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Forcing a packet through an interface (OT?)
Mario Lobo wrote: Yeah Stefan. They do take the default route. That is what I am already doing. I even wrote a little prog using a variation of ping to do just that. The problem lies with the fact that, there is a router between my rl0 and the internet. 1) rl0 --- router -- antenna -- ISPx -- internet So the fact that i can ping the hop next to rl0 doesn´t mean the link is up :(. That is why I NEED to ping something on the internet. I don't think so. You can follow Chad Leigh's advice and ping a router on your ISP. Figure out where your packets through ISP1 are routed (try traceroute) and then add a static route through ethernet1 to that router. You can do similar for ISP2. Then a ping of either router will always try to go through the network card appropriate to that ISP. --Alex ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Forcing a packet through an interface (OT?)
Mario Lobo wrote: Forgive me if this is off-topic. How could I force a packet to go out through an interface, despite the default route? What I do for testing is: 1. Assign additional local IP aliases. 2. Use IPFW or pf to forward packets that from those IPs through the different NICs. 3. Ping an IP online using the '-S' argument to specify the source as one of the IP aliases. Cheers, Nate ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Forcing a packet through an interface (OT?)
On Jul 12, 2005, at 5:38 AM, Mario Lobo wrote: First, thanks to all for the suggestions. Now, using the same scenario, 1) rl0 (real.ip.no.1) --- ISP x 2) rl1 (real.ip.no.2) --- ISP y Suppose 1) is down and I´m using 2). If I ping www.google.com, it will go out through 2). What I really need to do is to issue the same ping www.google.com but make go out through 1) !! Nom what you want to do is ping isp1.router.net Since #1 should still have its IP assigned, the system should route traffic out #1 for targets that are in the same subnet as the IP address for #1. Your assigned ISP #1 router/gateway address is probably in the same subnet but at the ISP, so traffic to it will go out #1 even with a default route of #2. This will tell you if the link to the ISP is back up or not. Chad Of course I could switch the default route to 1), test, then switch it back to 2), but I can´t do it this way because internet traffic should remain undisturbed. That is why the Forcing a packet... subject. thanks -- //| //|| // | // || -//--//---|| ARIO LOBO // //|| - [EMAIL PROTECTED] http://www.ipad.com.br --- Chad Leigh -- Shire.Net LLC Your Web App and Email hosting provider [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Forcing a packet through an interface (OT?)
Yep, that'll do it. Just choose two time servers that you would never need to use in real life. From google, you should be able to find a list of nearby public time servers. -john On Tue, 12 Jul 2005, Mario Lobo wrote: That sounds close to what I need !! 1) rl0 --- router -- antenna -- ISPx -- internet So would it be something like: route add -host ${ip.of.public.host} netmask 255.255.255.255 gateway ${ip.of.rl0} is that correct? In this case that host will be sacrificed, if rl0 is down. Do you have any suggestions on time or whois servers? Don't worry because the pings I send are standard 56 bytes long. Thanks John ! P.S. - I'm replying to your post from my home e-mail. I made the post from my work e-mail. -- //| //|| // | // || -//--//--|| ARIO LOBO // //|| - [EMAIL PROTECTED] http://mariolobo.70d.com http://www.mallavoodoo.com.br Mario, I think the only way to do what you want is to find two hosts on the internet that don't conflict with what you do on a day to day basis. Then add custom routes for those two specific hosts, and with those routes, you force traffic through each NIC. A perfect example of two public servers would be time or whois servers. Just be nice and dont ping too much (i.e., only send two small pings every 2 minutes or something). -john On Tue, 12 Jul 2005, Mario Lobo wrote: Yeah Stefan. They do take the default route. That is what I am already doing. I even wrote a little prog using a variation of ping to do just that. The problem lies with the fact that, there is a router between my rl0 and the internet. So the fact that i can ping the hop next to rl0 doesn´t mean the link is up :(. That is why I NEED to ping something on the internet. Thanks, -- //| //|| // | // || -//--//---|| ARIO LOBO // //|| - [EMAIL PROTECTED] http://www.ipad.com.br On 12 Jul 2005 at 15:48, [EMAIL PROTECTED] wrote: In case you got a static IP on rl0 from ISP x (and rl0 is up), ping -I IP of rl0 www.google.com might help. Just a guess though. Packets might still take the default route, even with -I. Good luck, -- stefan http://stsp.in-berlin.de PGP Key: 0xF59D25F0 ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Forcing a packet through an interface (OT?)
Forgive me if this is off-topic. How could I force a packet to go out through an interface, despite the default route? Suppose I have two interfaces connected to the internet: 1) rl0 (real.ip.no.1) --- ISP x 2) rl1 (real.ip.no.2) --- ISP y ISP y is just a backup link. ISP x is the working link. Don´t want to load-balance them. Use 2) ONLY if 1) is out. Suppose 1) is down. I switch to 2). But I have to keep testing 1) to see when it comes back up. How could I force a packet (ping maybe?) to www.whatever.com through 1), despite the default route being 2) ? I am aready binding the ping packet to the IP I want but that´s not enough. any suggestions? thanks, -- //| //|| // | // || -//--//---|| ARIO LOBO // //|| - [EMAIL PROTECTED] http://www.ipad.com.br ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Forcing a packet through an interface (OT?)
Suppose 1) is down. I switch to 2). But I have to keep testing 1) to see when it comes back up. How could I force a packet (ping maybe?) to www.whatever.com through 1), despite the default route being 2) ? I am aready binding the ping packet to the IP I want but that´s not enough. any suggestions? Host route for the 'www.whatever.com'? Warner ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Forcing a packet through an interface (OT?)
On Mon, Jul 11, 2005 at 04:53:25PM -0300, Mario Lobo wrote: Forgive me if this is off-topic. How could I force a packet to go out through an interface, despite the default route? You have a couple of options. Look at CARP in 5.4, that might do what you want best. man 4 carp Also google for: ipfw policy routing that is slightly different, but if you are going tests to see when a link goes up and down, and can change your firewall rules based on that, that would work I think. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Forcing a packet through an interface (OT?)
On Jul 11, 2005, at 5:26 PM, Mario Lobo wrote: Forgive me if this is off-topic. How could I force a packet to go out through an interface, despite the default route? Suppose I have two interfaces connected to the internet: 1) rl0 (real.ip.no.1) --- ISP x 2) rl1 (real.ip.no.2) --- ISP y ISP y is just a backup link. ISP x is the working link. Don?t want to load-balance them. Use 2) ONLY if 1) is out. Suppose 1) is down. I switch to 2). But I have to keep testing 1) to see when it comes back up. How could I force a packet (ping maybe?) to www.whatever.com through 1), despite the default route being 2) ? I am aready binding the ping packet to the IP I want but that?s not enough. If #1 still has an address associated with it, ping something in that same subnet -- like the ISPs router -- that should force the packet out #1 Chad --- Chad Leigh -- Shire.Net LLC Your Web App and Email hosting provider [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Forcing a packet through an interface (OT?)
Forgive me if this is off-topic. How could I force a packet to go out through an interface, despite the default route? Suppose I have two interfaces connected to the internet: 1) rl0 (real.ip.no.1) --- ISP x 2) rl1 (real.ip.no.2) --- ISP y ISP y is just a backup link. ISP x is the working link. Don?t want to load-balance them. Use 2) ONLY if 1) is out. Suppose 1) is down. I switch to 2). But I have to keep testing 1) to see when it comes back up. How could I force a packet (ping maybe?) to www.whatever.com through 1), despite the default route being 2) ? I am aready binding the ping packet to the IP I want but that?s not enough. any suggestions? thanks, -- //| //|| // | // || -//--//---|| ARIO LOBO // //|| - [EMAIL PROTECTED] http://www.ipad.com.br ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED] - End forwarded message - -- Jeremie Le Hen jeremie at le-hen dot org ttz at chchile dot org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]