Routers and network interconnection experiments

table of Contents

1 direct routes experimental configuration items

1.1 experimental content

1.2 Principle

1.3 configuration process

2 static route configuration test

2.1 experimental content

2.2 Principle

2.3 key command

  2.4 configuration process

3-point interconnect Ethernet channel test

3.1 experimental content

3.2 Principle

3.3 key command

3.4 configuration process

4 default route entries Configuration Lab

4.1 experimental content

4.2 Principle

4.3 configuration process

5 routing entries polymerization experiments

5.1 experimental content 

5..2 Principle

5.3 configuration process

6 routing entries remote configuration test 

6.1 experimental content

6.2 Principle

6.3 key command

6.4 configuration process


Routers are used to interconnect different types of networks, the router forwards the IP packet based routing table, the routing entry into the routing table entry direct routes, dynamic routing and static route entries configure the router interface IP address and subnet mask automatically generate direct routing entries, you can manually create a static route

1 direct routes experimental configuration items

1.1 experimental content

Construction of the network topology as shown below, network address of the communication process between each other and the Ethernet 192.168.1.0/24 192.168.2.0/24 of

1.2 Principle

Two interfaces two routers R are respectively connected to the Ethernet, two different Ethernet networks, different network addresses need to be assigned.

Once a router to assign an IP address and subnet mask interface and open interfaces for the routing, the router's routing table will automatically generate a route entry. Because the transmission route is a path specified in the network directly connected access router, it is called direct routing entries. , R router routing table automatically generated once the IP address and subnet mask (default subnet mask) in two interfaces shown on FIG distribution router R is as shown in FIG two direct routes item

Type C represents the direct route of entry

1.3 configuration process

router

2 static route configuration test

2.1 experimental content

Construction topology shown below, processes communicate with each other between the respective Internet terminal

2.2 Principle

After the router receives an IP packet, only items retrieved routing IP packets to the destination IP address matches in the routing table, it will forward the IP packet, otherwise, discard the IP packet. So for any of the network in the Internet, only when all the routing table are used to indicate the presence of the premise routing entries leading to the transmission path of the network, in order to correct the IP packet sent to the network.

Static route configuration process is divided into the following three steps:

1 通过分析互联网结构得出某个路由器通往互联网中所有没有与其直接连接的其他网络的传输路径

2 根据该路由器通往每一个网络的传输路径求出与该传输路径相关的路由项的内容

3 根据求出的路由项内容完成手工配置路由项的过程

2.3 关键命令

全局模式

ip route 192.168.2.0     255. 255.255.0   192.168.3.2 

               目的网络地址192.168.2.0/24     下一条IP地址

  2.4 配置过程

路由器0

路由器1

分别加上各自的静态路由项即可

ip route 192.168.2.0 255.255.255.0 192.168.3.2

ip route 192.168.1.0 255.255.255.0 192.168.3.1

3 点对点信道互连以太网实验

3.1 实验内容

点对点信道互连以太网的结构如下图。路由器1和路由器2之间用点对点信道互连。由于同步数字体系(Synchronous Digital Hierarchy,SDH)等电路交换网提供的点对点信道,因此可以用下图所示的互联网结构仿真用SDH等广域网互连路由器的情况。

3.2 实验原理

路由器1和2通过串行接口互连仿真点对点信道,基于点对点信道建立PPP链路。建立PPP链路时可以相互鉴别对方身份,即只在两个互信的路由器之间建立PPP链路,并通过PPP链路传输分组。

3.3 关键命令

1 串行接口配置命令

全局模式

interface serial 0/1/0   //进入路由器serial 0/1/0的接口配置模式

接口配置模式

bandwidth 4000   // 以Kb/s为单位指定串行接口的带宽 4000是命令参数,表示指定的带宽是4000kb/s

clock rate 4000000   //以b/s为单位制定串行接口的实际传输速率,40000000 表示实际传输速率是4000000b/s

keepalive 10   //指定发送存活检测消息(keepalive的时间间隔)

encapsulation ppp   //指定串行接口的封装方法,ppp是命令参数

ip address 192.168.3.1 255.255.255.252

no shutdown

exit

2 PPP身份鉴别配置命令

全局模式

username route1 password cisco   //只有名字为route1、口令为cisco的授权路由器,才能通过该路由器的身份鉴别

interface serial 0/1/0  //进入接口配置模式

接口配置模式

ppp authentication chap   //1确定只与授权路由器建立PPP链路 2指定鉴别对方路由器身份时使用的鉴别协议。 chap是命令参数,指定挑战握手协议(Challenge Handshake Authentication Protocol,CHAP)作为鉴别协议

exit

3.4配置过程

路由器1

路由器2

4 默认路由项配置实验

4.1 实验内容

网络拓扑如下图所示,对于路由器1,通往网络202.3.6.0/24 33.77.6.0/24 101.7.3.0/24有着相同的下一条跳,但三个网络地址段无法聚合成单个的CIDR地址块,因此路由器1无法用一项路由指明通往这些网络的传输路径,路由器2的情况类似。

解决这种问题的 方式是:配置默认路由项,默认路由项与所有IP地址匹配且前缀长度为0,因此,是一项优先级最低且与所有分组的目的IP地址匹配的路由项。通过配置默认路由项,可以有效减少路由表中的路由项。

4.2 实验原理

只要某个IP分组的目的IP地址与路由表中所有其他路由都不匹配,路由器将根据默认路由项指定的传输路径转发该IP分组

目的网络      输出接口     下一条

0.0.0.0/0         4                192.168.3.2

任何IP地址都与默认路由项匹配

为了避免出现IP分组的传输环路,需要认证选择配置默认路由项的路由器

4.3 配置过程

路由器0

路由器1

5 路由项聚合实验

5.1 实验内容 

网络拓扑如下图所示,对于路由器1,通往网络192.168.4.0/24  192.168.5.0/24  192.168.6.0/24 的传输路径有着相同的下一跳,而且三个网络地址段可以聚合为单个CIDR地址块192.168.4.0/22

本实验通过在路由器1和2中聚合用于指明没有与其直接连接的网络的传输路径的路由项,实现互联网中各个终端之间相互通信的过程。

5..2 实验原理

CIDR地址块的合并,通过路由聚合减少路由表中路由项的数量

5.3 配置过程

路由器1

路由器2

6 路由项远程配置实验 

6.1 实验内容

构建如下图所示的网络拓扑,使得终端A和终端B能够通过Telnet对路由器1和2进行远程配置

6.2 实验原理

终端通过telnet对路由器实施远程配置的条件有两个:1 需要建立终端与路由器之间的传输路径  2 路由器需要完成telnet相关参数的配置过程。

路由器的每一个接口的IP地址都可作为管理地址,也可为路由器定义单独的管理地址。

路由器可以配置多种鉴别远程用户身份的机制,常见的有口令和本地授权用户两种鉴别方式。

6.3 关键命令

全局模式

interface loopback 1   //定义一个环回接口,1是环回接口的编号,每一个环回接口用唯一编号标识

接口配置模式

ip address 192.168.3.1 255.255.255.0

exit 

6.4 配置过程

路由器1

路由器2

 

 

发布了122 篇原创文章 · 获赞 58 · 访问量 4万+

Guess you like

Origin blog.csdn.net/qq_39112646/article/details/104027528