chipc_0517@yahoo.com (Chip C) wrote in message news:<93ce4766.0406090838.360486d@posting.google.c om>...
> openbsd@hebro.de (helge brodersen) wrote in message news:<c998c0a4.0406072353.49c6c675@posting.google. com>...
> > > > Hello,
> > > >
> > > > i have 2 NICs in my openBSD 3.5 machine. They are named ne3 and xl0.
> > > > As i seet it the interfaces are handled alphabetically, therefor the
> > > > ne3 is handled by netstart first and the default route is set on this
> > > > interface. But i want it on the other IF, a 3com card with lower
> > > > processor load on data transmission. The ne3 is for spare and special
> > > > operations, and i don't want to open the machine again.
> > > > Is there a more elegant way to set the default route on the second
> > > > NIC,than deleting and setting in rc.local, for example.
> > > > Later on this machine will connect some clients to the internet
> > > > through dial-in with PPP, do i have to consider this at this moment or
> > > > is there no influence between PPP, TCP/IP and setting the routes.
> > > > The clients have all static IP-adresses.
> > > >
> > > > For my excuse:
> > > > i'm new on openBSD, but coming from windows(TM) and Linux, openBSD
> > > > serves much much more clearness in all aspects. i like it.
> > > >
> > > > TIA,
> > > >
> > > > helge
> > >
> > > Are both these interfaces assigned addresses on the same subnet?
> > >
> > > Most commonly (to avoid saying "normally") each interface is assigned
> > > an address which, in the context of its netmask, is on a unique
> > > subnet. Then you indicate your default router in /etc/mygate and the
> > > kernel figures out which interface to use to get to it.
> > >
> > > If for some reason you want the cards addressed in the same subnet,
> > > then I think you'll find it's difficult to control which interface is
> > > used for any traffic. Sometimes people want to restrict a
> > > high-performance interface to something (nfs, backups, etc); this can
> > > be done by artificially restricting the netmask, but you usually need
> > > to configure the routers involved to be in on the game, by which time
> > > you may as well have defined a new subnet. If the ne3 is spare or for
> > > testing, why not keep it offline or assign it a private address?
> > >
> > > I find it helpful to remember as an underlying principle that Unix
> > > (BSD, Linux) routing logic is based on addresses, not on interfaces.
> > > IE, the kernel first decides what *remote gateway* a datagram needs to
> > > be sent via, and then the choice of interface follows directly (and
> > > without a lot of room for options) based on addresses and netmasks.
> > > When I last worked in non-trivial Windows networks, which was with NT
> > > 4.0, Windows seemed to think about routing differently (to avoid
> > > saying "horrifically broken").
> > >
> > > Chip C
> > > Toronto
> >
> >
> > You guessed right. I planned to put them in the same subnet. And your
> > answer is very worthful for me to understand openBSDs network
> > principles.
> > Keeping the ne3 offline only moves the problem in the future.
> > I will put the ne3 in another subnet. Does that solve the problem that
> > the ne3 is the first to be initialized and gets the default route?
> > Where do i set the subnet mask all my other machines belong to, so
> > that all communication is done via xl0?
> >
> > Helge,
> > Berlin
>
> Pleased to be of help.
>
> The order of initialization has nothing to do with default route; the
> default route is set in /etc/mygate (which contains the address of the
> remote gateway/router; it does not directly name an interface).
>
> Netmasks are set on each machine (unless you're using DHCP, in which
> case the netmask is sent with the address). In OpenBSD the netmask is
> set in /etc/hostname.<ifname>; see the man page on "hostname.if".
> Other OSes have their own way. Of course the router/gateway needs to
> have it set too. Like the IP address, it is not a property that
> belongs to the machine as a whole; rather, it is set on each interface
> -- or more precisely, it is set for each IP address, as you may have
> multiple addresses per interface. Regardless of how it's set,
> "ifconfig" on all (?) Unix variants will show the netmask with each
> address.
>
> All machines in the subnet should have the same netmask set and you
> should not have overlapping subnets; ie, realize that
> 10.0.0.0/255.255.0.0 and 10.0.1.0/255.255.255.0 overlap (the latter is
> wholly included in the former). This might be a fun experiment but if
> it happens by accident it's likely to cause great confusion.
>
> Chip C
> Toronto
Thanks again for the detailed explanations.
I changed the IP-address of the ne3 to another subnet. And the subnet
mask has already been restricted enough to seperate them. Now that
point works fine. Pinging other machines in my network is done through
xl0 as i wanted it. SSH for example, also. I don't think there will
be any more errors in that direction.
There is no file /etc/mygate but there is one default route set. It
must be set by the system automatically, and that causes the trouble
that leads to this thread. In my researches i find out that the
initialization is done with hostname.if sorted alphabetically.
I didn't want to use /etc/mygate because i expect some trouble when
installing the Modem to connect to the internet (which in turn gets me
into trouble, because the modem (actually two of them one internal as
tty02 and one external on tty0[01]) does not respond on any efforts so
far).
Just for my interest: What is this link#n stuff? Has it something to
do with the different connectors on my NIC (BNC, AUI, TP)? (Not
important, please answer only, when you have some spare time, i'd like
to save your time for my important questions ((-: ).
Helge,
Berlin