>
> Wireshark is a free network diagnostic tool that runs on windows and
> iirc, os-x. You can selectively filter and trap any packets on the
> network and view contents. tcpdump runs on unix and was the diag tool
> many people used for decades before fancier stuff like wireshark. I
> think both use libpcap at the lower level, just that wireshark has a
> fancy gui interface and tcpdump is command line only. tcpdump is
> available for linux, but not part of the standard distribution, at least
> on suse, so you may need to go and find the package on the web.
Wireshark runs natively on Linux, and on OS X using
the X intermediate layer.
--
Tauno Voipio
tauno voipio (at) iki fi
Reply by ChrisQ●February 8, 20112011-02-08
piyushpandey wrote:
> Hey guys thanks to all finally I got success in executing the NFS command
> from my embedded board terminal and therefore now I can mount any directory
> on my embedded board of my Desktop system.
>
>
> But I want to know one thing Frank that when I execute this command:
>
> mount -t nfs 192.168.1.2:/opt/my_folder /mnt
>
> I didn't get any response , but when I execute this command :
>
> mount -t nfs -o nolock 192.168.1.2: /opt/my_folder /mnt
>
>
> I get successfully my folder mounted on the embedded board.
>
> So what is the reason for that.
ASssume the space bteween the jost name and path is intentional ?. That
is wierd, though you could try:
mount -t nfs -o nolock 192.168.1.2://opt/my_folder /mnt
-----------------------------------^-------------------
I think the nfs client I use on windows takes this syntax. Otherwise,
haven't a clue, but nfs runs on a wide variety of unix, linux, windows
and other systems. They all have odd corners in the implementation and
some may only partially implement the protocol and command line syntax.
Look at the man pages for the server and also the same for the flavour
of linux running on your embedded board.
>
>
> and this one for you chris :
>
>
> you told that you use wireshark or tcpdump , what are these things I mean
> are they different types of softwares to access NFS protocol or they are
> different type of protocol to access the embedded board from the Desktop.
>
Wireshark is a free network diagnostic tool that runs on windows and
iirc, os-x. You can selectively filter and trap any packets on the
network and view contents. tcpdump runs on unix and was the diag tool
many people used for decades before fancier stuff like wireshark. I
think both use libpcap at the lower level, just that wireshark has a
fancy gui interface and tcpdump is command line only. tcpdump is
available for linux, but not part of the standard distribution, at least
on suse, so you may need to go and find the package on the web.
I keep an old p3 laptop just for network debugging, win2k bare bones
install, wireshark, firefox and other utilities like netstumbler for
wireless...
Regards,
Chris
Reply by piyushpandey●February 8, 20112011-02-08
Hey guys thanks to all finally I got success in executing the NFS command
from my embedded board terminal and therefore now I can mount any directory
on my embedded board of my Desktop system.
But I want to know one thing Frank that when I execute this command:
mount -t nfs 192.168.1.2:/opt/my_folder /mnt
I didn't get any response , but when I execute this command :
mount -t nfs -o nolock 192.168.1.2: /opt/my_folder /mnt
I get successfully my folder mounted on the embedded board.
So what is the reason for that.
and this one for you chris :
you told that you use wireshark or tcpdump , what are these things I mean
are they different types of softwares to access NFS protocol or they are
different type of protocol to access the embedded board from the Desktop.
Well thanks once again guys......you were great helping hands to me.
Thank you
Piyush Pandey
---------------------------------------
Posted through http://www.EmbeddedRelated.com
Reply by ChrisQ●February 7, 20112011-02-07
Frank Buss wrote:
> piyushpandey wrote:
>
>> 1.In the first step:
>>
>> In this I just edited the /etc/exports file and added the ip address of my
>> client that is my embedded board and the path of the folder which I want to
>> share as follows:
>>
>> /opt/my_folder 192.168.1.230(rw,sync,no_root_squash)
>
> You have to restart the NFS service on your desktop Linux after editing
> /etc/exports.
>
>> So next time I commanded it having the destination folder as :
>>
>> # mount -t 192.168.1.230:/opt/my_folder /mnt/
>
> The command is wrong, you need to write this:
>
> mount -t nfs 192.168.1.230:/opt/my_folder /mnt
>
> But I guess it is wrong, because last time you wrote that 192.168.1.230 is
> the IP address of your embedded system. But you want to mount a directory
> of your desktop Linux onto your embedded system, so of course you have to
> provide the IP address of your desktop Linux.
>
>> I ran this command this time :
>>
>> # mount -t nfs -o nolock 192.168.1.230:/opt/my_folder /mnt/
>>
>> and I get the same error previous error as follows:
>>
>> mount: RPC: Unable to receive; errno = Connection refused
>
> Ok, now the command was ok, but I don't think you need "-o nolock". Maybe
> next thing to do is to read the troubleshooting section of the NFS-HOWTO,
> after trying the right IP address :-)
>
> http://nfs.sourceforge.net/nfs-howto/
>
>> Ok one more thing I want to know is that is it possible to mount any
>> filesystem through the NFS on my embedded board using the terminal of my
>> embedded board by telnet.
>
> Yes, this is possible.
>
I tend to use wireshark or tcpdump when debugging this type of thing, as
it shows what's actually on the wire, but to repeat, you must use the
server ip in the command line, not the client, if you are mounting from
the client. ie, from the client:
mount -t nfs server_ip_or_name:/directory client_path/directory
If you use the server name, not ip address, then you also need en entry
in the client /etc/hosts file as well...
Regards,
Chris
Reply by Frank Buss●February 7, 20112011-02-07
piyushpandey wrote:
> 1.In the first step:
>
> In this I just edited the /etc/exports file and added the ip address of my
> client that is my embedded board and the path of the folder which I want to
> share as follows:
>
> /opt/my_folder 192.168.1.230(rw,sync,no_root_squash)
You have to restart the NFS service on your desktop Linux after editing
/etc/exports.
> So next time I commanded it having the destination folder as :
>
> # mount -t 192.168.1.230:/opt/my_folder /mnt/
The command is wrong, you need to write this:
mount -t nfs 192.168.1.230:/opt/my_folder /mnt
But I guess it is wrong, because last time you wrote that 192.168.1.230 is
the IP address of your embedded system. But you want to mount a directory
of your desktop Linux onto your embedded system, so of course you have to
provide the IP address of your desktop Linux.
> I ran this command this time :
>
> # mount -t nfs -o nolock 192.168.1.230:/opt/my_folder /mnt/
>
> and I get the same error previous error as follows:
>
> mount: RPC: Unable to receive; errno = Connection refused
Ok, now the command was ok, but I don't think you need "-o nolock". Maybe
next thing to do is to read the troubleshooting section of the NFS-HOWTO,
after trying the right IP address :-)
http://nfs.sourceforge.net/nfs-howto/
> Ok one more thing I want to know is that is it possible to mount any
> filesystem through the NFS on my embedded board using the terminal of my
> embedded board by telnet.
>
>Your initial idea was to mount a directory on your embedded system, which
>is exported from your desktop PC. So of course you have to use the IP of
>your desktop PC. Login to your embedded system with telnet, then use
>something like
>
>mount -t nfs x:/opt/my_folder
>
>where "x" is the IP of your desktop PC, e.g. 192.168.1.42, not of your
>embedded system and not your internet IP (which is not a local address,
so
>it don't start with 192.168). Make sure that /opt/my_folder and the IP of
>your embedded system is in the /etc/exports file of your desktop PC. You
>can read more about the format of the exports file in the NFS HOWTO.
>
I did as you hinted here in the forum and I did it in two steps as
follows:
1.In the first step:
In this I just edited the /etc/exports file and added the ip address of my
client that is my embedded board and the path of the folder which I want to
share as follows:
/opt/my_folder 192.168.1.230(rw,sync,no_root_squash)
and after saving it I logged in the embedded board via telnet and executed
this command:
# mount -t 192.168.1.230:/opt/my_folder
and the command gets executed just giving the sign of pound next to it i.e.
" # " which means that the terminal is ready to accept the next command .
But where did it mount the filesystem as the path was not specified of the
destination folder where it has to be mounted.
So next time I commanded it having the destination folder as :
# mount -t 192.168.1.230:/opt/my_folder /mnt/
where the /mnt/ folder is present on my embedded board , but it gives the
following error:
# mount -t 192.168.1.230:/opt/my_folder /mnt/
mount: cannot read /etc/fstab: No such file or directory
ok did not get this point .
So this was all my first step, now in the second step I did a little bit
changes and than tried as follows:
2 . Second step of doing the same:
I ran this command this time :
# mount -t nfs -o nolock 192.168.1.230:/opt/my_folder /mnt/
and I get the same error previous error as follows:
mount: RPC: Unable to receive; errno = Connection refused
So with this it gave different error I am not able to get why it is so as I
made all recommended changes.
Ok one more thing I want to know is that is it possible to mount any
filesystem through the NFS on my embedded board using the terminal of my
embedded board by telnet.
Thank you
Piyush Pandey
---------------------------------------
Posted through http://www.EmbeddedRelated.com
Reply by Frank Buss●February 6, 20112011-02-06
Roberto Waltman wrote:
> You need two different addresses in your net, one for each node. They
> can be almost anything, but if you are using DHCP normally they will
> be 192.168.1.xxx or 192.168.0.xxx with a netmask = 255.255.255.0
>
> It is very likely that your modem was also acting as a DHCP server. If
> you disconnect your computer from it, you will have to assign static
> IP addresses to both systems.
DHCP is not very likely. If the PC is connected with something like PPPoE,
then the modem doesn't do very much and the IP address is provided from the
ISP. I would avoid such a configuration, because then you have to trust the
firewall of your PC and your computer is visible in the internet without
any layer between. Better using a router. There are many routers with an
integrated internet port, which provides a gateway for a local network with
DHCP and connects itself with PPPoE or similar protocols to the internet.
An unpatched Windows systems, which is connected to the internet with a
cable modem without a firewall, will be infected with a virus within 4
minutes:
http://isc.sans.edu/diary.html?storyid=4721
Patched Windows versions and Linux might survive longer, but maybe not a
standard desktop Linux configuration.
--
Frank Buss, http://www.frank-buss.de
piano and more: http://www.youtube.com/user/frankbuss
Reply by Roberto Waltman●February 6, 20112011-02-06
Frank Buss <fb@frank-buss.de> wrote:
>piyushpandey wrote:
>> as you said that I should use the ip address of my Desktop.So I want to
>> know that I don't have router and my computer is connected to the cable
>> modem , so what I do is that I remove the normal ethernet cable from the
>> modem and connect the crossover ethernet cable provided by my vendor to the
>> computer and my embedded board .
>>
>> Now since I have disconnected my computer from the modem therefore I change
>> it's ip address from the ip address through which I access the internet and
>> to the ip address of my embedded board which is 192.168.1.230 .
I read that as "Both the computer and the board have the same address"
that will not work.
>> Ok now I want to ask you that should I use this ip 192.168.1.230 or the ip
>> of my internet .......I think it's obvious that I should use the ip address
>> of the board to which I have converted the ip address of my computer.
Not so obvious.
I don't understand what is "the ip of my internenet". If that is the
IP address exposed by your cable to the outside world, it is
irrelevant in this context. You should not use it in your network.
You need two different addresses in your net, one for each node. They
can be almost anything, but if you are using DHCP normally they will
be 192.168.1.xxx or 192.168.0.xxx with a netmask = 255.255.255.0
It is very likely that your modem was also acting as a DHCP server. If
you disconnect your computer from it, you will have to assign static
IP addresses to both systems.
Now back to NFS - Imagine a more common situation, where your embedded
board is connected to a network with many other computers, and more
than one NFS server.
As Frank writes further down, the mount command in the client
specifies what directory to mount from WHICH server. That tells the
NFS client which NFS server should get the request and which server(s)
should not. Therefore, you need to specify there the address of the
server, not the address of the client.
The server will know who (what IP address) is making the request from
the addresses in the headers of the request packets.
> Maybe start reading some more about network basics.
Couldn't agree more.
> A router would make it simpler.
I strongly believe that in small networks, (let's say, up to 30 nodes)
using static IP addresses wil always save time compared to DHCP,
specially in development environments.
(Hey, my new system just rebooted but the lcd display is blank, and I
cannot telnet to it for debugging because I don't know the address.
I'm facing this everyday at work)
I know I am in a minority here ...
>I don't know which interesting problems you might get if you are
>using a crossover cable. But if you type "ifconfig" on your desktop Linux
>and it shows some address like 192.168.1.* , then it should work.
Only for a while... The address 192.168.1.x suggests that it was
obtained via DHCP from the (cable?) modem.
If the modem was disconnected to have a direct connection to the
embedded board, no DHCP server will be found when the lease expires
and the interface will stop working.
>Your initial idea was to mount a directory on your embedded system, which
>is exported from your desktop PC. So of course you have to use the IP of
>your desktop PC. Login to your embedded system with telnet, then use
>something like
>
>mount -t nfs x:/opt/my_folder
>
>where "x" is the IP of your desktop PC, e.g. 192.168.1.42, not of your
>embedded system and not your internet IP (which is not a local address, so
>it don't start with 192.168). Make sure that /opt/my_folder and the IP of
>your embedded system is in the /etc/exports file of your desktop PC. You
>can read more about the format of the exports file in the NFS HOWTO.
Reply by Frank Buss●February 6, 20112011-02-06
piyushpandey wrote:
> Hello Frank
>
>>From the client use the IP address of your desktop PC. Make sure that you
>>have added the IP of your client in the /etc/exports file of your desktop
>>PC. Take a look at /var/log/messages for errors. If you have two Linux
>>systems, try to mount it from one to the other system, to make sure NFS
>>works on your desktop PC. You can do this locally, too, but this might
> not
>>reveal /etc/exports- and network-problems.
>>
>
>
> as you said that I should use the ip address of my Desktop.So I want to
> know that I don't have router and my computer is connected to the cable
> modem , so what I do is that I remove the normal ethernet cable from the
> modem and connect the crossover ethernet cable provided by my vendor to the
> computer and my embedded board .
>
> Now since I have disconnected my computer from the modem therefore I change
> it's ip address from the ip address through which I access the internet and
> to the ip address of my embedded board which is 192.168.1.230 .
>
> and after changing the ethernet configuration I just run the ifconfig eth0
> to check that everything has changed suitably.
>
> and the result is ok and pinging it like this gives me result:
>
> ping 192.168.1.230
>
> it displays the data send and recieved from the embedded board on the
> terminal and also I am able to connect to my board through the FTP and
> telnet .
>
>
> So am I right up to this stage.
>
>
> Ok now I want to ask you that should I use this ip 192.168.1.230 or the ip
> of my internet .......I think it's obvious that I should use the ip address
> of the board to which I have converted the ip address of my computer.
>
>
> So I think I have cleared pretty much of my job, so please give me detailed
> hint on it .
Maybe start reading some more about network basics. A router would make it
simpler. I don't know which interesting problems you might get if you are
using a crossover cable. But if you type "ifconfig" on your desktop Linux
and it shows some address like 192.168.1.* , then it should work.
Your initial idea was to mount a directory on your embedded system, which
is exported from your desktop PC. So of course you have to use the IP of
your desktop PC. Login to your embedded system with telnet, then use
something like
mount -t nfs x:/opt/my_folder
where "x" is the IP of your desktop PC, e.g. 192.168.1.42, not of your
embedded system and not your internet IP (which is not a local address, so
it don't start with 192.168). Make sure that /opt/my_folder and the IP of
your embedded system is in the /etc/exports file of your desktop PC. You
can read more about the format of the exports file in the NFS HOWTO.
--
Frank Buss, http://www.frank-buss.de
piano and more: http://www.youtube.com/user/frankbuss
Reply by piyushpandey●February 6, 20112011-02-06
Hello Frank
>From the client use the IP address of your desktop PC. Make sure that you
>have added the IP of your client in the /etc/exports file of your desktop
>PC. Take a look at /var/log/messages for errors. If you have two Linux
>systems, try to mount it from one to the other system, to make sure NFS
>works on your desktop PC. You can do this locally, too, but this might
not
>reveal /etc/exports- and network-problems.
>
as you said that I should use the ip address of my Desktop.So I want to
know that I don't have router and my computer is connected to the cable
modem , so what I do is that I remove the normal ethernet cable from the
modem and connect the crossover ethernet cable provided by my vendor to the
computer and my embedded board .
Now since I have disconnected my computer from the modem therefore I change
it's ip address from the ip address through which I access the internet and
to the ip address of my embedded board which is 192.168.1.230 .
and after changing the ethernet configuration I just run the ifconfig eth0
to check that everything has changed suitably.
and the result is ok and pinging it like this gives me result:
ping 192.168.1.230
it displays the data send and recieved from the embedded board on the
terminal and also I am able to connect to my board through the FTP and
telnet .
So am I right up to this stage.
Ok now I want to ask you that should I use this ip 192.168.1.230 or the ip
of my internet .......I think it's obvious that I should use the ip address
of the board to which I have converted the ip address of my computer.
So I think I have cleared pretty much of my job, so please give me detailed
hint on it .
Thank you
---------------------------------------
Posted through http://www.EmbeddedRelated.com