您的位置:首页 > 其它

Cisco Router and switch 配置命令(六)

2009-08-06 09:15 459 查看
一、管理配置文件
1900#copy nvram tftp://host/dst_file

1900#copy tftp://host/src_file nvram

1950#copy nvram tftp://10.1.1.1/wgswd.cfg

2950#copy startup-config tftp://host/dst_file

二、清除 NVRAM

1900#delete nvram

2950#erase startup-config

三、vlan配置   

1、1900 VLAN建立

  1900下,使用vlan [vlan#] name [name] [vlan#]命令, 如下:

  >en

  #config t

  (config)#hostname 1900

  1900(config)#vlan 2 name sales

  1900(config)#vlan 3 name marketing

  1900(config)#vlan 4 name mis

  1900(config)#exit

  

2、端口分配

  1900(config)#int e0/2

  1900(config-if)#vlan-membership static 2

  1900(config)#int e0/4

  1900(config-if)#vlan-membership static 3

  1900(config)#int e0/5

  1900(config-if)#vlan-membership static 4

  1900(config-if)#exit

  1900(config)#exit

  

3、VLAN验证

1900#sh vlan
2900 VLAN建立

在2950下创建VLAN,在特权模式下使用vlan database命令

  2950#vlan database

  2950(vlan)#vlan 2 name Marketing

   VLAN 2 modified:

   Name: Marketing

  2950(vlan)#vlan 3 name Accounting

   VLAN 3 added:

   Name: Accounting

  2950(vlan)#apply

   APPLY complete

  2950(vlan)#Ctrl+C

  2950#
  

4、端口分配

2950下的端口配置,使用switchport access vlan [vlan#]命令,

  2950(config-if)#int f0/2

  2950(config-if)#switchport access vlan 2

  2950(config-if)#int f0/3

  2950(config-if)#switchport access vlan 3

  2950(config-if)#int f0/4

  2950(config-if)#switchport access vlan 4

  2950(config-if)#exit

  2950(config)#exit

  

  验证配置信息,如下:

  2950#sh vlan

  或

  2950#sh vlan brief

5、trunk配置

1900 trunk配置

  1900(config)#int f0/26

  1900(config-if)#trunk on
  2950下在接口配置模式,使用switchport命令,如下:

  2950(config)#int f0/12

  2950(config-if)#switchport mode trunk

2950(config-if)# switchport trunk encapsulation {isl|dot1q}

  2950(config-if)#^Z

6、将某VLAN从中继中删除

2950(config-if)# switchport trunk allowed vlan remove vlan-list

7、添加某个VLAN到中继线路

2950(config-if)# switchport trunk allowed vlan add vlan-list

  

Configuring Inter-VLAN Routing

  

  给连接1900的trunk端口配置,使用encapsulation isl [vlan#]命令,如下:

  2600Router(config)#int f0/0.1

  2600Router(config-subif)#encapsulation isl [vlan#]

2600Router(config-subif)#ip add ip add submask

给连接2950的这样配置,如下:

  2600Router(config)#int f0/0.1

  2600Router(config-subif)#encapsulation dot1q [vlan#]

2600Router(config-subif)#ip add ip add submask
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: