实验一:配置IP地址

1.实验环境

主机A和主机B通过一根网线相连

2.需求描述

为两台主机配置IP地址,验证IP地址是否生效,验证

同一网段的两台主机可以互通,不同网段的主机不能

直接互通

3.推荐步骤

1. 为两台主机配置P地址,主机A为10.0.10.10,主机B为10.0.11.11配置子网掩码

均为255.255.00

2.通过 ipconfig 命令验证主机IP是否生效

C:\>ipconfig

FastEthernet0 Connection:(default port)

   Link-local IPv6 Address.........: FE80::2D0:58FF:FEA8:EE60
   IP Address......................: 10.0.10.10
   Subnet Mask.....................: 255.0.0.0
   Default Gateway.................: 0.0.0.0

Bluetooth Connection:

   Link-local IPv6 Address.........: ::
   IP Address......................: 0.0.0.0
   Subnet Mask.....................: 0.0.0.0
   Default Gateway.................: 0.0.0.0

C:\>ipconfig

FastEthernet0 Connection:(default port)

   Link-local IPv6 Address.........: FE80::290:21FF:FE09:2730
   IP Address......................: 10.0.11.11
   Subnet Mask.....................: 255.0.0.0
   Default Gateway.................: 0.0.0.0

Bluetooth Connection:

   Link-local IPv6 Address.........: ::
   IP Address......................: 0.0.0.0
   Subnet Mask.....................: 0.0.0.0
   Default Gateway.................: 0.0.0.0

3.通过 ping 命令验证两台主机是否互通

C:\>ping 10.0.11.11

Pinging 10.0.11.11 with 32 bytes of data:

Reply from 10.0.11.11: bytes=32 time<1ms TTL=128
Reply from 10.0.11.11: bytes=32 time=4ms TTL=128
Reply from 10.0.11.11: bytes=32 time<1ms TTL=128
Reply from 10.0.11.11: bytes=32 time=3ms TTL=128

Ping statistics for 10.0.11.11:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 4ms, Average = 1ms

C:\>

4.将子网掩码都改为 255.255.255.0,并重复步骤 2,步骤 3

1.将子网掩码都改为255.255.255.0
2.重复步骤2
C:\>ipconfig

FastEthernet0 Connection:(default port)

   Link-local IPv6 Address.........: FE80::2D0:58FF:FEA8:EE60
   IP Address......................: 10.0.10.10
   Subnet Mask.....................: 255.255.255.0
   Default Gateway.................: 0.0.0.0

Bluetooth Connection:

   Link-local IPv6 Address.........: ::
   IP Address......................: 0.0.0.0
   Subnet Mask.....................: 0.0.0.0
   Default Gateway.................: 0.0.0.0

C:\>

C:\>ipconfig

FastEthernet0 Connection:(default port)

   Link-local IPv6 Address.........: FE80::290:21FF:FE09:2730
   IP Address......................: 10.0.11.11
   Subnet Mask.....................: 255.255.255.0
   Default Gateway.................: 0.0.0.0

Bluetooth Connection:

   Link-local IPv6 Address.........: ::
   IP Address......................: 0.0.0.0
   Subnet Mask.....................: 0.0.0.0
   Default Gateway.................: 0.0.0.0

C:\>
3.重复步骤3
​
C:\>ping 10.0.11.11

Pinging 10.0.11.11 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 10.0.11.11:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:\>

​

至此实验结束。

相关推荐
小屁不止是运维1 分钟前
麒麟操作系统服务架构保姆级教程(五)NGINX中间件详解
linux·运维·服务器·nginx·中间件·架构
Hacker_Oldv6 分钟前
WPS 认证机制
运维·服务器·wps
bitcsljl14 分钟前
Linux 命令行快捷键
linux·运维·服务器
Youkiup44 分钟前
【linux 常用命令】
linux·运维·服务器
qq_297504611 小时前
【解决】Linux更新系统内核后Nvidia-smi has failed...
linux·运维·服务器
weixin_437398211 小时前
Linux扩展——shell编程
linux·运维·服务器·bash
小林熬夜学编程1 小时前
【Linux网络编程】第十四弹---构建功能丰富的HTTP服务器:从状态码处理到服务函数扩展
linux·运维·服务器·c语言·网络·c++·http
Hacker_Fuchen1 小时前
天融信网络架构安全实践
网络·安全·架构
上海运维Q先生1 小时前
面试题整理15----K8s常见的网络插件有哪些
运维·网络·kubernetes
ProtonBase1 小时前
如何从 0 到 1 ,打造全新一代分布式数据架构
java·网络·数据库·数据仓库·分布式·云原生·架构