dpvs icon indicating copy to clipboard operation
dpvs copied to clipboard

ipvsadm -ln shows (null) for ip address

Open vincentmli opened this issue 4 years ago • 2 comments

I am running the master branch dpvs with dpdk-stable-18.11.2 patched on Ubuntu 18.04 with kernel 5.3.0-59-generic

used https://github.com/iqiyi/dpvs/blob/master/doc/tutorial.md#simple-fnat as example:

#!/bin/sh -

# add VIP to WAN interface
./dpip addr add 10.0.0.100/32 dev dpdk1

# route for WAN/LAN access
# add routes for other network or default route if needed.
./dpip route add 10.0.0.0/16 dev dpdk1
./dpip route add 192.168.100.0/24 dev dpdk0

# add service  to forwarding, scheduling mode is RR.
# use ipvsadm --help for more info.
#./ipvsadm -A -t 10.0.0.100:80 -s rr
./ipvsadm -A -t 10.0.0.100:5001 -s rr

# add two RS for service, forwarding mode is FNAT (-b)
#./ipvsadm -a -t 10.0.0.100:80 -r 192.168.100.2 -b
#./ipvsadm -a -t 10.0.0.100:80 -r 192.168.100.3 -b
./ipvsadm -a -t 10.0.0.100:5001 -r 192.168.100.2 -b

# add at least one Local-IP (LIP) for FNAT on LAN interface
#./ipvsadm --add-laddr -z 192.168.100.200 -t 10.0.0.100:80 -F dpdk0
./ipvsadm --add-laddr -z 192.168.100.200 -t 10.0.0.100:5001 -F dpdk0

but run ./ipvsadm -ln shows null


# bin/ipvsadm -ln
IP Virtual Server version 0.0.0 (size=0)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  [(null)]:5001 rr
  -> [(null)]:5001                FullNat 1      0          0     

the traffic pass through ok, just ipvsadm -ln not showing the ip address

vincentmli avatar Aug 26 '20 17:08 vincentmli

Pr #647 may have fixed the issue. Could you please test it?

ywc689 avatar Sep 05 '20 00:09 ywc689

Hi @ywc689

I am not the original writer but I have run into the same issues.

Server details: Ubuntu 18.04.5 LTS Linux packet-filter02 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux dpdk-stable-18.11.2 dpvs Release 1.8.4: from May 27

fixes done https://github.com/iqiyi/dpvs/pull/643/commits/e95a3592c70af6a4c34ebfbf480c73e2fa0cb4db https://github.com/iqiyi/dpvs/issues/585 https://github.com/iqiyi/dpvs/pull/647

config:

./dpip addr add 87.233.252.100/24 dev dpdk0
./ipvsadm -A -t 87.233.252.100:80 -s rr
./ipvsadm -a -t 87.233.252.100:80 -r 87.233.198.9 -b
./ipvsadm --add-laddr -z 87.233.252.200 -t 87.233.252.100:80 -F dpdk0
./dpip addr show
inet 87.233.252.200/32 scope global dpdk0
     valid_lft forever preferred_lft forever
inet 87.233.252.100/24 scope global dpdk0
     valid_lft forever preferred_lft forever

./ipvsadm  -ln
IP Virtual Server version 0.0.0 (size=0)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  [(null)]:80 rr
  -> [(null)]:80                  FullNat 1      0          0

eddie4 avatar Dec 29 '20 15:12 eddie4