LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-20-2017, 11:23 AM   #1
zzingass
LQ Newbie
 
Registered: Apr 2017
Posts: 4

Rep: Reputation: Disabled
ucarp configuration on ubuntu problem


Hello. I'm working on my project and i have few questions. My scheme is here: https://ibb.co/bKjvd5
My task is to ping AK2 computer from AK1 computer when my HA router is going from backup to master and see how much time it goes. Fistly, my AK1 computer configuration is :
ip addr add 10.1.1.1/24 dev eth1
ip route add default via 10.1.1.2/24 dev eth1
AK2 computer configuration is :
ip addr add 10.1.1.2.1/24 dev eth1
ip route add default via 10.1.2.2/24 dev eth1
R1 (upper one) configuration:
ip addr add 10.1.1.2/24 dev eth1
ip addr add 10.1.2.2/24 dev eth3
ip addr add 10.1.3.1/24 dev eth2
R2 router configuration:
ip addr add 10.1.1.3/24 dev eth1
ip addr add 10.1.2.3/24 dev eth3
ip addr add 10.1.3.2/24 dev eth2

R1 router is configured as Master by command:
ucarp -i eth2 -s 10.1.3.1 -v 1 -p pass -a 10.1.3.3 -u /etc/vip-up.sh -d /etc/vip-down.sh -P
vip-up.sh script:
#!/bin/sh
/sbin/ifconfig eth2:2 10.1.3.3/24 > /dev/null 2>&1
vip-down.sh script:
#!/bin/sh
/sbin/ifconfig eth2:2 down > /dev/null 2>&1

R2 router configurated as Slave :
ucarp -i eth2 -s 10.1.3.2 -v 1 -p pass -a 10.1.3.3 -k 50 -u /etc/vip-up.sh -d /etc/vip-down.sh

Now my AK1 and AK2 computers have ping through R1 router, and when I disable R1 computers stops pinging. I see that R2 launches as Master but flow doesnt go through him. What I need to do? Firstly I need to see how much time costs process while router goes to master state. Second task will be with d-itg traffic generator, to see how much packets i will lose when states will change.
Thanks for help
 
Old 04-24-2017, 02:32 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
After fail-over, does ucarp interface and virtual IP address move to R2 router?
 
Old 04-26-2017, 10:33 AM   #3
zzingass
LQ Newbie
 
Registered: Apr 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Yes, sorry for late replay. I resolve this problem. In R2 vip-up.sh script I write some lines to change interfaces IP's like R1 has. Now traffic goes through R2 when R1 is disabled, but it works about in 3-4seconds. What I should do to make it run in 1s?
 
Old 04-26-2017, 02:52 PM   #4
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
What's your meaning, R1 is disabled? The ucarp do fail-over when R1 is powered off.
 
Old 04-27-2017, 12:21 PM   #5
zzingass
LQ Newbie
 
Registered: Apr 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
I mean that only R1 ucarp interface is disabled. Then ucarp do fail-over and traffic goes through R2. Now I need to make traffic with iperf using iptables when R1 and R2 has NAT. Can you help how to do it correctly?
 
Old 04-27-2017, 02:52 PM   #6
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
Following link can help you configure NAT on Ubuntu.
https://askubuntu.com/questions/3076...n-ubuntu-12-04
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ucarp - Flapping cracker1985 Linux - Networking 0 05-15-2015 09:45 PM
ucarp service massy Linux - Server 3 03-09-2014 04:12 AM
Using ucarp massy Linux - Server 1 02-19-2014 01:46 PM
UBUNTU 5.04 PPTP configuration problem . On the Help Page of ubuntu is strange proble ReGgaE-Bg Linux - Networking 1 06-13-2006 08:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration