1. 先配置接入层的接口类型及划分
2.配置汇聚层的接口类型及划分
3.配置汇聚层的IP地址及编写缺省、NAT--IP地址转换
4. 给vlan分组,定义组 的主根,组的备份根
5.汇聚层之间使用通道技术(华为:以太网中继Eth-Trunk) 通道技术将多个接口逻辑的整合为一个接口
6.给汇聚层和核心层之间的交换机接口配置IP地址
7.在汇聚层配置DHCP服务
8.使用OSPF使汇聚层与核心层互通
9.给公网配置IP及环回及给汇聚层写缺省
因lsw3和lsw4配置相同,故只写一次配置
vlan batch 2 to 3
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 3
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
interface Ethernet0/0/3
port link-type access
port default vlan 2
interface Ethernet0/0/4
port link-type access
port default vlan 3
因lsw1和lsw2配置相同,故只写一次配置
vlan batch 2 to 3 6
interface Ethernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 3
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 3
interface GigabitEthernet0/0/1
port link-type access
port default vlan 6
interface GigabitEthernet0/0/0
ip address 12.1.1.2 255.255.255.0
interface GigabitEthernet0/0/1
ip address 192.168.1.1 255.255.255.0
interface GigabitEthernet0/0/2
ip address 192.168.0.1 255.255.255.0
ip route-static 0.0.0.0 0.0.0.0 12.1.1.1
acl number 2000
rule 5 permit source 192.168.0.0 0.0.255.255
interface GigabitEthernet0/0/0
nat outbound 2000
因lsw1到lsw4配置相同,故只写一次配置
stp region-configuration
instance 1 vlan 2
instance 2 vlan 3
active region-configuration
stp instance 1 root primary
stp instance 2 root secondary
stp instance 2 root primary
stp instance 1 root secondary
因lsw1和lsw2配置相同,故只写一次配置
interface Eth-Trunk0
interface Ethernet0/0/3
eth-trunk 0
interface Ethernet0/0/4
eth-trunk 0
interface Eth-Trunk0
port link-type trunk
port trunk allow-pass vlan 2 to 3
interface Vlanif6
ip address 192.168.0.2 255.255.255.0
interface Vlanif6
ip address 192.168.1.2 255.255.255.0
interface GigabitEthernet0/0/1
port link-type access
port default vlan 6
ip pool vlan2
gateway-list 192.168.2.254
network 192.168.2.0 mask 255.255.255.0
ip pool vlan3
gateway-list 192.168.3.254
network 192.168.3.0 mask 255.255.255.0
ip pool vlan2
gateway-list 192.168.2.254
network 192.168.2.0 mask 255.255.255.0
ip pool vlan3
gateway-list 192.168.3.254
network 192.168.3.0 mask 255.255.255.0
interface Vlanif2
ip address 192.168.2.1 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.2.254
vrrp vrid 1 priority 120
vrrp vrid 1 preempt-mode timer delay 20
vrrp vrid 1 track interface GigabitEthernet0/0/1 reduced 30
dhcp select global
interface Vlanif3
ip address 192.168.3.1 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.3.254
dhcp select global
interface Vlanif2
ip address 192.168.2.2 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.2.254
dhcp select global
interface Vlanif3
ip address 192.168.3.2 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.3.254
vrrp vrid 1 priority 120
vrrp vrid 1 preempt-mode timer delay 20
vrrp vrid 1 track interface GigabitEthernet0/0/1 reduced 30
dhcp select global
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 192.168.0.0 0.0.255.255
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 192.168.0.0 0.0.255.255
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 192.168.0.0 0.0.255.255
interface GigabitEthernet0/0/0
ip address 12.1.1.1 255.255.255.0
interface LoopBack0
ip address 2.2.2.2 255.255.255.0
ip route-static 0.0.0.0 0.0.0.0 192.168.1.1
ip route-static 0.0.0.0 0.0.0.0 192.168.0.1