三层架构
步骤
一、先交换
1.ETH-truck sw1/2 - g0/3 g0/4
2.vlan
3.truck
4.stp
5.svi
6.vrrp
7.dhcp
二、再路由
ospf
nat(acl)
配置
一、
1.eth-truck, sw1 sw2 的 g0/3与g0/4口均创建 eth-truck 通道
[sw1]interface Eth-Trunk 1
[sw1-Eth-Trunk0]q
[sw1]interface GigabitEthernet 0/0/3
[sw1-GigabitEthernet0/0/1]eth-trunk 1
[sw1-GigabitEthernet0/0/1]int g0/0/4
[sw1-GigabitEthernet0/0/2]eth-trunk 1
[sw2]interface Eth-Trunk 1
[sw2-Eth-Trunk0]q
[sw2]interface GigabitEthernet 0/0/3
[sw2-GigabitEthernet0/0/1]eth-trunk 1
[sw2-GigabitEthernet0/0/1]int g0/0/4
[sw2-GigabitEthernet0/0/2]eth-trunk 1
2.sw1/2/3/4均创建 vlan2
3.配置各交换机之间的 truck 通道,
4.各交换机 配置 stp, 其中sw1为主根,sw2为备份
[sw1]stp mode mstp
[sw1]stp enable
[sw1]stp region-configuration
[sw1-mst-region]region-name a
[sw1-mst-region]instance 1 vlan 1
[sw1-mst-region]instance 2 vlan 2
[sw1-mst-region]active region-configuration
[sw1]stp instance 1 root primary
[sw1]stp instance 2 root secondary
[sw1]stp mode mstp
[sw1]stp enable
[sw1]stp region-configuration
[sw1-mst-region]region-name a
[sw1-mst-region]instance 1 vlan 1
[sw1-mst-region]instance 2 vlan 2
[sw1-mst-region]active region-configuration
[sw1]stp instance 1 root secondary
[sw1]stp instance 2 root primary
5.sw1 sw2 配置 svi
[sw1]interface Vlanif 1
[sw1-Vlanif1]ip address 172.16.1.1 24
[sw1]interface Vlanif 2
[sw1-Vlanif2]ip address 172.16.2.1 24
[sw2]interface Vlanif 1
[sw2-Vlanif1]ip address 172.16.1.2 24
[sw2]interface Vlanif 2
[sw2-Vlanif2]ip address 172.16.2.2 24
6.配置 vrrp
sw1
sw2
7.sw1 sw2 配置DHCP
sw1
sw2
pc1
pc2
pc3
pc4
二、路由
未完待续