简单VLAN ACL实验
2012-12-03 14:42
197 查看
1.在S1上设置VTP
Switch(config)#vtp domain vtp1
Changing VTP domain name from NULL to vtp1
Switch(config)#vtp mode server
Setting device to VTP server mode.
Switch(config)#vtp password 123
Setting device VLAN database password to 123
2.在S1上建立三个VLAN
Switch(config)#vlan 10
Switch(config-vlan)#vlan 20
Switch(config-vlan)#vlan 30
Switch(config-vlan)#
3.在S1上定义三个VLAN
Switch(config)#int vlan 10
%LINK-5-CHANGED: Interface Vlan10, changed state to up
Switch(config-if)#ip add 192.168.10.1 255.255.255.0
Switch(config-if)#int vlan 20
%LINK-5-CHANGED: Interface Vlan20, changed state to up
Switch(config-if)#ip add 192.168.20.1 255.255.255.0
Switch(config-if)#int vlan 30
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan30, changed state to up
Switch(config-if)#ip add 192.168.30.1 255.255.255.0
4.把S1的三个接口全部开起TRUNK
Switch(config-if)#int range fa0/1 - 3
Switch(config-if)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport mode trunk
5.S2.S3.S4分别设置VTP
Switch(config)#vtp domain vtp1
Changing VTP domain name from NULL to vtp1
Switch(config)#vtp mode client \\注意模式
Setting device to VTP CLIENT mode.
Switch(config)#vtp password 123
Setting device VLAN database password to 123
6.S2.S3.S4的端口分别加入VLAN
Switch(config)#int fa0/2
Switch(config-if)#switchport access vlan 10
Switch(config-if)#int fa0/3
Switch(config-if)#switchport access vlan 30 \\格式一样 我只抄我S4的给你参考
7.分别设置各PC的IP,测试,各PC全部可以相互PING通.
8.做ACL
Switch(config)#access-list 1 permit 192.168.10.0 0.0.0.255
Switch(config)#access-list 1 permit 192.168.30.0 0.0.0.255
Switch(config)#access-list 1 deny 192.168.20.0 0.0.0.255 \\定义ACL
Switch(config-if)#int vlan 10
Switch(config-if)#ip access-group 1 in
Switch(config-if)#int vlan 20
Switch(config-if)#ip access-group 1 in
Switch(config-if)#int vlan 30
Switch(config-if)#ip access-group 1 in
Switch(config-if)#exi \\在VLAN上使用ACL
到此已经完成此实验,测试,192.168.10.0 可以和 192.168.30.0 通讯
192.168.20.0不能和其他两个网段通讯.
本文出自 “gome学习” 博客,请务必保留此出处http://goome.blog.51cto.com/4045241/1077162
相关文章推荐
- PVALN(私有vlan)简介及简单实验笔记
- 路由交换笔记(28)--ACL-NAT-VLAN-DHCP综合实验配置
- Packet Tracer 5.0建构CCNA实验攻略(15)――ACL简单的配置
- 路由交换笔记(28)--ACL-NAT-VLAN-DHCP综合实验配置
- 【实验】综合实验(VLAN间通信,ACL技术,DNS/WEB服务器架设,RIP路由)
- 华为 —小型企业多交换机多VLAN通信简单实验
- Packet Tracer 5.0建构CCNA实验攻略(15)――ACL简单的配置
- Packet Tracer 5.0建构CCNA实验攻略(15)――ACL简单的配置
- ACL-NAT-VLAN-DHCP综合实验配置
- 模拟简单进程调度实验
- ASA8.4版本静态映射和PAT简单配置实验
- 简单实验验证RIP的holddown timer
- Is-is简单实验走一波
- 【实验】简单实时300点采样逻辑
- Vlan ACL的IN和OUT的问题
- (数据结构排序的实验四)快速,冒泡,简单选择,直接插入排序的c语言实现!!
- 简单的高可用集群实验
- 简单的c++程序(实验一)
- Vlan间路由实验(单臂路由实现法)
- 【实验四】利用单臂路由实现VLAN间路由