0%

网络总结

网络总结

一、路由器配置网络

  1. 进入特权模式

    1
    Router> enable
  2. 进入全局模式

    1
    2
    Router#config term
    Enter configuration commands, one per line. End with CNTL/Z.
  3. 给路由器命名

    1
    2
    Router(config)#hostname R1
    R1(config)#
  4. 选中一个接口

    1
    2
    R1(config)#interface GigabitEthernet0/0/0
    R1(config-if)#
  5. 配置一个IP地址以及子网掩码

    1
    2
    R1(config-if)#ip address 192.168.1.1 255.255.255.0 
    R1(config-if)#
  6. 激活网口

    1
    R1(config-if)#no shutdown
  7. 设置密码

    1
    2
    3
    4
    # 设置明文密码
    R1(config)#enable password 123
    # 设置密文密码
    R1(config)#enable secret 456

二、路由器远程登录

  1. 首先设定两个路由器,将两个路由器分别设置IP为:192.168.1.1192.168.1.2,在路由器中ping另外一个路由器的方式如下:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    R2#ping
    Protocol [ip]:
    Target IP address: 192.168.1.1
    Repeat count [5]: 5
    Datagram size [100]: 100
    Timeout in seconds [2]: 2
    Extended commands [n]: n
    Sweep range of sizes [n]: n
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
    .!!!!
    Success rate is 80 percent (4/5), round-trip min/avg/max = 0/0/0 ms

    R2#
  2. 远程登录的第一种方式

    1. 进入特权模式,设定5个用户登录,设置为无密码登录

      1
      2
      3
      4
      R2#conf term
      Enter configuration commands, one per line. End with CNTL/Z.
      R2(config)#line vty 0 4
      R2(config-line)#no login
    2. 设置enable密码,如果需要远程登录,必须设定enable密码

      1
      2
      R2(config)#enable password 123
      R2(config)#
    3. 192.168.1.1远程登录192.168.1.2

      1
      2
      3
      4
      5
      R1>telnet 192.168.1.2
      Trying 192.168.1.2 ...Open
      R2>enable
      Password:
      R2#
  3. 远程登录的第二种方式

    1. 设置有密码的登录

      1
      2
      3
      4
      R2(config)#line vty 0 4
      R2(config-line)#password 456
      R2(config-line)#login
      R2(config-line)#exit
    2. 登录验证

      1
      2
      3
      4
      5
      6
      R1>telnet 192.168.1.2
      Trying 192.168.1.2 ...Open
      User Access Verification

      Password:
      R2>
  4. 远程登录的第三种方式

    1. 设置有用户名和密码的登录

      1
      2
      3
      4
      R2(config)#username xiaoqingdu password 789
      R2(config)#line vty 0 4
      R2(config-line)#login local
      R2(config-line)#en
    2. 验证登录

      1
      2
      3
      4
      5
      6
      7
      8
      R2>telnet 192.168.1.2 
      Trying 192.168.1.2 ...Open

      User Access Verification

      Username: xiaoqingdu
      Password:
      R2>

三、二层技术和三层技术在工作中的应用

1.二层技术

二层技术通常是指:交换机的交换技术。

例如:

  1. VLAN (虚拟局域网),隔离广播域
  2. 以太通道(链路聚合,提高带宽,实现冗余备份)
  3. 生成树(防止网络出现环路)
  4. Q in Q (做VLAN叠加)
  5. SPAN
  6. VACL
  7. PVLAN
  8. 等等

2.三层技术

例如:

  1. 静态路由
  2. 动态路由
  3. OSPF
  4. ISIS
  5. BGP
  6. EIGRP
  7. 路由策略
  8. 安全
  9. IP sec
  10. SDN
  11. NFV
  12. SD-WAN

四、网络分类

  1. A类网络

    前8位(网络位)+ 后24位(主机位)

  2. B类网络

    前16位(网络位)+ 后16位(主机位)

  3. C类网络

    前24位(网络位)+ 后8位(主机位)

  4. D类网络

    前4位固定为:1110,组播地址。

  5. E类网络

    前四位固定为:1111。作为保留。

-------------Thanks for your attention-------------