当前位置:网站首页>基础配置--IP地址--主机名--域名
基础配置--IP地址--主机名--域名
2022-07-31 05:19:00 【活加梦】
目录
网络系统管理 样卷+评分细则 提取码: 6hw9https://www.aliyundrive.com/s/wVyDd7dAVC8
一、基础配置
目标:每台主机基础配置,实现相同网段的互联互通。
IspSrv
1.主机名
[email protected]:~# hostnamectl set-hostname ispsrv #设置主机名
2.网卡配置
(1)进入网卡配置文件
[email protected]:~# vim /etc/network/interfaces
(2)修改网卡配置文件
allow-hotplug ens33
iface ens33 inet static
address 81.6.63.100/24
dns-nameservers 81.6.63.100
(3)进入dns配置文件
[email protected]:~# vim /etc/resolv.conf
(4)修改dns配置文件
nameserver 81.6.63.100 #指向dns服务器
3.域名配置
(1)进入hosts文件
[email protected]:~# vim /etc/hosts
(2)修改hosts文件
81.6.63.100 ispsrv ispsrv
(3)重启系统
[email protected]:~# reboot
4.测试
[email protected]:~# hostname #查看主机名
[email protected]:~# hostname -f #查看域名
[email protected]:~# ip a #查看ip地址
AppSrv
1.主机名
[email protected]:~# hostnamectl set-hostname appsrv #设置主机名
2.网卡配置
(1)进入网卡配置文件
[email protected]:~# vim /etc/network/interfaces
(2)修改网卡配置文件
allow-hotplug ens33
iface ens33 inet static
address 192.168.100.100/24
gateway 192.168.100.254
dns-nameservers 192.168.100.100
(3)进入dns配置文件
[email protected]:~# vim /etc/resolv.conf
(4)修改dns配置文件
nameserver 192.168.100.100 #指向dns服务器
3.域名配置
(1)进入hosts文件
[email protected]:~# vim /etc/hosts
(2)修改hosts文件
192.168.100.100 appsrv.chinaskills.cn appsrv
(3)重启系统
[email protected]:~# reboot
4.测试
[email protected]:~# hostname #查看主机名
[email protected]:~# hostname -f #查看域名
[email protected]:~# ip a #查看ip地址
StorageSrv
1.主机名
[email protected]:~# hostnamectl set-hostname storagesrv #设置主机名
2.网卡配置
(1)进入网卡配置文件
[email protected]:~# vim /etc/network/interfaces
(2)修改网卡配置文件
allow-hotplug ens33
iface ens33 inet static
address 192.168.100.200/24
gateway 192.168.100.254
dns-nameservers 192.168.100.100
(3)进入dns配置文件
[email protected]:~# vim /etc/resolv.conf
(4)修改dns配置文件
nameserver 192.168.100.100 #指向dns服务器
3.域名配置
(1)进入hosts文件
[email protected]:~# vim /etc/hosts
(2)修改hosts文件
192.168.100.100 storagesrv.chinaskills.cn storagesrv
(3)重启系统
[email protected]:~# reboot
4.测试
[email protected]:~# hostname #查看主机名
[email protected]:~# hostname -f #查看域名
[email protected]:~# ip a #查看ip地址
[email protected]:~# ping 192.168.100.100 #测试连通性
RouterSrv
1.主机名
[email protected]:~# hostnamectl set-hostname routersrv #设置主机名
2.网卡配置
(1)查看网卡名(因为有三张网卡)
[email protected]:~# ip a
(2)进入网卡配置文件
[email protected]:~# vim /etc/network/interfaces
(3)修改网卡配置文件
allow-hotplug ens33
iface ens33 inet static
address 192.168.100.254/24
dns-nameservers 192.168.100.100
allow-hotplug ens37
iface ens37 inet static
address 192.168.0.254/24
dns-nameservers 192.168.100.100
allow-hotplug ens38
iface ens38 inet static
address 81.6.63.254/24
(4)进入dns配置文件
[email protected]:~# vim /etc/resolv.conf
(5)修改dns配置文件
nameserver 192.168.100.100 #指向dns服务器
3.域名配置
(1)进入hosts文件
[email protected]:~# vim /etc/hosts
(2)修改hosts文件
192.168.100.254 routersrv.chinaskills.cn routersrv
(3)重启系统
[email protected]:~# reboot
4.测试
[email protected]:~# hostname #查看主机名
[email protected]:~# hostname -f #查看域名
[email protected]:~# ip a #查看ip地址
[email protected]:~# ping 192.168.100.100 #测试连通性
[email protected]:~# ping 192.168.100.200 #测试连通性
[email protected]:~# ping 81.6.63.100 #测试连通性
InsideCli
1.主机名
[email protected]:~# hostnamectl set-hostname insidecli #设置主机名
2.网卡配置
(1)进入网卡配置文件
[email protected]:~# vim /etc/network/interfaces
(2)修改网卡配置文件
allow-hotplug ens33
iface ens33 inet dhcp
3.域名配置
(1)进入hosts文件
[email protected]:~# vim /etc/hosts
(2)修改hosts文件
127.0.1.1 insidecli.chinaskills.cn insidecli
(3)重启系统
[email protected]:~# reboot
OutsideCli
1.主机名
[email protected]:~# hostnamectl set-hostname outsidecli #设置主机名
2.网卡配置
(1)进入网卡配置文件
[email protected]:~# vim /etc/network/interfaces
(2)修改网卡配置文件
allow-hotplug ens33
iface ens33 inet dhcp
3.域名配置
(1)进入hosts文件
[email protected]:~# vim /etc/hosts
(2)修改hosts文件
127.0.1.1 outsidecli.chinaskills.cn outsidecli
(3)重启系统
[email protected]:~# reboot
二、测试截图与评分要点
测试:Ispsrv
评分要点:
其他都是相同的就不具体一一对应了。
边栏推荐
猜你喜欢
随机推荐
2022年软件测试现状最新报告
UE5 最新动态虚幻引擎全新版本引爆互联网
ES6-字符串
常用浏览器内核的了解、ES5和ES6的区别、ES6的更新的笔试题
Unity Text一个简单的输入特效
第一次实践——计算器
PyTorch Study Notes 08 - Loading Datasets
定义一个类,super的使用,私有属性
【博学谷学习记录】超强总结,用心分享 | 软件测试 测试基本概念、模型与用例
Unity转微信小游戏与JS交互
【Rhapsody学习笔记】2:Count Down
等待,信息打印,浏览器操作,键盘事件
浅谈音视频开发入门基础及进阶资源分享
Pytorch study notes 13 - Basic_RNN
cenos7安装cmake-3.22.2
解决nx安装 jtop问题
力扣刷题.快乐数
企业级 DevOps 究竟是什么?
JDBC的使用
VS2019配置配置项目属性自定义输出目录与中间目录