频道栏目
首页 > 资讯 > 交换机 > 正文

Cisco交换机基本配置教程

17-10-17        来源:[db:作者]  
收藏   我要投稿

一台交换机和两台PC机互通允许登陆交换机终端

wKiom1njSuyyR0gRAAAVhc4mtfA331.png

命令配置:

SW1#vlan database //进入vlan数据库

% Warning: It is recommended to configure VLAN from config mode,

as VLAN database mode is being deprecated. Please consult user

documentation for configuring VTP/VLAN in config mode.

SW1(vlan)#vlan 10 //创建个VLAN10

VLAN 10 added:

Name: VLAN0010

SW1(vlan)#vlan 20 //创建个vlan20 然后保存退出

VLAN 20 added:

Name: VLAN0020

SW1(vlan)#exit

APPLY completed.

Exiting....

SW1#

SW1#config terminal

Enter configuration commands, one per line. End with CNTL/Z.

SW1(config)#enable password 123456 //设置明文密码

SW1(config)#line vty 0 4 //开启5个端口

SW1(config-line)#password 123456 //设置密码

SW1(config-line)#login //允许登录

SW1(config-line)#exit

SW1(config)#int f1/1 进入端口

SW1(config-if)#switchport mode access //访问模式

SW1(config-if)#switchport access vlan 10 //vlan10加入访问模式

SW1(config-if)#int f1/2

SW1(config-if)#switchport mode access

SW1(config-if)#switchport access vlan 20 //vlan20加入访问模式

SW1(config-if)#exit

SW1(config)#int vlan 10 //给vlan10设置IP地址

SW1(config-if)#ip address 192.168.10.1 255.255.255.0

SW1(config-if)#no sh

SW1(config-if)#int vlan 20

SW1(config-if)#ip address 192.168.20.1 255.255.255.0

SW1(config-if)#no sh

SW1(config-if)#

SW1#sh ip int br //查看端口的状态

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 unassigned YES unset administratively down down

FastEthernet0/1 unassigned YES unset administratively down down

FastEthernet1/0 unassigned YES unset up down

FastEthernet1/1 unassigned YES unset up up

FastEthernet1/2 unassigned YES unset up up

FastEthernet1/3 unassigned YES unset up down

FastEthernet1/4 unassigned YES unset up down

FastEthernet1/5 unassigned YES unset up down

FastEthernet1/6 unassigned YES unset up down

FastEthernet1/7 unassigned YES unset up down

FastEthernet1/8 unassigned YES unset up down

FastEthernet1/9 unassigned YES unset up down

FastEthernet1/10 unassigned YES unset up down

FastEthernet1/11 unassigned YES unset up down

FastEthernet1/12 unassigned YES unset up down

FastEthernet1/13 unassigned YES unset up down

FastEthernet1/14 unassigned YES unset up down

FastEthernet1/15 unassigned YES unset up down

Vlan1 unassigned YES unset up down

Vlan10 192.168.10.1 YES manual up up

Vlan20 192.168.20.1 YES manual up up

SW1#

wKiom1njV3KCWsVAAAAp30tzTpQ385.png
wKiom1njVdGQDTDbAADyNvFXwiI922.jpg
wKiom1njVqWA8C0jAAAJ_FqDFHc742.png
相关TAG标签
上一篇:通过ajax使用formdata实现往服务器上传文件
下一篇:线性方程组的花式解法
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站