Kevin Seguin wrote:
>
> Dan Cornilescu wrote:
>
> > Kevin Seguin wrote:
> > >
> > >
> > > actually, i only have one ethernet card, but i want to use it on two
> > > networks. is this even possible?
> > >
> > Yes, but surely not in the same time on two _physical_ networks
> > :)
> > Even if it's a combo card (i.e. it has 2 connectors), only one
> > can be active at a time.
> > I didn't hear about dual port cards.
> > It may be more convenient to get a second card and read the
> > mentioned howto.
> >
> > dan
> >
>
> i realize only one connection can be active at a time. i want to be able to
> change which network i am on, by deactivating one ethernet interface, and
> activating the other. this is what i'm having trouble getting to work. i
> could be wrong, but i think it has something to do with the default gateway.
Activating/deactivating would not be so complicated, "ifconfig
up/down".
The default route gives you a problem, as you can only have one
default route at a time.
However it can be done, using "route add/delete ...".
You might want to create a small script that does both things,
once you figured out the right commands (there are several
parameters for each command).
Another way may be possible, if the 2 networks run a routing
protocol, like RIP. You will run routed (or gated?), and you only
specify a default route towards the loopback. The machine will
act like a router.
Yet another solution to try may be linuxconf, which allows you to
create several machine profiles (e.g. home/office) with different
settings for each, and switch from one profile to another.
Not sure if you can do that on the fly, or you need to reboot,
I'm still a beginner with linuxconf.
Ah, and (possible?) another thing to try in order to avoid the
problem with kernel support for 2 ether interfaces (not trivial,
according to the traffic on the list).
Using insmod/rmmod with full parameters, (again from a script,
probably) carrefully load/unload the module corresponding to one
or the other interface card, so you'll always refer only to eth0.
You still need to bring the interfaces up/down, solve the default
route and possibly to restart networking daemons. I would try it
just for fun, though...
BTW, checking the routing info (including defaultroute): netstat
-rn
dan
>
> --
> PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
> http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
> To unsubscribe: mail [EMAIL PROTECTED] with
> "unsubscribe" as the Subject.
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject.