* Re: [LARTC] multiple MAC addresses from one network card
2001-04-06 22:03 [LARTC] multiple MAC addresses from one network card Alexey Marinichev
@ 2001-04-06 22:10 ` James A. Crippen
2001-04-06 22:16 ` Terry L. Ridder
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: James A. Crippen @ 2001-04-06 22:10 UTC (permalink / raw)
To: lartc
On Fri, 6 Apr 2001, Alexey Marinichev wrote:
> Hello,
>
> It is possible to get several interfaces assigned to one card, the
> simplest way is to use aliases, like:
> ifconfig eth0:0 <address>
>
> Is it possible to assign a different MAC address to an aliased
> interface? ifconfig eth0:0 hw ether <MAC> doesn't seem to work...
DON'T USE IFCONFIG AND fooN:M ALIASES IF YOU CAN HELP IT. Use the
iproute2 utility 'ip' and assign multiple addresses with
# ip address add <address> dev <device>
And you can add as many addresses as the kernel will let you (what's the
limit?). Make sure aliasing support is on in the kernel.
Honestly I'd avoid using route and ifconfig at all. Replace them
everywhere you can with 'ip'.
This doesn't answer your question, but I considered it a Public Service
Message. :)
'james
--
James A. Crippen <james@unlambda.com> ,-./-. Anchorage, Alaska,
Lambda Unlimited: Recursion 'R' Us | |/ | USA, 61.2069 N, 149.766 W,
Y = \f.(\x.f(xx)) (\x.f(xx)) | |\ | Earth, Sol System,
Y(F) = F(Y(F)) \_,-_/ Milky Way.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [LARTC] multiple MAC addresses from one network card
2001-04-06 22:03 [LARTC] multiple MAC addresses from one network card Alexey Marinichev
2001-04-06 22:10 ` James A. Crippen
@ 2001-04-06 22:16 ` Terry L. Ridder
2001-04-06 22:26 ` Alexey Marinichev
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Terry L. Ridder @ 2001-04-06 22:16 UTC (permalink / raw)
To: lartc
hello;
'mac' addresses are assigned to the manufactuerer of
each wired/wireless ethernet card. each ethernet device
must have their own unique 'mac' address. therefore,
it would be extremely unwise to have a card with
made-up 'mac' addresses. about the only way to guarantee
uniqueness would be to collect several dead ethernet
cards or pcmcia cards soley for the purpose of knowing
what their 'mac' address is and using those. it would
still be extremely difficult to convince any ethernet
card or pcmcia card to have more than one 'mac' address.
On Fri, 6 Apr 2001, Alexey Marinichev wrote:
alexey> Hello,
alexey>
alexey> It is possible to get several interfaces assigned to one card, the
alexey> simplest way is to use aliases, like:
alexey> ifconfig eth0:0 <address>
alexey>
alexey> Is it possible to assign a different MAC address to an aliased
alexey> interface? ifconfig eth0:0 hw ether <MAC> doesn't seem to work...
alexey>
alexey> Thanks,
alexey>
alexey> --Lyosha
alexey>
--
Terry L. Ridder
Blue Danube Software (Blaue Donau Software)
"We do not write software, we compose it."
digging deep, i feel my conscience burn
i need to know who and what i am
this hunger jolts me from complacency
rocks me, makes me meet myself
----kendall payne---closer to myself---
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [LARTC] multiple MAC addresses from one network card
2001-04-06 22:03 [LARTC] multiple MAC addresses from one network card Alexey Marinichev
2001-04-06 22:10 ` James A. Crippen
2001-04-06 22:16 ` Terry L. Ridder
@ 2001-04-06 22:26 ` Alexey Marinichev
2001-04-06 22:35 ` James A. Crippen
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Alexey Marinichev @ 2001-04-06 22:26 UTC (permalink / raw)
To: lartc
On Fri, Apr 06, 2001 at 02:10:00PM -0800, James A. Crippen wrote:
[...]
> DON'T USE IFCONFIG AND fooN:M ALIASES IF YOU CAN HELP IT.
[...]
Why? What exactly is the difference between using aliases from ifconfig
and from ip?
> Honestly I'd avoid using route and ifconfig at all. Replace them
> everywhere you can with 'ip'.
Why? Just curious. BSD uses ifconfig and route just fine, so does
SunOS.
--Lyosha
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [LARTC] multiple MAC addresses from one network card
2001-04-06 22:03 [LARTC] multiple MAC addresses from one network card Alexey Marinichev
` (2 preceding siblings ...)
2001-04-06 22:26 ` Alexey Marinichev
@ 2001-04-06 22:35 ` James A. Crippen
2001-04-06 22:43 ` James A. Crippen
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: James A. Crippen @ 2001-04-06 22:35 UTC (permalink / raw)
To: lartc
On Fri, 6 Apr 2001, Terry L. Ridder wrote:
> hello;
>
> 'mac' addresses are assigned to the manufactuerer of
> each wired/wireless ethernet card. each ethernet device
> must have their own unique 'mac' address. therefore,
> it would be extremely unwise to have a card with
> made-up 'mac' addresses.
Not really, you just need to make sure that no other cards on your network
have the same address. This isn't terribly difficult to check, and a good
network administrator should have a database of all MAC address to
hardware to IP address mappings anyway.
I have very occasionally encountered two cards from a manufacturer with
the same address. This has happened only once or twice in my life, but it
does happen, mostly because there are only so many bits for the
manufacturer to play with, usually only 32 or 24 of the whole 48 bit
address. This is why the manufacturer usually includes a DOS utility
(for PC ethernet cards anyway) on their driver disk to allow changing the
address in a permanent way.
> about the only way to guarantee
> uniqueness would be to collect several dead ethernet
> cards or pcmcia cards soley for the purpose of knowing
> what their 'mac' address is and using those.
Or just pick a random one from the 'ethers.txt' list or some similar
compendium of address range -> manufacturer assignments. Pick one from a
manufacturer that you've never heard of, like Symbolics, and you have a
very good chance of never having a collision with one of your other
cards. In fact, the probability of having an address collision is fairly
low in any case.
IIRC there are also some explicitly unallocated ranges, similar to the
IPv4 addresses like 10.0.0.0/8.
You can set the mac address of an ethernet card under Linux both
permanently and temporarily (eg, until next reboot). Donald Becker has
tools somewhere to permanently modify a MAC address, and there are also
tools available (on Freshmeat.net for instance) to *temporarily* change
the MAC address of a card. You can put such a program into your init
scripts to have it do this at every boot. A friend of mine has done this
with a firewall for his home network. His ISP is very slow to update
their DHCP static address mappings so he just worked around it by
temporarily changing the MAC addresses on his hardware until they finally
updated their DHCP servers. This worked beautifully.
Donald Becker for one explicitly mentions with his utilities that
*permanently* changing the MAC address of a card is probably not a good
idea. And that it doesn't always work right, and if it doesn't then you
can be left with nothing more than a worthless pile of silicon for your
efforts.
There's nothing really wrong with assigning your own MAC addresses, it's
just a pain to keep track of. Very rarely will you encounter problems
with doing so, like collisions between multiple cards.
Your network should have sufficient separation between hosts anyway, such
that address collisions never have a chance to tempt the probability of
occuring.
> it would
> still be extremely difficult to convince any ethernet
> card or pcmcia card to have more than one 'mac' address.
There is AFAIK no way to assign multiple concurrent addresses to a
device. Does anyone know otherwise? Is it even theoretically
possible? I don't think so the way most cards are designed.
Why would you want to anyway?
'james
--
James A. Crippen <james@unlambda.com> ,-./-. Anchorage, Alaska,
Lambda Unlimited: Recursion 'R' Us | |/ | USA, 61.2069 N, 149.766 W,
Y = \f.(\x.f(xx)) (\x.f(xx)) | |\ | Earth, Sol System,
Y(F) = F(Y(F)) \_,-_/ Milky Way.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [LARTC] multiple MAC addresses from one network card
2001-04-06 22:03 [LARTC] multiple MAC addresses from one network card Alexey Marinichev
` (3 preceding siblings ...)
2001-04-06 22:35 ` James A. Crippen
@ 2001-04-06 22:43 ` James A. Crippen
2001-04-06 22:45 ` Alexey Marinichev
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: James A. Crippen @ 2001-04-06 22:43 UTC (permalink / raw)
To: lartc
On Fri, 6 Apr 2001, Alexey Marinichev wrote:
> On Fri, Apr 06, 2001 at 02:10:00PM -0800, James A. Crippen wrote:
> [...]
> > DON'T USE IFCONFIG AND fooN:M ALIASES IF YOU CAN HELP IT.
> [...]
>
> Why? What exactly is the difference between using aliases from ifconfig
> and from ip?
> Why? Just curious. BSD uses ifconfig and route just fine, so does
> SunOS.
Right, and the Linux version used to work perfectly well too. But there
have been so many changes to the underlying network subsystem (under
kernel 2.4 particularly) that ifconfig and route aren't totally in sync
with the system. Aliases are a good example. They don't really exist
anymore as network devices. Instead there's a clear separation now
between the hardware device and its driver and the network stack and
addresses assigned to a device. The old ifconfig way was to create fake
devices like eth0:0 to hang other IP addresses on. The new way that the
'ip' tool works is to assign an arbitrary number of addresses to *one*
real device. If you create an alias with ifconfig as an eth0:0 type of
device then you can see it attached to the real device using 'ip'.
However if you allocate a number of addresses and attach them to eth0,
say, then you won't see any except the first with ifconfig. This is
because ifconfig doesn't understand the new alias mechanism. Then you
start to get out of sync, and you have the problem of your device going
down when you try to remove an alias. It's just not good to use for
anything more than the old single-address, single-device metaphor.
Anything more complicated is better done with 'ip'. And if you've learned
how to use 'ip' you'll find that it's so convenient that you want to just
throw ifconfig and route away.
'james
--
James A. Crippen <james@unlambda.com> ,-./-. Anchorage, Alaska,
Lambda Unlimited: Recursion 'R' Us | |/ | USA, 61.2069 N, 149.766 W,
Y = \f.(\x.f(xx)) (\x.f(xx)) | |\ | Earth, Sol System,
Y(F) = F(Y(F)) \_,-_/ Milky Way.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [LARTC] multiple MAC addresses from one network card
2001-04-06 22:03 [LARTC] multiple MAC addresses from one network card Alexey Marinichev
` (4 preceding siblings ...)
2001-04-06 22:43 ` James A. Crippen
@ 2001-04-06 22:45 ` Alexey Marinichev
2001-04-06 22:53 ` Terry L. Ridder
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Alexey Marinichev @ 2001-04-06 22:45 UTC (permalink / raw)
To: lartc
On Fri, Apr 06, 2001 at 02:35:28PM -0800, James A. Crippen wrote:
[...]
> > it would
> > still be extremely difficult to convince any ethernet
> > card or pcmcia card to have more than one 'mac' address.
>
> There is AFAIK no way to assign multiple concurrent addresses to a
> device. Does anyone know otherwise? Is it even theoretically
> possible? I don't think so the way most cards are designed.
Vmware seems to be able to do it. They assign different ethernet
address to a network card in the virtual machine. It might as well
involve putting the card in promiscuous mode and filtering out packets
that do not have addresses we're interested in.
--Lyosha
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [LARTC] multiple MAC addresses from one network card
2001-04-06 22:03 [LARTC] multiple MAC addresses from one network card Alexey Marinichev
` (5 preceding siblings ...)
2001-04-06 22:45 ` Alexey Marinichev
@ 2001-04-06 22:53 ` Terry L. Ridder
2001-04-06 22:59 ` James A. Crippen
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Terry L. Ridder @ 2001-04-06 22:53 UTC (permalink / raw)
To: lartc
hello;
would you know if anyone has all ready hacked
the /etc/sysconfig/network-scripts to use 'ip'
instead of 'ifconfig' and 'route'?
On Fri, 6 Apr 2001, James A. Crippen wrote:
<major snip>
james>
james> how to use 'ip' you'll find that it's so convenient that you want to just
james> throw ifconfig and route away.
james>
james> 'james
james>
--
Terry L. Ridder
digging deep, i feel my conscience burn
i need to know who and what i am
this hunger jolts me from complacency
rocks me, makes me meet myself
----kendall payne---closer to myself---
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [LARTC] multiple MAC addresses from one network card
2001-04-06 22:03 [LARTC] multiple MAC addresses from one network card Alexey Marinichev
` (6 preceding siblings ...)
2001-04-06 22:53 ` Terry L. Ridder
@ 2001-04-06 22:59 ` James A. Crippen
2001-04-06 23:12 ` Breen Mullins
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: James A. Crippen @ 2001-04-06 22:59 UTC (permalink / raw)
To: lartc
On Fri, 6 Apr 2001, Terry L. Ridder wrote:
> hello;
>
> would you know if anyone has all ready hacked
> the /etc/sysconfig/network-scripts to use 'ip'
> instead of 'ifconfig' and 'route'?
For Dead Hat? No clue. I use 6.2 but then again I also don't use aliases
if at all possible and if I do need one I do it myself by hand.
That'd be a good project to do, though. I'd love a version of the scripts
for 6.2 (I won't use 7 for obvious reasons).
If I ever get irritated enough by their boot scripts I'd rewrite 'em
meself. But I just don't care yet. They work well enough for now, since
I don't do anything magic, and don't have any funny routing to do on my
workstation (my routers all use handmade stuff).
Come to think of it though, in the next few months I'll be setting up some
tunneling from my workstation, so I'll probably need to. I'll let the
list know when I've rewritten them.
'james
--
James A. Crippen <james@unlambda.com> ,-./-. Anchorage, Alaska,
Lambda Unlimited: Recursion 'R' Us | |/ | USA, 61.2069 N, 149.766 W,
Y = \f.(\x.f(xx)) (\x.f(xx)) | |\ | Earth, Sol System,
Y(F) = F(Y(F)) \_,-_/ Milky Way.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [LARTC] multiple MAC addresses from one network card
2001-04-06 22:03 [LARTC] multiple MAC addresses from one network card Alexey Marinichev
` (7 preceding siblings ...)
2001-04-06 22:59 ` James A. Crippen
@ 2001-04-06 23:12 ` Breen Mullins
2001-04-06 23:48 ` Guy Van Den Bergh
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Breen Mullins @ 2001-04-06 23:12 UTC (permalink / raw)
To: lartc
On Fri, 6 Apr 2001, James A. Crippen wrote:
> I have very occasionally encountered two cards from a manufacturer with
> the same address. This has happened only once or twice in my life, but it
> does happen, mostly because there are only so many bits for the
> manufacturer to play with, usually only 32 or 24 of the whole 48 bit
> address.
It's 24 bits for the manufacturer to play with. The first three octets are
assigned by IEEE and the manufacturer assigns the other three.
Duplications happen sometimes, mostly because of a manufacturing error,
but occasionally because the manufacturer neglected to order a new address
range in time from IEEE.
If you need to assign extra MACs to a card, you should set the "locally
assigned" bit. It's the second bit on the wire and in canonical form
that's the 0x02 bit of the first octet, so if the real MAC is of the form
00:00:0c:xx:xx:xx you could assign 02:00:0c:xx:xx:xx with no fear of a
collision.
That's the theory, anyway. I've never had occasion to try it.
Breen
--
Breen Mullins
San Mateo, Calif.
<mailto:bmullins@pacbell.net>
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [LARTC] multiple MAC addresses from one network card
2001-04-06 22:03 [LARTC] multiple MAC addresses from one network card Alexey Marinichev
` (8 preceding siblings ...)
2001-04-06 23:12 ` Breen Mullins
@ 2001-04-06 23:48 ` Guy Van Den Bergh
2001-04-06 23:50 ` James A. Crippen
2001-04-07 0:24 ` Ingram Leedy
11 siblings, 0 replies; 13+ messages in thread
From: Guy Van Den Bergh @ 2001-04-06 23:48 UTC (permalink / raw)
To: lartc
>
> There is AFAIK no way to assign multiple concurrent addresses to a
> device. Does anyone know otherwise? Is it even theoretically
> possible? I don't think so the way most cards are designed.
I don't know of any system to do this either, but I think it is theoretically possible.
If you can get your NIC to listen to *any* destination MAC address (promiscuous mode), why would it be
impossible to let it listen to two different destination MAC addresses.
But this remains theory. I don't know of any card that can do this...
>
> Why would you want to anyway?
I think such a feature might be useful if you want to do 802.1q vlan trunking,
but I'm not sure about it. The applications of such a feature will be rare anyway...
Guy
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [LARTC] multiple MAC addresses from one network card
2001-04-06 22:03 [LARTC] multiple MAC addresses from one network card Alexey Marinichev
` (9 preceding siblings ...)
2001-04-06 23:48 ` Guy Van Den Bergh
@ 2001-04-06 23:50 ` James A. Crippen
2001-04-07 0:24 ` Ingram Leedy
11 siblings, 0 replies; 13+ messages in thread
From: James A. Crippen @ 2001-04-06 23:50 UTC (permalink / raw)
To: lartc
On Sat, 7 Apr 2001, Guy Van Den Bergh wrote:
> >
> > There is AFAIK no way to assign multiple concurrent addresses to a
> > device. Does anyone know otherwise? Is it even theoretically
> > possible? I don't think so the way most cards are designed.
>
> I don't know of any system to do this either, but I think it is theoretically possible.
> If you can get your NIC to listen to *any* destination MAC address (promiscuous mode), why would it be
> impossible to let it listen to two different destination MAC addresses.
> But this remains theory. I don't know of any card that can do this...
That's an idea for a kernel hack where you put the card into promiscuous
mode and then filter from there for only certain addresses. But that
would be a heavyhanded hack and I can see it chewing up quite a bit of
resources on a busy network.
'james
--
James A. Crippen <james@unlambda.com> ,-./-. Anchorage, Alaska,
Lambda Unlimited: Recursion 'R' Us | |/ | USA, 61.2069 N, 149.766 W,
Y = \f.(\x.f(xx)) (\x.f(xx)) | |\ | Earth, Sol System,
Y(F) = F(Y(F)) \_,-_/ Milky Way.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
^ permalink raw reply [flat|nested] 13+ messages in thread* RE: [LARTC] multiple MAC addresses from one network card
2001-04-06 22:03 [LARTC] multiple MAC addresses from one network card Alexey Marinichev
` (10 preceding siblings ...)
2001-04-06 23:50 ` James A. Crippen
@ 2001-04-07 0:24 ` Ingram Leedy
11 siblings, 0 replies; 13+ messages in thread
From: Ingram Leedy @ 2001-04-07 0:24 UTC (permalink / raw)
To: lartc
I havent tried or figured the way to do this with iproute2, but in the non
iproute2 way you can change the mac address by:
> ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
-- Ingram Leedy
-----Original Message-----
From: lartc-admin@mailman.ds9a.nl [mailto:lartc-admin@mailman.ds9a.nl]On
Behalf Of James A. Crippen
Sent: Friday, April 06, 2001 6:10 PM
To: Alexey Marinichev
Cc: lartc@mailman.ds9a.nl
Subject: Re: [LARTC] multiple MAC addresses from one network card
On Fri, 6 Apr 2001, Alexey Marinichev wrote:
> Hello,
>
> It is possible to get several interfaces assigned to one card, the
> simplest way is to use aliases, like:
> ifconfig eth0:0 <address>
>
> Is it possible to assign a different MAC address to an aliased
> interface? ifconfig eth0:0 hw ether <MAC> doesn't seem to work...
DON'T USE IFCONFIG AND fooN:M ALIASES IF YOU CAN HELP IT. Use the
iproute2 utility 'ip' and assign multiple addresses with
# ip address add <address> dev <device>
And you can add as many addresses as the kernel will let you (what's the
limit?). Make sure aliasing support is on in the kernel.
Honestly I'd avoid using route and ifconfig at all. Replace them
everywhere you can with 'ip'.
This doesn't answer your question, but I considered it a Public Service
Message. :)
'james
--
James A. Crippen <james@unlambda.com> ,-./-. Anchorage, Alaska,
Lambda Unlimited: Recursion 'R' Us | |/ | USA, 61.2069 N, 149.766 W,
Y = \f.(\x.f(xx)) (\x.f(xx)) | |\ | Earth, Sol System,
Y(F) = F(Y(F)) \_,-_/ Milky Way.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO:
http://ds9a.nl/2.4Routing/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
^ permalink raw reply [flat|nested] 13+ messages in thread