Subject: Re: Interface specification in route(8)
To: None <lucio@proxima.alt.za>
From: Guenther Grau <Guenther.Grau@bk.bosch.de>
List: tech-net
Date: 02/22/1999 20:37:58
Hi,
Lucio de Re wrote:
> # netstat -in
> Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
> ne1 1500 <Link> 00:80:ad:af:a6:c7 84263 0 693 0 0
> ne1 1500 192.168.30.16 192.168.30.22 84263 0 693 0 0
> lo0 32976 <Link> 4420 0 4420 0 0
> lo0 32976 127 127.0.0.1 4420 0 4420 0 0
> ppp0 1500 <Link> 12758 0 12568 0 0
> ppp0 1500 192.168.30.16 192.168.30.22 12758 0 12568 0 0
> ppp1* 1500 <Link> 0 0 0 0 0
> ppp2* 1500 <Link> 0 0 0 0 0
> ppp3* 1500 <Link> 0 0 0 0 0
> sl0* 296 <Link> 0 0 0 0 0
> sl1* 296 <Link> 0 0 0 0 0
> sl2* 296 <Link> 0 0 0 0 0
> sl3* 296 <Link> 0 0 0 0 0
>
> and I'm trying to add a default route via ne1, the gateway being
> 192.168.30.17.
IP-routing is based on the network part of an ip-address. As you have
two
interfaces which are in the same ip-network, I doubt routing will work
properly. I see two easy solutions to you problem.
1) Use a different IP-net on the ppp-link. You can use NAT on the
NetBSD machine to translate incoming ppp-packets to have a proper
IP address if you need to.
2) Create a small subnet in the 192.168.30 net, which contains only
two IP-addresses and use these for the two hosts doing ppp.
> And while I'm asking, where could I find the updated traceroute(8) that
> automatically selects the most sensible interface rather than the first
> one?
traceroute accepts an interface on the commandline. man traceroute.
> PS: seems I'm having trouble resubscribing to tech-net, so if you see
> this you might have to reply off the list to get to me :-(
What's the problem? You can either do it via email to
majordomo@netbsd.org with subsbribe tech-net in the BODY
of the mail or just go to www.netbsd.org and click your
way trough to the mailing lists. There you'll find a
subscribe button.
Guenther