敲半天一个闪退全™给我干没了呜呜呜,eNSP,wcnm!wcnm!wcnm!
→b站传送门,感谢大佬←
→华为eNSP中型企业局域网网络规划设计(下)←
→拓扑图传送门,可以自己配置着玩←
1.部门可以访问公司资源和互联网资源
2.部门之间不能互访
3.服务器要有单独的服务器区和交换机内部网络使用私有ip地址
配置vlan/各端口类型/链路聚合
SW1~8, SW10
#
vlan batch 10 20 30 40 50 60 100
#
SW1
#
interface GigabitEthernet0/0/1port link-type accessport default vlan 10stp edged-port enable
#
interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 10
#
interface GigabitEthernet0/0/3port link-type trunkport trunk allow-pass vlan 10
#
SW2
#
interface GigabitEthernet0/0/1port link-type accessport default vlan 20stp edged-port enable
#
interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 20
#
interface GigabitEthernet0/0/3port link-type trunkport trunk allow-pass vlan 20
#
SW3
#
interface GigabitEthernet0/0/1port link-type accessport default vlan 30stp edged-port enable
#
interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 30
#
interface GigabitEthernet0/0/3port link-type trunkport trunk allow-pass vlan 30
#
SW4
#
interface GigabitEthernet0/0/1port link-type accessport default vlan 40stp edged-port enable
#
interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 40
#
interface GigabitEthernet0/0/3port link-type trunkport trunk allow-pass vlan 40
#
SW5
#
interface GigabitEthernet0/0/1port link-type accessport default vlan 50stp edged-port enable
#
interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 50
#
interface GigabitEthernet0/0/3port link-type trunkport trunk allow-pass vlan 50
#
SW6
#
interface GigabitEthernet0/0/1port link-type accessport default vlan 60stp edged-port enable
#
interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 60
#
interface GigabitEthernet0/0/3port link-type trunkport trunk allow-pass vlan 60
#
SW7
[SW7]port-group trunk
[SW7-port-group-trunk]group-member g0/0/1 to g0/0/7
[SW7-port-group-trunk]p l t
[SW7-port-group-trunk]p t a v all//链路聚合
[SW7]int Eth-Trunk 1
[SW7-Eth-Trunk1]trunkport g0/0/10
[SW7-Eth-Trunk1]trunkport g0/0/11
[SW7-Eth-Trunk1]p l t
[SW7-Eth-Trunk1]p t a v all[SW7]v b 77 78#
interface GigabitEthernet0/0/8port link-type accessport default vlan 77
#
interface GigabitEthernet0/0/9port link-type accessport default vlan 78
#
interface Vlanif77ip address 192.168.77.7 255.255.255.0
#
interface Vlanif78ip address 192.168.78.7 255.255.255.0
#
SW8
[SW8]port-group trunk
[SW8-port-group-trunk]group-member g0/0/1 to g0/0/7
[SW8-port-group-trunk]p l t
[SW8-port-group-trunk]p t a v all//链路聚合
[SW8]int Eth-Trunk 1
[SW8-Eth-Trunk1]trunkport g0/0/10
[SW8-Eth-Trunk1]trunkport g0/0/11
[SW8-Eth-Trunk1]p l t
[SW8-Eth-Trunk1]p t a v all[SW8]v b 87 88#
interface GigabitEthernet0/0/8port link-type accessport default vlan 87
#
interface GigabitEthernet0/0/9port link-type accessport default vlan 88
#
interface Vlanif87ip address 192.168.87.8 255.255.255.0
#
interface Vlanif88ip address 192.168.88.8 255.255.255.0
#
SW9
[SW9]v b 200 201 91 92#
interface GigabitEthernet0/0/1port link-type accessport default vlan 200
#
interface GigabitEthernet0/0/2port link-type accessport default vlan 201
#
interface GigabitEthernet0/0/3port link-type accessport default vlan 91
#
interface GigabitEthernet0/0/4port link-type accessport default vlan 92
#
interface Vlanif200ip address 192.168.200.254 255.255.255.0
#
interface Vlanif201ip address 192.168.201.254 255.255.255.0
#
interface Vlanif91ip address 192.168.91.254 255.255.255.0
#
interface Vlanif92ip address 192.168.92.254 255.255.255.0
#
Server1
Server2
SW10
#
interface GigabitEthernet0/0/1port link-type accessport default vlan 100stp edged-port enable
#
interface GigabitEthernet0/0/2port link-type trunkport trunk allow-pass vlan 100
#
interface GigabitEthernet0/0/3port link-type trunkport trunk allow-pass vlan 100
#
interface Vlanif100ip address 192.68.100.254 255.255.255.0
#
AR-DHCP
#
interface GigabitEthernet0/0/0ip address 192.168.100.1 255.255.255.0
#
AR1
#
interface GigabitEthernet0/0/0ip address 192.168.77.1 255.255.255.0
#
interface GigabitEthernet0/0/1ip address 192.168.87.1 255.255.255.0
#
interface GigabitEthernet0/0/2ip address 192.168.13.1 255.255.255.0
#
interface GigabitEthernet4/0/0ip address 192.168.91.1 255.255.255.0
#
interface GigabitEthernet4/0/1ip address 192.168.12.1 255.255.255.0
#
AR2
#
interface GigabitEthernet0/0/0ip address 192.168.78.2 255.255.255.0
#
interface GigabitEthernet0/0/1ip address 192.168.88.2 255.255.255.0
#
interface GigabitEthernet0/0/2ip address 192.168.23.2 255.255.255.0
#
interface GigabitEthernet4/0/0ip address 192.168.92.2 255.255.255.0
#
interface GigabitEthernet4/0/1ip address 192.168.12.2 255.255.255.0
#
AR3
#
interface GigabitEthernet0/0/0ip address 192.168.13.3 255.255.255.0
#
interface GigabitEthernet0/0/1ip address 192.168.23.3 255.255.255.0
#
interface GigabitEthernet0/0/2ip address 100.1.11.3 255.255.255.0
#
AR5
#
interface GigabitEthernet0/0/0ip address 100.2.33.254 255.255.255.0
#
interface GigabitEthernet0/0/1ip address 100.1.33.5 255.255.255.0
#
interface GigabitEthernet0/0/2ip address 100.1.11.5 255.255.255.0
#
Server3
配置mstp
将SW7设置为vlan 10 20 30 100的根桥,SW8为备份根桥
将SW8设置为vlan 40 50 60的根桥,SW7为备份根桥
SW1~8,SW10
[SW7]stp mode mstp#
stp region-configurationregion-name region1instance 1 vlan 10 20 30 100instance 2 vlan 40 50 60active region-configuration
#
SW7
[SW7]stp instance 1 root primary
[SW7]stp instance 2 root secondary
SW8
[SW8]stp instance 1 root secondary
[SW8]stp instance 2 root primary
配置vrrp
SW7
#
interface Vlanif10ip address 192.168.10.7 255.255.255.0vrrp vrid 10 virtual-ip 192.168.10.254vrrp vrid 10 priority 120
#
interface Vlanif20ip address 192.168.20.7 255.255.255.0vrrp vrid 20 virtual-ip 192.168.20.254vrrp vrid 20 priority 120
#
interface Vlanif30ip address 192.168.30.7 255.255.255.0vrrp vrid 30 virtual-ip 192.168.30.254vrrp vrid 30 priority 120
#
interface Vlanif40ip address 192.168.40.7 255.255.255.0vrrp vrid 40 virtual-ip 192.168.40.254
#
interface Vlanif50ip address 192.168.50.7 255.255.255.0vrrp vrid 50 virtual-ip 192.168.50.254
#
interface Vlanif60ip address 192.168.60.7 255.255.255.0vrrp vrid 60 virtual-ip 192.168.60.254
#
interface Vlanif100ip address 192.168.100.7 255.255.255.0vrrp vrid 100 virtual-ip 192.168.100.254vrrp vrid 100 priority 120
#
SW8
#
interface Vlanif10ip address 192.168.10.8 255.255.255.0vrrp vrid 10 virtual-ip 192.168.10.254
#
interface Vlanif20ip address 192.168.20.8 255.255.255.0vrrp vrid 20 virtual-ip 192.168.20.254
#
interface Vlanif30ip address 192.168.30.8 255.255.255.0vrrp vrid 30 virtual-ip 192.168.30.254
#
interface Vlanif40ip address 192.168.40.8 255.255.255.0vrrp vrid 40 virtual-ip 192.168.40.254vrrp vrid 40 priority 120
#
interface Vlanif50ip address 192.168.50.8 255.255.255.0vrrp vrid 50 virtual-ip 192.168.50.254vrrp vrid 50 priority 120
#
interface Vlanif60ip address 192.168.60.8 255.255.255.0vrrp vrid 60 virtual-ip 192.168.60.254vrrp vrid 60 priority 120
#
interface Vlanif100ip address 192.168.100.8 255.255.255.0vrrp vrid 100 virtual-ip 192.168.100.254
#
配置dhcp
AR-DHCP
#
ip pool vlan10gateway-list 192.168.10.254 network 192.168.10.0 mask 255.255.255.0 excluded-ip-address 192.168.10.7 192.168.10.8
#
ip pool vlan20gateway-list 192.168.20.254 network 192.168.20.0 mask 255.255.255.0 excluded-ip-address 192.168.20.7 192.168.20.8
#
ip pool vlan30gateway-list 192.168.30.254 network 192.168.30.0 mask 255.255.255.0 excluded-ip-address 192.168.30.7 192.168.30.8
#
ip pool vlan40gateway-list 192.168.40.254 network 192.168.40.0 mask 255.255.255.0 excluded-ip-address 192.168.40.7 192.168.40.8
#
ip pool vlan50gateway-list 192.168.50.254 network 192.168.50.0 mask 255.255.255.0 excluded-ip-address 192.168.50.7 192.168.50.8
#
ip pool vlan60gateway-list 192.168.60.254 network 192.168.60.0 mask 255.255.255.0 excluded-ip-address 192.168.60.7 192.168.60.8
#[DHCP]dhcp en
[DHCP-GigabitEthernet0/0/0]dhcp select global//因为dhcp服务器没有路由,需要手动配置一条
[DHCP]ip route-static 0.0.0.0 0 192.168.100.254
配置dhcp中继
SW7
[SW7]dhcp en
[SW7]int Vlanif 10
[SW7-Vlanif10]dhcp select relay
[SW7-Vlanif10]dhcp relay server-ip 192.168.100.1
[SW7]int Vlanif 20
[SW7-Vlanif10]dhcp select relay
[SW7-Vlanif10]dhcp relay server-ip 192.168.100.1
[SW7]int Vlanif 30
[SW7-Vlanif10]dhcp select relay
[SW7-Vlanif10]dhcp relay server-ip 192.168.100.1
[SW7]int Vlanif 40
[SW7-Vlanif10]dhcp select relay
[SW7-Vlanif10]dhcp relay server-ip 192.168.100.1
[SW7]int Vlanif 50
[SW7-Vlanif10]dhcp select relay
[SW7-Vlanif10]dhcp relay server-ip 192.168.100.1
[SW7]int Vlanif 60
[SW7-Vlanif10]dhcp select relay
[SW7-Vlanif10]dhcp relay server-ip 192.168.100.1
SW8
[SW8]dhcp en
[SW8]int vlanif 10
[SW8-Vlanif10] dhcp relay server-ip 192.168.100.1
[SW8]int vlanif 20
[SW8-Vlanif10] dhcp relay server-ip 192.168.100.1
[SW8]int vlanif 30
[SW8-Vlanif10] dhcp relay server-ip 192.168.100.1
[SW8]int vlanif 40
[SW8-Vlanif10] dhcp relay server-ip 192.168.100.1
[SW8]int vlanif 50
[SW8-Vlanif10] dhcp relay server-ip 192.168.100.1
[SW8]int vlanif 60
[SW8-Vlanif10] dhcp relay server-ip 192.168.100.1
检查一下,成功拿到ip地址