User Tools

Site Tools


redundant_routers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
redundant_routers [2023/07/29 18:13] – created bentredundant_routers [2023/10/23 18:56] (current) bent
Line 6: Line 6:
  
 Nounours is the chosen master router since it has the best connection to the Internet. Gate-rpi is then the backup router. Configuration is done following the guidelines on the [[https://wiki.archlinux.org/title/Keepalived|ArchLinux Wiki]]. Nounours is the chosen master router since it has the best connection to the Internet. Gate-rpi is then the backup router. Configuration is done following the guidelines on the [[https://wiki.archlinux.org/title/Keepalived|ArchLinux Wiki]].
 +
 +The switch between master and backup is only done when the backup has a higher priority than the (previous) master. If Nounours goes down this happens automatically, but mishaps further 'up' in the system,e.g fiber break, cable break etc, are not detected ny Nounours. The dilemma is solved by using the monitoring capablilties of keepalived. In this case I use the  [[https://www.redhat.com/sysadmin/advanced-keepalived|'Track script']] facility where I let a script ping the upstream router every so often and when/if the upstream router doesn't reply the router enters the fault state. See the configuration file for details.
  
 Here are the configurations files. On both routers they may be found at /etc/keepalive/keepelive.conf. Here are the configurations files. On both routers they may be found at /etc/keepalive/keepelive.conf.
Line 19: Line 21:
    smtp_connect_timeout 30    smtp_connect_timeout 30
    router_id ROUTER1    router_id ROUTER1
 +   script_user bent
 +   enable_script_security
 +
 +  }
 +  vrrp_script keepalived_check {
 +   script "/usr/local/bin/keepalived_check.sh"
 +   interval 1
 +   timeout 5
 +   rise 3
 +   fall 3
   }   }
   vrrp_instance NET19 {   vrrp_instance NET19 {
Line 34: Line 46:
     }     }
   }   }
 +  track_script { 
 +    keepalived_check 
 +  } 
 +  notify "/usr/local/bin/keepalived_notify.sh"
 ===== Backup Router (Gate-rpi)===== ===== Backup Router (Gate-rpi)=====
  
redundant_routers.1690654391.txt.gz · Last modified: 2023/07/29 18:13 by bent