Network cmd commands

134 views
Skip to first unread message

Avramidis, Ilias

unread,
Apr 20, 2019, 4:40:24 PM4/20/19
to xvisor...@googlegroups.com
Dear Xvisor Community,

The following cmd commands. cmd_ping and cmd_ipconfig do not appear as choice in the "help" menu.
Is there anyway to enable them so I can see them at the help menu?
However I was wondering, can I use them via Xvisor prompt to try and test network connectivity with other devices
attached to the same LAN?

Also, If i want to create and send a packet via Xvisor prompt not from inside a guest VM, can I do it using
the vmm_netport and vmm_mbuf functions? Is it capable?

I am asking for a more professional opinion since I am very new in programming and soft development field.

Many thanks,
Regards,
Ilias

________________________________
Important Notice: the information in this email and any attachments is for the sole use of the intended recipient(s). If you are not an intended recipient, or a person responsible for delivering it to an intended recipient, you should delete it from your system immediately without disclosing its contents elsewhere and advise the sender by returning the email or by telephoning a number contained in the body of the email. No responsibility is accepted for loss or damage arising from viruses or changes made to this message after it was sent. The views contained in this email are those of the author and not necessarily those of Liverpool John Moores University.

Anup Patel

unread,
Apr 24, 2019, 7:39:42 AM4/24/19
to Xvisor Devel
Hi,

On Sun, Apr 21, 2019 at 2:10 AM Avramidis, Ilias
<I.Avr...@2015.ljmu.ac.uk> wrote:
>
> Dear Xvisor Community,
>
> The following cmd commands. cmd_ping and cmd_ipconfig do not appear as choice in the "help" menu.
> Is there anyway to enable them so I can see them at the help menu?

We have two types to networking stack:
1. Network packet switching framework (core/net directory): This is
our main networking framwork which is
designed from hypervisor perspective. We can easily write network
drivers and network emulators using it.
2. Network stack for socket programing (libs/netstack directory): This
an optional network TCP/IP stack for
developing TCP/IP based daemons running as part of Xvisor. We have
integrated lwIP our optional network
stack. The ping and ipconfig commands are for optional TCP/IP network
stack so these commands will only
show up when optional TCP/IP stack is enabled.

> However I was wondering, can I use them via Xvisor prompt to try and test network connectivity with other devices
> attached to the same LAN?

Yes, you can certainly use them. Just enable the lwIP network stack.

>
> Also, If i want to create and send a packet via Xvisor prompt not from inside a guest VM, can I do it using
> the vmm_netport and vmm_mbuf functions? Is it capable?

Use ping command. This will help you debug your network driver or
network emulator.

>
> I am asking for a more professional opinion since I am very new in programming and soft development field.
>

I hope comments above help.

Regards,
Anup

Avramidis, Ilias

unread,
Apr 24, 2019, 4:56:30 PM4/24/19
to xvisor...@googlegroups.com
Dear Anup Patel,

Thanks a lot for your reply.
So sorry for my awareness but I am still learning things around the programming, so I am not sure that
I fully understand, when you say "enable the TCP/IP stack" equal to enable the lwIP network stack
what you mean?
Can you explain a bit more about this, how someone enables the tcp stack?
I found this configuration file "xvisor-next/libs/netstack/openconf.cfg" but I dont understand how .cfg works
and how you can choose to enable the netstack.
I need to modify the source code to enable the TCP/IP stack?
Please If you have some time to provide me with any guidance I will appriciate that.

Many thanks,
Regards,
Ilias
________________________________
From: Avramidis, Ilias
Sent: Saturday, April 20, 2019 9:39 PM
To: xvisor...@googlegroups.com
Subject: Network cmd commands

Ashutosh Sharma

unread,
Apr 25, 2019, 2:31:12 AM4/25/19
to xvisor...@googlegroups.com
Hello  Ilias,

To enable TCP/IP stack, use build configuration of xVisor:

Command lines:
# make menuconfig

You can enable networking stack using following sections:

Library Options  --->
 Network Stack Options  --->
  <*> Network stack support  library
    Select a network Stack (lwIP)  --->


Regards,

Ashutosh Sharma

--
You received this message because you are subscribed to the Google Groups "Xvisor Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xvisor-devel...@googlegroups.com.
Visit this group at https://groups.google.com/group/xvisor-devel.
For more options, visit https://groups.google.com/d/optout.

Avramidis, Ilias

unread,
May 3, 2019, 5:15:38 PM5/3/19
to xvisor...@googlegroups.com
Dear Ashutosh Sharma,

Thanks for your reply and guidance.

May I can ask you some further questions If you can help me to troubleshoot the issue.

I have enabled the TCP/IP LwIP stack, so currenty I am able to see the cmd commands: ipconfig and ping

Here is the output of the current config:

XVisor# ipconfig show
Network stack Configuration:
TCP/IP stack name : lwIP
IP address : 192.168.0.12
IP netmask : 255.255.255.0
Gateway IP address : 192.168.0.1
HW address : B2:8B:A9:17:00:00

XVisor# net port list
--------------------------------------------------------------------------------
Num# Port Switch Link HW-Address MTU
--------------------------------------------------------------------------------
0 lwip-netport br0 UP B2:8B:A9:17:00:00 1500
1 guest0/virtio-net0 br0 UP 46:1A:B9:7A:00:00 1514
--------------------------------------------------------------------------------
XVisor# net switch list
--------------------------------------------------------------------------------
Num# Switch Policy Port List
--------------------------------------------------------------------------------
0 br0 bridge -+
+--- lwip-netport
+--- guest0/virtio-net0
--------------------------------------------------------------------------------
XVisor#

The issue that I am facing is that the ethernet port on RPI3 does not look alive, no lights, its dead.
So, I am not able to ping another RPI3 on the network.

What I need to do to enable the ethernet interface? What further configuration in order to ping from the Xvisor prompt
another ip on the network?

Any help, guidance is appriciated,

Thanks in advance,
Kind regards,

Ashutosh Sharma

unread,
May 5, 2019, 8:23:57 AM5/5/19
to xvisor...@googlegroups.com
Hello Ilias,

Looks like you have not enabled USB network driver.

XVisor# net port list
--------------------------------------------------------------------------------
 Num#  Port                Switch              Link HW-Address             MTU  
--------------------------------------------------------------------------------
 0     lwip-netport        br0                 UP   AA:65:08:17:00:00      1500 
 1     smsc95xx            br0                 UP   52:86:AE:78:01:00      1500 
--------------------------------------------------------------------------------

XVisor# ping 192.168.2.2 4                                     
PING (192.168.2.2) 56(84) bytes of data.
64 bytes from 192.168.2.2: seq=0 ttl=64 time=-140462621.656ms
64 bytes from 192.168.2.2: seq=1 ttl=64 time=-140462621.374ms
64 bytes from 192.168.2.2: seq=2 ttl=64 time=-140462620.146ms
64 bytes from 192.168.2.2: seq=3 ttl=64 time=-140462621.666ms

----- 192.168.2.2 ping statistics -----
4 packets transmitted, 4 packets received
round-trip min/avg/max = -140462621.374/-140462621.710/-140462620.146 ms

Adjust IP address as per your system.

Regards,

Ashutosh Sharma

Ahmad Yousef

unread,
May 6, 2019, 7:16:48 PM5/6/19
to xvisor...@googlegroups.com
Hello,
I have written a policy by XACML based on ABAC, and I want to test my policy in xVisor, And take control of XACML components on it.
How could I start!
Best.


Avramidis, Ilias

unread,
May 12, 2019, 7:45:59 AM5/12/19
to xvisor...@googlegroups.com
Dear Xvisor community,

I am facing an error when I am sending more than 2 (size) of ping requests to another node
in the network from Xvisor prompt.
I execute the command: "ping <ipaddr> 4"
and I receive this FATAL error:

FATAL: Bug in m_ext_free() at /root/xvisor-next/core/net/vmm_mbuf.c:386
0x10039E8C m_ext_free+0xb4/0xe8
0x10039F00 m_freem+0x18/0x30
0x10091E34 smsc95xx_start_xmit+0x64/0x78
0x10093C00 netdev_switch2port_xfer+0xc8/0xe0
0x1003A9F0 vmm_switch2port_xfer_mbuf+0x80/0xc8
0x1003BD58 bridge_rx_handler+0x2f8/0x370
0x1003A6FC netswitch_bh_main+0x10c/0x1b0
0x1003394C vmm_threads_entry+0x2c/0x78
0x00000000 _code_start+0xfffffffff0000000/0xa4
FATAL: Please reset the system ...

Only the first echo request packet is successful and I can see an echo reply from the destination node.
Do you have any idea why this is happening?

Furthermore, I was wondering if you have any example of code how to generate a udp packet based on lwip socket TCP/IP.
Or any logical diagram what functions I need to call in order to communicate to the netport and netswitch.

Many thanks in advance,
Reply all
Reply to author
Forward
0 new messages