路由器: ER8300
交换机: S3600v2
说明:这次网络配置主要是模拟,这套网络是挂在办公室网络下的.由于办公室给我的网络是:192.168.3.0/24, 网关是:192.168.3.254. 所以我们规划如下:
ER8300 wan口:192.168.3.11
设备ip(就是用于交换机,路由器互联ip): 192.168.2.x
应用ip全部在s3600v2上配置
:192.168.111.x, 192.168.112.x, 192.168.113.x, 192.168.114.x, 192.168.115.x .
其vlan号分别为: vlan111,vlan112,vlan113,vlan114,vlan115.
第一步:
首先连接交换机,设置
dhcp server ip-pool ip111network 192.168.111.0 mask 255.255.255.0gateway-list 192.168.111.254
dns-list 61.128.128.68expired day 4
dhcp server ip-pool ip112network 192.168.113.0 mask 255.255.255.0gateway-list 192.168.112.254
dns-list 61.128.128.68expired day 4
#其它网段类似配置.#在vlan接口中配置dhcp.
interface Vlan-interface111ip address 192.168.111.254 255.255.255.0dhcp server client-detect enable
interface Vlan-interface112ip address 192.168.112.254 255.255.255.0dhcp server client-detect enable
#其它网段类似配置.#在vlan接口中配置物理接口.
interface Ethernet1/0/11port link-mode bridgeport access vlan 111
interface Ethernet1/0/12port link-mode bridgeport access vlan 112
interface Ethernet1/0/13port link-mode bridgeport access vlan 113
#其它网段类似配置设置路由接口和ip地址:
Interface Ethernet 1/0/1
port link-mode routeip address 192.168.2.9 255.255.255.0创建默认静态路由:
ip route-static 0.0.0.0 0.0.0.0 192.168.2.1
开启dhcp
dhcp enable
第二步:
设置路由器
设置wan口为静态ip地址:192.168.3.11
设置lan口为静态ip地址:192.168.2.1
开启telnet 然后可以telnet上来ping 192.168.2.1和ping 192.168.3.254
设置接口路由
0.0.0.0 0.0.0.0 192.168.3.254 wan口
192.168.111.0 255.255.255.0 192.168.2.9 lan口
192.168.112.0 255.255.255.0 192.168.2.9 lan口
192.168.113.0 255.255.255.0 192.168.2.9 lan口
192.168.114.0 255.255.255.0 192.168.2.9 lan口
192.168.115.0 255.255.255.0 192.168.2.9 lan口
如图:
到这里就已经完成了.只需要测试和save.
第三步测试:
把电脑接到以太网12电口
如图:
[H3C]disp curr
#version 5.20, Release 2108P01
#sysname H3C
#irf mac-address persistent timerirf auto-update enableundo irf link-delay
#domain default enable system
#management-vlan 1001
#password-recovery enable
#
vlan 1
#
vlan 111 to 115
#
vlan 1001
#
domain systemaccess-limit disablestate active idle-cut disableself-service-url disable
#
dhcp server ip-pool ip111network 192.168.111.0 mask 255.255.255.0gateway-list 192.168.111.254dns-list 61.128.128.68expired day 2
#
dhcp server ip-pool ip112network 192.168.112.0 mask 255.255.255.0gateway-list 192.168.112.254dns-list 61.128.128.68expired day 2
#
dhcp server ip-pool ip113network 192.168.113.0 mask 255.255.255.0gateway-list 8.8.8.8expired day 4
#
dhcp server ip-pool ip114network 192.168.114.0 mask 255.255.255.0gateway-list 192.168.114.254dns-list 8.8.8.8
#
dhcp server ip-pool ip115network 192.168.115.0 mask 255.255.255.0gateway-list 192.168.115.254dns-list 8.8.8.8expired day 5
#
user-group systemgroup-attribute allow-guest
#
local-user adminpassword cipher $c$3$+24A5LfChlwynQ6I4O3uUiEWX+dcKmvsservice-type terminal
#
interface Ethernet1/0/1port link-mode routeip address 192.168.2.9 255.255.255.0
#
interface NULL0
#
interface Vlan-interface111ip address 192.168.111.254 255.255.255.0dhcp server client-detect enable
#
interface Vlan-interface112ip address 192.168.112.254 255.255.255.0dhcp server client-detect enable
#
interface Vlan-interface113ip address 192.168.113.254 255.255.255.0dhcp server client-detect enable
#
interface Vlan-interface114ip address 192.168.114.254 255.255.255.0dhcp server client-detect enable
#
interface Vlan-interface115ip address 192.168.115.254 255.255.255.0dhcp server client-detect enable
#
interface Vlan-interface1001
#
interface Ethernet1/0/2port link-mode bridge
#
interface Ethernet1/0/3port link-mode bridge
#
interface Ethernet1/0/4port link-mode bridge
#
interface Ethernet1/0/5port link-mode bridge
#
interface Ethernet1/0/6port link-mode bridge
#
interface Ethernet1/0/7port link-mode bridge
#
interface Ethernet1/0/8port link-mode bridge
#
interface Ethernet1/0/9port link-mode bridge
#
interface Ethernet1/0/10port link-mode bridge
#
interface Ethernet1/0/11port link-mode bridgeport access vlan 111
#
interface Ethernet1/0/12port link-mode bridgeport access vlan 112
#
interface Ethernet1/0/13port link-mode bridgeport access vlan 113
#
interface Ethernet1/0/14port link-mode bridgeport access vlan 114
#
interface Ethernet1/0/15port link-mode bridgeport access vlan 115
#
interface Ethernet1/0/16port link-mode bridge
#
interface Ethernet1/0/17port link-mode bridge
#
interface Ethernet1/0/18port link-mode bridge
#
interface Ethernet1/0/19port link-mode bridge
#
interface Ethernet1/0/20port link-mode bridge
#
interface Ethernet1/0/21port link-mode bridgeport access vlan 111
#
interface Ethernet1/0/22port link-mode bridgeport access vlan 112
#
interface Ethernet1/0/23port link-mode bridgeport access vlan 113
#
interface Ethernet1/0/24port link-mode bridge
#
interface GigabitEthernet1/0/25port link-mode bridge
#
interface GigabitEthernet1/0/26port link-mode bridge
#
interface GigabitEthernet1/0/27port link-mode bridge
#
interface GigabitEthernet1/0/28port link-mode bridge
#ip route-static 0.0.0.0 0.0.0.0 192.168.2.1
#dhcp enable
#load xml-configuration
# load tr069-configuration
#
user-interface aux 0authentication-mode scheme
user-interface vty 0 15
#
return
[H3C]