小型网络搭建
2012-11-20 23:59
232 查看
小型网络搭建配置解决方案
具体要求:
1.要求vlan间可以互相通讯。
2.vlan 10,20,30 都可以访问外网
3.外网可以访问通过访问 e0 端口来访问内部的www,RDP服务。
4.vlan 30 里面提供www服务,DHCP服务,RDP服务,
5.Vlan 30 中的DHCP 服务器提供要求vlan10的主机得到的ip地址是10的网段里的ip
Vlan 20的主机得到的ip地址是20的网段。
网络拓扑图:
![](http://blog.51cto.com/attachment/201211/234502914.png)
注:上述拓扑只为展示网络结构,配置请在华为实际设备进行验证。
具体配置:
对于R1的配置如下:
SNAT 的配置
[R1]ip route-static 0.0.0.0 0 192.168.101.254
[R1]acl 2001
[R1-acl-2001]rule permit source 192.168.10.0 0.0.0.255
[R1-acl-2001]acl 2002
[R1-acl-2002]rule permit source 192.168.20.0 0.0.0.255
规则已经被加入到普通的访问列表中
[R1-acl-2002]acl 2003
[R1-acl-2003]rule permit source 192.168.30.0 0.0.0.255
规则已经被加入到普通的访问列表中
[R1-acl-2003]rule deny source any
[R1]int e0
[R1-Ethernet0]ip add 192.168.101.1 24
[R1-Ethernet0]nat outbound 2001 interface
[R1-Ethernet0]nat outbound 2002 interface
[R1-Ethernet0]nat outbound 2003 interface
# 从内网访问外网测试
![](http://blog.51cto.com/attachment/201211/234555665.png)
DNAT 静态
[R1-Ethernet0]nat server global 192.168.101.1 80 inside 192.168.30.100 80 tcp
进入子接口封装协议添加ip
配置子接口1.1
[R1-Ethernet0]int e1
[R1-Ethernet1]int e1.1
[R1-Ethernet1.1]vlan-type dot1q vid 10
[R1-Ethernet1.1]ip add 192.168.10.254 24
[R1-Ethernet1.1]ip relay-address 192.168.30.100
配置子接口1.2
[R1-Ethernet1.1]int e1.2
[R1-Ethernet1.2]vlan-type dot1q vid 20
[R1-Ethernet1.2]ip add 192.168.20.254 24
[R1-Ethernet1.2]ip relay-address 192.168.30.100
配置子接口1.3 注意 不需要中继因为是服务器所在vlan
[R1-Ethernet1.2]int e1.3
[R1-Ethernet1.3]vlan-type dot1q vid 30
[R1-Ethernet1.3]ip add 192.168.30.254 24
配置交换机
交换机1
S1
[S1]int e1/0/1
[S1-Ethernet1/0/1]port link-type trunk 添加串口
[S1-Ethernet1/0/1]port trunk permit vlan all
[S1]int e1/0/24
[S1-Ethernet1/0/24]port link-type trunk
[S1-Ethernet1/0/24]port trunk permit vlan all
[S1-Ethernet1/0/24]vlan 10
[S1-vlan10]port e1/0/2 to e1/0/8
[S1-vlan10]vlan 20
[S1-vlan20]port e1/0/9 to e1/0/16
[S1-vlan20]vlan 30
[S1-vlan30]port e1/0/17 to e1/0/23
交换机2
[S2]int e1/0/24
[S2-Ethernet1/0/24]port link-type trunk
[S2-Ethernet1/0/24]port trunk permit vlan all
Please wait........................................... Done.
[S2-Ethernet1/0/24]vlan 10
[S2-vlan10]port e1/0/2 to e1/0/8
[S2-vlan10]vlan 20
[S2-vlan20]port e1/0/9 to e1/0/16
[S2-vlan20]vlan 30
[S2-vlan30]port e1/0/17 to e1/0/23
验证:在vlan10中获取ip,并且测试与vlan20 的联通性
![](http://blog.51cto.com/attachment/201211/234934571.png)
在vlan30中获取ip 并测试与vlan20 的联通性
![](http://blog.51cto.com/attachment/201211/235321312.png)
在vlan20 中获取ip 并测试与vlan30 的联通性
![](http://blog.51cto.com/attachment/201211/235443391.png)
服务器上的www服务器(192.168.30.100)
![](http://blog.51cto.com/attachment/201211/235519565.png)
通过外网连接服务器上的RDP
![](http://blog.51cto.com/attachment/201211/235541250.png)
从外网访问内网中的www服务器
![](http://blog.51cto.com/attachment/201211/235558624.png)
内网访问外网的测试
![](http://blog.51cto.com/attachment/201211/235822614.png)
具体要求:
1.要求vlan间可以互相通讯。
2.vlan 10,20,30 都可以访问外网
3.外网可以访问通过访问 e0 端口来访问内部的www,RDP服务。
4.vlan 30 里面提供www服务,DHCP服务,RDP服务,
5.Vlan 30 中的DHCP 服务器提供要求vlan10的主机得到的ip地址是10的网段里的ip
Vlan 20的主机得到的ip地址是20的网段。
网络拓扑图:
![](http://blog.51cto.com/attachment/201211/234502914.png)
注:上述拓扑只为展示网络结构,配置请在华为实际设备进行验证。
具体配置:
对于R1的配置如下:
SNAT 的配置
[R1]ip route-static 0.0.0.0 0 192.168.101.254
[R1]acl 2001
[R1-acl-2001]rule permit source 192.168.10.0 0.0.0.255
[R1-acl-2001]acl 2002
[R1-acl-2002]rule permit source 192.168.20.0 0.0.0.255
规则已经被加入到普通的访问列表中
[R1-acl-2002]acl 2003
[R1-acl-2003]rule permit source 192.168.30.0 0.0.0.255
规则已经被加入到普通的访问列表中
[R1-acl-2003]rule deny source any
[R1]int e0
[R1-Ethernet0]ip add 192.168.101.1 24
[R1-Ethernet0]nat outbound 2001 interface
[R1-Ethernet0]nat outbound 2002 interface
[R1-Ethernet0]nat outbound 2003 interface
# 从内网访问外网测试
![](http://blog.51cto.com/attachment/201211/234555665.png)
DNAT 静态
[R1-Ethernet0]nat server global 192.168.101.1 80 inside 192.168.30.100 80 tcp
进入子接口封装协议添加ip
配置子接口1.1
[R1-Ethernet0]int e1
[R1-Ethernet1]int e1.1
[R1-Ethernet1.1]vlan-type dot1q vid 10
[R1-Ethernet1.1]ip add 192.168.10.254 24
[R1-Ethernet1.1]ip relay-address 192.168.30.100
配置子接口1.2
[R1-Ethernet1.1]int e1.2
[R1-Ethernet1.2]vlan-type dot1q vid 20
[R1-Ethernet1.2]ip add 192.168.20.254 24
[R1-Ethernet1.2]ip relay-address 192.168.30.100
配置子接口1.3 注意 不需要中继因为是服务器所在vlan
[R1-Ethernet1.2]int e1.3
[R1-Ethernet1.3]vlan-type dot1q vid 30
[R1-Ethernet1.3]ip add 192.168.30.254 24
配置交换机
交换机1
S1
[S1]int e1/0/1
[S1-Ethernet1/0/1]port link-type trunk 添加串口
[S1-Ethernet1/0/1]port trunk permit vlan all
[S1]int e1/0/24
[S1-Ethernet1/0/24]port link-type trunk
[S1-Ethernet1/0/24]port trunk permit vlan all
[S1-Ethernet1/0/24]vlan 10
[S1-vlan10]port e1/0/2 to e1/0/8
[S1-vlan10]vlan 20
[S1-vlan20]port e1/0/9 to e1/0/16
[S1-vlan20]vlan 30
[S1-vlan30]port e1/0/17 to e1/0/23
交换机2
[S2]int e1/0/24
[S2-Ethernet1/0/24]port link-type trunk
[S2-Ethernet1/0/24]port trunk permit vlan all
Please wait........................................... Done.
[S2-Ethernet1/0/24]vlan 10
[S2-vlan10]port e1/0/2 to e1/0/8
[S2-vlan10]vlan 20
[S2-vlan20]port e1/0/9 to e1/0/16
[S2-vlan20]vlan 30
[S2-vlan30]port e1/0/17 to e1/0/23
验证:在vlan10中获取ip,并且测试与vlan20 的联通性
![](http://blog.51cto.com/attachment/201211/234934571.png)
在vlan30中获取ip 并测试与vlan20 的联通性
![](http://blog.51cto.com/attachment/201211/235321312.png)
在vlan20 中获取ip 并测试与vlan30 的联通性
![](http://blog.51cto.com/attachment/201211/235443391.png)
服务器上的www服务器(192.168.30.100)
![](http://blog.51cto.com/attachment/201211/235519565.png)
通过外网连接服务器上的RDP
![](http://blog.51cto.com/attachment/201211/235541250.png)
从外网访问内网中的www服务器
![](http://blog.51cto.com/attachment/201211/235558624.png)
内网访问外网的测试
![](http://blog.51cto.com/attachment/201211/235822614.png)
相关文章推荐
- 家庭小型网络搭建方案
- CCNA实用-搭建小型网络
- 小型网络的搭建知识
- 小型网络搭建方案
- 学校小型的实验室局域网络的搭建
- 家庭小型网络搭建方案
- 小型网络搭建方案
- IT运维管理:七步搭建企业网络
- 搭建samba服务器实现Linux磁盘或文件夹映射为 Windows网络磁盘
- 网络实验环境搭建--1.工具及搭建思路
- 不用网线搭建IPv6网络测试环境
- 如何使用星际文件传输网络(IPFS)搭建区块链服务(一)
- Vmware下 Mininet Floodlight SDN网络环境搭建
- 华为拓扑---帮发小公司解决的小型网络架构
- 开源网络引擎firefly:环境搭建
- PyTorch上搭建简单神经网络实现回归和分类
- 深层神经网络的搭建
- Ng深度学习 L层神经网络搭建和实例
- 网络营销第三课:利用织梦搭建动态网站(2)