首页 > 其他分享 >交换综合实验-三层架构

交换综合实验-三层架构

时间:2023-02-07 14:24:54浏览次数:35  
标签:24 架构 int ip vlan 交换 172.16 三层 port

 

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

 

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

 

在每个交换机上创建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

 

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

 

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

 

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

 

标签:24,架构,int,ip,vlan,交换,172.16,三层,port
From: https://www.cnblogs.com/miracle01/p/17098193.html

相关文章