当前位置:网站首页>基础配置--IP地址--主机名--域名
基础配置--IP地址--主机名--域名
2022-07-31 05:19:00 【活加梦】
目录
网络系统管理 样卷+评分细则 提取码: 6hw9
https://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]:~# reboot4.测试
[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]:~# reboot4.测试
[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]:~# reboot4.测试
[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]:~# reboot4.测试
[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]:~# rebootOutsideCli
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

评分要点:

其他都是相同的就不具体一一对应了。
边栏推荐
猜你喜欢
随机推荐
WIN10,配置adb环境
力扣.有效的字母异位词
TCP与UDP协议的区别,以及TCP的三次握手和四次挥手
UR3机器人运动学分析之正运动学分析
链表理论基础
MySQL表的增删改查(1)
Debian 搭建 WireGuard 服务端
Learning and understanding of ROS service programming
十分钟教你玩转分支语句!!!!!小白速进,新手福利!!
2021-09-30
Unity Text一个简单的输入特效
力扣刷题之排序链表
在 AWS 上从零开始设置 Incredibuild 构建系统
Webrtc从理论到实践二: 架构
滴滴被罚超80亿!收集并泄露1.07亿条乘客人脸识别信息
国际站卖家大促攻略,只需要做好这几件事
读写文件,异常,模块和包
ES6-Map、Set与Arrary的转换
解决nx安装 jtop问题
DOM操作案例1-点击,使表格的颜色切换(点击单元格,整行或整列颜色切换)










