实验目标:
1、 MM公司总公司位于北京,在唐山、秦皇岛分别有两家分公司,两家分公司通告专线连接到总公司,所有公司通过总公司路由器接入互联网方便统一管理。
2、 使用RIPV1路由协议,由于前期IP分配不规范,造成现有网络成为一个不连续的网络,因为路由协议使用RIPV1,请想办法解决路由问题。
注意:实验涉及RIPV1不连续子网环境中如果何解决,在单出口环境中默认路由发布
实验图:
R1配置:
BJ-3640-1#show run
Building configuration...
Current configuration : 1441 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname BJ-3640-1 //设置路由器名称
!
boot-start-marker
boot-end-marker
!
no aaa new-model
memory-size iomem 5
!
ip cef
no ip domain lookup
ip domain name lab.local
!
interface Serial0/0
description connect to R2-S0/0 //设置接口描述信息
ip address 10.30.1.1 255.255.255.0 secondary //设置辅助IP解决不连续子网路由问题
ip address 172.16.1.1 255.255.255.252 //设置主IP
ip nat inside //设置为NAT内部接口
ip virtual-reassembly
serial restart-delay 0
!
interface Serial0/1
description CONNECT TO R3-S0/0 //设置接口描述信息
ip address 10.40.1.1 255.255.255.0 secondary //设置辅助IP解决不连续子网路由问题
ip address 192.168.1.1 255.255.255.252 //设置主IP
ip nat inside //设置为NAT内部接口
ip virtual-reassembly
serial restart-delay 0
!
interface Serial0/2
ip address 121.1.1.1 255.255.255.252 //设置主IP
ip nat outside //设置为NAT外部接口
ip virtual-reassembly
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
interface FastEthernet1/0
no ip address
shutdown
duplex auto
speed auto
!
router rip//启用RIP
network 10.0.0.0
network 172.16.0.0
network 192.168.1.0 //通告网段使用RIP
default-information originate //产生默认路由
!
no ip http server
no ip http secure-server
!
ip nat inside source list 1 interface Serial0/2 overload //启用PAT,访问互联网
!
access-list 1 permit any //设置NAT许可的网段
!
control-plane
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
login
!
end
R2配置:
TS-R3640-1#show run
Building configuration...
Current configuration : 1367 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname TS-R3640-1
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$mEXO$6J0XQEHYug0CgxgtZW0ce1
!
no aaa new-model
memory-size iomem 5
!
ip cef
no ip domain lookup
ip domain name lab.local
!
interface Serial0/0
description connect R1-S0/0
ip address 10.30.1.2 255.255.255.0 secondary
ip address 172.16.1.2 255.255.255.252
serial restart-delay 0
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
interface Ethernet1/0
ip address 10.20.1.1 255.255.255.0
half-duplex
!
interface Ethernet1/1
ip address 10.20.2.1 255.255.255.0
half-duplex
!
interface Ethernet1/2
ip address 10.20.3.1 255.255.255.0
half-duplex
!
interface Ethernet1/3
no ip address
shutdown
half-duplex
!
router rip
network 10.0.0.0
network 172.16.0.0
!
no ip http server
no ip http secure-server
!
control-plane
!
line con 0
exec-timeout 0 0
privilege level 15
password mm
logging synchronous
login
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
password mm
login
!
End
R3配置:
QHD-R3640-1#show run
Building configuration...
Current configuration : 1373 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname QHD-R3640-1
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$nAEI$pa9mD71.Z0aR7ato.g91r0
!
no aaa new-model
memory-size iomem 5
!
ip cef
no ip domain lookup
ip domain name lab.local
!
!
interface Serial0/0
description connect to R1-S0/1
ip address 10.40.1.2 255.255.255.0 secondary
ip address 192.168.1.2 255.255.255.252
serial restart-delay 0
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
interface Ethernet1/0
ip address 10.20.5.1 255.255.255.0
half-duplex
!
interface Ethernet1/1
ip address 10.20.6.1 255.255.255.0
half-duplex
!
interface Ethernet1/2
ip address 10.20.7.1 255.255.255.0
half-duplex
!
interface Ethernet1/3
no ip address
shutdown
half-duplex
!
router rip
network 10.0.0.0
network 192.168.1.0
!
no ip http server
no ip http secure-server
!
control-plane
!
line con 0
exec-timeout 0 0
privilege level 15
password mm
logging synchronous
login
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
line vty 0 4
password mm
login
!
End
R1路由表:
R2路由表:
R3路由表:
PING测试
以上可以看出由于路由选择进程会把辅助地址看作是单独的数据链路,所以这种配置了辅助地址的链路会产生大量的路由更新。如果有较多的物理链路并且带宽有限的话,会造成网络拥塞。