Skip to contentSkip to conversation

VRRP related

DISCUSSION [email protected] 3 participants 3 messages Apr 16, 2001

lore
Share & tools
lore
#0 lore raw

Hi,
I am trying to put virtual mac address at the place of physical mac address , for that I have overwrite source hardware address with virtual address.Now when I try to ping to this machine with some other machine.It says request time out.While checking arp -a , gives me virtual mac address in ARP-Table instead of physical mac address.I want it should give response to ping also.what I can do????

thanks

#1 lore raw

More to the topic list for future questions of this type is [email protected] (or [email protected] -- real DEVELOPMENT talk goes there), but do read on.

Quoted 7 lines · On Mon, Apr 16, 2001 at 03:06:44PM +0100, [email protected] wrote:

Hi,
I am trying to put virtual mac address at the place of physical mac address , for that I have overwrite source hardware address with virtual address.Now when I try to ping to this machine with some other machine.It says request time out.While checking arp -a , gives me virtual mac address in ARP-Table instead of physical mac address.I want it should give response to ping also.what I can do????

You will, probably, need to run the VRRPed interface port in PROMISCUOUS mode, or use multicast address for the MAC- address, and process reception of that correctly.

There probably are more problems at using the multicast MAC address, than turning the interface into promiscuous. (At least the Linux packet reception path treats MC MAC
destined packets specially.)

ARP request gets in because it is MAC-level broadcast.

Quoted 1 line

thanks

/Matti Aarnio

#2 lore raw
In reply to [email protected]
Quoted 8 lines · On Mon, 16 Apr 2001 15:06:44 +0100, [email protected] wrote:

Hi,
I am trying to put virtual mac address at the place of physical mac address , for that I have overwrite source hardware address with virtual address.Now when I try to ping to this machine with some other machine.It says request time out.While checking arp -a , gives me virtual mac address in ARP-Table instead of physical mac address.I want it should give response to ping also.what I can do????

1. Get a card that accepts non-multicast MAC addresses in its hardware filter. eepro100, tulip, starfire will do. 3c59x won't (well newer cards have the capability, but the driver doesn't support it).

2. Apply the attached patch and enable "Ethernet Virtual MAC support".

3. Tell the card about your VMAC using ipmaddr.

The patch slows down the fast receive patch, I know, but I don't see a way around it. It's against 2.4.recent, I haven't looked at 2.2.

Ion

Signature · 38 lines
  It is better to keep your mouth shut and be thought a fool,
            than to open it and remove all doubt.
-----------------------
--- linux-2.4/net/ethernet/eth.c.old	Tue Nov 14 20:18:52 2000
+++ linux-2.4/net/ethernet/eth.c	Tue Nov 14 20:30:45 2000
@@ -203,8 +203,21 @@
 	 
 	else if(1 /*dev->flags&IFF_PROMISC*/)
 	{
-		if(memcmp(eth->h_dest,dev->dev_addr, ETH_ALEN))
+#ifdef CONFIG_NET_VMAC
+		if (memcmp(eth->h_dest,dev->dev_addr, ETH_ALEN)) {
+			struct dev_mc_list *mc_addr = dev->mc_list;
+			while (mc_addr) {
+				if (memcmp(mc_addr->dmi_addr, dev->dev_addr, ETH_ALEN))
+					goto loose_local;
+				mc_addr = mc_addr->next;
+			}
 			skb->pkt_type=PACKET_OTHERHOST;
+		loose_local:
+		}
+#else  /* not CONFIG_NET_VMAC */
+		if (memcmp(eth->h_dest,dev->dev_addr, ETH_ALEN))
+			skb->pkt_type=PACKET_OTHERHOST;
+#endif /* not CONFIG_NET_VMAC */
 	}
 	
 	if (ntohs(eth->h_proto) >= 1536)
--- linux-2.4/net/Config.in.old	Tue Nov 14 20:29:37 2000
+++ linux-2.4/net/Config.in	Tue Nov 14 20:30:31 2000
@@ -64,6 +64,7 @@
    tristate 'LAPB Data Link Driver (EXPERIMENTAL)' CONFIG_LAPB
    bool '802.2 LLC (EXPERIMENTAL)' CONFIG_LLC
    bool 'Frame Diverter (EXPERIMENTAL)' CONFIG_NET_DIVERT
+   bool 'Ethernet Virtual MAC support (EXPERIMENTAL)' CONFIG_NET_VMAC
 #   if [ "$CONFIG_LLC" = "y" ]; then
 #      bool '  Netbeui (EXPERIMENTAL)' CONFIG_NETBEUI
 #   fi