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

评分要点:

其他都是相同的就不具体一一对应了。
边栏推荐
猜你喜欢

对称加密和非对称加密

UR3机器人运动学分析之正运动学分析

软件测试之登录测试详解

MySQL free installation download and configuration tutorial

Pytorch study notes 13 - Basic_RNN

Unity导入我的世界模型,简单图解教程(包括调整材质贴图和光照和添加碰撞)

ImportError: cannot import name 'Xxxx' from partially initialized module 'xx.xx.xx'

Qt TreeView 问题记录

DOM操作-事件的绑定与解绑

Four common ways of POST to submit data
随机推荐
变更管理与 DevOps —— 二者同时进行吗?
国际站卖家大促攻略,只需要做好这几件事
ES6-Map和Set
2021-10-10
Use usb_cam to open multiple cameras at the same time
多线程截取视频为每帧
cenos7配置IP,配置IP不生效
ES6-新增的基本数据:Symbol
fdisk分区,gdisk添加磁盘,parted进行磁盘分区,parted新增分区,临时挂载和永久挂载
多线程(1)
PyTorch Study Notes 08 - Loading Datasets
2021-09-30
【Rhapsody学习笔记】1:Hello World
性能测试概述
ROS service transfer pictures
ES6-Map、Set与Arrary的转换
衡量 DevOps 成功与否的重要度量指标
VNC 启动脚本
文件内容浏览cut、uniq、sort、tr命令的使用,
常用浏览器内核的了解、ES5和ES6的区别、ES6的更新的笔试题
