通常的三层网络结构构成基本上由 路由/防火墙,三层交换,二层交换构成。但是大部分
中小企业未必会舍得在三层交换上面进行投入,但是没有三层交换网络结构扩展性会受到限制。
那么作为企业的信息部门,我们该怎么尽量降低成本的前提下,实现三层网络结构呢?
个人推荐的解决方案是RouterOS软路由,实施和管理起来都很方便。RouterOS在国内很多企业使用
的已经不再少数,软件功能性方面更是不可多得。
先说一下大致拓扑结构:
案例中RouterOS只作为三层交换机使用,其他诸如NAT都有防火墙来承担。
内网交换机全部都是H3C S5120 EI,承载二层网络交换.
下面开始逐一介绍各设备的具体配置:
防火墙部分:(缺省路由和回程路由)
1
2
3
4
5
6
7
8
9
10
11
12
|
#Port15 连接公网链路
config router
static
edit
1
set
dst
0.0
.
0.0
0.0
.
0.0
set
device port15
set
gateway x.x.x.x
#port14 连接RouterOS
config router
static
edit
2
set
dst
192.168
.
0.0
255.255
.
0.0
set
device port14
set
gateway
192.168
.
200.89
|
RouterOS部分:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
[admin@MikroTik] > ip address add
interface
=ether1 address=
192.168
.
200.89
network=
192.168
.
200.88
netmask=
255.255
.
255.252
disabled=no
#配置VLAN
[admin@MikroTik] >
interface
vlan add vlan-id=
1
name=vlan1
interface
=ether2
[admin@MikroTik] >
interface
vlan add vlan-id=
30
name=vlan30
interface
=ether2
[admin@MikroTik] >
interface
vlan add vlan-id=
40
name=vlan40
interface
=ether2
[admin@MikroTik] >
interface
vlan add vlan-id=
50
name=vlan50
interface
=ether2
[admin@MikroTik] >
interface
vlan add vlan-id=
100
name=vlan100
interface
=ether2
#配置VLAN接口
[admin@MikroTik] > ip address add address=
192.168
.
0.1
netmask=
255.255
.
255.0
interface
=vlan1
[admin@MikroTik] > ip address add address=
192.168
.
30.1
netmask=
255.255
.
255.0
interface
=vlan30
[admin@MikroTik] > ip address add address=
192.168
.
40.1
netmask=
255.255
.
255.0
interface
=vlan40
[admin@MikroTik] > ip address add address=
192.168
.
50.1
netmask=
255.255
.
255.0
interface
=vlan50
[admin@MikroTik] > ip address add address=
192.168
.
100.1
netmask=
255.255
.
255.0
interface
=vlan100
#配置缺省路由
[admin@MikroTik] > ip route add dst-address=
0.0
.
0.0
/
0
gateway=
192.168
.
200.90
check-gateway=ping
|
配置完毕后:
交换机配置部分:简单的划分vlan和端口就差不多了
1
2
3
4
|
#创建相应的vlan,然后做如下配置即可
interface g0
/24
port link-
type
trunk
port trunk permit vlan all
|
基本配置部分就完成了,剩下的就是检查网络连通性以及配置特殊的需求了.
这样三层网络结构在借助RouterOS下顺利实现。
本文转自marbury 51CTO博客,原文链接:http://blog.51cto.com/magic3/1418152,如需转载请自行联系原作者