Howdy,
I want to set up a testbed with traffic from many different unique MAC addresses --
ideally on the order of 2000, and I'd like to do this with a minimal number of
machines and interface cards.
My first thought was to set up virtual interfaces and give them MAC addresses via
ifconfig:
ifconfig eth0 down
ifconfig eth0:1 hw ether 2:0:a:1:0:1
ifconfig eth0:1 10.1.0.1 up
ifconfig eth0:2 hw ether 2:0:a:1:0:2
ifconfig eth0:2 10.1.0.2 up
ifconfig eth0 up
However, 'ifconfig -a' shows eth0, eth0:1 and eth0:2 all with the same MAC address,
see below. I was trying to set them to unique addresses above, but it apparently sets
the MAC address for all virtual interfaces on the interface.
What am I missing? Should this work? Does it matter which NIC I use? (I thought this
was done in the kernel). I'm running kernel 2.2.12 (from redhat 6.1).
My thought was that I could bind to each of the various IP addresses and then a send
would use the corresponding MAC.
One other question, what is the limit on number of virtual interfaces per interface?
I saw a note stating 256 for 2.0 kernels -- is that still correct?
thanks,
--mike <[EMAIL PROTECTED]>
Ifconfig -a output after the above configs:
eth0 Link encap:Ethernet HWaddr 02:00:0A:01:00:02
inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:314146 errors:0 dropped:0 overruns:0 frame:0
TX packets:341726 errors:0 dropped:0 overruns:0 carrier:0
collisions:6579 txqueuelen:100
Interrupt:11 Base address:0xe400
eth0:1 Link encap:Ethernet HWaddr 02:00:0A:01:00:02
inet addr:10.1.0.1 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:11 Base address:0xe400
eth0:2 Link encap:Ethernet HWaddr 02:00:0A:01:00:02
inet addr:10.1.0.2 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:11 Base address:0xe400
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]