HCIP 三层架构实验

1.拓扑结构

2.配置IP在R1,sw1,sw2之间并启动 rip协议

3.SW1和SW2之间使用Eth-Trunk进行链路封装

[SW1]interface Eth-Trunk 0
[SW1-Eth-Trunk0]q
[SW1]interface Ethernet0/0/4
[SW1-Ethernet0/0/4]eth-trunk 0
[SW1-Ethernet0/0/4]interface Ethernet0/0/5
[SW1-Ethernet0/0/4]eth-trunk 0
[SW1-Ethernet0/0/4]q
[SW1]interface Eth-Trunk 0
[SW1-Eth-Trunk0]port link-type trunk 
[SW1-Eth-Trunk0]port trunk allow-pass vlan all


4.将交换机之间的链路化为trunk接口

[SW1]interface Ethernet0/0/4
[SW1-Ethernet0/0/3]port link-type trunk 
[SW1-Ethernet0/0/3]port trunk allow-pass vlan all
[SW1-Ethernet0/0/3]interface Ethernet0/0/6
[SW1-Ethernet0/0/6]port link-type trunk
[SW1-Ethernet0/0/6]port trunk allow-pass vlan all

 5.启用STP并定义主根与副根

[SW1]vlan 2
[SW1-vlan2]q
[SW1]stp enable
[SW1]stp mode mstp 
[SW1]stp region-configuration 
[SW1-mst-region]region-name hcip
[SW1-mst-region]instance 3 vlan 3
[SW1-mst-region]instance 2 vlan 2
[SW1-mst-region]active region-configuration 

[SW1]stp instance 3 root primary 
[SW1]stp instance 2 root secondary
[SW2]stp instance 3 root secondary 
[SW2]stp instance 2 root primary

6.配置VRRP网关冗余 并启用DHCP

[SW1]interface vlan 3                              
[SW1-Vlanif1]vrrp vrid 1 virtual-ip 172.16.1.100  
[SW1-Vlanif1]vrrp vrid 1 priority 101              
[SW1-Vlanif1]vrrp vrid 1 track interface EigabitEthernet 0/0/1 reduced 10 10
[SW1-Vlanif1]q
[SW1]interface vlan 2
[SW1-Vlanif2]vrrp vrid  1 virtual-ip 172.16.2.100
[SW1-Vlanif2]q

[SW2]interface vlan 2                             
[SW2-Vlanif2]vrrp vrid 1 virtual-ip 172.16.2.100   
[SW2-Vlanif2]vrrp vrid 1 priority 101              
[SW2-Vlanif2]vrrp vrid 1 track interface GigabitEthernet 0/0/1
[SW2-Vlanif2]q
[SW2]interface vlan 3
[SW2-Vlanif1]vrrp vrid 1 virtual-ip 172.16.1.100 

7.配置NAT访问ISP

[R1]ip route-static 0.0.0.0 0.0.0.0 GigabitEthernet 0/0/1 12.1.1.2

[R1]acl 2000
[R1-acl-basic-2000]rule 0 permit source 172.16.0.0 0.0.255.255
[R1-acl-basic-2000]q

[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]nat outbound 2000

 8.测试

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值