在BOSON final bata 6.0和CCNA Network Visualizer 5.0里总是配置不成功,一些简单的命令都有时候会出错,比如,在Visualizer 5.0中,连在Trunk口,配置switchport trunk encapsulation dot1q 都会出错,我在那里打入
switchport trunk ? 显示的也没有encapsulation 这项!不过在网上有人说,,在2950里面是用switchport trunk native dot1q的,,不过我试了一下,总的配置还是不成功!
改用一点通后,总算可以成功了,,不过,也注意到了一个问题,那就是要三层交换机上开启ip routing的!呵呵,,我还以为默认开了的呢。。以前一直没有注意到。
差不多过程是这样的:
C3500:
switch>en
switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#vtp domain test
switch(config)#vtp mode server
switch(config)#exit
switch#vlan database
switch(vlan)#vlan 2 name xiaofam2
switch(vlan)#vlan 3 name xiaofam3
switch(vlan)#exit
switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#int f0/8
switch(config-if)#switchport mode trunk
switch(config-if)#switchport trunk encapsulation dot1q
switch(config-if)#exit
switch(config)#exit
switch#copy run sta
switch#show vlan
Vlan Name Status Ports
------- -------- ---------- ------------------------
1 default Active F0/1, F0/2, F0/3, F0/4, F0/5, F0/6, F0/7
2 xiaofam2 Active
3 xiaofam3 Active
1002 fddi-d Active
1004 fnet-d Active
VLAN Type SAID MTU
-------- ------- -------------- --------
1 enet 100001 1500
1002 fddi 101002 1500
1002 fnet 101003 1500
switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#int vlan 2
switch(config-if)#ip addr 192.168.10.1 255.255.255.0
switch(config-if)#exit
switch(config)#int vlan 3
switch(config-if)#ip addr 192.168.20.1 255.255.255.0
switch(config-if)#exit
switch(config)#ip ?
switch(config)#ip routing
switch(config)#
C2900:
switch>en
switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#vtp domain test
switch(config)#vtp mode client
switch(config)#exit
switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#int f0/8
switch(config-if)#switchport mode trunk
switch(config-if)#switchport trunk encapsulation dot1q
switch(config-if)#end
switch#show vlan
Vlan Name Status Ports
------- -------- ---------- ------------------------
1 default Active F0/1, F0/2, F0/3, F0/4, F0/5, F0/6, F0/7
2 Vlan02 Active
3 Vlan03 Active
1002 fddi-d Active
1004 fnet-d Active
VLAN Type SAID MTU
-------- ------- -------------- --------
1 enet 100001 1500
1002 fddi 101002 1500
1002 fnet 101003 1500
switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)#int f0/1
switch(config-if)#switchport mode access
switch(config-if)#switchport access vlan 2
switch(config-if)#exit
switch(config)#int f0/2
switch(config-if)#switchport mode access
switch(config-if)#switchport access vlan 3
switch(config-if)#exit
switch(config)#exit
switch#copy run star
然后再在两台主机上分别配置为192.168.10.2 255.255.255.0 gw 192.168.10.1
192.168.20.2 255.255.255.0 gw 192.168.20.1
这样两台主机就可以ping通了