Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1364916
  • 博文数量: 632
  • 博客积分: 2778
  • 博客等级: 大尉
  • 技术积分: 3387
  • 用 户 组: 普通用户
  • 注册时间: 2012-05-31 09:09
个人简介

123

文章分类

全部博文(632)

文章存档

2014年(36)

2013年(33)

2012年(563)

分类:

2012-07-08 09:07:38

1,2同Swithc1一样。

Switch>
%LINK-3-UPDOWN: Interface FastEthernet0/4, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
Switch>en
Switch#con t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#interface vlan 1
Switch()#ip address 192.168.1.1 255.255.255.0
Switch(config-if)#exit
Switch(config)#exit
Switch#vlan database
Switch(vlan)#vlan 2 name v2
VLAN 2 added:
    Name:v2
Switch(vlan)#vlan 3 name v3
VLAN 3 added:
    Name:v3
Switch(vlan)#exit
APPLY completed.
Exiting....
Switch#con t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#interface fastethernet 0/1
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#interface fastethernet 0/2
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#interface fastethernet 0/3
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#exit
Switch#show vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/4, Fa0/5, Fa0/6, Fa0/7
                                                Fa0/8, Fa0/9, Fa0/10, Fa0/11
                                                Fa0/12
2    v2                               active    Fa0/1

3    v3                               active    Fa0/2, Fa0/3
1002 fddi-default                     active
1003 token-ring-default               active
1004 fddinet-default                  active
1005 trnet-default                    active


Switch#con t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#interface fastethernet 0/12Switch(config-if)#con t
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch(config)#interface fastethernet 0/12
Switch(config-if)#duplex full
Duplex will not be set until speed is set to non-auto value
Switch(config-if)#speed 100
Switch(config-if)#exit
Switch#exit

两台交换机按以上配置完,两个Vlan分别是VLAN2和VLAN3,接着为PC机配IP地址。
实现PC2,PC3 同 PC5,PC6能够互相 ping通,PC1和PC4能够互相ping通
阅读(424) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~