Cisco 2950 实例配置

    技术2022-05-20  76

         Cisco 2950 实例配置            一、环境条件            1、需要了解的,上联3550配置情况:            VTP mode: server            VTP domain:CHJ- ShengDa            vlan ID: 700              ip range: 210.51.30.0/24            Default-Gateway: 210.51.30.1            二、2950配置            1、开机            A、如是新设备,开机需跳过系统默认配置模式,进入手动配置模式            B、进入用户模式,系统提示符为 > ,此模式只能查看统计信息,无配置功能,进入特权模式的唯一跳板            C、用户模式下,输入 enable ,进入特权模式,系统提示符为 #            2、创建VLAN 700  (vlan 1,1002-1005,设备自动生成,不能更改、删除)            方法1:            # vlan database            (vlan)# vlan 700 name XXX            (vlan)#apple            方法2:            #configure terminal            (config)#vlan 700            (config-vlan)#name XXX            (config-vlan)#exit            3、VLAN 配置            # configure terminal            (config-if)#interface vlan 700            (config-if)#ip address 210.51.30.7 255.255.255.0            (config-if)#no shutdown            (config-if)#description XXX            (config-if)#exit            4、添加端口  (系统默认端口都属于vlan 1)            方法1:            #configure terminal            (config)#interface fastehernet 0/1            (config-if)#no shutdown            (config-if)#switchport mode access            (config-if)#switchport access vlan 700            (config-if)#description XXX            (config-if)#exit            (config)#interface fastehernet 0/2                          .                          .                          .            (config)#interface fastehernet 0/24            方法2:            #configure terminal            (config)#interface rang fastehernet 0/1 - 24            (config-if-rang)#no shutdown            (config-if-rang)#switchport mode access            (config-if-rang)#switchport access vlan 700            (config-if-rang)#exit            5、添加默认网关地址            (config)#ip default-gateway 210.51.30.1            6、添加snmp管理字段            (config)#snmp-server community XXX ro 1    (只允许ACL 1中指定IP访问)            7、配置VTP            (config)#vtp mode transparent            (config)#vtp domain DHJ-ShengDa            8、安全性配置            A、设置enable密码            (config)#enable secret XXX            B、设置主机名            (config)#hostname XXX            C、关闭http访问            (config)#no httpserver            D、关闭密码明文显示            (config)#service password-encryption            E、配置consol口密码            (config)#line con 0            (config-line)#password XXX            (config-line)#login            (config-line)#exit            F、关闭telnet访问            (config)#line vty 0 4            (config-line)#no password            (config-line)#exit            G、关闭VLAN 1            (config)#interface vlan 1            (config-if)#shutdown            (config-if)#exit            9、建立安全的telnet访问 (安全部要求关闭telnet,这里仅做技术讨论)            (config)#access-list 1 permit host 210.51.28.4                 (建立标准型访问控制列表,ID号1,只允许主机210.51.28.4访问)            (config)#access-list 1 deny any any             (禁止其他地址访问,此语句为默认语句,所有建立的ACL,都会在最后添加此命令语句,不输入也可以)            (config)#line vty 0 4            (config-line)#password XXX            (config-line)#login            (config-line)#access-class 1 in                          (绑定已建立的ACL             ID:1 至telnet端口)            (config-line)#exit            10、保存配置            #copy run-configure start-configure            三、相关名词说明            1、VLAN                           VLAN是连接到定义好了的switch的端口的网络用户和资源的逻辑分组.给不同的子网分配不同的端口,就可以创建更小的广播域.默认情况下,在某个VLAN中的主机是不可以与其他VLAN通信的,除非你使用router来创建VLAN间的通信            2、VLAN的一些特点:             A.网络的增加,移动和改变,只需要在适当的VLAN中配置合适的端口             B.安全,因为不同VLAN的用户不能互相通信,除非依*router来做VLAN间的通信             C.因为VLAN可以被认为是按功能划分的逻辑分组,所以VLAN和物理位置,地理位置无关             D.VLAN增加安全性             E.VLAN增加广播域的数量,而减小广播域的大小            3、VLAN Trunking Protocol(VTP)             VTP也是Cisco创建的,但是现在已经不为Cisco所私有.VTP的主要目的是在1个交换性的环境中管理所有配置好的VLAN使所有的VLAN保持一致性VTP允许增加,删除和重命名VLAN,然后这些修改后的信息传播到整个VTP域里的所有switches上            4、在VTP域里操作的3种模式:             A.服务器模式(server mode):所有Catalyst             switches的默认设置,1个VTP域里必须至少要有1个服务器用来传播VLAN信息,对VTP信息的改变必须在服务器模式下操作.配置保存在NVRAM里             B.客户机模式(client             mode):在这种模式下,switches从VTP服务器接受信息,而且它们也发送和接收更新,但是它们不能做任何改变.在VTP服务器通知客户switches说增加了新的VLAN之前,你不能在客户switch的端口上增加新的VLAN.            C.透明模式(transparent             mode):该模式下的switch能增加和删除VLAN,因为它们保持的有自己的数据库,不和其他的共享.

    http://net.chinaunix.net/1/2008/03/04/1148564.shtml


    最新回复(0)