三层架构综合实验

 

实验配置

Eth-trunk配置

SW1:
    int Eth-Trunk 0
    int g 0/0/2
      eth-trunk 0
    int g 0/0/3
      eth-trunk 0
SW2:
    int Eth-Trunk 0
    int g 0/0/2
      eth-trunk 0
    int g 0/0/3
      eth-trunk 0

trunk干道配置

SW1:
    port-group group-member g0/0/4 to g0/0/5
      port link-type trunk 
      port trunk allow-pass vlan 1 2

SW2:
    port-group group-member g0/0/4 to g0/0/5
      port link-type trunk 
      port trunk allow-pass vlan 1 2

SW3:
    port-group group-member g0/0/4 to g0/0/5
      port link-type trunk 
      port trunk allow-pass vlan 1 2
      
SW4:
    port-group group-member g0/0/4 to g0/0/5
      port link-type trunk 
      port trunk allow-pass vlan 1 2

Vlan的创建于划分

在每个交换机上创建vlan2
SW3:
    port-group group-member e0/0/1 to e0/0/2
      port link-type access
    int e0/0/1
      port default vlan 1 
    int e0/0/2
      port default vlan 2

SW4:
    port-group group-member e0/0/1 to e0/0/2
      port link-type access
    int e0/0/1
      port default vlan 1 
    int e0/0/2
      port default vlan 2

生成树配置

SW1:
    stp enable
    stp region-configuration
      region-name a
      instance 1 vlan 1
      instance 2 vlan 2
      active region-configuration
    stp instance 1 root primary
    stp instance 2 root secondary 

SW2:
    stp enable
    stp region-configuration
      region-name a
      instance 1 vlan 1
      instance 2 vlan 2
      active region-configuration
    stp instance 1 root primary
    stp instance 2 root secondary 

SW3:
    stp enable
    stp region-configuration
      region-name a
      instance 1 vlan 1
      instance 2 vlan 2
      active region-configuration

SW4:
    stp enable
    stp region-configuration
      region-name a
      instance 1 vlan 1
      instance 2 vlan 2
      active region-configuration

SVI配置

SW1:
    int vlan 1
      ip address 172.16.1.1 24
    int vlan 2
      ip address 172.16.2.1 24
      
SW2:
    int vlan 1
      ip address 172.16.1.2 24
    int vlan 2
      ip address 172.16.2.2 24

VRRP配置

SW1:
    int vlanif 1 
      vrrp vrid 1 virtual-ip 172.16.1.254
      vrrp vrid 1 priority 120
      vrrp vrid 1 track int g0/0/1
    int vlanif 2
      vrrp vrid 1 virtual-ip 172.16.2.254
      vrrp vrid 1 track int g0/0/1 reduced 30

SW2:
    int vlanif 1 
      vrrp vrid 1 virtual-ip 172.16.1.254
      vrrp vrid 1 track int g0/0/1 
    int vlanif 2
      vrrp vrid 1 virtual-ip 172.16.2.254
      vrrp vrid 1 priority 120
      vrrp vrid 1 track int g0/0/1 reduced 30

DHCP配置

SW1:
    dhcp enable
    ip pool 1
      network 172.16.1.0 mask 24
      gateway-list 172.16.1.254
      dns-list 8.8.8.8
    ip pool 2
      network 172.16.2.0 mask 24
      gateway-list 172.16.2.254
      dns-list 8.8.8.8
    int vlan 1
      dhcp select global
    int vlan 2
      dhcp select global

SW2:
    dhcp enable
    ip pool 1
      network 172.16.1.0 mask 24
      gateway-list 172.16.1.254
      dns-list 8.8.8.8
    ip pool 2
      network 172.16.2.0 mask 24
      gateway-list 172.16.2.254
      dns-list 8.8.8.8
    int vlan 1
      dhcp select global
    int vlan 2
      dhcp select global

交换机与路由器间配置

SW1:
    vlan 10
    int g 0/0/1
      port link-type access
      port default vlan 10
    int vlanif 10
      ip address 172.16.11.1 24
    ip route-static 0.0.0.0 0 172.16.11.2

SW2:
    vlan 20
    int g 0/0/1
      port link-type access
      port default vlan 20
    int vlanif 20
      ip address 172.16.12.1 24
    ip route-static 0.0.0.0 0 172.16.12.2
    
R1:
    int g 0/0/1
      ip address 172.16.11.2 24
    int g 0/0/2
      ip address 172.16.12.2 24
    ip route-static 172.16.1.0 24 172.16.12.1
    ip route-static 172.16.1.0 24 172.16.11.1
    ip route-static 172.16.2.0 24 172.16.12.1
    ip route-static 172.16.2.0 24 172.16.11.1
    int g 0/0/0
      ip address 12.1.1.1 24
    
    acl number 2000
      rule 1 permit source 172.16.0.0 0.0.255.255
      int g 0/0/0
        nat outbound 2000
    ip route-static 0.0.0.0 0 12.1.1.2

R2:
    int g 0/0/0
      ip address 12.1.1.2 24
    int l0
      ip address 1.1.1.1 24

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值