日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

调整路由的AD值

發布時間:2023/12/19 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 调整路由的AD值 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

實驗:調整路由的AD值

【實驗名稱】調整路由的AD值 (注意:PT有可能不支持distance 99 192.168.1.2 0.0.0.0這條命令,所以我們做實驗的時候最好用小凡模擬器)

【實驗目的】通過調整路由的管理距離值,實現路由的管理和控制

【實驗背景】某企業的3臺路由器(RA、RB、RC)運行了RIP路由協議,RA分別與RB、RC連接

【需求分析】通過配置RA的管理距離,使RA只能學到RB的通告路由,并忽略所有路由器的路由,且從RB學到路由的管理距離為99.

【實驗拓撲】



【實驗設備】路由器3臺

【預備知識】路由器基本配置知識、IP路由知識、RIP

【實驗原理】修改管理距離來過濾和控制路由

【實驗步驟】

步驟1:在路由器上配置IP路由選擇和IP地址

Router>enable

Router#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#no ip domain lookup

Router(config)#hostname RzA

RzA(config)#int fa0/0

RzA(config-if)#ip address 192.168.1.1 255.255.255.0

RzA(config-if)#no shut

RzA(config-if)#exit

RzA(config)#int fa0/1

RzA(config-if)#ip address 192.168.2.1 255.255.255.0

RzA(config-if)#no shut

RzA(config-if)#exit

RzA(config)#int lo0

RzA(config-if)#ip address 10.1.1.1 255.255.255.0

RzA(config-if)#no shut

RzA(config-if)#

Router>enable

Router#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#no ip domain lookup

Router(config)#hostname RzB

RzB(config)#int fa0/0

RzB(config-if)#ip address 192.168.1.2 255.255.255.0

RzB(config-if)#no shut

RzB(config-if)#exit

RzB(config)#int lo0

RzB(config-if)#ip address 192.168.10.1 255.255.255.0

RzB(config-if)#no shut

RzB(config-if)#

Router>enable

Router#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#no ip domain lookup

Router(config)#hostname RzC

RzC(config)#int fa0/0

RzC(config-if)#ip address 192.168.2.2 255.255.255.0

RzC(config-if)#no shut

RzC(config-if)#exit

RzC(config)#int lo0

RzC(config-if)#ip address 192.168.20.1 255.255.255.0

RzC(config-if)#no shut

RzC(config-if)#

步驟2:配置RIP協議

RzA(config-if)#exit

RzA(config)#router rip

RzA(config-router)#version 2

RzA(config-router)#network 192.168.1.0

RzA(config-router)#network 192.168.2.0

RzA(config-router)#network 10.1.1.0

RzA(config-router)#no auto-summary

RzA(config-router)#end

RzA#write

Building configuration...

[OK]

RzA#

RzB(config-if)#exit

RzB(config)#router rip

RzB(config-router)#version 2

RzB(config-router)#network 192.168.1.0

RzB(config-router)#network 192.168.10.0

RzB(config-router)#no auto-summary

RzB(config-router)#end

RzB#write

Building configuration...

[OK]

RzB#

RzC(config-if)#exit

RzC(config)#router rip

RzC(config-router)#version 2

RzC(config-router)#network 192.168.2.0

RzC(config-router)#network 192.168.20.0

RzC(config-router)#no auto-summary

RzC(config-router)#end

%SYS-5-CONFIG_I: Configured from console by console

RzC#write

Building configuration...

[OK]

RzC#

步驟3:修改管理距離

RzA(config)#router rip

RzA(config-router)#distance 255

RzA(config-router)#distance 99 192.168.1.2 0.0.0.0

步驟4:驗證測試

在路由器A上用命令show ip route 和show ip rip來驗證配置

RzA#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

* - candidate default, U - per-user static route, o - ODR

P - periodic downloaded static route

Gateway of last resort is not set

10.0.0.0/24 is subnetted, 1 subnets

C 10.1.1.0 is directly connected, Loopback0

C 192.168.1.0/24 is directly connected, FastEthernet0/0

C 192.168.2.0/24 is directly connected, FastEthernet0/1

R 192.168.10.0/24 [99/1] via 192.168.1.2, 00:00:14, FastEthernet0/0

R 192.168.20.0/24 [99/1] via 192.168.2.2, 00:00:13, FastEthernet0/1

RzA#

RzA#ping 192.168.20.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.20.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 ms

RzA#

RzB#ping 10.1.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 15/28/32 ms

RzB#

RzC>ping 192.168.10.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.10.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 62/62/63 ms

RzC>

參考配置:

RzA#show running-config

Building configuration...

Current configuration : 664 bytes

!

version 12.4

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname RzA

!

!

!

!

!

!

!

!

!

!

!

!

no ip domain-lookup

!

!

!

!

!

!

interface Loopback0

ip address 10.1.1.1 255.255.255.0

!

interface FastEthernet0/0

ip address 192.168.1.1 255.255.255.0

duplex auto

speed auto

!

interface FastEthernet0/1

ip address 192.168.2.1 255.255.255.0

duplex auto

speed auto

!

interface Vlan1

no ip address

shutdown

!

router rip

version 2

network 10.0.0.0

network 192.168.1.0

network 192.168.2.0

distance 255

distance 99 192.168.1.2 0.0.0.0

no auto-summary

!

ip classless

!

!

!

!

!

!

!

line con 0

line vty 0 4

login

!

!

!

end

RzA#

RzB#show running-config

Building configuration...

Current configuration : 625 bytes

!

version 12.4

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname RzB

!

!

!

!

!

!

!

!

!

!

!

!

no ip domain-lookup

!

!

!

!

!

!

interface Loopback0

ip address 192.168.10.1 255.255.255.0

!

interface FastEthernet0/0

ip address 192.168.1.2 255.255.255.0

duplex auto

speed auto

!

interface FastEthernet0/1

no ip address

duplex auto

speed auto

shutdown

!

interface Vlan1

no ip address

shutdown

!

router rip

version 2

network 192.168.1.0

network 192.168.10.0

no auto-summary

!

ip classless

!

!

!

!

!

!

!

line con 0

line vty 0 4

login

!

!

!

end

RzB#

RzC#show running-config

Building configuration...

Current configuration : 625 bytes

!

version 12.4

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname RzC

!

!

!

!

!

!

!

!

!

!

!

!

no ip domain-lookup

!

!

!

!

!

!

interface Loopback0

ip address 192.168.20.1 255.255.255.0

!

interface FastEthernet0/0

ip address 192.168.2.2 255.255.255.0

duplex auto

speed auto

!

interface FastEthernet0/1

no ip address

duplex auto

speed auto

shutdown

!

interface Vlan1

no ip address

shutdown

!

router rip

version 2

network 192.168.2.0

network 192.168.20.0

no auto-summary

!

ip classless

!

!

!

!

!

!

!

line con 0

line vty 0 4

login

!

!

!

end

RzC#


【實驗總結】

通過本節課的學習,通過調整路由的管理距離,實現路由的過濾和控制。

轉載于:https://blog.51cto.com/19880423/1053582

總結

以上是生活随笔為你收集整理的调整路由的AD值的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。