Hi,
I want to setup a LVS cluster to loadbalance UDP server. The test setup use
an echo UDP server, the setup:
*# Environment*
1. LVS Director: 172.24.143.181 Redhat 6.6 x86_64
2. RS: 172.24.143.182 Redhat 6.6 x86_64
3. VIP 172.24.143.187
4. ipvs 1.2.1
5. keepalived v1.2.23
6. test client: 172.24.143.183 Redhat 6.6 x86_64
*# Configure*
keepalived.conf
virtual_ipaddress {
> 172.24.143.187 dev eth1
> }
.....
>
virtual_server 172.24.143.187 3333 {
> delay_loop 6
> lb_algo rr
> lb_kind DR
> protocol UDP
>
> real_server 172.24.143.182 3333 {
> weight 1
> }
> }
>
$ ipvsadm -Ln
> UDP 172.24.143.187:3333 rr
> -> 172.24.143.182:3333 Route 1 0 0
*# UDP server*
RS run UDP server
http://svn.python.org/projects/python/trunk/Demo/sockets/udpecho.py
*s.bind(('172.24.143.187', port)) # udp listen VIP address*
>
$ python udpserver.py -s 3333
*# Test*$ nc -u 172.24.143.187 3333
job
job
*# Tcpdump on LVS director (2 packet are duplicated, but one is
padding)*18:03:33.778558
In 00:50:56:83:68:bd ethertype IPv4 (0x0800), length 62: (tos 0x0, ttl 64,
id 46680, offset 0, flags [DF], proto UDP (17), length 32)
172.24.143.183.56006 > 172.24.143.187.3333: [udp sum ok] UDP, length 4
0x0000: 0000 0001 0006 0050 5683 68bd 0000 0800 .......PV.h.....
0x0010: 4500 0020 b658 4000 4011 0cd1 ac18 8fb7 E....X@.@.......
0x0020: ac18 8fbb dac6 0d05 000c d3ec 6a6f 620a ............job.
0x0030: 0000 0000 0000 0000 0000 0000 0000 ..............
18:03:33.778598 Out 00:50:56:83:06:ef ethertype IPv4 (0x0800), length 48:
(tos 0x0, ttl 64, id 46680, offset 0, flags [DF], proto UDP (17), length 32)
172.24.143.183.56006 > 172.24.143.187.3333: [udp sum ok] UDP, length 4
0x0000: 0004 0001 0006 0050 5683 06ef 0000 0800 .......PV.......
0x0010: 4500 0020 b658 4000 4011 0cd1 ac18 8fb7 E....X@.@.......
0x0020: ac18 8fbb dac6 0d05 000c d3ec 6a6f 620a ............job.
*# Tcpdump from client (the output does make sence, one is outgoing packet,
one is incoming packet)*18:03:33.776888 Out 00:50:56:83:68:bd ethertype
IPv4 (0x0800), length 48: (tos 0x0, ttl 64, id 46680, offset 0, flags [DF],
proto UDP (17), length 32)
172.24.143.183.56006 > 172.24.143.187.3333: [bad udp cksum 2b5c!] UDP,
length 4
0x0000: 0004 0001 0006 0050 5683 68bd 0000 0800 .......PV.h.....
0x0010: 4500 0020 b658 4000 4011 0cd1 ac18 8fb7 E....X@.@.......
0x0020: ac18 8fbb dac6 0d05 000c 77c1 6a6f 620a ..........w.job.
18:03:33.778472 In 00:50:56:83:6b:cd ethertype IPv4 (0x0800), length 62:
(tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 32)
172.24.143.187.3333 > 172.24.143.183.56006: [udp sum ok] UDP, length 4
0x0000: 0000 0001 0006 0050 5683 6bcd 0000 0800 .......PV.k.....
0x0010: 4500 0020 0000 4000 4011 c329 ac18 8fbb E.....@.@..)....
0x0020: ac18 8fb7 0d05 dac6 000c d3ec 6a6f 620a ............job.
0x0030: 0000 0000 0000 0000 0000 0000 0000 ..............
Why two same packet show on LVS director, any one know the reason?
Thanks,
Linbo
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
|