[Xorp-hackers] xorp svn VRRP centos
Eric S. Johnson
esj at cs.fiu.edu
Thu Feb 25 09:46:17 PST 2010
esj at cs.fiu.edu said:
> With that patch, vrrp *almost* works. It does the right thing on an
> interface that is in backup/standby mode (nothing). When an
> interface becomes master for the virtual address, it changes the
> MAC address correctly to the VRRP mac. But it does not add the layer
> 3 (IP) virtual address to the interface.
> It seems to be designed such that a fake arp daemonish section of
> code would respond to arp requests on behalf of the virtual IP. That
> code has some errors I have found (like throwing away frames that
> are smaller than the "minimum ethernet frame size" (which doesn't
> exist for full duplex ethernet), but so far even correcting that
> hasn't made it work. I am still working through that code.
Ok, so it turns out the fake arp daemon code is working just
fine. After a router becomes master on an interface it
correctly receives and responds to ARP requests for the virtual
IP address. (with the patch below).
The problem now seems to be simply that it does not add
the virtual Layer 3 address to the interface.
In fact, a manual
ip addr add x.x.x.x/y dev xxx
makes everything work.
I am not seeing where vrrp/vrrp.cc even tries to add the
IP to the interface in
void
Vrrp::become_master()
{
_state = MASTER;
_vif.add_mac(_source_mac);
send_advertisement();
send_arps();
setup_timers();
_arpd.start();
}
E
--- xorp-svn-20100217.orig/fea/io_link.cc 2010-02-17 10:25:29.000000000 -0500
+++ xorp-svn-20100217/fea/io_link.cc 2010-02-25 11:12:32.000000000 -0500
@@ -105,16 +105,17 @@
const uint8_t* ptr = packet;
// Test the received packet size
- if (packet_size < ETHERNET_MIN_FRAME_SIZE) {
- XLOG_WARNING("Received packet on interface %s vif %s: "
- "packet is too short "
- "(captured %u expecting at least %u octets)",
- if_name().c_str(),
- vif_name().c_str(),
- XORP_UINT_CAST(packet_size),
- XORP_UINT_CAST(ETHERNET_MIN_FRAME_SIZE));
- return; // Error
- }
+// ESJ um no... this is the 21st century after all :)
+// if (packet_size < ETHERNET_MIN_FRAME_SIZE) {
+// XLOG_WARNING("Received packet on interface %s vif %s: "
+// "packet is too short "
+// "(captured %u expecting at least %u octets)",
+// if_name().c_str(),
+// vif_name().c_str(),
+// XORP_UINT_CAST(packet_size),
+// XORP_UINT_CAST(ETHERNET_MIN_FRAME_SIZE));
+// return; // Error
+// }
// Extract the MAC destination and source address
dst_address.copy_in(ptr);
More information about the Xorp-hackers
mailing list