有三个路由器,怎么写两边两个路由器的路由表
答案:2 悬赏:50 手机版
解决时间 2021-01-31 17:37
- 提问者网友:几叶到寒
- 2021-01-31 02:26
有三个路由器,怎么写两边两个路由器的路由表
最佳答案
- 五星知识达人网友:西风乍起
- 2021-01-31 02:42
假设:
R1网段为:10.10.10.0/24
R2网段为:20.20.20.0/24
R3网段为:30.30.30.0/24
R1:
R1#sh run
Building configuration...
Current configuration : 534 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
interface FastEthernet0/0
ip address 1.1.1.1 255.255.255.252
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 10.10.10.1 255.255.255.0
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 10.10.10.0 0.0.0.255 area 0
network 1.1.1.0 0.0.0.3 area 0
!
ip classless
!
line con 0
line vty 0 4
login
!
!
endR2:
(略)
R3:
R3#sh run
Building configuration...
Current configuration : 534 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R3
!
interface FastEthernet0/0
ip address 1.1.2.2 255.255.255.252
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 30.30.30.1 255.255.255.0
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 30.30.30.0 0.0.0.255 area 0
network 1.1.2.0 0.0.0.3 area 0
!
ip classless
!
line con 0
line vty 0 4
login
!
!
end
R1网段为:10.10.10.0/24
R2网段为:20.20.20.0/24
R3网段为:30.30.30.0/24
R1:
R1#sh run
Building configuration...
Current configuration : 534 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
interface FastEthernet0/0
ip address 1.1.1.1 255.255.255.252
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 10.10.10.1 255.255.255.0
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 10.10.10.0 0.0.0.255 area 0
network 1.1.1.0 0.0.0.3 area 0
!
ip classless
!
line con 0
line vty 0 4
login
!
!
endR2:
(略)
R3:
R3#sh run
Building configuration...
Current configuration : 534 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R3
!
interface FastEthernet0/0
ip address 1.1.2.2 255.255.255.252
duplex auto
speed auto
!
interface FastEthernet1/0
ip address 30.30.30.1 255.255.255.0
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 30.30.30.0 0.0.0.255 area 0
network 1.1.2.0 0.0.0.3 area 0
!
ip classless
!
line con 0
line vty 0 4
login
!
!
end
全部回答
- 1楼网友:思契十里
- 2021-01-31 04:05
n1 5 e
n2 2 c
n3 8 c
n4 3 e
n6 4 c
n8 4 e
n9 3 c
------------
说明:
上面是解答,原因如下:
路由器自己有路由表,在收到路由更新后会将收到的路由信息和本地的路由表进行比较:
1. 如果新发的路由信息原路由表中无,于是添加,如此处的n1,n3,n4
2. 如果新发的路由信息原路由表中已有,则比较管理距离(ad):
1)、如果新路由信息中ad比原有ad大,则不进行更新,如此处的n2
2)、如果新路由信息中ad比原有ad小,则进行更新,如n6
3. 依次比较完所有的新路由信息后,就更新完了路由表,如上所示
希望对你有用!,祝你好运!
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯