HCIE--三层架构

HCIE–三层架构

一.实验要求:
STP+VRRP+OSPF,网关冗余,线路冗余.
二.实验拓扑:
在这里插入图片描述

三.实验配置
1.接入层
1)PC端的接口配置为access
2)交换机上的所有端口设置为边缘接口

interface Ethernet0/0/*
port link-type access
port default vlan 100 (允许相应的VLAN通过)
#stp edged-port default
2.汇聚层
1)将所有接口设为trunk
2)将网关设在汇聚层,配置dhcp pool (sw3 sw4),提示–开启dhcp功能
3)使用VRRP实现网关冗余(sw3-8都需要配置)

interface Ethernet0/0/*
port link-type trunk
port trunk allow-pass vlan all

ip pool 100
gateway-list 192.168.100.1
network 192.168.100.0 mask 255.255.255.0
dns-list 114.114.114.114

ip pool 200
gateway-list 192.168.200.1
network 192.168.200.0 mask 255.255.255.0
dns-list 114.114.114.114

interface Vlanif100
ip address 192.168.100.100 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.100.1
vrrp vrid 1 priority 120
dhcp select global

interface Vlanif200
ip address 192.168.200.100 255.255.255.0
vrrp vrid 2 virtual-ip 192.168.200.1
vrrp vrid 2 priority 115
dhcp select global
3.核心层
1)stp
除连接路由器接口为access,其他接口均可设置为trunk,
将Ethernet0/0/3,Ethernet0/0/4设置为Eth-Trunk,实现链路备份

interface Ethernet0/0/3
eth-trunk 0

interface Ethernet0/0/4
eth-trunk 0

interface Eth-Trunk0
port link-type trunk
port trunk allow-pass vlan 2 to 4094

stp region-configuration
region-name 100 组名,所有的设备都应在一个组内
instance 1 vlan 100 300 400 600 800 将一类vlan放到一个实例中
instance 2 vlan 200 500 700 900
active region-configuration 激活当前配置
Sw1做vlan 100的主根,sw2做vlan 200的主根(sw2相反)

stp instance 1 root secondary
stp instance 2 root primary 主根
Sw3做vlan100的次跟,sw4做vlan200的次跟

stp instance 1 priority 4096
2)svi
启用svi实现交换机三层互联

interface Vlanif300
ip address 192.168.3.1 255.255.255.0

interface Vlanif400
ip address 192.168.4.1 255.255.255.0

interface Vlanif600
ip address 192.168.6.1 255.255.255.0

interface Vlanif800
ip address 192.168.8.1 255.255.255.0
检查生成树是否正常,可以使用cost,优先级干涉
[sw1]interface GigabitEthernet 0/0/1
[sw1-GigabitEthernet0/0/1]stp instance 1 cost ?
INTEGER<1-200000000> Port path cost

[sw1-GigabitEthernet0/0/1]stp instance 1 port priority ?
INTEGER<0-240> Port priority, in steps of 16

3)ospf
核心设置为区域0,汇聚为区域1

ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 192.168.4.1 0.0.0.0
network 192.168.8.1 0.0.0.0
area 0.0.0.1
network 192.168.3.1 0.0.0.0
network 192.168.6.1 0.0.0.0
stub no-summary 区域1设置为完全stub,向下发布3类缺省
Sw1和sw2配置指向R1的缺省
将OSPFde全网络类型设置为p2p,不用进行DR和BDR的选举,直接形成邻接关系
#ospf network-type p2p
4)使用nat访问ISP

acl number 2000
rule 5 permit source 192.168.0.0 0.0.255.255

interface GigabitEthernet0/0/2
ip address 10.10.10.1 255.255.255.0
nat outbound 2000

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值