LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Web vs Mail services

To: lvs-users <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Web vs Mail services
From: "isplist@xxxxxxxxxxxx" <isplist@xxxxxxxxxxxx>
Date: Mon, 23 Apr 2007 21:55:53 -0500
> Does anything show up in the LVS conection counters?
> # ipvsadm -L -n

]# ipvsadm -L -n
IP Virtual Server version 1.2.0 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  192.168.1.151:143 wlc
TCP  192.168.1.151:25 wlc
TCP  192.168.1.151:80 wlc
  -> 192.168.1.250:80             Route   1      0          0
  -> 192.168.1.249:80             Route   1      0          0
TCP  192.168.1.151:110 wlc

>If you run tcpdump or simolar on the internal and external interfaces of the
>LVS machine, do the packets disapear at some point?

I'll have to do more testing later on this.

>> On the servers, in /etc/sysconfig/iptables;
>>
> I don't think that you need these iptables rules, LVS shoud do NAT
> without them.

Never works otherwise. Thought this was the only way?

Mike



>> *nat
>> :PREROUTING ACCEPT [602:53060]
>> :POSTROUTING ACCEPT [13:885]
>> :OUTPUT ACCEPT [13:885]
>> -A PREROUTING -d 192.168.1.151 -p tcp -m tcp --dport 25 -j REDIRECT --to-
>> ports
>> 25
>> -A PREROUTING -d 192.168.1.151 -p tcp -m tcp --dport 80 -j REDIRECT --to-
>> ports
>> 80
>> -A PREROUTING -d 192.168.1.151 -p tcp -m tcp --dport 110 -j REDIRECT
>> --to-ports 110
>> -A PREROUTING -d 192.168.1.151 -p tcp -m tcp --dport 143 -j REDIRECT
>> --to-ports 143
>> -A PREROUTING -d 192.168.1.151 -p tcp -m tcp --dport 993 -j REDIRECT
>> --to-ports 993
>> -A PREROUTING -d 192.168.1.151 -p tcp -m tcp --dport 995 -j REDIRECT
>> --to-ports 995
>> COMMIT
>>
>> On LVS,
>>
>> serial_no = 114
>> primary = 192.168.1.76
>> service = lvs
>> backup_active = 1
>> backup = 192.168.1.77
>> heartbeat = 1
>> heartbeat_port = 539
>> keepalive = 6
>> deadtime = 18
>> network = direct
>> nat_nmask = 255.255.255.255
>> debug_level = NONE
>> monitor_links = 0
>> virtual HTTP {
>> active = 1
>> address = 192.168.1.151 eth0:1
>> vip_nmask = 255.255.255.0
>> port = 80
>> send = "GET / HTTP/1.0\r\n\r\n"
>> expect = "HTTP"
>> use_regex = 0
>> load_monitor = none
>> scheduler = wlc
>> protocol = tcp
>> timeout = 6
>> reentry = 15
>> quiesce_server = 0
>> server qm249 {
>> address = 192.168.1.249
>> active = 1
>> weight = 0
>> }
>> server qm250 {
>> address = 192.168.1.250
>> active = 1
>> weight = 0
>> }
>> }
>> virtual POP {
>> active = 1
>> address = 192.168.1.151 eth0:1
>> vip_nmask = 255.255.255.0
>> port = 110
>> send = "GET / HTTP/1.0\r\n\r\n"
>> expect = "HTTP"
>> use_regex = 0
>> load_monitor = none
>> scheduler = wlc
>> protocol = tcp
>> timeout = 6
>> reentry = 15
>> quiesce_server = 0
>> server qm249 {
>> address = 192.168.1.249
>> active = 1
>> weight = 0
>> }
>> server qm250 {
>> address = 192.168.1.250
>> active = 1
>> weight = 0
>> }
>> }
>> virtual IMAP {
>> active = 1
>> address = 192.168.1.151 eth0:1
>> vip_nmask = 255.255.255.0
>> port = 143
>> send = "GET / HTTP/1.0\r\n\r\n"
>> expect = "HTTP"
>> use_regex = 0
>> load_monitor = none
>> scheduler = wlc
>> protocol = tcp
>> timeout = 6
>> reentry = 15
>> quiesce_server = 0
>> server qm249 {
>> address = 192.168.1.249
>> active = 1
>> weight = 0
>> }
>> server qm250 {
>> address = 192.168.1.250
>> active = 1
>> weight = 0
>> }
>> }
>> virtual SMTP {
>> active = 1
>> address = 192.168.1.151 eth0:1
>> vip_nmask = 255.255.255.0
>> port = 25
>> send = "GET / HTTP/1.0\r\n\r\n"
>> expect = "HTTP"
>> use_regex = 0
>> load_monitor = none
>> scheduler = wlc
>> protocol = tcp
>> timeout = 6
>> reentry = 15
>> quiesce_server = 0
>> server qm249 {
>> address = 192.168.1.249
>> active = 1
>> weight = 0
>> }
>> server qm250 {
>> address = 192.168.1.250
>> active = 1
>> weight = 0
>> }
>> }
>>
>>
>> _______________________________________________
>> LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
>> Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
>> or go to http://www.in-addr.de/mailman/listinfo/lvs-users




<Prev in Thread] Current Thread [Next in Thread>