免费注册 查看新帖 |

Chinaunix

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

网络技术 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-05-18 14:45 |只看该作者 |倒序浏览
三层交换机多VLAN+NAT上网实验配置(有拓扑和配置文件)\r\n\r\n\r\n \r\n\r\n\r\n说明:\r\n适用中心三层交换机划多VLAN(间不能互访),VLAN通过路由NAT上网\r\n\r\n配置文件如下:\r\n\r\n\r\nrouter1#show run\r\nBuilding configuration...\r\n\r\nCurrent configuration : 745 bytes\r\n!\r\nversion 12.4\r\nservice timestamps debug datetime msec\r\nservice timestamps log datetime msec\r\nno service password-encryption\r\n!\r\nhostname router1\r\n!\r\nboot-start-marker\r\nboot-end-marker\r\n!\r\n!\r\nno aaa new-model\r\nmemory-size iomem 5\r\n!\r\n!\r\nip cef\r\n!\r\n!\r\n!\r\ninterface FastEthernet0/0\r\n no ip address\r\n shutdown\r\n duplex auto\r\n speed auto\r\n!\r\ninterface Serial1/0\r\n ip address 172.16.0.2 255.255.255.0\r\n serial restart-delay 0\r\n!         \r\ninterface Serial1/1\r\n no ip address\r\n shutdown\r\n serial restart-delay 0\r\n!\r\ninterface Serial1/2\r\n no ip address\r\n shutdown\r\n serial restart-delay 0\r\n!\r\ninterface Serial1/3\r\n no ip address\r\n shutdown\r\n serial restart-delay 0\r\n!\r\nno ip http server\r\n!\r\ncontrol-plane\r\n\r\nline con 0\r\nline aux 0\r\nline vty 0 4\r\n!\r\n!\r\nEnd\r\n\r\n\r\nrouter2#show run\r\nBuilding configuration...\r\n\r\nCurrent configuration : 989 bytes\r\n!\r\nversion 12.4\r\nservice timestamps debug datetime msec\r\nservice timestamps log datetime msec\r\nno service password-encryption\r\n!\r\nhostname router2\r\n!\r\nboot-start-marker\r\nboot-end-marker\r\n!\r\n!\r\nno aaa new-model\r\nmemory-size iomem 5\r\n!\r\n!\r\nip cef\r\n!\r\n!\r\n!\r\n!\r\ninterface FastEthernet0/0\r\n ip address 192.168.0.1 255.255.255.0\r\n ip nat inside\r\n ip virtual-reassembly\r\n speed 100\r\n full-duplex\r\n!\r\ninterface Serial1/0\r\n ip address 172.16.0.1 255.255.255.0\r\n ip nat outside\r\n ip virtual-reassembly\r\n serial restart-delay 0\r\n!\r\ninterface Serial1/1\r\n no ip address\r\n shutdown\r\n serial restart-delay 0\r\n!\r\ninterface Serial1/2\r\n no ip address\r\n shutdown\r\n serial restart-delay 0\r\n!\r\ninterface Serial1/3\r\n no ip address\r\n shutdown\r\n serial restart-delay 0\r\n!\r\nip http server\r\nip route 192.168.0.0 255.255.0.0 192.168.0.2\r\n!\r\n!\r\nip nat inside source list 101 interface Serial1/0 overload\r\n!\r\naccess-list 101 permit ip 192.168.0.0 0.0.255.255 any\r\n!\r\n!\r\n!\r\ncontrol-plane\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\nline con 0\r\nline aux 0\r\nline vty 0 4\r\n!\r\n!\r\nEnd\r\n\r\n\r\nsw1#show run\r\nBuilding configuration...\r\n\r\nCurrent configuration : 1284 bytes\r\n!\r\nversion 12.4\r\nservice timestamps debug datetime msec\r\nservice timestamps log datetime msec\r\nno service password-encryption\r\n!\r\nhostname sw1\r\n!\r\nboot-start-marker\r\nboot-end-marker\r\n!\r\n!\r\nno aaa new-model\r\nmemory-size iomem 5\r\n!\r\n!\r\nip cef\r\n!\r\n!\r\n!\r\ninterface FastEthernet1/0\r\n!\r\ninterface FastEthernet1/1\r\n no switchport\r\n ip address 192.168.0.2 255.255.255.0\r\n!\r\ninterface FastEthernet1/2\r\n!\r\ninterface FastEthernet1/3\r\n switchport access vlan 10\r\n vlan-id dot1q 10\r\n  exit-vlan-config\r\n !\r\n!\r\ninterface FastEthernet1/4\r\n switchport access vlan 20\r\n!\r\ninterface FastEthernet1/5\r\n!\r\ninterface FastEthernet1/6\r\n!\r\ninterface FastEthernet1/7\r\n!\r\ninterface FastEthernet1/8\r\n!\r\ninterface FastEthernet1/9\r\n!\r\ninterface FastEthernet1/10\r\n!\r\ninterface FastEthernet1/11\r\n!\r\ninterface FastEthernet1/12\r\n!         \r\ninterface FastEthernet1/13\r\n!\r\ninterface FastEthernet1/14\r\n!\r\ninterface FastEthernet1/15\r\n!\r\ninterface Vlan1\r\n no ip address\r\n!\r\ninterface Vlan10\r\n ip address 192.168.10.1 255.255.255.0\r\n ip access-group 101 in\r\n!\r\ninterface Vlan20\r\n ip address 192.168.20.1 255.255.255.0\r\n!\r\nno ip http server\r\nip route 0.0.0.0 0.0.0.0 192.168.0.1\r\n!\r\n!\r\n!\r\naccess-list 101 deny   ip 192.168.10.0 0.0.0.255 192.168.20.0 0.0.0.255\r\naccess-list 101 permit ip any any\r\n!\r\n!\r\n!\r\ncontrol-plane\r\n!\r\nline con 0\r\nline aux 0\r\nline vty 0 4\r\n!\r\n!\r\nEnd\r\n\r\n\r\npc1#show run\r\nBuilding configuration...\r\n\r\nCurrent configuration : 385 bytes\r\n!\r\nversion 12.2\r\nservice timestamps debug uptime\r\nservice timestamps log uptime\r\nno service password-encryption\r\n!\r\nhostname pc1\r\n!\r\n!\r\nip subnet-zero\r\nno ip routing\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\ninterface FastEthernet0/0\r\n ip address 192.168.10.10 255.255.255.0\r\n no ip route-cache\r\n speed 100\r\n full-duplex\r\n!\r\nip default-gateway 192.168.10.1\r\nip classless\r\nip http server\r\n!\r\n!\r\nline con 0\r\nline aux 0\r\nline vty 0 4\r\n!\r\nEnd\r\n\r\n\r\n\r\npc2#show run\r\nBuilding configuration...\r\n\r\nCurrent configuration : 385 bytes\r\n!\r\nversion 12.2\r\nservice timestamps debug uptime\r\nservice timestamps log uptime\r\nno service password-encryption\r\n!\r\nhostname pc2\r\n!\r\n!\r\nip subnet-zero\r\nno ip routing\r\n!\r\n!\r\n!\r\n!\r\n!\r\n!\r\ninterface FastEthernet0/0\r\n ip address 192.168.20.10 255.255.255.0\r\n no ip route-cache\r\n speed 100\r\n full-duplex\r\n!\r\nip default-gateway 192.168.20.1\r\nip classless\r\nip http server\r\n!\r\n!\r\nline con 0\r\nline aux 0\r\nline vty 0 4\r\n!\r\nend
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP