当前位置:网站首页>基础配置--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

评分要点:

其他都是相同的就不具体一一对应了。
边栏推荐
猜你喜欢
随机推荐
C语言对文件的操作(完整版)
ROS subscription to multiple topics time synchronization problem
堆和栈的区别
ES6-箭头函数
Webrtc从理论到实践二: 架构
关于网络安全法的个人理解
超详细!!!让你通透数组!!!初学复习不迷路!!
Unity加载GIf动画
哈希表基础
【博学谷学习记录】超强总结,用心分享 | 软件测试 UnitTest框架
crontab timing operation
链表理论基础
闭包,装饰器,类方法,静态方法,委托属性
定义一个生成器函数,用代码写一个和range函数功能相同的函数,re模块中函数的使用
【Latex】TexLive+VScode+SumatraPDF 配置LaTex编辑环境
UE5 最新动态虚幻引擎全新版本引爆互联网
IDEA概述和安装及调试
衡量 DevOps 成功与否的重要度量指标
ES6-Map和Set
UR3机器人雅克比矩阵










