您的位置:首页 > 其它

cisco学习笔记(4)

2009-02-11 10:51 253 查看
昨天比较忙没有时间做笔记,今天补发,先搞个简单的.
这次主要做VLAN的实验,



sw1的配置:
Switch>en
Switch#vlan data
Switch(vlan)#vlan 10 name vlan10
VLAN 10 added:
Name:vlan10
Switch(vlan)#vlan 20 name vlan20
VLAN 20 added:
Name:vlan20
Switch(vlan)#end
Switch#conf t
Enter configuration commands, .e per line. End with CNTL/Z.
Switch(config)#int f0/1
Switch(config-if)#switchport access vlan 10
Switch(config-if)#int f0/2
Switch(config-if)#switchport access vlan 10
Switch(config-if)#int f0/3
Switch(config-if)#switchport access vlan 20
Switch(config-if)#end
Switch#conf t
Enter configuration commands, .e per line. End with CNTL/Z.
Switch(config)#int f0/12
Switch(config-if)#switchport mode trunk
Switch(config-if)#

R1的配置:
Router>
Router>
Router>en
Router#conf t
Enter configuration commands, .e per line. End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#no ip address
Router(config-if)#no sh
%LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
Router(config-if)#int f0/0.10
Router(config-subif)#ip address 192.168.1.100 255.255.255.0
Router(config-subif)#encapsulation dot1q 10
Router(config-subif)#int f0/0.20
Router(config-subif)#ip address 192.168.2.100 255.255.255.0
Router(config-subif)#encapsulation dot1q 20
Router(config-subif)#

3台PC按图设置好IP后,PC1与PC2能互相PING通,也能PING通网关192.168.1.100.PC3只能PING通网关192.168.2.100本文出自 “allen的学习笔记” 博客,请务必保留此出处http://allenyu.blog.51cto.com/193668/130068
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: