[wplug] Duplicate ETH0, different hardware address

Brandon Poyner bpoyner at gmail.com
Tue Feb 27 10:43:26 EST 2007


On 2/26/07, Brian A. Seklecki <lavalamp at spiritual-machines.org> wrote:
> On Mon, 26 Feb 2007, scoob8000 wrote:
>
> > I've used ifconfig eth0:0 to add a second IP address to the interface
> > before, but is
> > it possible to give the copy of the interface a different hardware address?
>
> That would be a kernel hack.  You'd have to check the L3 source address to
> determine the L2 transmit source address, and vice versa.

It doesn't seem to require a kernel hack...

[box1] # ifconfig eth0:3 192.168.0.99 netmask 255.255.255.0 hw ether
00:00:01:00:00:01
[box1] # ifconfig eth0:3
eth0:3    Link encap:Ethernet  HWaddr 00:00:01:00:00:01
          inet addr:192.168.0.99  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

[box2] # ping 192.168.0.99
PING 192.168.0.99 (192.168.0.99) 56(84) bytes of data.
64 bytes from 192.168.0.99: icmp_seq=0 ttl=64 time=3.01 ms
64 bytes from 192.168.0.99: icmp_seq=1 ttl=64 time=0.267 ms

--- 192.168.0.99 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.267/1.643/3.019/1.376 ms, pipe 2
[box2] # arp -an | grep 192.168.0.99
? (192.168.0.99) at 00:00:01:00:00:01 [ether] on eth0

-- 
Brandon
Kiva.org - Make a small loan, Make a big difference


More information about the wplug mailing list