打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Ethernet相关
1.PING
用网线连接目标板和主机,
手动设置主机ip地址(eg:192.168.1.99)
设置目标板ip:
#ifconfig eth0 192.168.1.100 up
net eth0: SMSC911x/921x identified at 0xc8020000, IRQ: 167
#ping 192.168.1.99

(#./ethertp 0 1-2-1.log 0 PING -h 192.168.1.99 -p 0 20 1 -d)

2.FTP
在windows下安装Xlight FTP Server,新建一个站点,
server ip:192.168.1.99
user:
password:
再设置用户的一些访问权限;
host ip:192.168.1.99/255.255.255.0/192.168.1.1
board ip:192.168.1.100(ifconfig eth0 192.168.1.100 up)

(# ./ethertp 0 3-2-1.log 0 FTP -h 192.168.1.99 -f ../data_100M -l shareFTP0 1 1 -d)


3.NFS
用网线连接主机和目标板
主机进入ubuntu,
3.1安装nfs:
#sudo apt-get install nfs-kernel-server(安装nfs-kernel-server时,apt会自动安装nfs-common和portmap),这样,宿主机就相当于NFS Server。
3.2配置nfs

打开/etc/exports文件,在末尾加入:

/home/lj/nfs 172.28.24.0/255.255.255.0(rw,sync,no_root_squash)(以本人测试环境为例)

NOTE:

上面的主机IP不能使用*来通配,否则在客户机上会出现访问拒绝,但是如果我们要设置局域网访问呢?怎么办,使用子网掩码例如:10.1.60.0/255.255.254.0即可让10.1.60.*和10.1.61.*都可以访问,还可以使用10.1.60/23这种方式类确定子网。

注:nfs允许挂载的目录及权限,在文件/etc/exports中进行定义, 各字段含义如下:

/home/lj/nf:要共享的目录

172.28.24.* :允许所有的网段访问

rw :读写权限

sync:资料同步写入内在和硬盘

no_root_squash:nfs客户端共享目录使用者权限

3.3重启服务

#sudo /etc/init.d/portmap restart <---重启portmap,很重要

Rather than invoking init scripts through /etc/init.d, use the service(8)

  utility, e.g. service portmap restart

  Since the script you are attempting to invoke has been converted to an

  Upstart job, you may also use the restart(8) utility, e.g. restart portmap

  portmap start/running, process 474

#sudo /etc/init.d/nfs-kernel-server restart <---重启nfs服务

* Stopping NFS kernel daemon [ OK ]

  * Unexporting directories for NFS kernel daemon... [ OK ]

  * Exporting directories for NFS kernel daemon...

  exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "*:/home/xgc".

  Assuming default behaviour ('no_subtree_check').

  NOTE: this default has changed since nfs-utils version 1.0.x

  [ OK ]

  * Starting NFS kernel daemon [ OK ]

#showmount -e <---显示共享出的目录

Export list for lj-desktop:

/home/lj/nfs 172.28.24.0/255.255.255.0

虚拟机上查看nfs:

#server nfs-kernel-server status

nfsd running

(# ./ethertp 0 5-2-1.log 0 NFS -h 172.28.24.236:/home/lj/nfs -f ../data_100M -l shareNFS0 1 1 -d)

问题:

mount: RPC: Unable to send; errno = Network is unreachable

解决:保证主机和板子的ip在同一网段上;

mount: RPC: Unable to receive; errno = No route to host

解决:连接板子和主机的网线可用,ping一下,看是否ping通;






本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
实现nfs(不知叫不叫nfs,就是arm能通过网络挂接虚拟机中的文件夹)
ubuntu12.04的NFS配置
Ubuntu NFS 安装与配置
mount.nfs: access denied by server while mounting
NFS安装在ubuntu并共享
ubunut NFS
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服