Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 02 Mar 2001 14:08:30 -0800
From:      richard childers <fscked@pacbell.net>
To:        David Dooley <dpd@raffles-it.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Multipule Lan Configurations
Message-ID:  <3AA019DE.911ABB5F@pacbell.net>
References:  <200103020203.f2223Ip03546@dribble.lan.raffles-it.com>

next in thread | previous in thread | raw e-mail | index | archive | help
"I am wondering if it is at all possible to have multipule lan configurations
on the same laptop, depending on what card is inserted in which pcmcia slot."


You should not need to have multiple network cards unless you want to.

(You can do it, though; and there are some times when it is desirable. Such as
testing the efficiency of a firewall, or just watching to see who's knocking.)

If you read the man page for ifconfig(8) you will see details describing how to
use the 'alias' keyword to use one physical network interface to handle more than
one logical address.

I haven't tested 4.2's abilities in this area too well; I was testing 4.0's
abilities in this area but my work was interrupted by a death in the family and
I'm just getting back in the saddle now.

Your best bet is to read the man page for ifconfig(8) a few times, and then look
at the examples in /etc/defaults/rc.conf and /etc/rc.conf for examples of how it
is done. Grep for 'ifconfig' and 'alias'.

You may also find it useful to experiment by hand, with ifconfig(8), to be sure
you understand what the changes you are making, are supposed to be like; use
'ifconfig -a' to examine the consequences of your experiments, and reboot the
system to correct any uncorrectable mistakes. Of course, do not change
/etc/defaults/rc.conf or /etc/rc.conf until you are sure you know what you are
doing; and be careful to comment out any functionality you may need to restore in
the future, along with comments noting when you commented it out ... and why.

Note that manually changing your network interface's configuration will not
propagate into the routing table, and that this will also need to be changed
manually; but I believe that routing tables are automatically modified during
boot, so that aliases you add will work without further changes. (For additional
information read /etc/rc.network, for starters. :-)

Note that there is also a similar aliasing mechanism available in the DHCP
configuration file, if you are using DHCP, and that this may be preferable to the
above-described mechanism under some circumstances.

The interactions between DHCP client software and pccardd(8) are also important to
take into consequence; but that is probably outside the scope of this reply.


Hope this is helpful ...


-- richard


David Dooley wrote:

> Hi,
>
> I am wondering if it is at all possible to have multipule lan configurations
> on the same laptop, depending on what card is inserted in which pcmcia slot.
>
> I have a Lucent WaveLan card that I would like to configure for home in the
> top slot - on a residential gateway, if inserted in the bottom slot
> reconfigure for an accesspoint, both DHCP. If I insert a 3com 16 bit card yat
> another configuration but this time static network address and such.
>
> I figure that this will require some hacking of the network setup scripts, but
> I am not sure what would be the best way to approach, or even if it is
> possible to get the slot a card is inserted into. I have been looking at
> rc.network, pccard.conf and start_if.wi0 but I cannot see how I would get the
> slot information as nothing appears to use this information.
>
> I want to do this so I can take my laptop from home to work and to friends
> with out having to spend hours reconfigureing for each location.
>
> Thanks for your time.
>
> Please feel free to tell me that what I want to do is stupid, i just figured
> it would make my life simpler once it was configured.
>
> David.
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

--
Richard A. Childers
Senor UNIX Administrator
fscked@pacbell.net (email)
203.556.8471 (voice/msgs)

# Providing administrative expertise (not 'damage control') since 1986.
# PGP fingerprint: 7EFF 164A E878 7B04 8E9F  32B6 72C2 D8A2 582C 4AFA



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AA019DE.911ABB5F>