广告
返回顶部
首页 > 资讯 > 后端开发 > Python >Router Configuration
  • 462
分享到

Router Configuration

RouterConfiguration 2023-01-31 01:01:39 462人浏览 安东尼

Python 官方文档:入门教程 => 点击学习

摘要

配置RIP被动接口Target:    配置RIP被动接口用来过滤路由的条目,增强网络的安全性。实验原理:    使用被动接口,禁止在连接ISP路由器的接口上发送RIP更新。实验拓扑图:    Step:步骤1 在路由器上配置IP路由选择和

配置RIP被动接口

Target:

   配置RIP被动接口用来过滤路由的条目,增强网络安全性。

实验原理:

   使用被动接口,禁止在连接ISP路由器的接口上发送RIP更新。

实验拓扑图:

   

Step:


步骤1 在路由器上配置IP路由选择和IP地址。

RA#config t

RA(config)# interface FastEthernet 0/0

RA(config-if)#ip address 172.16.1.5 255.255.255.252

RA(config)#interface FastEthernet 0/1

RA(config-if)#ip address 172.16.1.1 255.255.255.252

RA(config)#interface Loopback 0

RA(config-if)#ip address 172.16.3.1 255.255.255.0

RB(config)#interface FastEthernet 0/0

RB(config-if)#ip address 172.16.1.9 255.255.255.252

RB(config)#interface FastEthernet 0/1

RB(config-if)#ip address 172.16.1.2 255.255.255.252

RB(config)#interface Loopback 0

RB(config-if)#ip address 172.16.2.1 255.255.255.0

RC(config)# interface FastEthernet 0/0

RC(config-if)#ip address 172.16.1.10 255.255.255.252

RC(config)# interface FastEthernet 0/1

RC(config-if)#ip address 172.16.1.6 255.255.255.252

RC(config)#interface Loopback 0

RC(config-if)#ip address 210.10.1.1 255.255.255.0

步骤2 配置RIP。

RA(config)# router rip

RA(config-router)# version 2

RA(config-router)#network 172.16.0.0

RA(config-router)#no auto-summary

RB(config)# router rip

RB(config-router)#version 2

RB(config-router)#network 172.16.0.0

RB(config-router)#no auto-summary

步骤3 配置被动接口。

RA(config)# router rip

RA(config-router)# passive-interface FastEthernet 0/0

RB(config)# router rip

RB(config-router)# passive-interface FastEthernet 0/0

步骤4 验证测试

用debug ip rip packet send来测试RIP更新。

下面显示的是完成“步骤2”时的测试,这时可以从Fa0/0接口上发送会发现RIP的更新,这样对于安全和带宽都有影响。


RA#debug ip rip packet send

RA#Sep 7 00:15:07 RA %7: [RIP] Output timer expired to send reponse

Sep 7 00:15:07 RA %7: [RIP] Prepare to send MULTICAST response...

Sep 7 00:15:07 RA %7: [RIP] Building update entries on FastEthernet 0/0

Sep 7 00:15:07 RA %7: 172.16.1.0/30 via 0.0.0.0 metric 1 tag 0

Sep 7 00:15:07 RA %7: 172.16.1.8/30 via 0.0.0.0 metric 2 tag 0

Sep 7 00:15:07 RA %7: 172.16.2.0/24 via 0.0.0.0 metric 2 tag 0

Sep 7 00:15:07 RA %7: 172.16.3.0/24 via 0.0.0.0 metric 1 tag 0

Sep 7 00:15:07 RA %7: [RIP] Send packet to 224.0.0.9 Port 520 on FastEthernet 0/0

RB#debug ip rip packet send

Sep 7 00:21:57 RB %7: [RIP] Send packet to 224.0.0.9 Port 520 on FastEthernet 0/0

Sep 7 00:21:57 RB %7: [RIP] Prepare to send MULTICAST response...

Sep 7 00:21:57 RB %7: [RIP] Building update entries on FastEthernet 0/1

Sep 7 00:21:57 RB %7: 172.16.1.8/30 via 0.0.0.0 metric 1 tag 0

Sep 7 00:21:57 RB %7: 172.16.2.0/24 via 0.0.0.0 metric 1 tag 0

下面显示的是完成“步骤3”时的测试,这时RIP的更新只从Fa0/1接口上发送,不会从Fa0/0发送更新。

RA#debug ip rip packet send

RA#Sep 7 00:26:37 RA %7: [RIP] Output timer expired to send reponse

Sep 7 00:26:37 RA %7: [RIP] Prepare to send MULTICAST response...

Sep 7 00:26:37 RA %7: [RIP] Building update entries on FastEthernet 0/1

Sep 7 00:26:37 RA %7: 172.16.1.4/30 via 0.0.0.0 metric 1 tag 0

Sep 7 00:26:37 RA %7: 172.16.3.0/24 via 0.0.0.0 metric 1 tag 0

Sep 7 00:26:37 RA %7: [RIP] Send packet to 224.0.0.9 Port 520 on FastEthernet 0/1

Sep 7 00:26:37 RA %7: [RIP] Prepare to send MULTICAST response...

Sep 7 00:26:37 RA %7: [RIP] Building update entries on Loopback 0

Sep 7 00:26:37 RA %7: 172.16.1.0/30 via 0.0.0.0 metric 1 tag 0

Sep 7 00:26:37 RA %7: 172.16.1.4/30 via 0.0.0.0 metric 1 tag 0

Sep 7 00:26:37 RA %7: 172.16.1.8/30 via 0.0.0.0 metric 2 tag 0

Sep 7 00:26:37 RA %7: 172.16.2.0/24 via 0.0.0.0 metric 2 tag 0

Sep 7 00:26:37 RA %7: [RIP] Send packet to 224.0.0.9 Port 520 on Loopback 0

RB# debug ip rip packet send

Sep 7 00:35:57 RB %7: [RIP] Output timer expired to send reponse

Sep 7 00:35:57 RB %7: [RIP] Prepare to send MULTICAST response...

Sep 7 00:35:57 RB %7: [RIP] Building update entries on FastEthernet 0/1

Sep 7 00:35:57 RB %7: 172.16.1.8/30 via 0.0.0.0 metric 1 tag 0

Sep 7 00:35:57 RB %7: 172.16.2.0/24 via 0.0.0.0 metric 1 tag 0

Sep 7 00:35:57 RB %7: [RIP] Send packet to 224.0.0.9 Port 520 on FastEthernet 0/1

Sep 7 00:35:57 RB %7: [RIP] Prepare to send MULTICAST response...

Sep 7 00:35:57 RB %7: [RIP] Building update entries on Loopback 0

Sep 7 00:35:57 RB %7: 172.16.1.0/30 via 0.0.0.0 metric 1 tag 0

Sep 7 00:35:57 RB %7: 172.16.1.4/30 via 0.0.0.0 metric 2 tag 0


Sep 7 00:35:57 RB %7: 172.16.1.8/30 via 0.0.0.0 metric 1 tag 0

Sep 7 00:35:57 RB %7: 172.16.3.0/24 via 0.0.0.0 metric 2 tag 0

Sep 7 00:35:57 RB %7: [RIP] Send packet to 224.0.0.9 Port 520 on Loopback 0

【参考配置】

RA#show running-config

Building configuration...

Current configuration : 721 bytes

!

version RGNOS 10.1.00(4), Release(18443)(Tue Jul 17 20:50:30 CST 2007 -ubu1server)

hostname RA

!

enable secret 5 $1$db44$8x67vy78Dz5pq1xD

!

interface FastEthernet 0/0

ip address 172.16.1.5 255.255.255.252

duplex auto

speed auto

!

interface FastEthernet 0/1

ip address 172.16.1.1 255.255.255.252

duplex auto

speed auto

!

interface Loopback 0

ip address 172.16.3.1 255.255.255.0

!

router rip

version 2

passive-interface FastEthernet 0/0

network 172.16.0.0

no auto-summary

!

ip route 0.0.0.0 0.0.0.0 FastEthernet 0/0

!

line con 0

line aux 0

line vty 0 4

login

!

end

RB#show running-config

Building configuration...

Current configuration : 721 bytes

!

version RGNOS 10.1.00(4), Release(18443)(Tue Jul 17 20:50:30 CST 2007 -ubu1server)

hostname RB

!

enable secret 5 $1$db44$8x67vy78Dz5pq1xD

!

interface FastEthernet 0/0

ip address 172.16.1.9 255.255.255.252

duplex auto

speed auto

!

interface FastEthernet 0/1

ip address 172.16.1.2 255.255.255.252

duplex auto

speed auto

!

interface Loopback 0

ip address 172.16.2.1 255.255.255.0

!

router rip

version 2

passive-interface FastEthernet 0/0

network 172.16.0.0

no auto-summary

!

ip route 0.0.0.0 0.0.0.0 FastEthernet 0/0

!

line con 0

line aux 0

line vty 0 4

login

!

end

RC#show running-config

Building configuration...

Current configuration : 682 bytes

!

version RGNOS 10.1.00(4), Release(18443)(Tue Jul 17 20:50:30 CST 2007 -ubu1server)


hostname RC

!

enable secret 5 $1$db44$8x67vy78Dz5pq1xD

!

interface FastEthernet 0/0

ip address 172.16.1.10 255.255.255.252

duplex auto

speed auto

!

interface FastEthernet 0/1

ip address 172.16.1.6 255.255.255.252

duplex auto

speed auto

!

interface Loopback 0

ip address 210.10.1.1 255.255.255.0

!

ip route 172.16.2.0 255.255.255.0 FastEthernet 0/0

ip route 172.16.3.0 255.255.255.0 FastEthernet 0/1

!

line con 0

line aux 0

line vty 0 4

login

!

end



--结束END--

本文标题: Router Configuration

本文链接: https://www.lsjlt.com/news/183357.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作