Date: Sat, 26 Oct 2002 14:45:00 +0200 From: Robert Staflin <krs@canit.se> To: freebsd-net@FreeBSD.ORG Subject: Re: Choosing interface for a destination Message-ID: <BDD9A576-E8E0-11D6-B088-00039304172A@canit.se> In-Reply-To: <61AA1726-E926-11D6-B166-00039304172A@canit.se>
next in thread | previous in thread | raw e-mail | index | archive | help
It really was a newbie question - sorry for the bandwidth. If anyone else wonders, email me and I'll help! /Robert Staflin On lördag, okt 26, 2002, at 23:03 Europe/Stockholm, Robert Staflin wrote: > I'm developing an application to set the interface to use for > different IP addresses, e.g. if I want to use a modem to talk to > certain "protected" nets while using the ordinary ethernet port for > web access a.s.o. > > I've wracked my head for two days now, trying different ways of making > "route" do the job, to no avail. At the moment I'm running with the > ethernet card (en0) as 192.168.0.2 and a wlan card (en1) as > 192.168.0.5. Now, I want to reach the address 192.168.0.3 through en1 > instead of en0. If I try i.e. > > route -n add -host 192.168.0.3 -interface 192.168.0.5 > > no traffic at all gets through, and I have to delete the route again. > Netstat -r gives me (no change after adding the above route): > > Routing tables > > Internet: > Destination Gateway Flags Refs Use Netif > Expire > default UGSc 13 137 en0 > localhost localhost UH 12 56901 lo0 > 169.254 link#4 UCS 0 0 en0 > 192.168.0 link#4 UCS 2 0 en0 > 0:5:5d:dc:33:3c UHLW 13 0 en0 > 765 > localhost UHS 0 47 lo0 > 0:50:e4:30:7a:71 UHLW 0 54 en0 > 324 > localhost UHS 0 0 lo0 > > I've only tried this in Windows before, so please bear with me if I > seem like a total newbie! > > Thanks for any help! > > /Robert Staflin > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message > > ============================================== KRS Consulting Robert Staflin Jenny Linds väg 75 Tel: +46 (18) 369425 S-756 50 UPPSALA Mobile: +46 (708) 369578 SWEDEN To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BDD9A576-E8E0-11D6-B088-00039304172A>
