学习注水-20160824~20160830-CCNA检漏之旅

来源:互联网 发布:unity3d ui制作 编辑:程序博客网 时间:2024/04/27 14:32

网络互联

设备

  • 集线器:物理层设备
  • 交换机/网桥:数据链路层设备(划分冲突域)[专用集成电路ASIC]
  • 路由器:网络层设备(划分广播域)
  • WAN:采用串行接口(广域网)V.35接口
  • VLAN:为第二层交换网络划分逻辑广播域

导致LAN拥塞的原因

  • 广播域或冲突域主机太多
  • 广播风暴
  • 组播数据流太多
  • 带宽太低
  • 使用集线器拓扑网络
  • ARP广播太多

网络互联模型

OSI:开放系统互联参考模型

  • 应用层:提供用户界面
  • 表示层:表示数据 / 进行数据加密压缩等处理
  • 会话层:分离不同应用数据的信息[单工/半双工/全双工]
  • 传输层:端到端连接(数据分段)[TCP/UDP]流量控制/窗口技术/面向连接的通信/确认(支持重传纠错)
  • 网络层:路由选择(段成分组)
  • 数据链路层:成帧(分组成帧)(错误检测但不纠错)[逻辑链路控制LLC/介质访问控制MAC]
  • 物理层:物理拓扑(传输比特)

运行在OSI模型的全部7层上的设备:

  • NMS(网络管理工作站)
  • Web和应用程序服务器
  • 网关(非默认网关)
  • 服务器
  • 网络主机

透明桥接

是指第二层设备只把帧转发到目标硬件地址所属的网段

CSU/DSU/DTE/DCE

DTE通过调制解调器货CSU/DSU来使用可用的服务

以太网和数据封装

备忘

AP

无线接入点[IEEE 802.11]

整理

冲突域和广播域

二层设备分割冲突域,三层设备分割广播域

载波侦听多路访问/冲突检测 CSMA/CD

LAN冲突后,将出现如下情况:(严重时导致延迟/吞吐量低/拥塞)

  • 拥堵信号告诉所有设备
  • 冲突激活随机后退算法
  • 以太网网段中的每台设备都暂停运输,直到其后退定时器到期
  • 定时器到期后,所有主机的传输优先级都相同

半双工和全双工以太网

IEEE 思科

  • 半双工[IEEE 802.3](CSMA/CD)
  • 全双工[简单说,至少无集线器](自动检测机制)
  • 思科认为只用一对导线叫做半双工,用两对导线叫做全双工模式

牢记要点

  • 全双工模式下,不会发生冲突
  • 每个全双工节点都必须有一个专用的交换机端口
  • 主机的网卡和交换机端口必须能够在全双工模式下运行
  • 如果检测失败,10Base-T 和 100Base-T主机默认在半双工模式下以10Mbit/s的传输速率运行,因此务必设置交换机速度和双工模式

以太网数据链路层

  • 以太网编址
    • I/G位:0 -> I (某台设备) 1 -> G (广播/组播地址)
    • U/L位或G/L位:0 -> U/G (全局管理地址 IEEE分配) 1 -> L (本地管理地址)
  • 其他内容
    • 循环冗余校验(CRC) FCS帧校验序列
    • Ethernet_II帧类型:0x800 -> IPv4 0x86dd -> IPv6

以太网物理层

  • UTP -> 非屏蔽双绞线
  • 标准接头 -> RJ45
  • 以太网标准
    • 10Base-T IEEE802.3
    • 100Base-TX IEEE802.3u
    • 100Base-FX IEEE802.3u
    • 1000Base-CX IEEE802.3z
    • 1000Base-T IEEE802.3ab
    • 1000Base-SX IEEE802.3z
    • 1000Base-LX IEEE802.3z
    • 1000Base-ZX 思科标准
    • 10GBase-T IEEE802.3an

以太网布线(自动检测机制不包含在CCNA中)

  • 直通电缆(交换机到其他)
  • 其他
  • 反转电缆(控制台串行通信 COM )
  • 光纤(9微米)

数据封装

  • MAC LLC IP头 TCP头 上层数据 FCS
  • 数据段
  • 分组
  • 比特

包含三层的思科模型

  • 核心层:唯一目标是尽可能快地交换数据
  • 集散层:主要功能是提供路由选择/过滤和WAN接入,以及在必要时确定如何让分组进入核心层
  • 接入层:大多数用户所需要的资源位于本地

TCP/IP 简介

备忘

私有地址

RFC1918

整理

DoD模型是OSI模型的精简版,包含以下四层:

  • 进程应用层
    • Telnet
    • SSH
    • FTP
    • TFTP
    • SNMP
    • HTTP
    • HTTPS
    • NTP
    • DNS
    • DHCP/BootP(免费ARP)
    • APIPA(自动私有IP编址)
  • 主机到主机层(也称为传输层)[TCP(虚电路)/UDP(也称为痩协议)]
    • FTP [20 21] -> Tcp
    • SSH[22]-> Tcp
    • Telnet [23] -> Tcp
    • HTTP[80]-> Tcp
    • POP3 [110] -> Tcp
    • IMAP4[143]-> Tcp
    • HTTPS[443]-> Tcp
    • DNS [53] -> Tcp / Udp
    • TFTP [69] -> Udp
    • DHCP/BootPS [67] -> Udp
    • NTP[123]-> Udp
    • SNMP[161]-> Udp
  • Internet层
    • ICMP(互联网控制消息协议)
    • IP(网际协议)
    • ARP(地址解析协议)
  • 网络接入层(也称为链路层)

轻松划分子网

无类域间路由选择 CIDR

ip subnet-zero //可使用第一个和最后一个子网

变长子网掩码/汇总和TCP/IP故障排除

分类路由选择

所有主机和路由器接口都使用相同的子网掩码

汇总

超网化/路由聚合

思科发现协议

CDP

排除 IP 编址故障

ping //cisco & windowstraceroutetracert //windowsarp -a //windowsshow ip arpipconfig /all

思科互联网络操作系统

备忘

连接到思科设备的三种方式

  • 控制台端口
  • 辅助端口 Aux (交换机没有辅助端口)
  • 带内方式 Telnet & SSH

整理

switch>enable
switch>logout
switch#disable
switch#config t
switch(config)#interface f0/0
switch(config)#line con 0
switch(config-line)#exec-timeout 0 0
switch(config-line)#logging synchronous
switch(config)#ip access-list standard stdName
switch#clock set 2:32:01 29 aug 2016
switch#show history
switch#show terminal
switch(config)#hostname hostName
switch(config)banner motd #
switch(config-line)#password telnet
switch(config-line)#login
switch(config)#ip domain-name ipDomainName.com
switch(config)#crypto key generate rsa
switch(config)#ip ssh version 2
switch(config-line)#transport input ssh
switch#show running-config
switch(config)#service password-encryption
switch(config-if)#description descriptionDetail …
switch#show ip interface brief
switch(config-if)#speed 1000
switch(config-if)#duplex full
switch(config-if)#ip address 10.1.1.1 255.255.255.0
switch(config-if)#ip address 10.10.1.1 255.255.255.0 secondary
switch(config-if)#no shutdown
switch#show run | begin begin
switch#show run | include include
switch(config-if)#clock rate clockRateNum(bit/s)
switch(config-if)#bandwidth bandwidthNum(kbit/s)
router#show controllers s0/2/0
switch#copy run start
switch#erase start
switch#reload
switch#show cdp entry * protocol

模式

  • 用户EXEC模式
  • 特权EXEC模式
  • 全局配置模式
  • 具体的配置模式
  • 设置模式

管理思科互联网络

配置DHCP

switch(config)#ip dhcp excluded-address 192.168.10.1 192.168.10.10
switch(config)#ip dhcp pool dhcpPoolName
switch(dhcp-config)#network 192.168.10.0 255.255.255.0
switch(dhcp-config)#default-router 192.168.10.1
switch(dhcp-config)#dns-server 4.4.4.4
switch(dhcp-config)#lease 3 12 15 // 3天12小时15分钟
router(config-if)#ip helper-address 10.10.10.254
switch#show ip dhcp binding
switch#show ip dhcp pool poolName
switch#show ip dhcp server statistics
switch#show ip dhcp conflict

配置NTP

router(config)#logging host 10.1.1.1
router(config)#service timestamps log datetime msec
router(config)#ntp server 10.1.1.1 version 4
router(config)#show ntp status
router(config)#show ntp associations
switch#show cdp
switch(config)#cdp holdtime secNum
switch(config)#cdp timer rate
switch(config)#no cdp run //关闭cdp
switch(config)#cdp run //启用cdp
switch#show cdp neighbors
switch#show cdp neighbors detail

telnet

switch#show users
switch#show session
switch#disconnect telnetNum

解析主机名

  • host命令配置

    switch(config)#ip host hostName ipAddress
    switch(config)#do show hosts

  • dns解析名称

    switch(config)#ip domain-lookup
    switch(config)#ip name-server ipAddress
    switch(config)#ip domain-name domainName.com

使用troubleshoot

switch#show processes
switch#debug all
switch#debug ip icmp

IP路由选择

思科使用三种分组转发技术

  • 进程交换
  • 快速交换
  • CEF

路由选择协议管理距离AD

  • 直连接口 0
  • 静态路由 1
  • EIGRP 90
  • OSPF 110
  • RIP 120
  • 外部EIGRP 170
  • 未知 255

配置默认路由

router(config-router)#default-information originate

开放最短路径优先

备忘

ASBR

自主系统边界路由器

LSA更新使用的组播地址

224.0.0.5 点到点224.0.0.6 广播

OSPF度量值

ip ospf cost costNum

整理

OSPF操作分为三类:

  • 初始化邻居关系
  • LSA泛洪
  • 计算SPF树

OSPF配置

Router(config)#router ospf 1
Router(config-router)#network 10.0.0.0 0.255.255.255 area 0
Router#show ip ospf database
Router#show ip protocols

第二层交换

三项功能

  • 地址获悉
  • 转发/过滤决策
  • 环路避免

端口安全

switch(config-if)#switchport mode access
switch(config-if)#switchport port-security
switch(config-if)#switchport port-security maximun 1
switch(config-if)#switchport port-security violation shutdown //snmp 关闭端口
switch(config-if)#switchport port-security violation restrict //snmp 丢弃所有帧
switch(config-if)#switchport port-security violation protect //丢弃所有帧
switch(config-if)#switchport port-security mac-address sticky
switch(config)#ip default-gateway 192.168.1.1
switch(config)#mac address-table static aaaa.bbbb.ccc vlan 1 int f0/7

vlan及vlan间路由选择

备忘

vlan标识方法

  • IEEE 802.1q
  • ISL

单臂路由

ROAS

整理

switch(config-if)#switchport mode access
switch(config-if)#switchport access vlan 3
switch(config-if)#switchport trunk native vlan vlanNum

安全

备忘

拒绝服务攻击

DoS

入侵检测系统

IDS

入侵防范系统

IPS

整理

router(config)#access-list standardAccessListNum deny host ipAddress
router(config)#access-list standardAccessListNum permit any
router(config-if)#ip access-group standardAccessListNum out
router(config)#access-list extentedAccessListNum deny tcp sourceIpAddress destinationIpAddress
router(config)#access-list extentedAccessListNum deny ip any host 172.16.30.2 eq 23 log
router(config)#ip access-list standard standardAccessListName
router(config-std-nacl)#deny 172.168.40.0 0.0.0.255
router(config-std-nacl)#permit any
router(config-std-nacl)#remark description

网络地址转换

NAT三种类型

  • 静态NAT

    ip nat inside source static 10.1.1.1 170.1.1.1
    ip nat inside
    ip nat outside

  • 动态NAT

    ip nat pool poolName beginIpAddress endIpAddress netmask netmask
    access-list accessListNum permit 192.168.1.0 0.0.0.255
    ip nat inside source list accessListNum pool poolName
    ip nat inside
    ip nat outside

  • NAT重载 PAT

    ip nat pool poolName IpAddress IpAddress netmask netmask
    access-list accessListNum permit 192.168.1.0 0.0.0.255
    ip nat inside source list accessListNum pool poolName overload
    ip nat inside
    ip nat outside

IPv6

  • 单播地址
  • 全局单播地址 2000::/3
  • 链路本地地址 FE80::/10
  • 唯一本地地址FC00::/7
  • 组播地址 FF00::/8
  • 任意播地址

router(config)#ipv6 unicast-routing
router(config-if)#ipv6 address 2001:db8:3c4d:1:0260:d6ff:fe73:1987/64
router(config-if)#ipv6 address 2001:db8:3c4d:1::/64 eui-64
router(config-if)#ipv6 enable
router(config-if)#ipv6 address autoconfig default

邻居发现支持的功能

  • 获取邻居mac地址
  • RS FF02::2
  • RA FF02::1
  • NS
  • NA
  • 重复地址检测 DAD

OSPFv3

router(config)#ipv6 router ospf 10
router(config-rtr)#router-id 1.1.1.1
router(config-if)#ipv6 ospf 10 area 0

高级交换技术

生成树协议

STP

根网桥

网桥ID(网桥优先级和MAC地址共同决定)最小(最佳)的网桥

BPDU

网桥协议数据单元

端口角色

- 根端口- 指定端口- 非指定端口- 转发端口- 阻断端口- 替代端口(802.1w)- 备用端口(802.1w)

生成树端口状态

  • 禁用-丢弃
  • 阻断-丢弃
  • 侦听-丢弃
  • 学习-学习
  • 转发-转发

端口成本

  • 10Mbit/s 100
  • 100Mbit/s 19
  • 1000Mbit/s 4
  • 10000Mbit/s 2

生成树协议的类型

  • IEEE 802.1d
  • PVST+
  • IEEE 802.1w RSTP
  • 快速PVST+

show spanning-tree vlan vlanId
show spanning-tree summary
spanning-tree vlan vlanId priority priorityNum
spanning-tree vlan vlanId root primary/secondary
spanning-tree mode rapid-pvst

portfast

switch(config-if)#spanning-tree portfast

bpduguard

switch(config)#spanning-tree portfast bpduguard default
switch(config-if)#spannning-tree bpduguard enable

EthernetChannel

  • PAgP(思科专用)[auto/desirable]
  • LACP(非专用)[active/passive](802.3ad)
    switch(config-if)#switchport trunk encapsulation dot1q
    switch(config-if)#switchport mode trunk
    switch(config-if)#channel-group 1 mode active

e.g.

switch(config)#int port-channel 1
switch(config-if)#switchport trunk encapsulation dot1q
switch(config-if)#switchport mode trunk
switch(config-if)#switchport trunk allowed vlan 1,2,3
switch(config-if)#channel-group 1 mode desirable

管理思科设备

router#show version
router#show flash
router(config)#boot system flash xxxxxxx.bin

修改配置寄存器

rommon 1 >confreg 0x2142
rommon 2 >reset
router(config)#config-register 0x2102

许可

router#show license udi //唯一设备标识符
router#license install flash:xxxx.lic
router(config)# license boot module xxx xxx xxx
router#show license
router#show license feature

IP 服务

第一跳冗余协议

FHRP
  • HSRP-热备用路由器协议

    • 活动路由器
    • 备用路由器
    • 虚拟路由器
    • hello定时器/保持定时器/活动定时器/备用定时器

    router(config-if)#standby groupNum ip ipAddress
    router(config-if)#standby groupNum name hsrpName
    router(config-if)#standby groupNum priority levelNum
    router#show standby [brief]

  • VRRP-虚拟路由器冗余协议

    MPLS 多协议标签交换VPN和VLAN都支持VRRP
    虚拟路由器表示一组路由器,活动路由器称为主虚拟路由器

  • GLBP-网关负载均衡协议

    活动虚拟网关AVG
    活动虚拟转发器AVF

  • router(config-if)#glbp 1 ip 10.10.1.1
    router(config-if)#glbp 1 name glbpName
    router(config-if)#glbp 1 priority 110

    系统日志严重级别

    • 紧急 emergency 0
    • 警报 alert 1
    • 危险 critical 2
    • 错误 error 3
    • 警告 warning 4
    • 通知 notification 5
    • 说明 information 6
    • 调试 debugging 7

    router(config)#logging console
    router(config)#logging buffered
    router(config)#service timestamps log datetime msec
    router(config)#logging trap warnings
    router(config)#service sequence-numbers

    SNMPv3

    支持MD5或SHA

    router(config)#snmp-server community xxx rw //读写权限
    router(config)#snmp-server location xxx
    router(config)#snmp-server contact xxx
    配置ACL

    管理信息库

    MIB

    配置NetFlow

    router(config-if)#ip flow ingress
    router(config-if)#ip flow egress
    router(config)#ip flow-export version 9
    router(config)#ip flow-export destination ipAddress portNum
    router(config)#ip flow-export source loopback 0
    router#show ip cache flow
    router#show ip flow export

    排除IP IPv6和vlan故障

    show ipv6 neighbors

    • INCMP 不完整
    • REACH 可达
    • STABLE 未在可达时间内与邻居通信
    • DELAY
    • PROBE

    排除vlan故障

    show vlan
    show mac address-table
    show interfaces interface switchport
    switchport access vlan vlan
    show dtp interface interface

    端口DTP状态

    • access
    • auto
    • desirable
    • nonegotiate
    • trunk //只要不处于access状态,默认提供中继功能

    增强IGRP

    RTP

    224.0.0.10

    DUAL 扩散更新算法

    router(config)#router eigrp eigrpNum
    router(config-router)#network 10.0.2.0 0.0.0.255
    router(config-router)#maximum-paths pathsNum // 默认4条成本相等的路径之间均衡负载
    router(config-router)#metric maximum-hops hopCount // 默认100
    router(config-router)#metric weights 0 1 0 1 0 0 // K值
    router#show ip eigrp neighbors
    router#show ip eigrp interfaces
    router#show ip route eigrp
    router#show ip eigrp topology
    router#show ip eigrp traffic
    router#show ip protocols

    RD

    FD

    多区域 OSPF(dijkstra)

    以下方面必须一致:

    • 区域 ID
    • 子网
    • Hello 定时器和失效定时器
    • 身份验证方法(如果配置了)

    各种LSA

    • 1 类 LSA -路由器链路通告 R
    • 2 类 LSA -网络链路通告 DR
    • 3 类 LSA -汇总链路通告 ABR
    • 4 类 LSA -区域边界路由器 ABR
    • 5 类 LSA -外部链路通告 ASBR

    关系状态

    • DOWN
    • ATTEMPT
    • INIT
    • 双向
    • 预启动
    • 交换
    • 加载
    • 完全邻接

    OSPF 验证命令

    • show ip ospf neighbor
    • show ip ospf interface
    • show ip protocols
    • show ip route
    • show ip ospf database

    OSPFv3

    router(config)#ipv6 router ospf 10
    router(config-router)#router-id 1.1.1.1
    router(config-router)#network 10.0.0.0 0.255.255.255 area 0
    router(config-if)#ipv6 ospf 10 area 0.0.0.0

    广域网

    • 专用线
    • 电路交换
    • 分组交换

    第二层WAN封装

    • frame-relay 帧中继 nbma
      • 封装类型
        • ietf
        • cisco
      • 虚电路
      • 数据链路链接标识符(DLCI)
        • show frame-relay map
        • frame-relay interface-dlci dlciNum
        • frame-relay lmi-type cisco/ansi/q933a
      • lmi 本地管理接口 信令标准
        • show frame-relay lmi
        • show frame-relay pvc
    • hdlc 高级数据链路控制(默认)
    • ppp 点到点
      • 身份验证
        • PAP密码身份验证协议
        • CHAP质询握手验证协议
      • 故障分析
        • 身份验证
        • WAN封装不一致
        • IP地址不匹配
          router(config-if)#ppp authentication chap pap//第二个为备用

    IPSec

    • 验证头 AH
    • 封装安全有效负载 ESP

    GRE

    router(config)#int tunnel 0
    router(config-if)#tunnel mode gre ip
    router(config-if)#ip address 10.1.1.0 255.255.255.0
    router(config-if)#tunnel source 61.1.1.1
    router(config-if)#tunnel destination 61.1.1.2

    0 0
    原创粉丝点击