免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 12057 | 回复: 2
打印 上一主题 下一主题

cisco 3560交换机加2800路由器多VLAN共享上网配置 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-07-24 10:08 |只看该作者 |倒序浏览
经过1天的实验,完成多VLAN结合路由器经过地址换转实现共享上网问题。大家可以一起研究。为了方便交换机上启用了DHCP
网管给我了个可以上外网的地址192.168.1.199-230,网关是192.168.1.1 这个地址配置在PC可是可以上外网的。
可是分配的地址不够给需要上外网的PC,同时为了控制风险。我对需要上外网的3个部门划了3个VLAN。为了减少工作量我在3560上启用了DHCP,我现在通过1台28路由七器以及1台3560交换机
进行网络配置,共享外网,结果出了点问题。请大家指点下:
3560交换机主要配置
Building configuration...

!
no aaa new-model
vtp mode transparent
ip subnet-zero
ip routing    /*定义DHCP*/
ip dhcp excluded-address 191.168.1.1
ip dhcp excluded-address 191.168.2.1
ip dhcp excluded-address 191.168.3.1
!
ip dhcp pool 1
   network 191.168.1.0 255.255.255.0
   default-router 191.168.1.1
   dns-server 202.96.209.5 202.96.209.133
!
ip dhcp pool 2
   network 191.168.2.0 255.255.255.0
   default-router 191.168.2.1
   dns-server 202.96.209.5 202.96.209.133
!
ip dhcp pool 3
   network 191.168.3.0 255.255.255.0
   default-router 191.168.3.1
!
!
vlan 60
name office
!
vlan 61
name dzqy
!
vlan 62
name xqy
!
!
interface FastEthernet0/1        /*因为多个VLAN我设置了TRUNK模式*,是外网的jinxian
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/2
!
.........
!
interface FastEthernet0/23
switchport access vlan 61
switchport mode access
!
interface FastEthernet0/24
switchport access vlan 60
switchport mode access
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!         
interface Vlan1    /*与2800路由器互联地址*/
ip address 191.168.100.2 255.255.255.0
!
interface Vlan60
ip address 191.168.1.1 255.255.255.0
!
interface Vlan61
ip address 191.168.2.1 255.255.255.0
!
interface Vlan62
ip address 191.168.3.1 255.255.255.0
!
ip classless
ip route 0.0.0.0 0.0.0.0 Vlan1
ip route 191.168.1.0 255.255.255.0 Vlan60
ip route 191.168.2.0 255.255.255.0 Vlan61
ip route 191.168.3.0 255.255.255.0 Vlan62
ip http server
ip http secure-server
!
!
2800路由器配置
interface FastEthernet0/0
ip address 192.168.1.199 255.255.255.0  /*可以上外网的地址*/
ip nat outside
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 191.168.100.1 255.255.255.0/*与3560交换机互联地址*/
ip nat inside
duplex auto
speed auto
!
ip route 0.0.0.0 0.0.0.0 192.168.1.1
ip route 191.168.1.0 255.255.255.0 191.168.100.2
ip route 191.168.2.0 255.255.255.0 191.168.100.2
ip route 191.168.3.0 255.255.255.0 191.168.100.2
!
ip http server  /*进行地址转换*/
ip nat pool adsl 192.168.1.200 192.168.1.230 netmask 255.255.255.0
ip nat inside source list 1 pool adsl overload
!
access-list 1 permit 191.168.1.0 0.0.0.255
access-list 1 permit 191.168.2.0 0.0.0.255
access-list 1 permit 191.168.3.0 0.0.0.255
!
control-plane

现在我把1台PC插在3560的24口,PC可以正常的获取地址和DNS为191.168.1.2网关为191.168.1.1
然后可以ping通路由器的2个E0口,可以实现上网
目前的问题就是头次打开一个新的网页会有点慢,打开以后就好些了,但是如果下载的话速度没有任何问题,请问有解决方法吗?

论坛徽章:
0
2 [报告]
发表于 2008-07-24 10:10 |只看该作者
不好意思发错点交换机上没有启用trunk
interface FastEthernet0/1

论坛徽章:
5
IT运维版块每日发帖之星
日期:2015-08-06 06:20:00IT运维版块每日发帖之星
日期:2015-08-10 06:20:00IT运维版块每日发帖之星
日期:2015-08-23 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-11-12 06:20:00
3 [报告]
发表于 2008-07-24 10:47 |只看该作者
1 、你重复发帖干吗?这个是最终的正确配置吗?
2、对于初次打开慢的问题你可以考虑再2811上开DNS PROXY看能不能改善。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP