1、本案例是常见的小型企业网络方案
2、涉及的常见技术知识为VLAN、静态路由、NAT、Eth-Trunk
3、接入交换机与核心交换机通过Eth-Trunk组网保证可靠性
4、网关设置在核心交换机,通过核心交换机交换数据
5、接入层楼层1交换机配置举例
<L1>dis cu
#
sysname L1
#
vlan batch 10
#
stp bpdu-protection
#
interface Vlanif1
#
interface Vlanif10
ip address 10.10.10.253 255.255.255.0
#
interface MEth0/0/1
#
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 10
mode lacp-static
#
interface Ethernet0/0/1
port link-type access
port default vlan 10
stp edged-port enable
#
interface Ethernet0/0/2
port link-type access
port default vlan 10
stp edged-port enable
#
interface Ethernet0/0/3
#
interface GigabitEthernet0/0/1
eth-trunk 1
#
interface GigabitEthernet0/0/2
eth-trunk 1
#
return
<L1>
6、核心交换机配置
<core>dis cu
#
sysname core
#
vlan batch 10 20 100
#
cluster enable
ntdp enable
ndp enable
#
interface Vlanif1
#
interface Vlanif10
ip address 10.10.10.1 255.255.255.0
#
interface Vlanif20
ip address 10.10.20.1 255.255.255.0
#
interface Vlanif100
ip address 10.10.100.1 255.255.255.0
#
interface MEth0/0/1
#
interface Eth-Trunk1
description to L1
port link-type trunk
port trunk allow-pass vlan 10
mode lacp-static
#
interface Eth-Trunk2
description to L2
port link-type trunk
port trunk allow-pass vlan 20
mode lacp-static
#
interface GigabitEthernet0/0/1
eth-trunk 1
#
interface GigabitEthernet0/0/2
eth-trunk 1
#
interface GigabitEthernet0/0/3
eth-trunk 2
#
interface GigabitEthernet0/0/4
eth-trunk 2
#
interface GigabitEthernet0/0/5
#
interface GigabitEthernet0/0/24
description to ro router
port link-type access
port default vlan 100
#
interface NULL0
#
ip route-static 0.0.0.0 0.0.0.0 10.10.100.2
#
return
<core>
7、路由器配置
<router>dis cu
#
sysname router
#
dns resolve
dns server 114.114.114.114
dns proxy enable
#
acl number 2000
rule 5 permit
#
interface GigabitEthernet0/0/0
ip address 10.10.100.2 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 5.5.5.5 255.255.255.0
nat outbound 2000
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
wlan
#
interface NULL0
#
ip route-static 0.0.0.0 0.0.0.0 GigabitEthernet0/0/1
ip route-static 10.10.10.0 255.255.255.0 10.10.100.1
ip route-static 10.10.20.0 255.255.255.0 10.10.100.1
#
return
<router>
8、验证网络通断。
PC>ping 5.5.5.5
Ping 5.5.5.5: 32 data bytes, Press Ctrl_C to break
From 5.5.5.5: bytes=32 seq=1 ttl=254 time=79 ms
From 5.5.5.5: bytes=32 seq=2 ttl=254 time=125 ms
From 5.5.5.5: bytes=32 seq=3 ttl=254 time=78 ms
From 5.5.5.5: bytes=32 seq=4 ttl=254 time=78 ms
From 5.5.5.5: bytes=32 seq=5 ttl=254 time=109 ms
--- 5.5.5.5 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 78/93/125 ms
PC>
发表评论