
运维服务
docker离线安装
一、准备工作:确认架构并下载安装包 1.1 确认目标服务器架构 在目标服务器上执行以下命令,确认系统架构: 输出 x8664:对应 amd64 架构(Intel/AMD 64位服务
[root@www.wulaoer.org ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 10.18.255.253 0.0.0.0 UG 0 0 0 eth0 10.18.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0 172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0 192.168.250.0 0.0.0.0 255.255.255.0 U 0 0 0 br-187fdbd4e5cf路由表信息注解: Destination: 目标网段或者主机 Gateway: 网关地址,”*” 表示目标是本主机所属的网络,不需要路由 Genmask: 网络掩码 Flags: 标记。一些可能的标记如下: U — 路由是活动的 H — 目标是一个主机 G — 路由指向网关 R — 恢复动态路由产生的表项 D — 由路由的后台程序动态地安装 M — 由路由的后台程序修改 ! — 拒绝路由 Metric: 路由距离,到达指定网络所需的中转数(linux 内核中没有使用) Ref: 路由项正在被使用的进程数 Use: 通过此路由项的分组数 Iface: 路由项对应的接口 下面操作一下route的增删操作,删除路由表需要使用到路由的关键词add,看下面的例子:
[root@www.wulaoer.org ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 10.18.255.253 0.0.0.0 UG 0 0 0 eth0 10.18.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0 172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0 192.168.250.0 0.0.0.0 255.255.255.0 U 0 0 0 br-187fdbd4e5cf [root@www.wulaoer.org ~]# route del -net 172.17.0.0 gw 0.0.0.0 netmask 255.255.0.0 dev docker0172.17.0.0是Destination项的指,gw是固定网关,0.0.0.0是Gateway的值,netmask是固定值,255.255.0.0是Genmask的值,dev是网关出口,最后就是物理设备名。同样也可以用到添加路由表的操作,如下:
[root@www.wulaoer.org ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 10.18.255.253 0.0.0.0 UG 0 0 0 eth0 10.18.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0 192.168.250.0 0.0.0.0 255.255.255.0 U 0 0 0 br-187fdbd4e5cf [root@www.wulaoer.org ~]# route add -net 172.17.0.0 gw 0.0.0.0 netmask 255.255.0.0 dev docker0 [root@www.wulaoer.org ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 10.18.255.253 0.0.0.0 UG 0 0 0 eth0 10.18.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0 172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0 192.168.250.0 0.0.0.0 255.255.255.0 U 0 0 0 br-187fdbd4e5cf路由表的添加在网络维护中相对用的比较多,本篇文章只是对于不了解的入门,如果想深入了解可以看看,这里就说到这,知道怎么使用即可,没有了,在看些其他的吧。。。。。
评论 0