设为首页收藏本站language 语言切换
查看: 1920|回复: 2
收起左侧

求助:如何在交换机上配置默认路由连接到internet?

[复制链接]
发表于 2013-8-7 10:26:54 | 显示全部楼层 |阅读模式
我的网络环境:
一台cisco 3560交换机划分了5个VLAN.
然后这五个VLAN下的电脑需要通地一台宽带路由器连接到internt.
每个VLAN的网关地址为 192.168.XX.254. 默认路由器地址是192.168.1.1.
我配置ACL及默认路由,但所有电脑都不能通过192.168.1.1连接到internet.

我的交换机配配如下:

Switch#show run
Building configuration...
Current configuration : 3392 bytes
!
version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
enable password 123456
!
no aaa new-model
system mtu routing 1500
ip routing
ip dhcp smart-relay
ip dhcp route connected
ip dhcp relay information trust-all
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
interface FastEthernet0/1
spanning-tree portfast
!
interface FastEthernet0/2
switchport access vlan 120
spanning-tree portfast
!
interface FastEthernet0/3
spanning-tree portfast
!
interface FastEthernet0/4
spanning-tree portfast
!
interface FastEthernet0/5
spanning-tree portfast
!
interface FastEthernet0/6
spanning-tree portfast
!
interface FastEthernet0/7
spanning-tree portfast
!
interface FastEthernet0/8
spanning-tree portfast
!
interface FastEthernet0/9
spanning-tree portfast
!
interface FastEthernet0/10
switchport access vlan 99
spanning-tree portfast
!
interface FastEthernet0/11
spanning-tree portfast
!
interface FastEthernet0/12
spanning-tree portfast
!
interface FastEthernet0/13
spanning-tree portfast
!
interface FastEthernet0/14
spanning-tree portfast
!
interface FastEthernet0/15
spanning-tree portfast
!
interface FastEthernet0/16
spanning-tree portfast
!
interface FastEthernet0/17
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/18
spanning-tree portfast
!
interface FastEthernet0/19
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/20
spanning-tree portfast
!
interface FastEthernet0/21
spanning-tree portfast
!
interface FastEthernet0/22
spanning-tree portfast
!
interface FastEthernet0/23
spanning-tree portfast
!
interface FastEthernet0/24
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
ip address 192.168.1.254 255.255.255.0
ip access-group vlan_in in
ip access-group vlan_out out
!
interface Vlan2
ip address 192.168.2.254 255.255.255.0
ip access-group vlan_in in
ip access-group vlan_out out
ip helper-address 192.168.120.200
ip helper-address 192.168.120.210
!
interface Vlan3
ip address 192.168.3.254 255.255.255.0
ip access-group vlan_in in
ip access-group vlan_out out
ip helper-address 192.168.120.200
ip helper-address 192.168.120.210
!
interface Vlan99
ip address 192.168.99.254 255.255.255.0
!
interface Vlan120
ip address 192.168.120.254 255.255.255.0
ip access-group vlan_in in
ip access-group vlan_out out
!
ip default-gateway 192.168.1.1
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.1.1
ip http server
ip http secure-server
!
!
ip access-list extended vlan_in
permit ip any 192.168.1.0 0.0.0.255
permit ip any 192.168.2.0 0.0.0.255
permit ip any 192.168.3.0 0.0.0.255
permit ip any 192.168.99.0 0.0.0.255
permit ip any 192.168.120.0 0.0.0.255
deny   ip any any
ip access-list extended vlan_out
permit ip 192.168.1.0 0.0.0.255 any
permit ip 192.168.2.0 0.0.0.255 any
permit ip 192.168.3.0 0.0.0.255 any
permit ip 192.168.99.0 0.0.0.255 any
permit ip 192.168.120.0 0.0.0.255 any
deny   ip any any
!
ip sla enable reaction-alerts
!
!
!
line con 0
line vty 0 4
password 123456
login
line vty 5 15
login
!
end
Switch#



发表于 2013-11-11 11:24:11 | 显示全部楼层
沙发 2013-11-11 11:24:11 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2016-3-21 10:01:25 | 显示全部楼层
宽带路由器没有回返路由
板凳 2016-3-21 10:01:25 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-2-13 00:15 , Processed in 0.061532 second(s), 23 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表