首页 > 代码库 > 路由器配置

路由器配置

实验01:配置路由器

实验目标:掌握路由器配置,实现全网能够互通

实验环境:在Cisco上选择路由器、交换机各两台,PC机四台

路由器地址:

R1:192.168.1.254

F0/1:192.168.4.1

F1/0:192.168.2.1

R2:192.168.3.254

F0/1:192.168.4.2

F1/0:192.168.2.2

实验拓扑:

wKiom1PnM9nCykGlAACoOp2gZ2U496.jpg

实验步骤:

一、配置IP地址

1、PC0 IP地址和网关地址

wKioL1PnNQKxZGFcAAEep5IkpLk114.jpg

PC1 IP地址为191.168.1.2      网关地址为192.168.1.254

2、PC3IP地址

wKioL1PnNRTw--VgAAFBGSZXJ0s841.jpg

PC4IP地址为192.168.3.2 网关地址为192.168.3.254

二、路由器配置

1、配置路由器1IP地址

R1:interface fastEthernet 0/0

ip address 192.168.1.254 255.255.255.0

no shutdown

wKioL1PnNSSRgrsOAAEB_TfGtIU967.jpg

2、配置路由器2IP地址

R2:interface fastEthernet 0/0

ip address 192.168.3.254 255.255.255.0

no shutdown

wKiom1PnNCryIAeJAAD2lkMimbY769.jpg

3、配置路由器R1 1/0端口

interface fastEthernet 1/0

ip address 192.168.2.1 255.255.255.0

no shutdown

wKioL1PnNU_hnBv2AADhwUfn_NY835.jpg

4、配置路由器R2 1/0端口

interface fastEthernet 1/0

ip address 192.168.2.2 255.255.255.0

no shutdown

wKiom1PnNEOzi5VHAAD9b2tj2hc609.jpg

5、配置路由器R1 1/0端口与R2 R21/0互连

ip route 192.168.3.0 255.255.255.0 192.168.2.2

wKiom1PnNFyi5eeeAACrsl29_Mg383.jpg

6、配置路由器R2 1/0端口与R2 R1 1/0互连

ip route 192.168.1.0 255.255.255.0 192.168..2.1

wKioL1PnNYuCuW_mAAB7f-znA44160.jpg

二、配置浮动路由

  1. 安装模块

    wKiom1PnNIPgioUkAAEgHjAYCuI687.jpg

  2. 配置路由器R1 0/1端口

    R1:interface fastEthernet 0/1

    ip address 192.168.4.1 255.255.255.0

    no shutdown

    wKioL1PnNa7R0FH1AAC8ZHXtwG4276.jpg

3、配置路由器R2 0/1端口

   R2:interface fastEthernet 0/1

   ip address 192.168.4.2 255.255.255.0

   no shutdown

wKiom1PnNLbhSOy4AADFVaK6-jo924.jpg

4、配置路由器R1 1/0端口与R2 R1 1/0互连

ip route 192.168.3.0 255.255.255.0 192.168.4.2 4

wKioL1PnNeDxEAsPAABs4GILRBg136.jpg

5、配置路由器R2 1/0端口与R2 R1 1/0互连

ip route 192.168.1.0 255.255.255.0 192.168.4.1 4

wKioL1PnNiXDKe7XAAB4-JhAi4g255.jpg

结果验证

1、两个端口之间连通

wKiom1PnNPyz0WEwAAF_W5-Y8Tc834.jpg

2、关掉端口0/1

R1

 wKiom1PnNO7QmTpfAAHOvD4VrRI261.jpg

R2

wKiom1PnNOKivhiHAAFP62Ji3vw858.jpg

本文出自 “IT” 博客,转载请与作者联系!