Code Monkey home page Code Monkey logo

Comments (2)

acassen avatar acassen commented on May 13, 2024

Unicast code rely on your network configuration nothing exotic in here. To make sure routing path between your 2 hosts is working investigate with netcat or other tools.

On the other hand you may want to bind your traffic to a specific IP address as source address. if so use 'mcast_src_ip', in some routings env it can be usefull to traverse firewalls.

Regs,
Alexandre

from keepalived.

gudmundur avatar gudmundur commented on May 13, 2024

I just tried the mcast_src_ip with no luck either. I have keepalived running on two hosts 10.0.0.134 and 10.0.1.202 with the following configuration.

vrrp_instance VI_1 {
  interface eth0
  state BACKUP
  virtual_router_id 10
  priority 100
  advert_int 1
  nopreempt

  mcast_src_ip 10.0.1.202

  unicast_peer {
    10.0.0.134
  }
  authentication {
    auth_type PASS
    auth_pass whatever
  }
  notify_master "/etc/keepalived/assign-eip.sh"
}

Both of the nodes assume master, and looking at what traffic is going between the hosts, it looks like this.

$ sudo tcpdump -vvv -i eth0 host 10.0.0.134
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
14:15:33.267923 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.0.134 tell 10.0.1.202, length 28
14:15:34.267932 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.0.134 tell 10.0.1.202, length 28
14:15:35.270846 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.0.134 tell 10.0.1.202, length 28

If I send a packet with sudo sendip -p ipv4 -is 10.0.0.134 -id 10.0.1.202 -ip 112 -d hello 10.0.1.202, the following comes up on the other end.

14:19:50.012095 IP (tos 0x0, ttl 255, id 51003, offset 0, flags [none], proto VRRP (112), length 25)
    10.0.0.134 > 10.0.1.202: vrrp 10.0.0.134 > 10.0.1.202: VRRPv6, unknown type (8)

I am confused by this whole who-has thing, as that should only be happening on local networks (same subnet). Any ideas?

from keepalived.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.