Test the process of keepalived the VIP forward data to rip in DR mode
Test environment Convention here: "Client" cip = 10.0.200.22        MAC = 8C:89:A5:96:4C:B2 (assuming 11:11:11:11:11:11) "Director" VIP = 10.0.205.100 DIP = 10.0.200.21       MAC = 8C:89:A5:96:51:CF (assuming 22:22:22:22:22:22) "RealServer" rip = 10.0.205.2 mac = 08:00:27:3b:62:f5 (assuming 33:33:33:33:33:33) 1) "Client" ARP Request who has 10.0.205.100 tell 10.0.200.22cip = 10.0.200.22mac = 11:11:11:11:11:112) "Director "Response 1,arp reply 10.0.205.100 is-at 22:22:22:22:22:22vip = 10.0.205.100dip = 10.0.200.21mac = 22:22:22:22:22:223) "Client" Send tcp syncip = 10.0.200.22 mac = 11:11:11:11:11:11->vip = 10.0.205.100 mac = 22:22:22:22:22:224) "Director" Select a "Realserver", change the Mac in the packet to rip Mac, forward to ripcip = 10.0.200.22 mac = 11:11:11:11:11:11->vip = 10.0.205.100 mac = 33:33:33:33:33:335) "RealServer" Receiving, sending arp,request who has 10.0.200.22 tell 10.0.205.26) "Client" Response 5) arp reply 10.0.200.22 is-at 11:11:11:11:11:117) "Realserver" uses VIP response to 3 measured capture contents: [[[email protected] ~]# tcpdump -nn host 10.0.200.22 and \ (10.0.200.21 or 10.0.205.100 or 10.0.205.2\) tcpdump: verbose output suppressed, use -v or -vv For full protocol decodelistening on eth0, link-type en10mb (Ethernet), capture size 65535 bytes18:08:31.342062 arp, request who-has 10.0.205.100 tell 10.0.200.22, length 2818:08:31.342627 arp, reply 10.0.205.100 is-at 8c:89: a5:96:51:cf, length 4618:08:31.342637 ip 10.0.200.22.58914 > 10.0.205.100.80: flags [s], seq 3567838243, win 14600, options [mss 1460,sackok, Ts val 373309346 ecr 0,nop,wscale 7], length 018:08:31.343842 arp, request who-has 10.0.200.22 tell 10.0.205.2, length 4618:08:31.343854 arp, reply 10.0.200.22 is-at 8c:89:a5:96:4c:b2, length 2818:08:31.344629 ip 10.0.205.100.80 > 10.0.200.22.58914: flags [s.], seq 4193479915 , ack 3567838244, win 14480, options [mss 1460,sackok,ts val 27450580 ecr 373309346,nop, wscale 6], length 018:08:31.344649 ip 10.0.200.22.58914 > 10.0.205.100.80: flags [.], ack 1, win 115, options [nop,nop,ts val 373309348 ecr 27450580], length 018:08:39.260264 ip 10.0.200.22.58914 > 10.0.205.100.80: flags [p.], seq 1:6, ack 1, win 115, options [nop,nop,TS val 373317264 ecr 27450580], length 518:08:39.261438 ip 10.0.205.100.80 > 10.0.200.22.58914: flags [.], ack  6, WIN 227, OPTIONS [NOP,NOP,TS VAL 27458498 ECR 373317264], length 018:08:39.261637 ip 10.0.205.100.80 > 10.0.200.22.58914: flags [p.], seq 1:174, ack 6,&nBsp;win 227, options [nop,nop,ts val 27458498 ecr 373317264], length 17318:08:39.261663 ip 10.0.200.22.58914 > 10.0.205.100.80: flags [.], ack 174, win 123, options [nop,nop,TS val 373317265 ecr 27458498], length 018:08:39.261670 ip 10.0.205.100.80 > 10.0.200.22.58914: flags [f.], seq 174, ack 6, win 227, options [nop,nop,ts val 27458498 ecr 373317264], length 0
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5C/04/wKiom1UY6pfRZ9v7AAYdyLbFhes676.jpg "title=" Cip_ Vip_rip.png "alt=" Wkiol1uy63ta2l9saas3btzknno352.jpg "/>
Test the process of keepalived the VIP forward data to rip in DR mode