-----Original Message----- From: Xenomai [mailto:xenomai-boun...@xenomai.org] On Behalf Of Pintu Kumar Sent: 20 February 2018 16:58 To: Jan Kiszka <jan.kis...@web.de>; Pintu Kumar <pintu.p...@gmail.com> Cc: xenomai@xenomai.org Subject: Re: [Xenomai] [rtnet] - help required with rtnet interface bring up
On Tue, Feb 20, 2018 at 6:27 PM, Jan Kiszka <jan.kis...@web.de> wrote: > On 2018-02-20 07:43, Pintu Kumar wrote: >> Dear Jan, >> >> I had two network adapter setup in my virtual box: >> NAT0: NAT network >> NAT1: Host-only adapter >> >> Now I removed NAT1, and changed NAT0 to Host only type So, now I just >> have only one ethernet interface (eth0). >> >> After this if I install RTnet, rteth0 is up, but still it does not >> connect to the host PC. >> (I cannot ping the IP address from host). >> >> Note: The ip address is visible only in vnic0 and not in rteth0. >> >> And I still get the kernel errors flooded: >> [58710.438552] RTcfg: error -11 while sending stage 1 frame >> [58710.438585] RTcfg: error -11 while sending stage 1 frame >> [58710.438602] RTcfg: error -11 while sending stage 1 frame ..... >> >> Please let me know if I am missing something. >> >> Here is the output from ifconfig: >> >> pintu@osboxes:~$ ifconfig >> lo Link encap:Local Loopback >> inet addr:127.0.0.1 Mask:255.0.0.0 >> inet6 addr: ::1/128 Scope:Host >> UP LOOPBACK RUNNING MTU:65536 Metric:1 >> RX packets:42 errors:0 dropped:0 overruns:0 frame:0 >> TX packets:42 errors:0 dropped:0 overruns:0 carrier:0 >> collisions:0 txqueuelen:1 >> RX bytes:4594 (4.5 KB) TX bytes:4594 (4.5 KB) >> >> rteth0 Link encap:Ethernet HWaddr 08:00:27:52:ba:f1 >> inet6 addr: fe80::a00:27ff:fe52:baf1/64 Scope:Link >> UP BROADCAST RUNNING MTU:1500 Metric:1 >> RX packets:92071 errors:0 dropped:92052 overruns:0 frame:0 >> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 >> collisions:0 txqueuelen:1000 >> RX bytes:2584501 (2.5 MB) TX bytes:0 (0.0 B) >> >> rteth0-mac Link encap:Ethernet HWaddr 08:00:27:52:ba:f1 >> inet6 addr: fe80::a00:27ff:fe52:baf1/64 Scope:Link >> UP BROADCAST RUNNING MTU:1500 Metric:1 >> RX packets:92071 errors:0 dropped:57 overruns:0 frame:0 >> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 >> collisions:0 txqueuelen:1000 >> RX bytes:2584501 (2.5 MB) TX bytes:0 (0.0 B) >> >> rtlo Link encap:Ethernet HWaddr 00:00:00:00:00:00 >> inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link >> UP BROADCAST RUNNING MTU:1500 Metric:1 >> RX packets:6 errors:0 dropped:0 overruns:0 frame:0 >> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 >> collisions:0 txqueuelen:1000 >> RX bytes:504 (504.0 B) TX bytes:0 (0.0 B) >> >> vnic0 Link encap:Ethernet HWaddr 08:00:27:52:ba:f1 >> inet addr:192.168.56.102 Bcast:192.168.56.255 Mask:255.255.255.0 >> inet6 addr: fe80::a00:27ff:fe52:baf1/64 Scope:Link >> UP BROADCAST RUNNING MTU:1496 Metric:1 >> RX packets:0 errors:0 dropped:0 overruns:0 frame:0 >> TX packets:57 errors:0 dropped:0 overruns:0 carrier:0 >> collisions:0 txqueuelen:1000 >> RX bytes:0 (0.0 B) TX bytes:7598 (7.5 KB) >> >> pintu@osboxes:~$ sudo /usr/xenomai/sbin/rtifconfig [sudo] password >> for pintu: >> rteth0 Medium: Ethernet Hardware address: 08:00:27:52:BA:F1 >> IP address: 192.168.56.102 Broadcast address: 192.168.56.255 >> UP BROADCAST RUNNING MTU: 1500 >> >> rtlo Medium: Local Loopback >> IP address: 127.0.0.1 >> UP LOOPBACK RUNNING MTU: 1500 >> >> pintu@osboxes:~$ sudo /usr/xenomai/sbin/rtroute Host Routing Table >> Hash Destination HW Address Device >> 00 0.0.0.0 00:00:00:00:00:00 rtlo >> 01 192.168.56.1 0A:00:27:00:00:12 rteth0 >> 01 127.0.0.1 00:00:00:00:00:00 rtlo >> 26 192.168.56.102 00:00:00:00:00:00 rtlo 3F 192.168.56.255 >> FF:FF:FF:FF:FF:FF rteth0 >> > > Key question, once again: Do you want RTmac/TDMA and medium access > control mechanism? If yes, do you have a full RTnet stack running on > BOTH ends already? > > If no, don't use the rtnet start script. Only configure what you > actually need. You can follow init_rtnet() from that script for these steps. > OK. Thank you so much for all your help, and sorry for troubling you so much. I think I have also tried manually. But still I am not able to ping from host. I followed the below steps. 1) rtnet stop = > since the rtnet driver was already loaded from boot. 2) modprobe -r e1000 (remove non-rt driver) 3) modprobe rtnet 4) modprobe rt_e1000 5) rtifconfig rtlo up 127.0.0.1 6) rtifconfig rteth0 up 192.168.56.101 After this only vnic0 is visible in ifconfig (with IP address). After that I also did: 7) ifconfig rtlo up 8) ifconfig rteth0 up Now, rtlo and rteth0 is visible, but I could not ping the IP from outside. Also, if I ping 192.168.56.101 locally also, it still returns 127.0.0.1 So, I tried changing the route, but no success. If any steps is missed out please let me know. Tomorrow, I will also cross check with init_inet() and update. Thanks, Pintu > Jan > It's been a while since I setup or used rtnet, but I recall needing to run the rtroute command before being able to ping to and from. Eg 'rtroute add 192.168.56.101 Mac-Address-Of-rteth0-NIC dev rteth0' Add destination to rteth0 routing table manually (same as above but with destination IP and MAC addresses) or ping 192.168.56.101 from destination and the destination route is added to rteth0 routing table, complete with destination MAC address. 'rtroute' wil list the current routing table. Paul. ___________________________________________ Xenomai mailing list Xenomai@xenomai.org https://xenomai.org/mailman/listinfo/xenomai _______________________________________________ Xenomai mailing list Xenomai@xenomai.org https://xenomai.org/mailman/listinfo/xenomai