交换机基本配置.doc

合集下载

交换机基本配置上机

交换机基本配置上机

实验一、交换机的基本配置一、实验目的:熟悉配置环境,学会交换机的基本配置方法。

3.命令:SwitchA>enablePassword:SwitchA#config terminalEnter configuration commands, one per line. End with CNTL/Z. SwitchA(config)#hostname switchA2005-02-20 16:59:05 @5-CONFIG:Configured from outband switchA(config)#enable secret 5 s12005-02-20 16:59:24 @5-CONFIG:Configured from outband% ERROR: The secret you entered is not a valid encrypted secret.To enter an UNENCRYPTED secret, do not specify type 5 encryption. When you properly enter an UNENCRYPTED secret, it will be encrypted. switchA(config)#SwitchA(config)#line vty2005-02-20 16:55:29 @5-CONFIG:Configured from outband SwitchA(config-line)#exec-timeout 10002005-02-20 16:55:47 @5-CONFIG:Configured from outband SwitchA(config-line)#exit2005-02-20 16:55:55 @5-CONFIG:Configured from outband SwitchA(config)#switchA#config terminalEnter configuration commands, one per line. End with CNTL/Z. switchA(config)#no ip domain-lookup2005-02-20 17:02:54 @5-CONFIG:Configured from outband switchA(config)#int fa 0/12005-02-20 17:03:47 @5-CONFIG:Configured from outband switchA(config-if)#speed 1002005-02-20 17:04:00 @5-CONFIG:Configured from outband switchA(config-if)#duplex full2005-02-20 17:04:09 @5-CONFIG:Configured from outband switchA(config-if)#switchA(config)#int vlan 12005-02-20 17:18:16 @5-CONFIG:Configured from outband switchA(config-if)#ip address 192.168.1.1 255.255.255.02005-02-20 17:18:42 @5-CONFIG:Configured from outband switchA(config-if)#switchA(config)#ip default-gateway 192.168.1.2542005-02-20 17:21:44 @5-CONFIG:Configured from outband switchA(config)#switchA#show running-configSystem software version : 1.61(2) Build Aug 31 2005 ReleaseBuilding configuration...Current configuration : 453 bytes!version 1.0!enable services web-serverhostname switchAvlan 1!vlan 2!enable secret level 15 5 $2,1u_;C3&-8U0<D4'.tj9=GQ+/7R:>H !interface fastEthernet 0/1speed 100duplex full!interface vlan 1no shutdownip address 192.168.1.1 255.255.255.0!interface vlan 2!ip default-gateway 192.168.1.254snmp-server community public roline vtyexec-timeout 1000!line console 0exec-timeout 30!endswitchA#switchA#show interface vlan% Incomplete command.switchA#show interface vlan 1Interface : Vlan 1Description :AdminStatus : upOperStatus : downHardware : -Mtu : 1500LastChange : 0d:0h:0m:0sARP Timeout : 3600 sec PhysAddress : 00d0.f8db.b176 ManagementStatus:EnabledPrimary Internet address: 192.168.1.1/24 Broadcast address : 255.255.255.255switchA#switchA#show interface fa 0/1Interface : FastEthernet100BaseTX 0/1 Description :AdminStatus : upOperStatus : downHardware : 10/100BaseTXMtu : 1500LastChange : 0d:0h:0m:0s AdminDuplex : FullOperDuplex : Unknown AdminSpeed : 100OperSpeed : Unknown FlowControlAdminStatus : Off FlowControlOperStatus : OffPriority : 0Broadcast blocked :DISABLE Unknown multicast blocked :DISABLE Unknown unicast blocked :DISABLEswitchA#switchA#show mac-address-tableVlan MAC Address Type Interface---------- -------------------- -------- -------------------switchA#switchA#show versionSystem description : Red-Giant Gigabit Intelligent Switch(S2126G) ByRuijie NetworkSystem uptime : 0d:3h:44m:25sSystem hardware version : 3.3System software version : 1.61(2) Build Aug 31 2005 ReleaseSystem BOOT version : RG-S2126G-BOOT 03-02-02System CTRL version : RG-S2126G-CTRL 03-08-02Running Switching Image : Layer2switchA#show clockSystem clock : 2005-02-20 17:31:58 SundayswitchA#show configUsing 181 out of 6291456 bytes!version 1.0!enable services web-serverhostname S2126-2vlan 1!enable secret level 15 5 $2;C,tZ[30<D+S(\49=G1X)sQ:>H.Y*T!snmp-server community public roendswitchA#。

交换机基本配置命令

交换机基本配置命令

熟悉和掌握交换机配置命令Ⅰ.实验目标:熟悉交换机的编辑命令和帮助命令的使用。

Ⅱ.实验环境:网络实验室,锐捷交换机RG-S2126G,WINDOWS XPⅢ.基本内容:配置交换机的方法(1)(各种窗口菜单的使用)Ⅳ.实验原理:LAN交换技术Ⅴ.实验设备:交换机,主机。

1、网络实验室介绍每小组对应一个实验台,每小组的机柜里有5台设备,从上到下依次为:验设备使用说明⑴RG-RCMS对该组实验台上所有网络设备进行统一的管理和控制,学生作网络实验时,不需要对控制线进行任何的拔插。

⑵登录任一设备的方式为:HTTP://RCMS控制台IP地址:该设备的端口号其中,每小组RCMS控制台的IP地址为:如登录到第一组的第一台交换机的方式为:HTTP:// 172.16.1.1:8080●每台设备的登录密码均为:Star●进入特权方式的命令为:enable 14Ⅵ.实验内容:第一部分:熟悉交换机RG-S2126G(二层交换机)配置命令(1)一、交换机基本操作1.由用户模式进入特权模式Switch>enableSwitch#例如:Switch> enable 14 //进入特权模式Password: starSwitch# config terminal //进入全局配置模式Switch#exitPress RETURN to get started!Switch>二、配置模式:1、全局配置模式:[主机名(config)#]:配置交换机的整体参数2、子模式:⑴线路配置模式:[主机名(config-line)#]:配置交换机的线路参数⑵接口配置模式:[主机名(config-if)#]:配置交换机的接口参数①进入全局配置模式Switch#configure terminalSwitch(config)#exitSwitch#②进入接口配置模式Switch(config)#interface fastEthernet 0/1Switch(config-if)#exitSwitch(config)#③从子模式下直接返回特权模式Switch(config-if)#endSwitch#三、交换机操作帮助特点:1.支持命令简写(按TAB键将命令补充完整)2.在每种操作模式下直接输入“?”显示该模式下所有的命令3.命令空格“?”显示命令参数并对其解释说明4.字符“?”显示以该字符开头的命令5.命令历史缓存:(Ctrl+P)显示上一条命令,(Ctrl+N)显示下一条命令附1:help命令详解要查看帮助系统的一些简要信息,请执行help命令。

2 交换机基本配置

2 交换机基本配置

实训2 交换机基本配置一、实训目的1.掌握交换机的基础配置命令2.熟悉交换机端口配置3.能进行交换机端口安全配置二、实验逻辑图图2-1 实训逻辑图三、实验内容及步骤1.交换机基础配置(1)配置交换机主机名Switch# configure terminalSwitch(config)# hostname XXX注:在工程中名称一般命名为交换机所处建筑物位置和型号这样的名字。

(2)为log和debug设置时间戳Switch(config)# service timestamps debug uptimeSwitch(config)# service timestamps log uptime(3)禁止DNS查询Switch(config)# no ip domain-lookup(4)设置虚拟终端线路vty及telnet登录参数Switch(config-line)# line vty 0 4Switch(config-line)#password XXXSwitch(config-line)# loginSwitch(config-line)# end2.配置交换机端口速率及双工模式Switch(config)# int f0/1Switch(config-if)# speed 100Switch(config-if)# duplex full //设置F0/1口为全双工接口Switch(config-if)# exitSwitch(config)# int range f0/2 -5Switch(config-if)# speed 10Switch(config-if)# duplex half //设置F0/1口为半双工接口Switch(config-if)# exitSwitch(config)# int range f0/6 , f0/9Switch(config-if)# speed 100Switch(config-if)# duplex auto //设置F0/1口为自适应接口Switch(config-if)# endSwitch# show running-confit3.交换机端口安全配置Switch(config)# int f0/10Switch(config-if)# switchport mode access //设置接口为access模式Switch(config-if)# switchport port-security //开启端口安全Switch(config-if)# switchport port-security mac-address MAC地址//绑定MAC地址Switch(config-if)# endSwitch# show running-config4.保存所做的配置到启动配置文件Switch# copy running-config startup-configSwitch# show startup-config四、实训调测及结果1.进入交换机后,查看其当前配置Switch>enableSwitch# show running-config显示结果为:2.进行实训中的配置步骤后查看交换机当前运行配置Switch# show running-config显示结果为:(与前面显示不同处设置为蓝色)Building configuration...Current configuration : 1204 bytes!version 12.1no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption!hostname hngy!enable secret 5 $1$mERr$AqLQG3PAfePeBA Vl5rJeQ1!no ip domain-lookupspanning-tree mode pvst !interface FastEthernet0/1 duplex fullspeed 100!interface FastEthernet0/2 duplex halfspeed 10!interface FastEthernet0/3 duplex halfspeed 10!interface FastEthernet0/4 duplex halfspeed 10!interface FastEthernet0/5 duplex halfspeed 10!interface FastEthernet0/6 speed 100!interface FastEthernet0/7 !interface FastEthernet0/8 !interface FastEthernet0/9 speed 100!interface FastEthernet0/10 !interface FastEthernet0/11 !interface FastEthernet0/12 !interface FastEthernet0/13interface FastEthernet0/14!interface FastEthernet0/15!interface FastEthernet0/16!interface FastEthernet0/17!interface FastEthernet0/18!interface FastEthernet0/19!interface FastEthernet0/20!interface FastEthernet0/21!interface FastEthernet0/22!interface FastEthernet0/23!interface FastEthernet0/24!interface Vlan1ip address 192.168.1.1 255.255.255.0 !!line con 0!line vty 0 4password hngyloginline vty 5 15login!!end3.查看启动配置文件Switch# show startup-configstartup-config is not present4.保存所做的配置到启动配置文件Switch# copy running-config startup-configSwitch# show startup-config与你前面的配置哪一步相同?第二步5.配置交换机端口速率及双工模式Switch# show running-confit将显示结果中f0/1、f0/2、f0/3、f0/4、f0/5、f0/6、f0/9端口的显示行复制:!interface FastEthernet0/1duplex fullspeed 100!interface FastEthernet0/2duplex halfspeed 10!interface FastEthernet0/3duplex halfspeed 10!interface FastEthernet0/4duplex halfspeed 10!interface FastEthernet0/5duplex halfspeed 10interface FastEthernet0/6speed 100!interface FastEthernet0/7!interface FastEthernet0/8!interface FastEthernet0/9speed 1006.交换机端口安全配置Switch(config)# int f0/10Switch(config-if)# switchport mode accessSwitch(config-if)# switchport port-securitySwitch(config-if)# switchport port-security mac-address MAC地址Switch(config-if)# endSwitch# show running-config将显示结果中f0/10端口的显示行复制:interface FastEthernet0/1duplex fullspeed 100!interface FastEthernet0/2duplex halfspeed 10!interface FastEthernet0/3duplex halfspeed 10!duplex halfspeed 10!interface FastEthernet0/5duplex halfspeed 10!interface FastEthernet0/6speed 100!interface FastEthernet0/7!interface FastEthernet0/8!interface FastEthernet0/9speed 100!interface FastEthernet0/10switchport mode accessswitchport port-security五、实训思考作为一个网络管理员,常常是将交换机的基础配置先写在一个文本文件中(.txt文件),配置时再将该文件中的内容粘贴到交换机中去,运行后再将运行配置拷贝到启动配置文件。

实验二 交换机基本配置

实验二 交换机基本配置

实验二交换机基本配置【实验目的】理解交换机命令行各种操作模式的区别,以及模式之间的切换。

【实验环境】1 台Cisco Catalyst 2950 交换机。

【实验指导】交换机的命令行操作模式主要包括:用户模式、特权模式、全局配置模式和端口模式。

(1)用户模式用户模式是在进入交换机后的第一个操作模式,在该模式下可以简单地查看交换机的软件及硬件版本信息,并进行简单的测试。

用户模式提示符为 switch>。

(2)特权模式特权模式是由用户模式进入的下一级模式,在该模式下可以对交换机的配置文件进行管理,查看交换机的配置信息,以及可对网络进行测试和调试。

特权模式提示符为switch#。

(3)全局配置模式全局配置模式是由特权模式进入的下一级模式,在该模式下可以配置交换机的主机名、登录信息等全局性参数。

全局配置模式提示符为 switch(config)#。

(4)端口模式端口模式是由全局配置模式进入的下一级模式,在该模式下可以对交换机的端口参数进行配置,端口模式提示符为 switch(config-if)#。

Exit 命令可退回到上一级操作模式,而 End 命令则是指用户可从特权模式以下的级别直接返回到特权模式。

交换机命令行可支持帮助信息获取、命令的简写、命令的自动补齐和快捷键等功能。

【实验内容】1. 掌握交换机的基本配置命令交换机命令行操作模式的进入。

基本输入:Switch>enable //进入特权模式Switch#configure terminal //进入全局配置模式Switch(config)#interface fastethernet 0/5 //进入交换机F0/5 的接口模式Switch(config-if)#exit //退回到上一级操作模式Switch(config-if)#end //直接退回到特权模式交换机命令行基本功能。

基本输入:Switch>? //显示当前模式下所有可执行的命令Switch#co ? //显示当前模式下所有以co 的命令Switch#copy ? //显示copy 命令后可执行的参数Switch#clock set 参数//时间设置Switch#show 参数//显示信息命令Switch(config)#hostname 主机名//主机名修改Switch(config)#enable secret 密码//特权模式进入密码Switch(config)#enable password 密码Switch(config)#no enable secret //特权模式取消密码Switch(config)#no enable passwordSwitch(config)#no hostname 主机名//取消主机名设置Switch(config-if)#no shutdown //开启端口Switch(config-if)#shutdown //关闭端口Switch(config)#interfacerange fastethernet 0/1-5 //同种类型多端口配置Switch(config)#interface range fastethernet 0/1-5 ,gigabitethernet 0/1-2//不同类型多端口配置注意:①为了操作简单,退出特权模式和全局配置模式的命令统一用exit。

主流厂家交换机、路由器基本配置参考

主流厂家交换机、路由器基本配置参考

多厂商的基本配置一、思科路由:a\ IP基本配置:Router>enRouter#conf tRouter(config)#hostname SPOTO-DX-R1SPOTO-DX-R1(config)#SPOTO-DX-R1(config)#interface f0/1SPOTO-DX-R1(config-if)#ip address 192.168.166.254 255.255.255.0 SPOTO-DX-R1(config-if)#no shutdownSPOTO-DX-R1(config-if)#exitb\路由配置:SPOTO-DX-R1(config)#router ospf 100SPOTO-DX-R1(config-router)#router-id 21.25.97.5SPOTO-DX-R1(config-router)#network 192.168.166.0 0.0.0.255 area 0 SPOTO-DX-R1(config-router)#network 21.25.97.5 0.0.0.0 area 0 SPOTO-DX-R1(config-router)#exitc\远程管理:SPOTO-DX-R1(config)#enable password espotor1SPOTO-DX-R1(config)#service password-encryptionSPOTO-DX-R1(config)#line vty 0 4SPOTO-DX-R1(config-line)#password tspotor1SPOTO-DX-R1(config-line)#loginSPOTO-DX-R1(config-line)#exitd\查看信息:SPOTO-DX-R1#show versionSPOTO-DX-R1#show ip interface briefSPOTO-DX-R1#show interfaceSPOTO-DX-R1#show ip route ospfSPOTO-DX-R1#show running-config交换:a\Access配置:switch>enableswitch#confi tswitch(config)#hostname SPOTO-S1SPOTO-S1(config)#vlan 10SPOTO-S1(config-vlan)#name vlan10SPOTO-S1(config-vlan)#exit% Applying VLAN changes may take few minutes. Please wait... SPOTO-S1(config)#interface vlan 10SPOTO-S1(config-if)#ip address 192.168.166.252 255.255.255.0 SPOTO-S1(config-if)#interface f0/3SPOTO-S1(config-if)#switchport mode accesSPOTO-S1(config-if)#switchport access vlan 10b\Trunk 配置:SPOTO-S1(config-if)#interface f0/24SPOTO-S1(config-if)#switchport trunk encapsulation dot1q SPOTO-S1(config-if)#switchport mode trunkSPOTO-S1(config-if)#switchporttrunk allowed vlan XSPOTO-S1(config-if)#exit二、华为路由:a\ IP基本配置:<Quidway>system view[Quidway]sysname SPOTO-YD-R2[SPOTO-YD-R2]super password espotor2[SPOTO-YD-R2]interface ethernet 0[SPOTO-YD-R2-Ethernet0]ip address 192.168.2.254 255.255.255.0 [SPOTO-YD-R2-Ethernet0]undo shutdown[SPOTO-YD-R2-Ethernet0]quitb\路由配置:[SPOTO-YD-R2]router id x.x.x.x[SPOTO-YD-R2]interface ethernaet 0[SPOTO-YD-R2-ethernet0]ospf enable area 0.0.0.0[SPOTO-YD-R2-ospf]quit[SPOTO-YD-R2]ospf enable[SPOTO-YD-R2-ospf]import-route direct[SPOTO-YD-R2-ospf]network 192.168.2.0 0.0.0.255c\远程管理:[SPOTO-YD-R2] user-interface vty 0 4[SPOTO-YD-R2-ui-vty0-4]authentication-mode password[SPOTO-YD-R2-ui-vty0-4]set authentication-mode password simpletspotor2 [SPOTO-YD-R2-ui-vty0-4]user privilege level 3[SPOTO-YD-R2-ui-vty0-4]quitd\查看信息:[SPOTO-YD-R2]display version[SPOTO-YD-R2]display interface[SPOTO-YD-R2]display ip route[SPOTO-YD-R2]display current-configuration[SPOTO-YD-R2]display history交换:a\Access配置:[SPOTO-S2]vlan 10[SPOTO-S2-vlan10]quit[SPOTO-S2]interface ethernet 0/1[SPOTO-S2-Ethernet0/1]port link-type access [SPOTO-S2-Ethernet0/1]port access vlan 10 [SPOTO-S2-Ethernet0/1]quitb\Trunk配置:[SPOTO-S2]interface ethernet 0/2[SPOTO-S2-Ethernet0/2]port link-type trunk [SPOTO-S2-Ethernet0/2]port trunk permit vlan 10 [SPOTO-S2-Ethernet0/2]port trunk pvid vlan X [SPOTO-S2-Ethernet0/2]quit三、华三H3C路由:a\ IP基本配置:<H3C>system view[H3C]sysname SPOTO-R[SPOTO-R]interface GigabitEthernet 1/0/1[SPOTO-R-GigabitEthernet1/0/1]ip address192.168.166.254 24[SPOTO-R-GigabitEthernet1/0/1]undo shutdown[SPOTO-R-GigabitEthernet1/0/1]quitb\路由配置:[SPOTO-R]ospf 12[SPOTO-R-ospf-12]area 0[SPOTO-R-ospf-12-area-0.0.0.0]network 192.168.166.0 0.0.0.255[SPOTO-R-ospf-12-area-0.0.0.0]silent-interface gi 0/0[SPOTO-R-ospf-12]import-routestatitc\远程管理:[SPOTO-R]super password simple espotor \\明文密码,密文可用cipher替代simple [SPOTO-R]user-interface vty 0 4[SPOTO-R-ui-vty0-4]authentication-mode password[SPOTO-R-ui-vty0-4]set authentication password tspotor[SPOTO-R-ui-vty0-4]user privilege level 3[SPOTO-R-ui-vty0-4]quit[SPOTO-R]telnet server enabled\查看信息:dirdisplay versiondisplay vlandisplay current-configurationdisplay ip routedisplay usersdisplay interface交换:a\Access配置:[SPOTO-S]vlan 10[SPOTO-S-vlan10]port e 0/1[SPOTO-S-vlan10]quit[SPOTO-S]interface ethernet 0/1[SPOTO-S-Ethernet0/1]port link-type access [SPOTO-S-Ethernet0/1]port access vlan 10b\Trunk配置:[SPOTO-S-Ethernet0/1]port link-type trunk [SPOTO-S-Ethernet0/1]port trunk permit vlan 10 [SPOTO-S-Ethernet0/1]port trunk pvid vlan 1四、锐捷路由:a\ IP基本配置:Router >enableRouter#configure terminalRouter(config)#interface f0/1Router(config-if)#ip address 192.168.166.253 255.255.255.0 Router(config-if)#no shutdownb\路由配置:Router(config)#router ospf 1Router(config-router)#network 192.168.166.0 0.0.0.255 area 0 Router(config-router)#endc\远程管理:Router(config)#enable password espotor1Router(config)#service password-encryptionRouter(config)#line vty 0 4Router(config-line)#password tspotor1Router(config-line)#loginRouter(config-line)#exitd\查看信息:show versionshow ip interface briefshow interface fa0/1show running-configshow ip route交换:a\Access配置:switch>enableswitch#confi tswitch(config)#hostname S1S1(config)#S1(config)#vlan 10S1(config-vlan)#name vlan10S1(config-vlan)#exitS1(config)#interface vlan 10S1(config-if)#ip address 192.168.166.252 255.255.255.0 S1(config-if)#interface f0/3S1(config-if)#switchport mode accessS1(config-if)#switchport access vlan 10b\Trunk配置:S1(config)#interface e0/2S1(config-if)#switchport mode trunk五、Juniper路由:a\ IP基本配置:root@%cliroot>editEntering configuration mode[edit]root#set system host-name SPOTO-Junos[edit]root#commitcommitcomplete[edit]root@SPOTO-Junos#edit interface[edit interface]root@SPOTO-Junos#setem0 unit 0 family inet address 192.168.166.252/24[edit interface]root@SPOTO-Junos#setlo0 unit 0 family inet address 21.99.67.55/32[edit interface]root@SPOTO-Junos#exit[edit]root@SPOTO-Junos#commitb\路由配置:root@SPOTO-Junos#set logical-routers r1 protocols ospf area 0 interface em0 [edit]root@SPOTO-Junos#c\远程管理:[edit]root@SPOTO-Junos#edit system login[edit system login]root@SPOTO-Junos#setuser kiss class super-user authentication plan-text-password Newpassword:Retypenew password:[edit system login]root@SPOTO-Junos#top[edit]root@SPOTO-Junos#edit system services[edit system services]root@SPOTO-Junos#setssh protocol-version v2[edit system services]root@SPOTO-Junos#commitcommitcomplete[edit system services]root@SPOTO-Junos#settelnetd\查看信息:root@SPOTO-Junos>showversionroot@SPOTO-Junos>showroute terseroot@SPOTO-Junos>showconfigurationroot@SPOTO-Junos#showlogical-routersroot@SPOTO-Junos#showinterfaces交换:a\Access配置:[edit]root@SPOTO-Junos#set vlans vlan10 vlan id 10[edit]root@SPOTO-Junos#set interface fe-0/1 unit 0 family Ethernet-switching port-mode access [edit]root@SPOTO-Junos#set interface fe-0/1 unit 0 family Ethernet-switching vlan members 10 b\Trunk配置:[edit]root@SPOTO-Junos#set interface fe-0/1 unit 0 family ethernet-switching port-mode trunk [edit]root@SPOTO-Junos#set interface fe-0/1 unit 0 family ethernet-switching vlan members all六、迈普路由:a\ IP基本配置:Router>enableRouter#configure terminalRouter(config)#hostname MaipuMaipu(config)#interface fastethernet0Maipu(config-if-fastethernet0)#ip add 192.168.2.252 255.255.255.0 b\路由配置:Maipu(config)#router ospf 100Maipu(config-router)#network 192.168.2.0 0.0.0.255 area 0c\远程管理:Maipu(config)#aaa new-modelMaipu(config)#aaa authentication login default local enable none Maipu(config)#user SPOTO password 0 espotoMaipu(config)#line vty 0 4Maipu(config-line)#login locald\查看信息:Maipu#show versionMaipu#show ip routeMaipu#show interfaceMaipu#show cpuMaipu#show memoryMaiou#show running-config交换:a\Access配置:Maipu(config)#vlan 801Maipu(config-vlan801)#exitMaipu(config)#port 0/0/2Maipu(config-port-0/0/2)#port access vlan 801Maipu(config-port-0/0/2)#port-type nnib\Trunk配置:Maipu(config)#interface ethernet1/0/1Maipu(config-if-ethernet1/0/1)#switchport mode trunk Maipu(config-if-ethernet1/0/1)#exit七、Redback路由:a\ IP基本配置:[local]SE800>enable[local]SE800#configuration[local]SE800(config)#context local[local]SE800(config-ctx)#interface toSPOTO-R1[local]SE800(config-if)#ip add 21.98.65.21/30[local]SE800(config-if)#commit[local]SE800(config)#port ethernet 1/1[local]SE800(config-port)#no auto-negotiate[local]SE800(config-port)#no shutdown[local]SE800(config-port)#bind interface toSPOTO-R1 local[local]SE800(config-port)#commitb\路由配置:[local]SE800(config)#context local[local]SE800(config-ctx)#router-id x.x.x.x[local]SE800(config-ctx)#interface lp1 loopback[local]SE800(config-if)#ip address x.x.x.x/32[local]SE800(config-if)#ip source-address snmp syslog[local]SE800(config-ctx)#router ospf 1[local]SE800(config-ospf)#auto-cost reference-bandwidth 80000 [local]SE800(config-ospf)#log-neighbor-up-down[local]SE800(config-ospf)#area 0.0.0.0[local]SE800(config-ospf-area)#interface toSPOTO-R1[local]SE800(config-ospf-interface)#network-type point-to-point [[local]SE800(config-ospf)#redistribute connected metric 20metric-type 1 c\远程管理:[local]SE800(config)#system hostname SPOTO-R[local]SPOTO-R(config)#context local[local]SPOTO-R(config-ctx)#enable password espotor[local]SPOTO-R(config-ctx)#service ssh[local]SPOTO-R(config-ctx)#administrator SPOTO password se800pt [local]SPOTO-R(config-admin)privil start 10[local]SPOTO-R(config-admin)privil max 15ip access-list admin-acldescription This is a sample access control list seq 10 permit ip host 192.168.166.55seq 20 permit ip host 172.16.10.122sep 30 permit ip host 172.16.10.77sep 40 deny ip anyadmin-access-group admin-acl ind\查看信息:show subscribersshow cirsho clocksho vershow releasesho sub summ allshow hardware detailcontext localshow confi八、中兴路由:a\ IP基本配置:interface create ip to-r2 address-netmask 120.190.1.1/16port et.1.2interface create ip to-r3 address-netmask 130.1.1.1/16 portet.1.3b\路由配置:ip add route 202.1.0.0/16 gateway 120.90.1.2ospf startospf create area 140.1.0.0ospf create area backboneospf set ase-default cost 4ospf add interface 140.1.1.1 to-area 140.1.0.0ospf add interface 140.1.2.1 to-area 140.1.0.0ip-router policy create ospf-export-destinationospfExpDstType1 type 1 metric 1 c\远程管理:create user administratorlogin pass administratorline-vty timeout 60d\查看信息:system show active-config?交换:a\Access配置:set vlan 10 add port 1-23 untagset port 1-23 pvid 10b\Trunk配置:set vlan 1-10 add port 24 tag。

交换机的基本配置

交换机的基本配置

交换机的基本配置交换机的基本配置交换机:1.⽤控制台端⼝配置2.远程端⼝配置交换机命令⾏模式⼯作模式提⽰符⾃动⽅式⽤户模式Switch> 开机⾃动进⼊特权模式Switch# Switch>enable配置模式全局模式Switch(config)# Switch#configure terminalVLAN模式Switch(config-vlan)# Switch(config) #vlan 100接⼝模式Switch(config-if)# Switch(config)#interface fa0/1线程模式Switch(config-line)# Switch(config)#line console 0⽤户模式:可进⾏交换机的基本测试显⽰系统信息特权模式:全局模式:接⼝模式:可配置交换机的各种接⼝Vlan配置模式:Exit退出当前模式返回上⼀模式End或ctrl+Z 退出到特权模式提供帮助信息TAB补齐该命令剩余单词No 取消某种功能,⼏乎所有命令都有“no”选项配置交换机的基本功能:交换机命令⾏操作模式转换:Switch>enable !进⼊特权模式Switch#Switch#configure terminal !进⼊全局配置模式Switch(config)#Switch(config)#interface fastethernet 0/3 !进⼊交换机fa0/3 的接⼝模式Switch(config-if) Switch(config-if)#exit !退回到上⼀级操作模式Switch(config)#Switch(config-if)#end !直接退出到特权模式Switch#改变交换机名称Switch(config)#hostname ruijie_switch !配置设备名称为ruijie_switch每⽇提⽰信息Switch(config)#banner motd !配置每⽇提⽰信息下⾯可以键⼊描述信息,以各种交换机提⽰符号结束端⼝参数Switch(config -if)#speed 100 !配置端⼝速率为100MSwitch(config-if)#duplex full !配置端⼝的双⼯模式为全双⼯Switch(config-if)#no shutdown !开启该端⼝,使端⼝转发数据查看交换机端⼝信息Switch#show interface fastethernet 0/3 !查看端⼝配置信息2.2⽤Telnet远程配置交换机(1)为交换机配置管理ip地址Switch(config)#interface vlan 1 !打开交换机管理vlan 交换机管理vlan设为启动状态Switch(config-if)#no shutdown !交换机管理vlan设置为启动状态Switch(config-if)#ip address 192.168.1.1 255.255.255.0 !为交换机配置管理地址Switch(config-if)#exit !返回全局模式(2)开启远程登录权限Switch(config)#line vty 0 4 !配置远程登录密码0为虚拟终端号0~32 ;4为同时登录⽤户数Swirch(config)#password 0 xx !xx为⼝令0为输⼊密码⽅式0明⽂7密⽂(3)为交换机开启特权级操作权限Switch(config)# enable secret level 15 0 star !配置进⼊特权模式密码0 star如上3.3配置⼆层交换机vlan功能1.基于端⼝划分vlan使⽤vlan命令Switch(config)#vlan 10 !启⽤vlan 10Switch(config)#vlan 11 !启⽤vlan 11Switch(config)#no vlan 11 !删除vlan 11使⽤switchport accessSwitch(conifg)#interface fastethernet 0/5 !打开交换机的接⼝5Switch(config-if)#switchport access vlan 10 !把该接⼝分配到vlan 10Switch(config-if)#no shutdown !开启接⼝⼯作状态Switch(config-if)#endSwitch#show vlan !查看vlan配置信息配置连接跨越多台交换机的vlan⼲道Switch(conifg)#interface fastethernet 0/1 !进⼊fa0/1接⼝配置模式Switch(config-if)#switchport mode trunk !将fa0/1设置为Trunk模式配置交换机的⽣成树功能(预防⼴播风暴,多重帧复制,mac地址表不稳定)Switch(conifg)#spanning-tree !开启⽣成树Switch(conifg)#spanning-tree mode stp!设置⽣成树为STPSwitch(conifg)#spanning-tree priority <0-61440> !交换机优先级0最⾼,为根,依次16个位4096的倍数,即0,4096,8192…默认32768Switch(config-if)#spanning-tree port-priority<0-240> !设置交换机端⼝优先级依次为16倍数,共16个,默认128Switch#show spanning-tree !显⽰交换机的⽣成树模式状态Switch#show spanning-tree interface fastethernet0/1 !显⽰fa0/1接⼝STP状态另⼀模式RSTPSwitch(config)#spanning-tree mode rstp !设置⽣成树为RSTP配置交换机的端⼝聚合功能交换机最⼤聚合端⼝数是有限的;注意端⼝速度必须⼀致;属于同⼀个vlan;传输介质⼀样;⽹络同⼀层次配置聚合端⼝Switch(config)#interface aggregateport n !创建⼀个AP端⼝组号Switch(config)#interface range fastethernet 0/1-2 !1,2号端⼝聚合Switch(config-if-range)#port-group 5 !配置成5号端⼝组成员配合聚合端⼝负载均衡Switch(config)#aggregateport load-balance {dst-mac|src-mac|ip}显⽰聚合端⼝Switch#show aggregateprot load-balance配置三层交换机名词解释:SVI(switch virtualinterface)交换机虚拟接⼝可以实现不同vlan间访问Switch(config)#interface vlan 10 !创建⼀个vlan的虚拟⽹络接⼝Switch(config-if)#ip address 192.168.1.1 255.255.255.0 !虚拟⽹络接⼝ip同时为结点⽹关Switch(config-if)#no shutdown开启三层交换机的路由功能Switch(config)#interface fastethernet0/5Switch(config-if)#no switchport !开启物理端⼝fa0/5的路由功能Switch(config-if)#ip address 192.168.1.1 255.255.255.0 !配置端⼝fa0/5的ip Switch(config-if)#no shutdown交换机连接级联堆叠星形堆叠:Switch(config)#member 1 !配置设备号为1Switch(config)#device-priority 10 !配置优先级为10,范围1-10,默认1,优先级最⾼位堆叠主机。

交换机配置方法网络交换机的详细配置方法(DOC)

交换机配置方法网络交换机的详细配置方法(DOC)

交换机配置方法网络交换机的详细配置方法如何配置交换机对很多人来说都是一门高深的学问,甚至在被问及交换机如何配置时,有人会反问道:交换机还需要配置的么?确实,交换机的配置过程复杂,而且根据品牌及产品的不同也各不相同,那么我们应该如何配置交换机呢?本文将以图文结合的方式来具体介绍一下交换机配置,希望对大家有所帮助。

交换机本地配置谈起交换机本地配置,首先我们来看一下交换机的物理连接。

交换机的本地配置方式是通过计算机与交换机的“Console”端口直接连接的方式进行通信的。

计算机与交换机的“Console”端口连接网管型交换机一般都有“Console”端口,用于进行交换机配置。

物理连接完成后就要进行交换机软件配置,下面以思科“Catalyst 1900”为例来说明如何进行交换机软件配置:第1步:单击“开始”按钮,在“程序”菜单的“附件”选项中单击“超级终端”,弹出如图所示界面。

第2步:双击“Hypertrm”图标,弹出如图所示对话框。

这个对话框是用来对立一个新的超级终端连接项。

第3步:在“名称”文本框中键入需新建超的级终端连接项名称,这主要是为了便于识别,没有什么特殊要求,我们这里键入“Cisco”,如果您想为这个连接项选择一个自己喜欢的图标的话,您也可以在下图的图标栏中选择一个,然后单击“确定”按钮,弹出如图所示的对话框。

第4步:在“连接时使用”下拉列表框中选择与交换机相连的计算机的串口。

单击“确定”按钮,弹出如图所示的对话框。

第5步:在“波特率”下拉列表框中选择“9600”,因为这是串口的最高通信速率,其他各选项统统采用默认值。

单击“确定”按钮,如果通信正常的话就会出现类似于如下所示的主配置界面,并会在这个窗口中就会显示交换机的初始配置情况。

Catalyst 1900 Management ConsoleCopyright (c) Cisco Systems,Inc。

1993-1999All rights reserved。

东土交换机配置文档

东土交换机配置文档

东土交换机配置文档东土交换机配置文档1.交换机的配置1.1.交换机的登录方式1.1.1.telnet登录正常情况下(能Ping通,能连上),都是用telnet登录。

东土新的二层交换机的IP,一般是192.168.0.2使用CRT工具,输入telnet 172.3.xxx.241 没有密码,直接回车进入1.1.2.console线直连登录当ping不通,连接不上的情况下,可以使用console线直接连到交换机上,无需登录密码直接可以进入。

如果是用consol线连接,需要用usb转串口线连接,选择好串口,波特率选择9600,连接后直接输入用户名密码即可登陆。

必须用东土提供的线,线序与正常的不一样。

1.2.二层交换机的配置方法telnet 172.3.XXX.241-249password:回车>enable>confurger terminal –进入配置模式>ip address 172.3.XXX.241-249之间mask 255.255.255.0 --配置IP地址和子网掩码>ip gateway 172.3.XXX.254 --配置网关配置完成后会出现successful配IP地址和网关如果不成功,就多配置几遍>exitconfig>dt-ring mode port-based 环协议配置成端口模式config>dt-ring new 1 domain 1 slave(从) --配置当前正在配置的交换机的主从Master(主)车站三个以下交换机,包括三个交换机,设置三层交换机为主车站三个以上交换机,设置172.3.XXX.242或者243二层交换机为主>exitconfig>dt-ring 1dt-ring 1>ringport add 17 --将两个光口配置到环协议里dt-ring 1>ringport add 18dt-ring 1>protocol enable>exitConfig>exitswitch>save>reboot1.3.三层交换机的配置方法telnet 登陆enableshow running-config --找一台正常的机器,输入此命令后,可以显示出正确的配置按照显示出的命令配置即可,中间注意exit切换命令所在目录在需要配置的三层交换机上,输入EnableConfig在config模式下,按照正确的配置逐行输入,然后回车即可。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

交换机基本配置.doc
交换机是一个关键的网络设备,它可以连接许多计算机和其他网络设备。

为了使交换机发挥最大的作用,必须对它进行基本配置。

本文将介绍如何进行交换机的基本配置,包括设置IP地址、管理用户和密码、创建VLAN和开启端口。

1.设置IP地址
设置IP地址是交换机配置的重要步骤。

在设置之前,需要确定交换机所在的网络和网段。

比如,如果交换机的IP地址是192.168.0.1,子网掩码是255.255.255.0,那么该交换机所在的网络就是192.168.0.0,并且包括从192.168.0.1到192.168.0.254的所有IP 地址。

设置IP地址的具体步骤如下:
1. 连接交换机并登录。

2. 进入配置模式。

3. 输入以下命令:interface vlan 1
4. 输入以下命令:ip address 192.168.0.1 25
5.255.255.0
5. 保存配置并退出。

2.管理用户和密码
为了确保交换机的安全性,必须设置管理用户和密码。

这样,只有授权的用户才能登录交换机并进行配置。

3. 输入以下命令:username admin password password123
在上面的命令中,“admin”是用户名,“password123”是密码。

您可以根据需要修改这些值。

3.创建VLAN
VLAN是逻辑上的网络隔离,可以将交换机拆分为多个虚拟交换机。

每个VLAN都有其独立的IP地址和子网掩码,并且只能与同一VLAN的计算机或设备通信。

创建VLAN的具体步骤如下:
5. 输入以下命令:exit
在上面的命令中,“vlan10”是VLAN的名称。

您可以为每个VLAN指定不同的名称和ID。

4.开启端口
端口是交换机用于连接计算机和其他网络设备的物理接口。

为了确保交换机能够正常工作,必须开启端口。

4. 输入以下命令:no shutdown
在上面的命令中,“gigabitethernet 0/1”是端口的名称。

您可以根据需要修改端口的名称和编号。

总结。

相关文档
最新文档