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

评分要点:

其他都是相同的就不具体一一对应了。
边栏推荐
猜你喜欢
随机推荐
Log jar package conflict, and its solution
Qt TreeView 问题记录
能否更上一层楼?探究 CMake 争论
软链接和硬链接画图,以及代码,一级目录的解释,重定向,创建文件,删除文件,创建目录,删除目录,cp、mv命令的使用
nacos1.4.1创建配置报错
IDEA overview and installation and debugging
C语言结构体(必须掌握版)
超详细!!!让你通透数组!!!初学复习不迷路!!
OneManager搭建
浅谈音视频开发入门基础及进阶资源分享
DOM操作-事件的绑定与解绑
堆和栈的区别
企业级 DevOps 究竟是什么?
Debian 搭建 WireGuard 服务端
IDEA概述和安装及调试
MySQL官网8.0.17 安装教程(适合离线安装)
FRP穿透教程
Unity Text一个简单的输入特效
【源码笔记】痛苦来源于比较——什么是相等,hashCode() 和 equals(Object)
Unity软件中UGUI和NGUI的多语言开发










