HCIP第二次作业

作业:完成上述实验拓扑配置,编写实验报告 

需求分析:

1. 拓扑结构概述

该网络拓扑包括两个核心交换机(LSW1和LSW2)、一个接入层交换机(AR1)以及多个连接到不同VLAN的终端设备(PC1、PC2、PC3、PC4)。各个设备的接口和IP地址分配如下:

  • VLAN 2: 包含PC1,网关为10.0.2.1/24
  • VLAN 3: 包含PC2,网关为10.0.3.1/24
  • VLAN 20: 包含PC3,网关为10.0.20.1/24
  • VLAN 30: 包含PC4,网关为10.0.30.1/24
2. 配置任务分解

根据题目要求,需要完成以下配置任务:

  1. 按图示的VLAN及IP地址需求,完成相关配置:

    • 配置各交换机的VLAN和接口。
    • 为每个VLAN分配相应的IP地址。
  2. 要求SW1为VLAN 2/3的主根及主网关,SW2为VLAN 20/30的主根及主网关,SW1和SW2互为备份:

    • 设置生成树协议(STP),指定SW1和SW2分别为不同VLAN的主根交换机。
  3. 上层通过静态路由完成数据通信过程:

    • 配置静态路由以确保不同VLAN之间的通信。
  4. AR1为企业出口路由器:

    • 配置AR1作为企业的出口路由器,负责内外部网络的通信。
  5. 要求全网可达:

    • 确保所有设备之间可以互相通信。

 

相关代码:

  1. 交换机命名

    • LSW1:system-view
      sysname LSW1
      
    • LSW2:system-view
      sysname LSW2
      
    • AR1:system-view
      sysname AR1

其余同理 

VLAN配置

  • 在LSW1和LSW2上创建VLAN:
    vlan 2
    vlan 3
    vlan 20
    vlan 30
    
  • 将相应端口划入VLAN:
    interface gigabitEthernet 0/0/1
    port link-type access
    port default vlan 2

 

LSW3和LSW4同理如上 

二:

  1. LSW1配置:配置链路聚合:

    interface Eth-Trunk 1
     mode lacp-static
     quit
    interface GigabitEthernet 0/0/1
     eth-trunk 1
    interface GigabitEthernet 0/0/2
     eth-trunk 1
    interface Eth-Trunk 1
     port link-type trunk
     port trunk allow-pass vlan 2 3 20 30

    mstp配置:

    stp region-configuration
     region-name mst
     revision-level 1
     instance 0 vlan 2 3
     instance 1 vlan 20 30
     active region-configuration
    stp instance 1 root primary
    stp instance 2 root secondary

    配置 VRRP 网关:

    interface Vlanif 2
     ip address 10.0.2.1 24
     vrrp vrid 2 virtual-ip 10.0.2.254
     vrrp vrid 2 priority 110
    interface Vlanif 3
     ip address 10.0.3.1 24
     vrrp vrid 3 virtual-ip 10.0.3.254
     vrrp vrid 3 priority 110
    interface Vlanif 20
     vrrp vrid 20 virtual-ip 10.0.20.254  vrrp vrid 20 priority 90
    interface Vlanif 30
     vrrp vrid 30 virtual-ip 10.0.30.254  vrrp vrid 30 priority 90
    

    配置 AR1 接口:

    interface GigabitEthernet 0/0/5
     ip address 10.0.0.1 30

  2. LSW2配置:同上

三:

R1:

接口配置:

interface GigabitEthernet 0/0/0
 ip address 202.1.1.1 30
interface GigabitEthernet 0/0/1
 ip address 10.0.0.2 30
interface GigabitEthernet 0/0/2
 ip address 10.0.0.6 30

NAT 配置:

acl 2000
 rule permit source any
interface GigabitEthernet 0/0/0
 nat outbound 2000

静态路由:

ip route-static 10.0.2.0 24 10.0.0.1
ip route-static 10.0.3.0 24 10.0.0.1
ip route-static 10.0.20.0 24 10.0.0.5
ip route-static 10.0.30.0 24 10.0.0.5

静态路由到 ISP:

ip route-static 0.0.0.0 0 202.1.1.2

四:验证与测试

  1. PC配置:为每台PC配置相应的IP地址和网关。
  2. 连通性测试:使用PC上的ping命令测试各设备间的连通性。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值