路由重分发,三层交换机综合应用
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
RIP,OSPF,VTP,PVST,NAT,VPN,HSRP,路由重分发,三层交换机综合应用(内含配置命令)~
网络拓扑如上图
R1 E0/3 <----> R2 E0/3
R1 E0/1 <----> 3L-1 F0/0
R1 E0/2 <----> 3L-2 F0/0
3L-1 F0/1 <----> 3L-2 F0/1
3L-1 F0/2 <----> 3L-2 F0/2
3L-1 F0/3 <----> SW1 F0/0
3L-1 F0/4 <----> SW2 F0/0
3L-1 F0/5 <----> SW3 F0/0
3L-2 F0/3 <----> SW1 F0/1
3L-2 F0/4 <----> SW2 F0/1
3L-2 F0/5 <----> SW3 F0/1
PC1 <----> SW1 F0/15
PC2 <----> SW2 F0/9
PC3 <----> SW3 F0/15
网络地址规划
R1 e0/1: 172.16.1.1 24 e0/2: 172.16.2.1 24 e0/3 172.16.3.1 24 l0:192.168.100.1 24
R2 e0/3: 172.16.3.1 24
3L-1 f0/0: 172.16.1.2 24 f0/5: 192.168.10.1 24 l0:192.168.100.2 24
vlan 1 : 10.10.1.1 24 vlan 2 10.10.2.2 24
3L-2 f0/0::172.16.2.2 24 f0/5:192.168.10.2 24 l0:192.168.100.3
vlan 1: 10.10.1.2 24 valn 2 10.10.2.1 24
网络拓扑注解:
R1运行两种路由协议ospf和rip,需要配置路由重分发,配置vpn,对端路由为R2,配置PAT
R2运行ospf路由协议,配置vpn,对端路由为R1
3L-1运行rip路由协议,f0/1 - 4 trunk 运行vtp(server),pvst(vlan1根)vlan1 走f0/1 - f0/1 3L-2运行rip路由协议,f0/1 - 4 trunk 运行vtp(client),pvst(vlan2根)vlan2走f0/2 - f0/2 SW1 f0/0 - 1 trunk 运行vtp(client),f0/10 - 15 属于vlan1
SW1 f0/0 - 1 trunk 运行vtp(client),f0/10 - 15 属于vlan2
3-L1和3L-2的f0/5 配置HSRP,虚拟ip为 192.168.1.254
PC1属于vlan2 ip:10.10.2.2 24
PC2属于vlan1 ip:10.10.1.2 24
pc3不属于任何valn ,网关地址为HSRP的虚拟ip地址:192.168.1.254
R1 show run
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$umYv$gzWXgvkDBL/BYOXFtqiuC/
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
!
!
!
!
!
crypto isakmp policy 1
hash md5
authentication pre-share
crypto isakmp key wocao address 172.16.3.2
!
!
crypto ipsec transform-set wocao ah-md5-hmac esp-des !
crypto map wocaomap 1 ipsec-isakmp
set peer 172.16.3.2
set transform-set wocao
match address 101
!
!
!
!
interface Loopback0
ip address 192.168.100.1 255.255.255.0
!
interface Ethernet0/0
no ip address
shutdown
half-duplex
!
interface Ethernet0/1
ip address 172.16.1.1 255.255.255.0
ip nat inside
ip virtual-reassembly
full-duplex
!
interface Ethernet0/2
ip address 172.16.2.1 255.255.255.0
ip nat inside
ip virtual-reassembly
full-duplex
!
interface Ethernet0/3
ip address 172.16.3.1 255.255.255.0
ip nat outside
ip virtual-reassembly
half-duplex
crypto map wocaomap
!
router ospf 99
log-adjacency-changes
redistribute rip metric 200 subnets
network 172.16.3.0 0.0.0.255 area 0
!
router rip
version 2
redistribute ospf 99 metric 10
passive-interface Ethernet0/3
network 172.16.0.0
network 192.168.100.0
default-metric 10
no auto-summary
!
ip http server
no ip http secure-server
ip route 172.16.4.0 255.255.255.0 172.16.3.2 !
!