저는 현재 LVS-Linux Virtual Server 설정에 바쁩니다 .
root@debian1:~# ipvsadm -L
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP debian1.lan:http wlc
-> debian2.lan:http Masq 1 0 1
-> debian3.lan:http Masq 1 0 1
debian1.lan은 내 VIP입니다. debian2와 3은 아파치를 실행하고 있습니다.
curl
콘텐츠를 가져 오는 데 사용할 수 있습니다.
root@debian1:~# curl debian1.lan
<html><body><h1>debian2</h1>
<p>This is the default web page for this server.</p>
<p>The web server software is running but no content has been added, yet.</p>
</body></html>
하지만 firefox
Windows 컴퓨터에서 debian1.lan (10.0.0.171)에 액세스 하면 "연결 시간이 초과되었습니다"라는 메시지가 나타납니다.
Virtualbox가 LVS를 망칠 가능성이 있습니까? (debian 1 ~ 3은 브리지 어댑터를 사용하는 Virtualbox의 VM입니다).
tcpdump
debian2에서 시작 했는데 firefox
의미는 확실하지 않지만 패킷 (을 사용할 때 )이 표시 됩니다 .
root@debian2:~# tcpdump -s 0 -A tcp port http
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
13:07:05.725727 IP My-PC.lan.54663 > debian2.lan.http: Flags [S], seq 1738645408, win 8192, options [mss 1460,nop,wscale 2,nop,nop,sackOK], length 0
[email protected]
...
......Pg......... .\...............
13:07:05.725755 IP debian2.lan.http > My-PC.lan.54663: Flags [S.], seq 184008166, ack 1738645409, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 4], length 0
E..4..@.@.%{
...
....P..
...g.....9..p..............
13:07:06.722025 IP debian2.lan.http > My-PC.lan.54663: Flags [S.], seq 184008166, ack 1738645409, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 4], length 0
E..4..@.@.%{
...
....P..
...g.....9..p..............
13:07:08.722729 IP debian2.lan.http > My-PC.lan.54663: Flags [S.], seq 184008166, ack 1738645409, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 4], length 0
E..4..@.@.%{
...
....P..
...g.....9..p..............
13:07:08.723841 IP My-PC.lan.54663 > debian2.lan.http: Flags [S], seq 1738645408, win 8192, options [mss 1460,nop,wscale 2,nop,nop,sackOK], length 0
E..4.a@.....
...
......Pg......... .\...............
13:07:08.723849 IP debian2.lan.http > My-PC.lan.54663: Flags [S.], seq 184008166, ack 1738645409, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 4], length 0
E..4..@.@.%{
...
....P..
...g.....9..p..............
13:07:12.722808 IP debian2.lan.http > My-PC.lan.54663: Flags [S.], seq 184008166, ack 1738645409, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 4], length 0
E..4..@.@.%{
...
....P..
...g.....9..p..............
13:07:14.724158 IP My-PC.lan.54663 > debian2.lan.http: Flags [S], seq 1738645408, win 8192, options [mss 1460,nop,nop,sackOK], length 0
E..0.g@.....
...
......Pg.......p. .p...........
13:07:14.724179 IP debian2.lan.http > My-PC.lan.54663: Flags [S.], seq 184008166, ack 1738645409, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 4], length 0
E..4..@.@.%{
...
....P..
...g.....9..p..............
13:07:20.722805 IP debian2.lan.http > My-PC.lan.54663: Flags [S.], seq 184008166, ack 1738645409, win 14600, options [mss 1460,nop,nop,sackOK,nop,wscale 4], length 0
E..4..@.@.%{
...
....P..
...g.....9..p..............
누군가 내가 무엇을 할 수 있는지 또는 다음에 확인할 수 있는지에 대한 힌트를 제공 할 수 있습니까?
마침내이 작업을했습니다. 해결책은 LVS의 실제 서버를위한 완전히 새로운 사설 네트워크를 만드는 것이었고 저는 192.168.1.x를 사용했습니다 (물론 감독도이 네트워크에 액세스해야 함). VIP의 경우 퍼블릭 IP 주소 10.0.0.x를 사용했습니다. 또한 LVS의 실제 서버에서 이전 네트워크 (10.0.0.x)의 모든 추적을 제거해야했습니다.
root@debian1:~# ipvsadm -L --stats
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Conns InPkts OutPkts InBytes OutBytes
-> RemoteAddress:Port
TCP debian1.lan:http 45 269 167 27483 27061
-> 192.168.1.2:http 21 118 74 11370 11912
-> 192.168.1.3:http 24 151 93 16113 15149
바라건대 이것은 같은 문제를 가진 사람에게 도움이되기를 바랍니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다