Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not ping to IP address in VM #92

Closed
sachithmuhandiram opened this issue Mar 14, 2019 · 13 comments
Closed

Can not ping to IP address in VM #92

sachithmuhandiram opened this issue Mar 14, 2019 · 13 comments

Comments

@sachithmuhandiram
Copy link

sachithmuhandiram commented Mar 14, 2019

I have dpdk-ans running in my VirtualBox - Centos-7 environment.

I can run everything without error

I ran -> ./build/ans -c 0x2 -n 1 -- -p 0x1 --config="(0,0,1)"

Checking link status ...............done
Port 0 Link Up - speed 1000 Mbps - full-duplex
USER8: main loop on lcore 1
USER8:  -- lcoreid=1 portid=0 rxqueueid=0

Opened another one and ran ./build/anscli inside dpdk-ans/ans

ip addr show

 veth0: mtu 1500 
   link/ether 08:00:27:0c:45:ab
   inet addr: 10.0.0.2/24

But I can not ping to 10.0.0.2 from VM or my host PC. I have changed the IP but no luck.

I would like to join dpdk-ans Slack community. Please let me know how to join.

@bluenet13
Copy link
Member

You may do such test:

  • Don't run ans. the nic bind to linux kernel, configure 10.0.0.2/24 on the nic.
  • ping 10.0.0.2 from host PC.
    maybe the root cause is your virtual box network setting.

@sachithmuhandiram
Copy link
Author

I have tested this dpdk example. It works. Only this example gets failed.

@bluenet13
Copy link
Member

  1. Check the arp table by anscli"ip neigh show", and check the stat of the nic by anscli "ip link show".
  2. Print all rx packets in ans_main.c and check it.

@sachithmuhandiram
Copy link
Author

ip neigh show

ans> ip neigh show

ANS IP neigh table

ip link show

 veth0: port 0 state DOWN mtu 1500 
   link/ether 00:1b:21:c0:51:b8
   IPV4 checksum offload enable 
   UDP checksum offload enable 
   TCP checksum offload enable 
   TCP TSO offload enable 
   Max allowed number of segments: 255 
   RX packets:0 errors:0 dropped:0
   TX packets:0 errors:0 dropped:0

@bluenet13
Copy link
Member

Something wrong with your nic.
The port is down.

@sachithmuhandiram
Copy link
Author

In my network card, port as a different name other than veth0. But i have set hugepages and bind network card in dpdk module.

@sachithmuhandiram
Copy link
Author

I have fixed Port down issue. But still it does not bind an IP for that.

Checking link status ...............done
Port 0 Link Up - speed 1000 Mbps - full-duplex
USER8: main loop on lcore 1
USER8:  -- lcoreid=1 portid=0 rxqueueid=0

IP assigning

ans> ip addr show

 veth0: mtu 1500 
   link/ether 08:00:27:0c:45:ab
   inet addr: 10.0.0.2/24
ans> ip add del 10.0.0.2/24 dev veth0
Bad arguments
ans> ip addr del 10.0.0.2/24 dev veth0
Del IP address successfully 
ans> ip addr del 192.168.20.10/24 dev veth0
Del IP address failed,  error code 17 
ans> ip addr add 192.168.20.10/24 dev veth0
Add IP address successfully 
ans> 
ans> ip addr show 

 veth0: mtu 1500 
   link/ether 08:00:27:0c:45:ab
   inet addr: 192.168.20.10/24

But I still can not ping to it even inside the VM.

@bluenet13
Copy link
Member

ans is userspace tcp/ip stack, you can't ping to it from linux kernel inside the VM, you shall ping to it from another vm.

@sachithmuhandiram
Copy link
Author

Yes, VM to VM ping was working fine. Thanks for the support.

@JorheMartinez
Copy link

Good morning Sachith, I have been facing what I think is a similiar issue to yours.
I know the issue is closed, but maybe you can provide me some help.
I have 2 interfaces, one is NATted and the other one is for dpdk binding purposes.
Within my Ubuntu 16.04 I have isntalled dpdk and dpdk-ans, and run it with:
./ans -c 0x4 -n 1 --base-virtaddr=0x2aaa2aa0000 -- -p 0x1 --config="(0,0,2)" --enable-kni --enable-ipsync

I cannot ping 10.0.0.2 from other VM.
Do you know what can be happening or would it be bigger issue to you to explain me how to get connection from one VM with DPDK-ANS to another VM?
Thank you very much in advance

@bluenet13
Copy link
Member

You may try the command "./ans -c 0x4 -n 1 --base-virtaddr=0x2aaa2aa0000 -- -p 0x1 --config="(0,0,2)""

@JorheMartinez
Copy link

Good evening. Thank you for your answer.
Without ipsync I am also unable to ping the dpdk-ans stack.
This is my configuration:
VM1(DPDK-ANS):
Interface NAT:
ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:8c:c9:bf brd ff:ff:ff:ff:ff:ff
inet 192.168.153.148/24 brd 192.168.153.255 scope global dynamic ens33
valid_lft 1564sec preferred_lft 1564sec
inet6 fe80::b286:4947:3db5:fdfe/64 scope link
valid_lft forever preferred_lft forever

DPDK-ANS conf:
ans> ip addr show

veth0: mtu 1500
link/ether 00:0c:29:8c:c9:c9
inet addr: 10.0.0.2/24
ans> ip route show

ANS IP routing table
10.0.0.0/24 via dev veth0 src 10.0.0.2
10.10.0.0/24 via 10.0.0.5 dev veth0

From another VM in the same network (i can ping the NAT interface), i cannot ping 10.0.0.2.
Could you please make me a short explanation about how to do it? I cannot find anything on the userguide.

Thank you very much in advance.

@xiaxiaobugs
Copy link

Thanks for your talks! It is helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants