思科VLAN

交换机常用命令:

设置vtp域名: vtp domain 域名

进入vlan数据库: vlan database

创建vlan : vlan vlan号 [name valn名]

设置端口为存取模式: switchport access vlan <valn 号>

交换机接口主动变为中继模式:switchport mode dynamic desirable

设置vtp工作模式:vtp mode server|client|transparent

显示vlan信息:show vlan

显示vtp状态:show vtp status

显示交换机端口信息:show interface 端口号 switchport

删除vlan :

Swhtch1(config)#int vlan10

Swhtch1(config-if)#no vlan 10

端口加入vlan

Swhtch1(config)#int f0/2

Swhtch1(config-if)#switchport mode access

Swhtch1(config-if)#switchport access vlan 10

配置vlan管理地址:

Swhtch1(config-if)#int vlan10

Swhtch1(config-if)#ip add 192.168.1.2 255.255.255.0

配置默认网关地址:

Swhtch1(config)#ip default-gateway 192.168.1.254

 

 

思科实现:

Switch>en

Switch#setup

!进入初始配置阶段

   

--- System Configuration Dialog ---

   

Continue with configuration dialog? [yes/no]: y

At any point you may enter a question mark '?' for help.

Use ctrl-c to abort configuration dialog at any prompt.

Default settings are in square brackets '[]'.

Basic management setup configures only enough connectivity

for management of the system, extended setup will ask you

to configure each interface on the system

Would you like to enter basic management setup? [yes/no]: y

!询问是否进入基本管理设置

Configuring global parameters:

Enter host name [Switch]: Switch1

!输入交换机名字

The enable secret is a password used to protect access to

privileged EXEC and configuration modes. This password, after

entered, becomes encrypted in the configuration.

Enter enable secret: 123

!输入特权密码

The enable password is used when you do not specify an

enable secret password, with some older software versions, and

some boot images.

Enter enable password: 456

!输入一般用户密码

The virtual terminal password is used to protect

access to the router over a network interface.

Enter virtual terminal password: 789

!输入远程密码

Configure SNMP Network Management? [no]:n

   

   

!配置ip

management network from the above interface summary: vlan1

!输入配置ip接口的名称

Configuring interface Vlan1:

Configure IP on this interface? [yes]: y

IP address for this interface: 192.168.1.1

!输入ip地址

Subnet mask for this interface [255.255.255.0] : 255.255.255.0

!子网掩码

Would you like to enable as a cluster command switch? [yes/no]:y

   

   

!是否保存

[0] Go to the IOS command prompt without saving this config.

[1] Return back to the setup without saving this config.

[2] Save this configuration to nvram and exit.

   

Enter your selection [2]: 2

!0不保存进入ios界面,1不保存重新进入setup,2保存进入ios界面

转载于:https://www.cnblogs.com/NINOMIYA1360/p/9865257.html

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值