Re: routing to specific network

2004-01-12 Thread David Miller
On Mon, 12 Jan 2004, Dinesh Nair wrote:

> 
> On Sun, 11 Jan 2004, David Miller wrote:
> 
> > So you want packets for 60.6.* to go out through ISP2?
> 
> it is amazing that how something which completely stumps you at 4am,
> suddenly becomes so clear after some sleep and coffee at 11am. i added a
> route for 60.6/16, but was trying to traceroute 61.6/16. the mistake kept
> perpetuating because i kept using the shell's history to run the
> traceroute, and the mind could not tell the difference between the 0 and
> the 1. my bad, and much apologies. all works fine now.

Oops. Now if I had a dollar for every time *I'd* done something like
that...

> 
> > Zebra implemets a number of routing protocols, including bgp.  With BGP
> > you can pick the best route *out* for your packet, but everyone else's
> > BGP sessions will decide the best route *in* for you.  In other words,
> 
> to me, if i can pick the source ip address of my _outgoing_ packet, i.e.
> on which interface the connection is made, i'd be a happy camper.

Isn't this equivilent to selecting the outbound route?  You want to select
10.a.b.c uf you want the connection routed out ISP 1 and 192.168.x.y
otherwise.


> since i have two interfaces with two ip addies, the first http connection
> can have a 192.168.0/24 ip address, with the flow being carried on fxp0.
> the second http connection have have a 10.1/16 address with the flow being
> carried on the aue0. that would actually solve the problem, without having
> to set up multiple static routes. would this be possible ?

I don't think that's really going to help much.  You still have to have
some basis for knowing which network you want to handle which
connections.  Unless you're doing heavy duty uploading somewhere you're
very likely to be limited by your inbound bandwidth, so it doesn't really
matter which interface you're going out anyway.

FreeBSD should pick the "closest" IP address for any outgoing connections
anyway.  Say you had two "real" addresses so we can forget about NAT,
12.1.2.3 and 24.2.3.4.  Say you routed 60.1/16 out the upstream for
24.2.3.4.  Say you pinged 60.1.2.3.  It would already see a source address
on the ping packets of 24.2.3.4, not 12.1.2.3.  You don't have to do
anything special for that to happen - your application would have to bind
to 12.1.2.3 exclusively in order for it to be the source address.

There are bizzare cases where it might make sense to try and load balance
two broadband connections, but they're really special cases and don't have
general purpose solutions:(

--- David

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Speak Freely

2004-01-12 Thread David Miller
On Mon, 12 Jan 2004, Q wrote:

> On Mon, 2004-01-12 at 05:52, David Miller wrote: 
> > Hi All;
> > 
> > I've spent the last two days trying to get speak freely (Internet voice
> > program with encryption, see 
> 
> If you are intending to use this out of more than just curiosity you
> might want to look at alternatives like some of the OpenH323 clients
> (eg. net/gnomemeeting), as this particular program will be officially
> 'End of Life'ed by its author on the 15th of this month.

I know about the end-of-life message.  For now, at least, it doesn't
bother me.

I just now looked at gnomemeeting.  It doesn't appear to support
encryption.  Do you know if there's a way to keep private conversations
private, short of VPN's or the like?

> > Speakfreely was first installed from ports, then compiled in half duplex
> > mode.  If I launch sfspeaker -d from one window, and sfmike -d some.host
> > from another, I get the following error from sfspeaker:
> > 
> > new:dmiller$ sfspeaker -d
> > sfspeaker: 10.0.0.3 packet lost by half-duplex muting.
> > sfspeaker: 10.0.0.3 packet lost by half-duplex muting.
> > sfspeaker: 10.0.0.3 packet lost by half-duplex muting.
> 
> This is exactly what's supposed to happen when you compile it with half
> duplex mode enabled. You should recompile it without defining
> HALF_DUPLEX (which should be the default) if you want this behaviour to
> stop.

I started out with full duplex.  The error message said to compile it in
half duplex.

 
> > One other thing that seems odd is that sound from the mike comes through
> > the speakers even when sfmike is "paused".
> 
> If this is sound from your locally connected mic, then this is probably
> a mixer 'input source' issue more than anything else. Try playing with
> the 'rec' and 'mic' input level and see if it makes any difference.

I didn't observe this on a windows machine against an echo server.  My
freebsd box doesn't "speak" anything from an echo server, just gives me
the error messag above.  From looking briefly at the code, it looks like
speakfreely thinks something else already has exclusive access to the
card.

man pcm indicates that the driver is full duplex, for those cards which
support it.  I tried a card with the yamaha chip (opl, iirc) that
certainly supported it, with the same results.

sflaunch should work with half duplex drivers/devices, but I don't get any
sound echoed back from echo servers with it either, just the muting
message above.

What am I doing wrong?

--- David

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Speak Freely

2004-01-11 Thread David Miller
Hi All;

I've spent the last two days trying to get speak freely (Internet voice
program with encryption, see 

I believe I have a full duplex card running properly.  I can play a CD and
mp3's at the same time, and have both come out the speakers at once.  It
shows up as:

pci1:  at 0.0 irq 11
pcm0:  port 0xd800-0xd8ff irq 10 at device 5.0 on pci0
ohci0:  mem 0xdd00-0xdd000fff
irq 11 at device 13.0 on pci0

Speakfreely was first installed from ports, then compiled in half duplex
mode.  If I launch sfspeaker -d from one window, and sfmike -d some.host
from another, I get the following error from sfspeaker:

new:dmiller$ sfspeaker -d
sfspeaker: 10.0.0.3 packet lost by half-duplex muting.
sfspeaker: 10.0.0.3 packet lost by half-duplex muting.
sfspeaker: 10.0.0.3 packet lost by half-duplex muting.


It happens while using two terminal sessions after a cold boot; it's not a
matter of something else in gnome having a lock on the audio device.

I've tried three different sound cards, all of which came up as /dev/pcm0.

I'm using 4.9RC and speakfreely 7.6a.

One other thing that seems odd is that sound from the mike comes through
the speakers even when sfmike is "paused".

Suggestions and/or clues most welcome.

Thanks,

--- David

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: routing to specific network

2004-01-11 Thread David Miller
On Mon, 12 Jan 2004, Dinesh Nair wrote:

> 
> hey,
> 
> i'm on a multihomed FreeBSD 4.9-RELEASE, cvsupped and built to -STABLE as
> of two weeks ago. the two NICs on the box each go to different ADSL
> providers. right now, i can switch which provider i use by just manually
> changing the default route. however, what i'd like to do is to have the
> default route set to one provider, but manually add static routes to
> networks closer to the second provider going out that way.
> 
> EXAMPLE OUTPUT OF NETSTAT -RN:
> 
> default192.168.0.1UGSc   13 2878   fxp0
> 10.1/16link#9 UC  20   aue0
> 10.1.105.5 00:e0:7d:03:a2:08  UHLW0  363   aue0815
> 10.1.105.2600:08:54:d0:5d:2e  UHLW10lo0
> 60.6/1610.1.1.1   UGSc00   aue0
> 127.0.0.1  127.0.0.1  UH  012407lo0
> 192.168.0  link#2 UC  10   fxp0
> 192.168.0.100:30:ab:10:6c:0d  UHLW   13  215   fxp0913
> 
> (192.168.0.1 is ISP1's router and 10.1.1.1 is ISP2's router)

So you want packets for 60.6.* to go out through ISP2?

> 
> i've successfully managed to add routes for /16 networks, and 'netstat
> -rn' as well as 'route -n get' both give the expected results. however,
> tracerouting to an ip address in one of these static routes still shows
> that it is going out thru the default route instead of the second
> provider. running a packet sniffer and attempting a http connection
> confirmed this. in this case, any packet going to 60.6.1.1
> 
> what exactly should i be doing to get the behaviour i desire ?

By the sounds of it, exactly what you are doing.  Can you show us a
traceroute that isn't working normally?  Are you running any routing
protocols, like routed?



> a secondary question is, with the /usr/ports/net/zebra package, can i
> configure this box to load balance flows over both ADSL connections,
> assuming i do not have an AS number (for BGP) handy ? i.e. the question
> is, assuming i make a tcp connection out using a browser (for argument's
> sake, mozilla), can mozilla send the packet out dynamically on the first
> NIC (with its IP address as source) and then round robin the next TCP
> connection off the second NIC (with the second IP address as source) ?
> would i need the recent multipath patches (though its for 4.8-STABLE) to
> do this ?

Zebra implemets a number of routing protocols, including bgp.  With BGP
you can pick the best route *out* for your packet, but everyone else's BGP
sessions will decide the best route *in* for you.  In other words, you
can't really shape the incoming traffic very much.  In order to setup BGP
you'll need to get both your upstreams to setup BGP sessions with you,
which is very unlikely to happen.  It's also unlikely to really buy you
any performance advantage after you subtract the bandwidth that the
routing protocol takes.

Lastly, you don't have any routes to advertise that will help.  I assume,
at least, that you just have a /32 for each connection, in which case
you'd be trying to advertise a /32 to the entire Internet.  That's not
going to happen:)

Hope this helps,

--- David

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"