路由协议实验:静态路由和默认路由的配置

路由协议实验:静态路由和默认路由的配置

1、实验拓扑结构

在这里插入图片描述

2、实验目的

掌握静态路由和默认路由的配置

3、静态路由的配置

1.配置R1A的F0/0接口的IP并启用接口
在这里插入图片描述
2.配置R1A两个回环口的IP

Router(config)#int l0

Router(config-if)#
%LINK-5-CHANGED: Interface Loopback0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

Router(config-if)#ip address 192.168.3.1 255.255.255.0
Router(config-if)#exit
	
Router(config)#int l1

Router(config-if)#
%LINK-5-CHANGED: Interface Loopback1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up

Router(config-if)#ip add 192.168.4.1 255.255.255.0
Router(config-if)#exit

3、配置R1B的F0/0和F0/1接口并启用接口
在这里插入图片描述
在这里插入图片描述

4.配置R1C的F0/1接口和两个回环口
在这里插入图片描述

Router(config)#int l0

Router(config-if)#
%LINK-5-CHANGED: Interface Loopback0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

Router(config-if)#ip add 88.88.88.88 255.255.255.0
Router(config-if)#exit
Router(config)#int l1

Router(config-if)#
%LINK-5-CHANGED: Interface Loopback1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up

Router(config-if)#ip add 22.22.22.22 255.255.255.0
Router(config-if)#exit

5.R1A配置静态路由

Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#ip route 10.1.1.0 255.255.255.0 192.168.1.2
Router(config)#ip route 88.88.88.0 255.255.255.0 192.168.1.2
Router(config)#ip route 22.22.22.0 255.255.255.0 192.168.1.2
Router(config)#

6.R1B配置静态路由

Router(config)#ip route 192.168.3.0 255.255.255.0 192.168.1.1
Router(config)#ip route 192.168.4.0 255.255.255.0 192.168.1.1
Router(config)#ip route 88.88.88.0 255.255.255.0 10.1.1.3
Router(config)#ip route 22.22.22.0 255.255.255.0 10.1.1.3

7、R1C配置静态路由

Router(config)#ip route 192.168.1.0 255.255.255.0 10.1.1.2
Router(config)#ip route 192.168.3.0 255.255.255.0 10.1.1.2
Router(config)#ip route 192.168.4.0 255.255.255.0 10.1.1.2

8、测试R1A ping 88.88.88.88 和22.22.22.22,能ping通

Router#ping 88.88.88.88

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 88.88.88.88, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/1 ms

Router#ping 22.22.22.22

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 22.22.22.22, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/1 ms

9、测试R1C ping 192.168.3.1,能ping通

Router#ping 192.168.3.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/1/3 ms

4、默认路由的配置

1、接上面已经配置好的静态路由
2、删除R1B通向88.88.88.0和22.22.22.0网段的静态路由

Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#no ip route 88.88.88.0 255.255.255.0 10.1.1.3
Router(config)#no ip route 22.22.22.0 255.255.255.0 10.1.1.3

3、删除R1C通向192.168.1.0网段的静态路由

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#no ip route 192.168.1.0 255.255.255.0 10.1.1.2

4、配置R1B通向R1C的默认路由

Router(config)#ip route 0.0.0.0 0.0.0.0 10.1.1.3

5、配置R1C通向R1B的默认路由

Router(config)#ip route 0.0.0.0 0.0.0.0 10.1.1.2

6、测试R1A ping 88.88.88.88,能 ping 通

Router#ping 88.88.88.88

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 88.88.88.88, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/0 ms

7、测试R1C ping 192.168.3.1,能 ping 通

Router#ping 192.168.3.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/1 ms

赠人玫瑰,手留余香,如果这篇文章对你有帮助的话,请随手点个赞再走吧(づ ̄3 ̄)づ╭❤~

  • 4
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

悦下听风

学生一枚,请多多支持我的创作

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值