设为首页收藏本站language 语言切换
查看: 1376|回复: 0
收起左侧

[原创] HCNA-资料

[复制链接]
发表于 2017-6-14 09:24:58 | 显示全部楼层 |阅读模式
OSI七层模型
物理层physical   1     比特 bit
数据链路层 data-link   帧 frame
网络层 network         包 packet
传输层transport        段 segment
会话层session
表示层presentation
应用层application  7

1 Byte= 8 bit


对于下层来说,上层封装的所有部分都是我的data。





数据链路层

LLC子层
logic-link control
逻辑链路控制子层

SAP服务访问点:区分不同的上层协议

MAC子层
media-access control
介质访问控制子层

FCS尾部校验和:保证数据完整性

端口号:
标识不同的上层协议
范围:0~65535      65536=2^16




TTL:生存时间

数据包每被重新封装一次减1

MTU:最大传输单元

255.255.255.255   本地广播


C:192.168.1.0      网络位24位
256-2=254台

2个部门    每个部门100台PC
2个子网

192.168.1.0000 0000

192.168.1.0000 0000    25位
192.168.1.0/25         126  PC

192.168.1.1000 0000    25位
192.168.1.128/25       126  PC



192.168.1.0/24
3个部门       借2位   划分成4个子网  每个子网大小是一样的,可以容纳62台PC
VLSM
可变长子网掩码
传统的子网划分方式,是根据子网的数量来进行借位的,每个子网大小相同,实用性很低

VLSM是根据子网的大小来进行借位,每个子网的大小不一样

借位的规则:
向主机位借位,依次借位

二级结构:网络位+主机位
三级结构:网络位+子网位+主机位


192.168.1.0   24位
A:100
192.168.1.0   25位    126台

剩余:192.168.1.128    25位  126台

B:50
192.168.1.128       26位  62台

剩余:
192.168.1.192      26位  62台

C:30
192.168.1.192    27位    30台

剩余:
192.168.1.224    27位    30台

D:10
192.168.1.1110 0000

192.168.1.111X 0000

192.168.1.224   28   14台

剩余:
192.168.1.240   28   14台


E:4
192.168.1.240   28   14台



192.168.1.1     C    24位

192.168.1.1   
子网掩码
用1 表示网络位,用0表示主机位
0和1 不能交替出现

0000 0000   0
1111 1111   255

192.168.1.1
1100 0000.1010 1000.0000 0001.0000 0001

1111 1111.1111 0000.1111 1111.1000 0000

网络号:
1100 0000.1010 1000.0000 0001.0000 0000

192.168.1.0

网络号:192.168.1.0
用IP地址和子网掩码进行“与”运算

1 1 --1
1 0 --0
0 1 --0
0 0 --0

255.255.255.128




CIDR ---  VLSM

192.168.1.0      24
192.1010 1000
192.168.2.0    24
192.1010 1000
192.160.3.0    24
192.1010 0000

192.1010 1000
192.1010 1000
192.1010 0000

从第一位“不都一样”的位开始为主机位

192.160.0.0/12   CIDR表示法


封装的必要参数:
SMAC   DMAC
SIP DIP
SPORT  DPORT




ARP:
广播请求
单播回应










路由:
名词:路由条目
动词:动作,把数据包转发出去的动作

每个字节一个序列号

期望确认:
用自己希望得到的序列号来进行确认,这个序列号是我收到的有效的报文的最后一个序列号加1

端口号:
FTP   TCP 21用于数据连接 20用于控制连接
TFTP  UDP 69




TCP   22 SSH  23telnet   80 http







  



<Huawei>用户视图
<Huawei>system-view 进入系统视图
Enter system view, return user view with Ctrl+Z.
[Huawei]系统视图

[Huawei]sysname R1
[R1]interface g0/0/0
[R1-GigabitEthernet0/0/0]ip address 12.1.1.1 24

[R1-GigabitEthernet0/0/0]display this
[V200R003C00]
#
interface GigabitEthernet0/0/0
ip address 12.1.1.1 255.255.255.0
#
return


[R1-GigabitEthernet0/0/0]quit
[R1]

[R1-GigabitEthernet0/0/0]return
<R1>

[R2-GigabitEthernet0/0/0]ping 12.1.1.1
  PING 12.1.1.1: 56  data bytes, press CTRL_C to break
    Reply from 12.1.1.1: bytes=56 Sequence=1 ttl=255 time=160 ms
    Reply from 12.1.1.1: bytes=56 Sequence=2 ttl=255 time=40 ms
    Reply from 12.1.1.1: bytes=56 Sequence=3 ttl=255 time=10 ms
    Reply from 12.1.1.1: bytes=56 Sequence=4 ttl=255 time=30 ms
    Reply from 12.1.1.1: bytes=56 Sequence=5 ttl=255 time=10 ms

  --- 12.1.1.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/50/160 ms

[R1]user-interface console 0
[R1-ui-console0]authentication-mode password
Please configure the login password (maximum length 16):123

[R1]dis current-configuration 查看运行配置

<R2>dis saved-configuration 查看保存配置




precedence 优先级  ----Cisco AD
cost 度量值------------Cisco metric







谁给我的路由条目谁就是我的下一跳(下一个路由器)

[R2]dis ip int br
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 2
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 2

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              12.1.1.2/24          up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s)  


[R2]dis interface brief
PHY: Physical
*down: administratively down
(l): loopback
(s): spoofing
(b): BFD down
^down: standby
(e): ETHOAM down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface                   PHY   Protocol InUti OutUti   inErrors  outErrors
GigabitEthernet0/0/0        up    up          0%     0%          0          0
GigabitEthernet0/0/1        down  down        0%     0%          0          0
GigabitEthernet0/0/2        down  down        0%     0%          0          0
NULL0                       up    up(s)       0%     0%          0   



IGP   RIP OSPF ISIS
EGP    BGP

AS:自治系统
由一个组织统一定义和管理的网络,运行相同的路由策略

[R2]dis arp
IP ADDRESS      MAC ADDRESS     EXPIRE(M) TYPE        INTERFACE   VPN-INSTANCE
                                          VLAN/CEVLAN PVC                     
------------------------------------------------------------------------------
12.1.1.2        00e0-fcf6-7348            I -         GE0/0/0
12.1.1.1        00e0-fc92-2a6d  5         D-0         GE0/0/0
------------------------------------------------------------------------------
Total:2         Dynamic:1       Static:0     Interface:1  


[R1-GigabitEthernet0/0/0]arp-proxy enable 开启代理ARP



------清默网络简介

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-2-10 23:32 , Processed in 0.059191 second(s), 12 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表