网络 || 网络层

ip和IP地址

IP指网际互连协议,Internet Protocol的缩写,是TCP/IP体系中的网络层协议。
IP地址:其实就是互联网协议里使用的地址

一台电脑(computer)就是一台主机(host)
一个服务器就是一个主机

一个主机就是一个节点(node)

主机唯一的标识,保证主机间正常通信 
一种网络编码,用来确定网络中一个节点
IP地址由32位二进制(32bit)组成

11010010.01001001.10001100.00000110 

ip地址里的数字(10进制)的范围0~255

IPV4:Internet protocol version 4 --》平常的网络里非常常见 --》32位
IPV6:Internet protocol version 6 --》已经在公网里使用了 --》128位 --》下一代互联网协议

为什么IPV6有这么多的地址,怎么还在使用ipv4?

    资金投入大

IP地址的组成

ip地址由两部分组成

    1.网络部分(network)
    2.主机部分(host)

网段:就是指的网络部分,如果所有的ip地址网络部分一样,这些ip地址就是一个网段。

IP地址的分类

公网:互联网上使用的,是全球唯一的地址

    A 1~126 --》10.*.*.* -->2^24=16777216 -->只有126个网络 --》大型网络
    B 128~191 --》172.16.*.* --》2^16=65536 --》有16384个网络 --》中型网络
    C 192~223 --》192.168.0.* --》2^8=256 -->有16777216个网络 --》小微型网络
    D :给组播地址使用 224
    E :   保留科学研究使用

私网:相当于一个小的局域网,例如某学校。

满足企业用户在内部网络中使用的需求 
私有地址不能在Internet上使用 

私有地址包括3组 
A类:10.0.0.0~10.255.255.255
B类:172.16.0.0~172.31.255.255 
C类:192.168.0.0~192.168.255.255 

环回:loopback --》lo 接口,环回地址,环回接口 127.0.0.1
127开头的地址给所有电脑的lo接口使用,用来测试TCP/IP协议是否正常

ISP internet service provider 互联网服务提供商 -->电信运营商:中国电信,中国移动,中国联通,中国广电

A、B、C三类IP地址的组成
        网络部分(NETWORK)
        主机部分(HOST)

子网掩码

用来确定IP的网络地址
32个二进制位
对应IP地址的网络部分用1表示 
对应IP地址的主机部分用0表示 

IP地址和子网掩码作逻辑“与”运算得到网络地址
0和任何数相与都等于0
1和任何数相与都等于任何数本身

A、B、C三类地址的默认子网掩码

A类:255.0.0.0
B类:255.255.0.0
C类:255.255.255.0

配置主机的IP地址

windows里配置

操作步骤

在桌面上右击“网络”并选择“属性”
在“网络和共享中心”单击“更改适配器设置”
右击需要设置的本地连接,选择“属性”
选择“Internet协议版本 4(TCP/IPv4)”
配置IP地址

windows命令行查看ip地址

ipconfig

linux里的命令

ip  add
ifconfig

查看路由

[root@sc-server ~]# ip route
default via 192.168.1.1 dev ens33 proto static metric 100 
192.168.1.0/24 dev ens33 proto kernel scope link src 192.168.1.54 metric 100 

使用ping命令诊断网络连接

ping 127.0.0.1
验证本地计算机上是否正确地配置了TCP/IP

ping 本地计算机的IP地址
验证其是否已正确地添加到网络中

ping默认网关的IP地址
验证默认网关是否正常工作
是否可以与本地网络上的主机进行通信

ping远程主机的IP地址
验证是否可以通过路由器进行通信

C:\Users\wei>ping 127.0.0.1

正在 Ping 127.0.0.1 具有 32 字节的数据:
来自 127.0.0.1 的回复: 字节=32 时间<1ms TTL=128
来自 127.0.0.1 的回复: 字节=32 时间<1ms TTL=128
来自 127.0.0.1 的回复: 字节=32 时间<1ms TTL=128
来自 127.0.0.1 的回复: 字节=32 时间<1ms TTL=128

127.0.0.1 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
    最短 = 0ms,最长 = 0ms,平均 = 0ms

C:\Users\wei>ping 192.168.2.7

正在 Ping 192.168.2.7 具有 32 字节的数据:
来自 192.168.2.7 的回复: 字节=32 时间<1ms TTL=128
来自 192.168.2.7 的回复: 字节=32 时间<1ms TTL=128
来自 192.168.2.7 的回复: 字节=32 时间<1ms TTL=128
来自 192.168.2.7 的回复: 字节=32 时间<1ms TTL=128

192.168.2.7 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
    最短 = 0ms,最长 = 0ms,平均 = 0ms

C:\Users\wei>ping 192.168.2.1

正在 Ping 192.168.2.1 具有 32 字节的数据:
来自 192.168.2.1 的回复: 字节=32 时间=3ms TTL=128
来自 192.168.2.1 的回复: 字节=32 时间=10ms TTL=128
来自 192.168.2.1 的回复: 字节=32 时间=3ms TTL=128
来自 192.168.2.1 的回复: 字节=32 时间=15ms TTL=128

192.168.2.1 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
    最短 = 3ms,最长 = 15ms,平均 = 7ms

C:\Users\wei>ping 192.168.0.1

正在 Ping 192.168.0.1 具有 32 字节的数据:
来自 192.168.0.1 的回复: 字节=32 时间=6ms TTL=127
来自 192.168.0.1 的回复: 字节=32 时间=2ms TTL=127
来自 192.168.0.1 的回复: 字节=32 时间=3ms TTL=127
来自 192.168.0.1 的回复: 字节=32 时间=4ms TTL=127

192.168.0.1 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
    最短 = 2ms,最长 = 6ms,平均 = 3ms

ping  命令用来测试网络是否通畅,测试工具

时间越短,说明网络质量越好

时间是去+回的总和

0% packet loss  丢包率 为0 说明网络质量还可以,很好
                丢包率越高说明网络质量越差


手工配置ip地址

第一步:查看centos的版本

[root@localhost ~]# cat /etc/centos-release
CentOS Linux release 8.3.2011

第二步:进入网卡配置文件目录

[root@localhost ~]# cd /etc/sysconfig/network-scripts/
[root@localhost network-scripts]# ls
ifcfg-ens33        # 是ens33网卡的配置文件     interface config 接口配置
ens33是系统里的第一个网卡的名字

第三步:修改配置文件

下载vim编辑器
[root@localhost network-scripts]# yum install vim -y

[root@localhost network-scripts]# vim ifcfg-ens33 
BOOTPROTO=none  # 静态配置ip地址 none静态配置(手工配置)dhcp就是动态获得,别的dhcp服务器给我们的机器分配IP地址
NAME=ens33  # 网络连接的名字
DEVICE=ens33 # 网卡的设备名
ONBOOT=yes      # 开机是否启动(激活)yes 启动 no 不启动
IPADDR=192.168.102.129     # 配置ip地址
PREFIX=24                  # 子网掩码
GATEWAY=192.168.102.2    # 默认网关
DNS1=114.114.114.114    # 首选DNS服务器地址
DNS2=192.168.0.1        # 备用DNS服务器地址

首选DNS  第一个开始进行域名解析的服务器
备用DNS  第2个域名服务器,当第一个域名服务器失效的时候,才使用。

DNS服务器不填的后果是什么?
    能否登录QQ? 答案是:可以

    能否打开网页/网站   www.qq.com  答案是:不能

第四步:重启网络服务,获得新配置的ip

centos7 重启网络服务
    service network restart
        service NetworkManager stop -->NetworkManager是一个网络连接管理服务,经常会导致我们的网络配置的ip地址出现服务启动不了,没有获得ip地址
centos8 重启网络服务
    ifup ens33 --》 interface up ens33
[root@localhost network-scripts]# ifup ens33
连接已成功激活(D-Bus 活动路径:/org/freedesktop/NetworkManager/ActiveConnertion/23)

NetworkManager 在centos8里是不能关闭,必须要开启的


tcpdump 是一个抓包工具,数据捕获的工具

-i  指定接口,指定在哪个接口上抓捕数据   interface   一个网卡就是一个接口
     网络适配器就是网卡

 -e     Print  the  link-level  header  on  each  dump line.  This can be used, for example, to print MAC layer
              addresses for protocols such as Ethernet and IEEE 802.11.
              可以查看到mac地址

-v 或者 -vv 可以看到更加多的协议的信息

[root@aliyun ~]# tcpdump -i eth0 -e -v
10:58:22.953683 ee:ff:ff:ff:ff:ff (oui Unknown) > 00:16:3e:24:c7:4b (oui Unknown), ethertype IPv4 (0x0800), length 66: (tos 0x14, ttl 116, id 3319, offset 0, flags [DF], proto TCP (6), length 52)
    175.0.151.158.56718 > iZbp1i0ub0xc19m2oo581kZ.ssh: Flags [.], cksum 0x2803 (correct), ack 323260, win 511, options [nop,nop,sack 1 {328304:332816}], length 0
10:58:22.953685 ee:ff:ff:ff:ff:ff (oui Unknown) > 00:16:3e:24:c7:4b (oui Unknown), ethertype IPv4 (0x0800), length 66: (tos 0x14, ttl 116, id 3320, offset 0, flags [DF], proto TCP (6), length 52)
    175.0.151.158.56718 > iZbp1i0ub0xc19m2oo581kZ.ssh: Flags [.], cksum 0x267f (correct), ack 323260, win 511, options [nop,nop,sack 1 {328304:333204}], length 0
10:58:22.953688 ee:ff:ff:ff:ff:ff (oui Unknown) > 00:16:3e:24:c7:4b (oui Unknown), ethertype IPv4 (0x0800), length 66: (tos 0x14, ttl 116, id 3321, offset 0, flags [DF], proto TCP (6), length 52)
    175.0.151.158.56718 > iZbp1i0ub0xc19m2oo581kZ.ssh: Flags [.], cksum 0x24fb (correct), ack 323260, win 511, options [nop,nop,sack 1 {328304:333592}], length 0
10:58:22.953912 00:16:3e:24:c7:4b (oui Unknown) > ee:ff:ff:ff:ff:ff (oui Unknown), ethertype IPv4 (0x0800), length 2958: (tos 0x10, ttl 64, id 37266, offset 0, flags [DF], proto TCP (6), length 2944)
    iZbp1i0ub0xc19m2oo581kZ.ssh > 175.0.151.158.56718: Flags [.], cksum 0x4dd9 (incorrect -> 0xb07f), seq 334368:337272, ack 37, win 261, length 2904
10:58:22.953916 00:16:3e:24:c7:4b (oui Unknown) > ee:ff:ff:ff:ff:ff (oui Unknown), ethertype IPv4 (0x0800), length 1282: (tos 0x10, ttl 64, id 37268, offset 0, flags [DF], proto TCP (6), length 1268)
    iZbp1i0ub0xc19m2oo581kZ.ssh > 175.0.151.158.56718: Flags [P.], cksum 0x474d (incorrect -> 0x4d46), seq 337272:338500, ack 37, win 261, length 1228
10:58:22.953933 00:16:3e:24:c7:4b (oui Unknown) > ee:ff:ff:ff:ff:ff (oui Unknown), ethertype IPv4 (0x0800), length 2426: (tos 0x10, ttl 64, id 37269, offset 0, flags [DF], proto TCP (6), length 2412)
    iZbp1i0ub0xc19m2oo581kZ.ssh > 175.0.151.158.56718: Flags [P.], cksum 0x4bc5 (incorrect -> 0xd03b), seq 338500:340872, ack 37, win 261, length 2372
10:58:22.953981 00:16:3e:24:c7:4b (oui Unknown) > ee:ff:ff:ff:ff:ff (oui Unknown), ethertype IPv4 (0x0800), length 1146: (tos 0x10, ttl 64, id 37271, offset 0, flags [DF], proto TCP (6), length 1132)
    iZbp1i0ub0xc19m2oo581kZ.ssh > 175.0.151.158.56718: Flags [P.], cksum 0x46c5 (incorrect -> 0xbe68), seq 340872:341964, ack 37, win 261, length 1092
10:58:22.954013 00:16:3e:24:c7:4b (oui Unknown) > ee:ff:ff:ff:ff:ff (oui Unknown), ethertype IPv4 (0x0800), length 442: (tos 0x10, ttl 64, id 37272, offset 0, flags [DF], proto TCP (6), length 428)
    iZbp1i0ub0xc19m2oo581kZ.ssh > 175.0.151.158.56718: Flags [P.], cksum 0x4405 (incorrect -> 0xa93a), seq 341964:342352, ack 37, win 261, length 388
10:58:22.978400 ee:ff:ff:ff:ff:ff (oui Unknown) > 00:16:3e:24:c7:4b (oui Unknown), ethertype IPv4 (0x0800), length 90: (tos 0x14, ttl 116, id 3322, offset 0, flags [DF], proto TCP (6), length 76)
    175.0.151.158.56718 > iZbp1i0ub0xc19m2oo581kZ.ssh: Flags [P.], cksum 0x2e58 (correct), seq 37:73, ack 323260, win 511, length 36
^C
906 packets captured
1079 packets received by filter

按ctrl+c停止

三层交换机里给每个vlan配置ip地址,这个vlan对应的ip地址,就是2层交换机里的对应vlan接口的pc机的网关

vlan因为是虚拟的,是逻辑的,不是真正的某个接口的ip

在三层交换机启用路由功能

Switch>en  进入特权模式
Switch#conf t  进去配置模式  config terminate
Enter configuration commands, one per line.  End with CNTL/Z.

Switch(config)#ip routing   开启路由功能

配置虚接口的IP

Switch(config)#interface vlan 1  #  进入vlan1接口
Switch(config-if)#ip  add  192.168.1.1 255.255.255.0
Switch(config-if)#no shutdown  # 激活网卡


Switch(config)#interface vlan 2
Switch(config-if)#ip add 192.168.2.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#interface vlan 3
Switch(config-if)#ip add 192.168.3.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#

Switch(config)#exit  # 退出配置模式,返回到特权模式
Switch#
%SYS-5-CONFIG_I: Configured from console by console

查看路由器里的路由表 

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

C    192.168.1.0/24 is directly connected, Vlan1
C    192.168.2.0/24 is directly connected, Vlan2
C    192.168.3.0/24 is directly connected, Vlan3
Switch#

交换机的接口是不配置ip地址的,一般是给vlan配置ip地址
路由器的接口是可以配置ip地址的,一个接口默认对应一个网段。
三层交换机默认接口是不配置ip地址的,是2层接口,但是可以启用路由功能,让接口成为路由接口,就可以配置ip地址。

Switch(config)#interface f0/1
Switch(config-if)#no switchport   # 启用接口称为路由口,就可以配置ip地址了
Switch(config-if)#ip add 192.168.4.1 255.255.255.0  配置ip地址
Switch(config-if)#no shutdown     # 激活接口


# 注意:需要将对面的路由器的接口激活,配置好ip地址

Switch#show ip route    # 查看路由表
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

C    192.168.1.0/24 is directly connected, Vlan1
C    192.168.2.0/24 is directly connected, Vlan2
C    192.168.3.0/24 is directly connected, Vlan3
C    192.168.4.0/24 is directly connected, FastEthernet0/1

测试和路由器之间的链路是否畅通

Switch#ping 192.168.4.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.4.2, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 22/28/32 ms

Switch#

练习

1.路由器练习

路由器里添加接口

 路由器里配置ip地址

拓扑图

 验证

PC>ipconfig

IP Address......................: 192.168.1.1
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.1.254

PC>ping 192.168.1.1

Pinging 192.168.1.1 with 32 bytes of data:

Reply from 192.168.1.1: bytes=32 time=13ms TTL=128
Reply from 192.168.1.1: bytes=32 time=0ms TTL=128
Reply from 192.168.1.1: bytes=32 time=15ms TTL=128
Reply from 192.168.1.1: bytes=32 time=16ms TTL=128

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

PC>ping 192.168.1.254

Pinging 192.168.1.254 with 32 bytes of data:

Request timed out.
Reply from 192.168.1.254: bytes=32 time=64ms TTL=255
Reply from 192.168.1.254: bytes=32 time=62ms TTL=255
Reply from 192.168.1.254: bytes=32 time=62ms TTL=255

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

PC>ping 192.168.1.254

Pinging 192.168.1.254 with 32 bytes of data:

Reply from 192.168.1.254: bytes=32 time=62ms TTL=255
Reply from 192.168.1.254: bytes=32 time=51ms TTL=255
Reply from 192.168.1.254: bytes=32 time=61ms TTL=255
Reply from 192.168.1.254: bytes=32 time=62ms TTL=255

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

PC>ping 192.168.2.254

Pinging 192.168.2.254 with 32 bytes of data:

Reply from 192.168.2.254: bytes=32 time=64ms TTL=255
Reply from 192.168.2.254: bytes=32 time=62ms TTL=255
Reply from 192.168.2.254: bytes=32 time=56ms TTL=255
Reply from 192.168.2.254: bytes=32 time=61ms TTL=255

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

PC>ping 192.168.2.1

Pinging 192.168.2.1 with 32 bytes of data:

Request timed out.
Reply from 192.168.2.1: bytes=32 time=110ms TTL=127
Reply from 192.168.2.1: bytes=32 time=126ms TTL=127
Reply from 192.168.2.1: bytes=32 time=111ms TTL=127

Ping statistics for 192.168.2.1:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 110ms, Maximum = 126ms, Average = 115ms

PC>ping 192.168.3.254

Pinging 192.168.3.254 with 32 bytes of data:

Reply from 192.168.3.254: bytes=32 time=64ms TTL=255
Reply from 192.168.3.254: bytes=32 time=63ms TTL=255
Reply from 192.168.3.254: bytes=32 time=32ms TTL=255
Reply from 192.168.3.254: bytes=32 time=63ms TTL=255

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

PC>ping 192.168.3.1

Pinging 192.168.3.1 with 32 bytes of data:

Request timed out.
Reply from 192.168.3.1: bytes=32 time=110ms TTL=127
Reply from 192.168.3.1: bytes=32 time=124ms TTL=127
Reply from 192.168.3.1: bytes=32 time=111ms TTL=127

Ping statistics for 192.168.3.1:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 110ms, Maximum = 124ms, Average = 115ms

PC>ping 192.168.3.1

Pinging 192.168.3.1 with 32 bytes of data:

Reply from 192.168.3.1: bytes=32 time=70ms TTL=127
Reply from 192.168.3.1: bytes=32 time=112ms TTL=127
Reply from 192.168.3.1: bytes=32 time=109ms TTL=127
Reply from 192.168.3.1: bytes=32 time=109ms TTL=127

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

2.三层交换机的练习

 网络拓扑图

测试

 


域名解析工具

host、nslookup、dig 是常用的域名解析工具,可以用来测试域名系统工作是否正常。

# 查询host的命令通过那个软件安装
[root@aliyun ~]# yum provides host
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
32:bind-utils-9.11.4-26.P2.el7.x86_64 : Utilities for querying DNS name servers
Repo        : base
Matched from:
Filename    : /usr/bin/host

# 安装bind-utils软件,得到host命令
[root@aliyun ~]# yum install bind-utils -y

[root@aliyun ~]# host www.qq.com
www.qq.com is an alias for ins-r23tsuuf.ias.tencent-cloud.net.
ins-r23tsuuf.ias.tencent-cloud.net has address 101.91.22.57
ins-r23tsuuf.ias.tencent-cloud.net has address 101.91.42.232
ins-r23tsuuf.ias.tencent-cloud.net has IPv6 address 2402:4e00:1430:1301:0:9227:79d3:ffd1
ins-r23tsuuf.ias.tencent-cloud.net has IPv6 address 2402:4e00:1430:1301:0:9227:79cc:76f2

[root@aliyun ~]# ping www.baidu.com
PING www.a.shifen.com (180.101.50.242) 56(84) bytes of data.
64 bytes from 180.101.50.242 (180.101.50.242): icmp_seq=1 ttl=50 time=12.2 ms
64 bytes from 180.101.50.242 (180.101.50.242): icmp_seq=2 ttl=50 time=12.2 ms
64 bytes from 180.101.50.242 (180.101.50.242): icmp_seq=3 ttl=50 time=12.1 ms
64 bytes from 180.101.50.242 (180.101.50.242): icmp_seq=4 ttl=50 time=12.2 ms
^C
--- www.a.shifen.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3002ms
rtt min/avg/max/mdev = 12.198/12.213/12.228/0.012 ms

[root@aliyun ~]# host www.baidu.com
www.baidu.com is an alias for www.a.shifen.com.
www.a.shifen.com has address 180.101.50.188
www.a.shifen.com has address 180.101.50.242

[root@aliyun ~]# dig www.baidu.com

; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.el7_9.13 <<>> www.baidu.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39213
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.baidu.com.			IN	A

;; ANSWER SECTION:
www.baidu.com.		962	IN	CNAME	www.a.shifen.com.
www.a.shifen.com.	104	IN	A	180.101.50.242
www.a.shifen.com.	104	IN	A	180.101.50.188

;; Query time: 0 msec
;; SERVER: 100.100.2.136#53(100.100.2.136)
;; WHEN: Thu Aug 10 16:40:45 CST 2023
;; MSG SIZE  rcvd: 93

[root@aliyun ~]# nslookup www.baidu.com
Server:		100.100.2.136
Address:	100.100.2.136#53

Non-authoritative answer:
www.baidu.com	canonical name = www.a.shifen.com.
Name:	www.a.shifen.com
Address: 180.101.50.188
Name:	www.a.shifen.com
Address: 180.101.50.242
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

韩未零

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值