路由器以及路由协议

路由器端口特性:

  控制端口:管理端口,一般连接到终端或者终端模拟器,在路由器未进行任何配置和网络接入的时候,用来进行初始化配置。不进行任何的包转发。

  附加端口:另一个管理端口,连接到modem,实现远程配置路由器。

  WIC/WHICS:连接到WAN的接口,例如FE/GE/SE/ADSL/VDSL/BRI

  AUI端口:AUI端口是用来与粗同轴电缆连接的接口,它是一种"D"型15针接口,可通过粗同轴电缆收发器实现与10Base-5网络的连接,但更多的是借助于外接的收发转发器(AUI-to-RJ-45),实现与10Base-T以太网络的连接。通过外接的收发器实现各种类型的网络连接。

  RJ-45端口:用来连接LAN。

路由器的类型:

  • 分支机构路由器
  • 云连接器(US)
  • 数据中心互联平台
  • 工业路由器
  • 移动互联网路由器
  • 服务供应商基础架构软件(US)
  • 服务供应商核心路由器
  • 服务供应商边缘路由器
  • 中小企業路由器虚拟路由器
  • 虚拟路由器
  • 广域网聚合与互联网边缘路由器

路由器的接入方式:

  带外访问:通过PC的com口与路由器的控制端口连接。没有COM时,可以用USB到RJ-45的反转控制线。

  带内访问:TELNET、WEB、SNMP,对于这三种接入方式,首先配置IP和password,并且开启相应的服务。

路由器的基础配置:

  用户模式:基础测试和显示系统信息

  特权模式:验证设置,有密码保护 ,通过enable进入,disable退出。

  全局配置模式:configure terminal 从特权模式进入全局配置模式,用end、exit、Ctrl+c,退出到特权模式

  接口配置模式:interface 从全局配置进入接口配置模式,exit到全局配置,CRTL+C到特权模式。

命令行提示信息:

  1) % Ambiguous command:  "show c“:模糊的命令
      The user does not enter enough characters, network device does not recognize a unique command.
  2) % Incomplete command.:未完成的命令,比如参数不够
      User does not have the necessary keyword or enter the command variable arguments 。
  3) % Invalid input detected at ‘^’ marker.:无效的输入
      User input command error and symbol (^) pointed out the errors of the position of the word.

路由器的基础配置命令:

 •Clear any existing configurations on the routers.

Router>enable

Router#erase startup-config #清除所有配置

Configure the router hostname.

Router(config)#hostname R1

Disable DNS lookup.

R1(config)#no ip domain lookup

Configure an EXEC mode password.

R1(config)#enable password r1

Configure a message-of-the-day banner.

R1(config)#banner motd #Hello R1#

Configure a login banner.

R1(config)#banner login #Hello R1#

Configure a password for console connections.

R1:

R1(config)#line console 0

R1(config-line)#password r1

R1(config-line)#login

Configure a password for VTY connections.

注:思科在默认情况下,不允许远程访问路由器,除非对VTY进行配置,只有配置了的才允许访问

R1:

R1(config)#line vty 0 4 #配置0-4的虚拟终端

R1(config-line)#password r1

R1(config-line)#login   #注:如果是无口令,则为no login

• 对vty,console的登录口令加密

R1(config)#service password-encryption 注:这条命令对所有的口令加密,处理enable secret 设置的口令,如果只想让某一口令加密,在password 后添加 [0|7],0表示明文存储,7表示密文存储。

验证和存储路由器配置信息:

R1#show running-config

将配置信息写入rom

Router#copy running-config startup-config 或者直接执行 write memory命令

Copy the running configuration file to the TFTP server:
Router #copy running-config  tftp
Address or name of remote host []? 192.168.1.2  ! Here 192.168.1.2 is the IP address of TFTP server
Destination filename [Router-config]? my_config  ! my_config is the new backup file name.
!!
1030 bytes copied in 2.489 secs (395 bytes/sec)

Copy the configuration file from the TFTP server to a new router:
Router#copy tftp: running-config
Address or name of remote host []? 192.168.1.2
Source filename []? my_config
Destination filename [running-config]?
Accessing tftp:// 192.168.1.2/ my_config...
Loading my_config from 192.168.1.2 (via FastEthernet0/0): !
[OK - 1030 bytes]
1030 bytes copied in 9.612 secs (107 bytes/sec)
 
路由表的介绍:
  1、Direct routing(直连路由)

    1)Router can automatically create directly connected route information  on   IP network segment of activated port(自动创建路由信息)

  2、Indirect routing(非直连路由)
    1)Static routing(静态路由)
      By the network administrator manually adding routing information to implement routing on the router.

    2)Dynamic routing(动态路由)
      Depending on the network structure or flow change, routing information is automatically adjusted by routing routing protocol.

  

猜你喜欢

转载自www.cnblogs.com/mhzhou-whyj/p/9163870.html