静态路由实验报告

拓扑图

在这里插入图片描述

需求分析

各pc之间可以ping通

配置内容

1.配置各端口ip

r1

[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.2 24
Apr 23 2023 17:29:42-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r1-GigabitEthernet0/0/0]int g 0/0/1
[r1-GigabitEthernet0/0/1]ip address 12.1.1.1 30
Apr 23 2023 17:30:13-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state.

r2

[r2]interface GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/1]ip address 23.1.1.1 30
Apr 23 2023 17:31:07-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r2-GigabitEthernet0/0/1]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip address 12.1.1.2 30
Apr 23 2023 17:31:56-08:00 r2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r2-GigabitEthernet0/0/0]int g 0/0/2
[r2-GigabitEthernet0/0/2]ip address 192.168.2.2 24
[r2-GigabitEthernet0/0/2]
Apr 23 2023 17:32:22-08:00 r2 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state.

r3

[r3]interface GigabitEthernet 0/0/0
[r3-GigabitEthernet0/0/0]ip address 23.1.1.2 30
Apr 23 2023 17:32:59-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r3-GigabitEthernet0/0/0]int g 0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.3.2 24
Apr 23 2023 17:33:19-08:00 r3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state.
2.配置各pc的ip

pc1

在这里插入图片描述

pc2

在这里插入图片描述

pc3

在这里插入图片描述

3.配置静态路由并查看

r1

[r1]ip route-static 192.168.2.0 24 12.1.1.2
[r1]ip route-static 23.1.1.0 30 12.1.1.2
[r1]ip route-static 192.168.3.0 24 12.1.1.2
[r1]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 13       Routes : 13       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

       12.1.1.0/30  Direct  0    0           D   12.1.1.1        GigabitEthernet
0/0/1
       12.1.1.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
       12.1.1.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
       23.1.1.0/30  Static  60   0          RD   12.1.1.2        GigabitEthernet
0/0/1
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    192.168.1.0/24  Direct  0    0           D   192.168.1.2     GigabitEthernet
0/0/0
    192.168.1.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
  192.168.1.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
    192.168.2.0/24  Static  60   0          RD   12.1.1.2        GigabitEthernet
0/0/1
    192.168.3.0/24  Static  60   0          RD   12.1.1.2        GigabitEthernet
0/0/1
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

pc2

[r2]ip route-static 192.168.1.0 24 12.1.1.1
[r2]ip route-static 192.168.3.0 24 23.1.1.2
[r2]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 15       Routes : 15       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

       12.1.1.0/30  Direct  0    0           D   12.1.1.2        GigabitEthernet
0/0/0
       12.1.1.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
       12.1.1.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
       23.1.1.0/30  Direct  0    0           D   23.1.1.1        GigabitEthernet
0/0/1
       23.1.1.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
       23.1.1.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    192.168.1.0/24  Static  60   0          RD   12.1.1.1        GigabitEthernet
0/0/0
    192.168.2.0/24  Direct  0    0           D   192.168.2.2     GigabitEthernet
0/0/2
    192.168.2.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2
  192.168.2.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2
    192.168.3.0/24  Static  60   0          RD   23.1.1.2        GigabitEthernet
0/0/1
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

pc3

[r3]ip route-static 192.168.2.0 24 23.1.1.1
[r3]ip route-static 192.168.1.0 24 23.1.1.1
[r3]ip route-static 12.1.1.0 30 23.1.1.1
[r3]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 13       Routes : 13       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

       12.1.1.0/30  Static  60   0          RD   23.1.1.1        GigabitEthernet
0/0/0
       23.1.1.0/30  Direct  0    0           D   23.1.1.2        GigabitEthernet
0/0/0
       23.1.1.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
       23.1.1.3/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    192.168.1.0/24  Static  60   0          RD   23.1.1.1        GigabitEthernet
0/0/0
    192.168.2.0/24  Static  60   0          RD   23.1.1.1        GigabitEthernet
0/0/0
    192.168.3.0/24  Direct  0    0           D   192.168.3.2     GigabitEthernet
0/0/1
    192.168.3.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
  192.168.3.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

测试结果

1.PC1

在这里插入图片描述

2.PC2

在这里插入图片描述

3.PC3

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值