网络配置

1.ifconfig检查网络配置
image
了解每个部分的含义
2.ip addr检查网口
image
单独检测某一个网口ip addr show
image
设置设备的ip地址及其子网掩码
ip addr add 目标ip/子网掩码 dev docker0
image
3.路由配置
3.1路由的基础知识
3.2路由查询
查询当前设备路由表:route -n
image
了解输出选项说明
image
添加到主机的路由:
route add -host 地址 dev 网卡
添加静态路由
image
添加默认路由:
image
删除路由:
image
3.3路由配置
路由查看和配置都可以使用route命令
了解常用参数
3.4权限配置
3.4.1权限位
3.4.2基本权限命令
chmod
image
image
3.5启动项配置
image
image
3.5.1systemd开机启动
image
3.5.2 rc.local
image
在Linux启动之前会进行执行的配置文件,为该文件下添加你想进行的内容可以开机自启动。
3.6 ntl配置
image
image是NTL服务的主要配置文件
启动ntp服务:
service ntpd start
查看ntp服务器与上层ntp状态:
image

3.6.2 restrict命令
image
image
image
限制服务器访问类型:
image
restict 192.168.0.0 mask 255.255.255.0 notrust nomodify notrap
image
从192.168.0.1-192.168.0.254的服务器都可以找我们的ntp服务器同步时间
确保localhost有足够权限:
image
image
3.6.3 设定ntp主机来源,找到本地ntp服务器地址,优先指定从该主机同步时间
image
image
3.6防火墙配置
3.7 ipv6配置

posted @ 2025-11-04 15:47  Lè_Sage  阅读(22)  评论(0)    收藏  举报