某企业B网络拓扑结构如下图所示,内部有R1-R4共4个路由器,该4个路由器都在同一个自治域系统0中,在该网络中共使用OSPF和RIP两种路由选择协议进行网络互连。在满足内部网络相互通信的需求后,要求该网络能上Internet,现要求内部网络通过路由器R1连接到Internet。

为达到上述要求,请描述在每个路由器上需要配置什么(接口打开及IP地址配置除外),如有必要请写出配置语句。(路由器R1和R3的配置各8分,Internet路由器、R2和R4各为3分)

拓扑图如下:

f05180623b11e597adb14d54b98d57fe.png

R1配置:

Router#show run

Building configuration...

Current configuration : 605 bytes

!

version 12.2

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname Router

!

!

!

!

!

!

!

!

!

!

ip name-server 0.0.0.0

!

!

!

!

!

!

interface FastEthernet0/0

ip address 10.1.1.1 255.255.255.0

duplex auto

speed auto

!

interface FastEthernet0/1

ip address 210.19.34.81 255.255.255.252

duplex auto

speed auto

!

router ospf 100

log-adjacency-changes

network 10.1.1.0 0.0.0.255 area 0

default-information originate

!

ip classless

ip route 0.0.0.0 0.0.0.0 FastEthernet0/1

!

!

!

!

!

!

!

!

!

line con 0

line vty 0 4

login

!

!

!

end

R2配置:

Router#show run

Building configuration...

Current configuration : 538 bytes

!

version 12.2

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname Router

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

interface FastEthernet0/0

ip address 10.1.1.2 255.255.255.0

duplex auto

speed auto

!

interface FastEthernet0/1

ip address 10.1.2.1 255.255.255.0

duplex auto

speed auto

!

router ospf 100

log-adjacency-changes

network 10.1.1.0 0.0.0.255 area 0

network 10.1.2.0 0.0.0.255 area 0

!

ip classless

!

!

!

!

!

!

!

!

!

line con 0

line vty 0 4

login

!

!

!

end

R3配置:

Router#show run

Building configuration...

Current configuration : 703 bytes

!

version 12.2

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname Router

!

!

!

!

!

!

!

!

!

!

ip name-server 0.0.0.0

!

!

!

!

!

!

interface FastEthernet0/0

ip address 10.1.2.2 255.255.255.0

duplex auto

speed auto

!

interface FastEthernet0/1

ip address 172.30.1.1 255.255.255.0

duplex auto

speed auto

!

router ospf 100

log-adjacency-changes

redistribute rip subnets

network 10.1.2.0 0.0.0.255 area 0

!

router ospf 10

log-adjacency-changes

!

router rip

version 2

redistribute ospf 100 metric 3

network 172.30.0.0

default-information originate

!

ip classless

!

!

!

!

!

!

!

!

!

line con 0

line vty 0 4

login

!

!

!

end

R4的配置:

Router#show run

Building configuration...

Current configuration : 559 bytes

!

version 12.2

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname Router

!

!

!

!

!

!

!

!

!

!

ip name-server 0.0.0.0

!

!

!

!

!

!

interface Loopback0

ip address 4.4.4.4 255.255.255.0

!

interface FastEthernet0/0

ip address 172.30.1.2 255.255.255.0

duplex auto

speed auto

!

interface FastEthernet0/1

no ip address

duplex auto

speed auto

shutdown

!

router rip

version 2

network 4.0.0.0

network 172.30.0.0

!

ip classless

!

!

!

!

!

!

!

!

!

line con 0

line vty 0 4

login

!

!

!

end

internet路由配置:

Router#show run

Building configuration...

Current configuration : 465 bytes

!

version 12.2

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname Router

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

interface FastEthernet0/0

ip address 210.19.34.82 255.255.255.252

duplex auto

speed auto

!

interface FastEthernet0/1

no ip address

duplex auto

speed auto

shutdown

!

ip classless

ip route 0.0.0.0 0.0.0.0 FastEthernet0/0

!

!

!

!

!

!

!

!

!

line con 0

line vty 0 4

login

!

!

!

end

Logo

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。

更多推荐