centos7挂载nas存储_CentOS7服务器连接nas拷贝文件

1. 给nas配置固定ip并用网线直接连接到nas上

先把nas连接到局域网里,在局域网里用windows下的nas厂商提供的工具查找到了nas的ip,进去web页面将ip设置为固定ip 192.168.3.3。 CentOS服务器有两个网卡,em1正在使用(dhcp分配的ip)不可变动,em2没在使用。

用网线将em2和nas的网口直连。配置em2网卡的IP为192.168.3.5。配置centos路由,先查看route。

[root@localhost ~]# route

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

default 172.31.0.1 0.0.0.0 UG 100 0 0 em1

172.31.0.0 0.0.0.0 255.255.255.0 U 100 0 0 em1

192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0

如果发现有em2的route,先route del -net x.x.x.x netmask x.x.x.x dev em2 删掉。

添加到192.168.3.3的route。

route add -host 192.168.3.3 dev em2

[root@localhost ~]# route

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

default 172.31.0.1 0.0.0.0 UG 100 0 0 em1

172.31.0.0 0.0.0.0 255.255.255.0 U 100

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值