华三交换机-路由器配置命令
- 格式:docx
- 大小:11.20 KB
- 文档页数:5
华三路由器命令信息⼀、模式命令。
<H3C>debugging ip ?开启调试功能<H3C>undo debugging ip 关闭调试功能<H3C>restore factory-default 恢复交换机出⼚设置,重启⽣效<H3C>display version 查看设备版本<R1>dir 查看⽂件<H3CR1>reboot 重启<R1>system-view 进⼊系统模式<H3C>reset logbuffer 清除⽇志缓冲区的信息<H3C>reset blacklist ip all 查看⿊名单所有ip<H3C>reset recycle-bin 清除回收站⽂件[R1]quit 返回上⼀级[R1]sysname H3CR1 修改设备名称[H3CR1]display interface brief 查看接⼝信息[H3CR1]display ip routing-table 查看路由表[H3CR1]display ip routing-table statistics 查看路由表统计信息[H3CR1]display ip routing-table 20.1.1.3 查看符合指定⽬的地址的路由信息[H3CR1]ip route-static 10.1.1.2 255.255.255.0 20.1.1.2 description jin 配置静态路由[R4]save 保存配置到Start.cfg,系统启动默认加载此⽂件⼆、RIP(Routing Information Protocol)路由协议[H3CR1]int GE0/0 进⼊端⼝[H3CR1-GigabitEthernet0/0]ip address 10.1.1.3 255.255.255.0 为端⼝配置IP地址[H3CR1-GigabitEthernet0/0]undo shutdown 启动物理端⼝[H3CR1]int LoopBack 0 起⼀个回环⼝[H3CR1-LoopBack0]ip address 1.1.1.1 255.255.255.0 配置回环⼝的IP[H3CR1]rip 启RIP协议[H3CR1-rip-1]version 2 使⽤版本2[H3CR1-rip-1]undo summary 关闭⾃动汇总[H3CR1-rip-1]network 1.1.1.0 0.0.0.255 宣告路由[H3CR1]display rip 查看rip协议信息[R2]int GE0/1 进⼊接⼝[R2-GigabitEthernet0/1]rip authentication-mode md5 rfc2453 plain 123456 配置明⽂密码三、OSPF(Open Shortest Path First)[R2]router id 2.2.2.2 配置router-id[R2]ospf 1 启⼀个ospf协议[R2-ospf-1]area 0 配置ospf的区域号[R2-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255 宣告路由四、IS-IS[H3C]isis 100设置进程号[H3C-isis-100]network-entity 01.0000.0000.0001.00 设置⽹络实体名称[H3C-isis-100]is-level level-1 配置路由器级别为level-1(类型)[H3C]int LoopBack 0 进⼊环回⼝[H3C-LoopBack0]isis enable 100 在指定接⼝上使能IS-IS进程[H3C-GigabitEthernet0/0]isis cost 5 使能⾃动计算接⼝链路开销值功能同⼀个区域内:[H3C]isis 100 设置进程号[H3C-isis-100]network-entity 01.0000.0000.0002.00 设置⽹络实体名称[H3C-GigabitEthernet0/1]isis enable 1 在指定接⼝上使能IS-IS进程[H3C-GigabitEthernet0/1]isis circuit-level level-1 配置is-is接⼝邻接关系类型查询维护命令:[H3C]display isis is-is摘要信息显⽰[H3C]display isis peer is-is邻居信息显⽰[H3C]display isis route is-is路由信息显⽰[H3C]display isis lsdb level-1 verbose is-is链路状态数据库显⽰五、配置telnet[H3C]telnet server enable 开启telnet服务[H3C]ssh server enable 开启ssh服务[H3C]line vty 0 4 允许4个⽤户登录[H3C-line-vty0-4]authentication-mode scheme 设置⽤⽤户名加密码登录[H3C-line-vty0-4]user-role network-admin 设置⽤户权限为admin[H3C-line-vty0-4]qu[H3C]local-user admin 创建本地⽤户[H3C-luser-manage-admin]password simple admin@123 创建密码[H3C-luser-manage-admin]service-type telnet 设置⽤户⽤于telnet[H3C-luser-manage-admin]authorization-attribute user-role network-admin 设置权限为admin[H3C]display users 查看登录⽤户[H3C]undo super password 删除密码[H3C-line-aux0]idle-timeout 2 50 设置超时时间为2分50秒,设置为0表⽰不超时[H3C-line-aux0]undo idle-timeout 恢复默认值[H3C-line-vty0]undo set authentication password 取消密码。
一、交换机命令<Quidway>system进入使能模式password:~~~~~~~~~~[Quidway]superpassword修改特权用户密码[Quidway]sysname交换机命名[Quidway]interface ethernet0/1 进入接口视图[Quidway]interface vlanx 进入接口视图[Quidway-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0 [Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 静态路由=网关[Quidway]user-interface vty 0 4[S3026-ui-vty0-4]authentication-mode password[S3026-ui-vty0-4]set authentication-mode password simple 222 [S3026-ui-vty0-4]user privilege level 3[Quidway-Ethernet0/1]duplex{half|full|auto} 配置端口双工工作状态[Quidway-Ethernet0/1]speed {10|100|auto} 配置端口工作速率[Quidway-Ethernet0/1]flow-control配置端口流控[Quidway-Ethernet0/1]mdi{across|auto|normal} 配置端口MDI/MDIX状态平接或扭接[Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} 设置接口工作模式[Quidway-Ethernet0/1]shutdown 关闭/重起接口[Quidway-Ethernet0/2]quit退出系统视图[Quidway]vlan3创建/删除一个VLAN/进入VLAN模式[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 在当前VLAN增加/删除以太网接口[Quidway-Ethernet0/2]port access vlan3 将当前接口加入到指定VLAN[Quidway-Ethernet0/2]port trunk permit vlan{ID|All} 设trunk允许的VLAN[Quidway-Ethernet0/2]port trunk pvid vlan 3 设置trunk 端口的PVID[Quidway]monitor-port <interface_typeinterface_num> 指定和清除镜像端口[Quidway]port mirror <interface_typeinterface_num> 指定和清除被镜像端口[Quidway]port mirror int_list observing-port int_type int_num 指定镜像和被镜像[Quidway]descriptionstring 指定VLAN描述字符[Quidway]description删除VLAN描述字符[Quidway]display vlan[vlan_id] 查看VLAN 设置[Quidway]stp{enable|disable}开启/关闭生成树,默认关闭[Quidway]stp priority4096 设置交换机的优先级[Quidway]stp root{primary|secondary} 设置交换机为根或根的备份[Quidway-Ethernet0/1]stp cost200 设置交换机端口的花费[SwitchA-vlanx]isolate-user-vlanenable 设置主vlan[SwitchA]Isolate-user-vlan <x> secondary <list> 设置主vlan包括的子vlan[Quidway-Ethernet0/2]port hybrid pvid vlan <id> 设置vlan的pvid[Quidway-Ethernet0/2]port hybridpvid 删除vlan的pvid [Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged 设置无标识的vlan如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。
H3C交换机配置命令大全1、system-view 进入系统视图模式2、sysname 为设备命名3、display current-configuration 当前配置情况4、language-mode Chinese|English 中英文切换5、interface Ethernet 1/0/1 进入以太网端口视图6、port link-type Access|Trunk|Hybrid 设置端口访问模式7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、vlan 10 创建VLAN 10并进入VLAN 10的视图模式11、port access vlan 10 在端口模式下将当前端口加入到vlan 10中12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中13、port trunk permit vlan all 允许所有的vlan通过H3C路由器1、system-view 进入系统视图模式2、sysname R1 为设备命名为R13、display ip routing-table 显示当前路由表4、language-mode Chinese|English 中英文切换5、interface Ethernet 0/0 进入以太网端口视图6、ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由11、ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由H3C S3100 SwitchH3C S3600 SwitchH3C MSR 20-20 Router1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置:<H3C>reset save ;<H3C>reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。
1、system-view 进入系统视图模式2、sysname 为设备命名3、display current-configuration 当前配置情况4、 language-mode Chinese|English 中英文切换5、interface Ethernet 1/0/1 进入以太网端口视图6、 port link-type Access|Trunk|Hybrid 设置端口访问模式7、 undo shutdown 打开以太网端口8、 shutdown 关闭以太网端口9、 quit 退出当前视图模式10、 vlan 10 创建VLAN 10并进入VLAN 10的视图模式11、 port access vlan 10 在端口模式下将当前端口加入到vlan 10中12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中13、port trunk permit vlan all 允许所有的vlan通过H3C路由器############################################################################### #######1、system-view 进入系统视图模式2、sysname R1 为设备命名为R13、display ip routing-table 显示当前路由表4、 language-mode Chinese|English 中英文切换5、interface Ethernet 0/0 进入以太网端口视图6、 ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码7、 undo shutdown 打开以太网端口8、 shutdown 关闭以太网端口9、 quit 退出当前视图模式10、 ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由11、 ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由H3C S3100 SwitchH3C S3600 SwitchH3C MSR 20-20 Router############################################################################### ###########1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、 language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置 :<H3C>reset save ;<H3C>reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。
路由器:1、进入SETUP模式Router#setup2、时间设置router#clock set hh:mm:ss date moth year3、 router>show historyRouter>terminal history size lines4、 router#show version5、 router#show running-config6、 router#show starup-config7、 router(config)#hostname name 主机命名8、 router(config)#banner motd # message # 开机时的固定显示信息9、 router(config)#enable password password 特权模式明文密码10、 router(config)#no enable password11、 router(config)#enable secret password 特权模式加密密码12、 router(config)#no enable secret13、 router(config)#service password-encryption特权模式把明文密码加密密码,但没enable secret安全可以反解14、 router(config)#line console控制台密码15、 router(config-line)#login16、 router(config-line)#password password17、 router(config-line)#exec-timeout mm ss 禁止控制台会话自动退出18、 router(config-line)#logging synchronous重显被打乱的控制台输入router(config)#no ip domain-lookup 禁止域名解析19、 router(config)#line vty 0 4虚拟终端密码20、 router(config-line)#login21、 router(config-line)#password password22、 router(config)#interface type number(slot/port)端口设置23、 router(config-if)#ip address ip summast24、 router(config-if)#clock rate 64000〔时钟频率单位为bps,只在DCE端设置〕25、 router(config-if)#bandwith 64(带宽设置,单位为KB)26、 router(config-if)#no shutdown(shutdown)27、 router(config-if )#media-type type(10base) 为以太网端口选择适当的介质类型28、 router(config-if )#ctrl+z保存退出到特权模式29、 router#30、 router>用户模式enable进入router#特权模式config terminal进入router(config)#全局配置模式31、Interface Router(config-if)#端口设置Subinterface Router(config-subif)# 子端口设置Controller Router(config-controller)# 控制口设置Line Router(config-line)# 虚拟口设置Router Router(config-router)# 路由设置IPX router Router(config-ipx-router)#IPX路由设置32、 router#show interface33、 router#show interface Ethernet 034、 router#show interface serial 035、 router#show running-config36、 router#show starup-config37、 router#show flash38、 router#show controller39、 router#show controller interface type40、 router#show running-configrouter#copy running-config starup-configrouter#copy running-config tftprouter#copy starup-config tftprouter#copy flash tftprouter#copy tftp star-configrouter#copy tftp flash--------------------------------------------------------------------------------端口状态Serial1 is up, line protocol is up正常工作Serial1 is up, line protocol is down连接问题Serial1 is down, line protocol is down端口问题Serial1 is administratively down, line protocol is down人为关闭配置存放器的值1、关闭路由器的电源重新启动按住ctrl+break键入进2、>3、>o/r 0×2142(跳过nvarm启动恢复密码)4、>I5、当系统提示是否进入setup模式时,按N6、 router>7、 router>enable8、 router#9、进入修改后〔包括密码、存放器的值:0×2100为rom monitor启动、0×2101为setup 模式启动、0×2102为10、 router#copy running-config starup-config11、 router#reload12、也可以在router#setup进入setup模式静态路由协议设置router(config)#ip route network submask(要到达的网络号掩码)ip address(下一跳或出口ip地址)router(config)#ip route 0.0.0.0 s0〔出口端口或下一跳IP地址〕rip设置router(config)#router riprouter(config-router)#network network-numberrouter#show ip protocol查看RIP信息router#show ip route 查看路由表router#debug ip rip查看RIP更新信息router(config-router)#passive-interface e0(阻止发出作息)router(config-router)#ip rip receive version 1 2接收1、2RIP版本信息igrp设置router(config)#router igrp as numberrouter(config-router)#network network numberrouter#show ip route 查看路由表router#debug ip igrp events 查看IGRP路由更新大概信息router#debug ip igrp transaction 查看IGRP路由更新详细信息Router(config-router)#variance multiplier 控制 IGRP load balancingRouter(config-router)#traffic-share {balanced | min}控制load-balanced traffic 的分布eigrp设置router(config)#router eigrp as numberrouter(config-router)#network network numberrouter(config)#no auto-summry 关闭自动汇总router(config)# auto-summry 打开自动汇总〔默认是打开的〕router#show ip route eigrp 显示当前的路由表里的EIGRP条目router#show ip protocol 显示活动的路由协议进程的参数和当前的状态router#show ip eigrp neighbors 显示被EIGRP发现的邻居router#show ip eigrp traffic 显示发出和收到的IP EIGRP 包的数量router#show ip eigrp topology 显示IP EIGRP的拓扑表Router#debug ip eigrpospf设置1. Router(config)#router ospf process-idRouter(config-router)#network address(可以是网络号也可以是Ip地址 mask〔通配掩码〕area area-idRouter(config-if)# ip ospf priority numbe 配置OSPF的优先级Router#show ip protocols 验证OSPF的配置Router#show ip route 显示路由器学到的所有路由Router#show ip ospf interface type number 显示 area-ID 和邻接信息Router#show ip ospf neighbor 基于每接口显示OSPF邻居信息Router#debug ip ospf eventsRouter#debug ip ospf packet2. Router(config)# interface loopback number〔lookback回路配置〕Router(config-if)# ip address ip-address subnet-maskRouter(config-if)# ip ospf cost cost-numbe 修改OSPF 的Cost数值Router(config-if)# ip ospf authentication-key key 配置明文口令Router(config-if)# ip ospf messge-digest-key keyid md5 key 配置MD5口令(keyid和key必须配对一致,两邻居才可以通信)Router(config-route)# area area-id authentication [message-digest]message-digest为可选项,使用后路由器只传送口令消息的摘要〔或散列〕配置OSPF区域的验证:3. Router(config-if)# ip ospf hello-interval seconds 配置hello间隔:Router(config-if)# ip ospf dead-interval seconds配置down机判断间隔--------------------------------------------------------------------------------访问列表1.标准访问列表(standard access lists):只使用源IP地址来做过滤决定Router(config)#access-list 10 permit anyRouter(config)#int e1Router(config-if)#ip access-group 10 out使用IP标准ACL来控制VTY线路的访问.Router(config)#line vty 0 4Router(config-line)#access-class 50 in删除IP标准ACLRouter(config-line)#no ip access-class 50 inRouter(config)#no access-list 502.扩展访问列表(extended access lists):它比拟源IP地址和目标IP地址,层3的协议字段,层4端口号来做过滤决定Router(config)#access-list 110 deny tcp any host 172.16.30.5 eq 21Router(config)#access-list 110 deny tcp any host 172.16.30.5 eq 23Router(config)#access-list 110 permit ip any anyRouter(config)#int e1Router(config-if)#ip access-group 110 outrouter(config)#line vty 0 4outer(config-line)#access-class 12 in3.show ip interface:只显示IP访问列表信息4.show ip interface:显示所有接口的信息和配置的ACL信息5.show ip interface [接口号]:显示具体某个接口的信息和配置的ACL信息6.show running-config:显示DRAM信息和ACL信息,以与接口对ACL的应用信息. 交换机配置交换机上设置登陆口令Switch(config)# enable password level level passwordSwitch(config)# no enable password level level passwordhostname1900/2900(config)#hostname hostnameIP Address1900(config)#ip address {ip address} {mask}2950(config#interface vlan 12950(config-if)#ip address {ip_address} {mask}2950(config)#interface vlan 1default gateway1900/2950(config)#ip default-gateway {ip address}查看交换机的IP地址1900#show ipManagement VLAN: 12950#show interface vlan 1Vlan1 is up, line protocol is upHardware is Cat5k Virtual Ethernet, address is 0010.f6a9.9800 (bia 0010.f6a9.9800)设置双工选项1900(config)#interface e0/11900(config-if)#duplex {auto | full |full-flow-control | half}2950(config)#interface fe0/12950(config-if)#duplex {auto | full | half}设置端口速度:switch(config-if)# speed {10|100|auto}查勘双工选项Switch#show interfaces fastethernet0/3查看MAC地址表1900/2950#show mac-address-table配置永久MAC地址1900(config)#mac-address-table permanent {mac-address type module/port}1900(config)#mac-address-table permanent 2222.2222.2222 ethernet 0/31900#show mac-address-table2950(config)#mac-address-table static mac_addr {vlan vlan_id} [interface int1 [int2 ... int15]]--------------------------------------------------------------------------------配置受限静态MAC地址1900(config)#mac-address-table restricted static {mac-address type module/port src-if-list}1900(config)#mac-address-table restricted static 1111.1111.1111 e0/4 e0/11900#show mac-address-table2950(config)#mac-address-table secure mac-addr interface [vlan vlan-id]2950(config)#mac-address-table secure 0003.3333.3333 fa 0/1 vlan 12950#show mac-address-table配置端口安全性1900(config-if)#port secure max-mac-count count1900(config)#interface e0/41900(config-if)#port secure1900(config-if)#port secure max-mac-count 11900(config)#address-violation {suspend | disable | ignore1900# show mac-address-table security2950(config-if)#port security max-mac-count count2950(config)#interface fa0/12950(config-if)#port security2950(config-if)#port security max-mac-count 102950(config-if)#port security action {shutdown | trap} 2950#show mac-address-table secure2950#show port-security管理配置文件1900#copy nvram tftp://host/dst_file1900#copy tftp://host/src_file nvram2950#copy startup-config tftp://host/dst_file去除 NVRAM1900#delete nvram2950#erase startup-configvlan配置1900 VLAN建立1900下,使用vlan [vlan#] name [name] [vlan#]命令, 如下: >en#config t(config)#hostname 19001900(config)#vlan 2 name sales1900(config)#vlan 3 name marketing1900(config)#vlan 4 name mis1900(config)#exit端口分配1900(config)#int e0/21900(config-if)#vlan-membership static 21900(config)#int e0/41900(config-if)#vlan-membership static 31900(config)#int e0/51900(config-if)#vlan-membership static 41900(config-if)#exit1900(config)#exitVLAN验证1900#sh vlan2900 VLAN建立在2950下创建VLAN,在特权模式下使用vlan database命令2950#vlan database2950(vlan)#vlan 2 name MarketingVLAN 2 modified:Name: Marketing2950(vlan)#vlan 3 name AccountingVLAN 3 added:Name: Accounting2950(vlan)#applyAPPLY plete2950(vlan)#Ctrl+C2950#端口分配2950下的端口配置,使用switchport access vlan [vlan#]命令, 2950(config-if)#int f0/22950(config-if)#switchport access vlan 22950(config-if)#int f0/32950(config-if)#switchport access vlan 32950(config-if)#int f0/42950(config-if)#switchport access vlan 42950(config-if)#exit2950(config)#exit验证配置信息,如下:2950#sh vlan或2950#sh vlan brieftrunk配置1900 trunk配置1900(config)#int f0/261900(config-if)#trunk on2950下在接口配置模式,使用switchport命令,如下:2950(config)#int f0/122950(config-if)#switchport mode trunk2950(config-if)# switchport trunk encapsulation {isl|dot1q}2950(config-if)#^Z将某VLAN从中继中删除2950(config-if)# switchport trunk allowed vlan remove vlan-list添加某个VLAN到中继线路2950(config-if)# switchport trunk allowed vlan add vlan-listConfiguring Inter-VLAN Routing给连接1900的trunk端口配置,使用encapsulation isl [vlan#]命令,如下:2600Router(config-subif)#encapsulation isl [vlan#]2600Router(config-subif)#ip add ip add submask给连接2950的这样配置,如下:2600Router(config-subif)#encapsulation dot1q [vlan#]2600Router(config-subif)#ip add ip add submask--------------------------------------------------------------------------------VTP配置1900(config)#vtp server1900(config)#vtp domain noco1900(config)#vtp password noko在特权模式下使用show vtp命令验证,如下:1900#sh vtpVTP version: 1Configuration revision: 0Maximum VLANs supported locally: 1005Number of existing VLANs: 5VTP domain name: nocoVTP password: nokoVTP operating mode: Server2950如下:2950(config)#vtp mode server2950(config)#vtp domain noco验证信息,如下:2950#sh vtp ?counters VTP statisticsstatus VTP domain status2950#sh vtp statusNAT配置配置静态转换Router(config)#ip nat inside source static local-ip global-ipRouter(config-if)#ip nat insideRouter(config-if)#ip nat outside配置动态地址转换Router(config)#ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length}Router(config)#access-list access-list-number permit source [source-wildcard]Router(config)#ip nat inside source listaccess-list-number pool name配置OverloadingRouter(config)#access-list access-list-number permitsource source-wildcardRouter(config)#ip nat inside source listaccess-list-number interface interface overload去除NAT Translation TableRouter#clear ip nat translation * 去除所有的动态地址转换条目Router#clear ip nat translation inside global-iplocal-ip [outside local-ip global-ip] 去除一个简单的动态地址转换条目〔、外〕Router#clear ip nat translation outsidelocal-ip global-ip去除一个简单的动态地址转换〔外〕Router#clear ip nat translation protocol inside global-ipglobal-port local-ip local-port [outside local-iplocal-port global-ip global-port] 去除一个扩展动态地址转换条目Show命令输出信息Router#show ip nat translations------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------交换机:1.在基于IOS的交换机上设置主机名/系统名:switch(config)# hostname hostname在基于CLI的交换机上设置主机名/系统名:switch(enable) set system name name-string2.在基于IOS的交换机上设置登录口令:switch(config)# enable password level 1 password在基于CLI的交换机上设置登录口令:switch(enable) set passwordswitch(enable) set enalbepass3.在基于IOS的交换机上设置远程访问:switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-address在基于CLI的交换机上设置远程访问:switch(enable) set interface sc0 ip-address netmask broadcast-addressswitch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.在基于IOS的交换机上启用和浏览CDP信息:switch(config-if)# cdp enableswitch(config-if)# no cdp enable为了查看Cisco邻接设备的CDP通告信息:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail]在基于CLI的交换机上启用和浏览CDP信息:switch(enable) set cdp {enable|disable} module/port为了查看Cisco邻接设备的CDP通告信息:switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 5.基于IOS的交换机的端口描述:switch(config-if)# de脚本ion de脚本ion-string基于CLI的交换机的端口描述:switch(enable)set port name module/number de脚本ion-string6.在基于IOS的交换机上设置端口速度:switch(config-if)# speed{10|100|auto}在基于CLI的交换机上设置端口速度:switch(enable) set port speed moudle/number {10|100|auto}switch(enable) set port speed moudle/number {4|16|auto}7.在基于IOS的交换机上设置以太网的链路模式:switch(config-if)# duplex {auto|full|half}在基于CLI的交换机上设置以太网的链路模式:switch(enable) set port duplex module/number {full|half}8.在基于IOS的交换机上配置静态VLAN:switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)# interface interface module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# end在基于CLI的交换机上配置静态VLAN:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list9. 在基于IOS的交换机上配置VLAN中继线:switch(config)# interface interface mod/portswitch(config-if)# switchport mode trunkswitch(config-if)# switchport trunk encapsulation {isl|dotlq}switch(config-if)# switchport trunk allowed vlan remove vlan-listswitch(config-if)# switchport trunk allowed vlan add vlan-list在基于CLI的交换机上配置VLAN中继线:switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate]Vlan-range [isl|dotlq|dotl0|lane|negotiate]--------------------------------------------------------------------------------10.在基于IOS的交换机上配置VTP管理域:switch# vlan databaseswitch(vlan)# vtp domain domain-name在基于CLI的交换机上配置VTP管理域:switch(enable) set vtp [domain domain-name]11.在基于IOS的交换机上配置VTP 模式:switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password password在基于CLI的交换机上配置VTP 模式:switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password]12. 在基于IOS的交换机上配置VTP版本:switch# vlan databaseswitch(vlan)# vtp v2-mode在基于CLI的交换机上配置VTP版本:switch(enable) set vtp v2 enable13. 在基于IOS的交换机上启动VTP剪裁:switch# vlan databaseswitch(vlan)# vtp pruning在基于CL I 的交换机上启动VTP剪裁:switch(enable) set vtp pruning enable14.在基于IOS的交换机上配置以太信道:switch(config-if)# port group group-number [distribution {source|destination}] 在基于CLI的交换机上配置以太信道:switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto}--------------------------------------------------------------------------------15.在基于IOS的交换机上调整根路径本钱:switch(config-if)# spanning-tree [vlan vlan-list] cost cost在基于CLI的交换机上调整根路径本钱:switch(enable) set spantree portcost moudle/port costswitch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list]16.在基于IOS的交换机上调整端口ID:switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority在基于CLI的交换机上调整端口ID:switch(enable) set spantree portpri {mldule/port}priorityswitch(enable) set spantree portvlanpri {module/port}priority [vlans]17. 在基于IOS的交换机上修改STP时钟:switch(config)# spanning-tree [vlan vlan-list] hello-time secondsswitch(config)# spanning-tree [vlan vlan-list] forward-time secondsswitch(config)# spanning-tree [vlan vlan-list] max-age seconds在基于CLI的交换机上修改STP时钟:switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征:switch(config-if)#spanning-tree portfast在基于CLI的交换机端口上启用或禁用Port Fast 特征:switch(enable) set spantree portfast {module/port}{enable|disable}19. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征:switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]在基于CLI的交换机端口上启用或禁用UplinkFast 特征:switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]--------------------------------------------------------------------------------20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用如下命令: switch(config)# cluster enable cluster-name cv21. 为了从一条中继链路上删除VLAN,可使用如下命令:switch(enable) clear trunk module/port vlan-range22. 用show vtp domain 显示管理域的VTP参数.23. 用show vtp statistics显示管理域的VTP参数.24. 在Catalyst交换机上定义TrBRF的命令如下:switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}]--------------------------------------------------------------------------------25. 在Catalyst交换机上定义TrCRF的命令如下:switch (enable) set vlan vlan-num [name name] type trcrf{ring hex-ring-num|decring decimal-ring-num} parent vlan-num26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:switch(enable) set vlan vlan-num mod-num/port-num27. 命令show spantree显示一个交换机端口的STP状态.28. 配置一个ELAN的LES和BUS,可以使用如下命令:ATM (config)# interface atm number.subint multiointATM(config-subif)# lane serber-bus ethernet elan-name29. 配置LECS:ATM(config)# lane database database-nameATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-addressATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-addressATM(lane-config-databade)# name …--------------------------------------------------------------------------------30. 创建完数据库后,必须在主接口上启动LECS.命令如下:ATM(config)# interface atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的ATM子接口上.命令如下:ATM(config)# interface atm number.subint multipointATM(config)# lane client ethernet vlan-num elan-num32. 用show lane server 显示LES的状态.33. 用show lane bus显示bus的状态.34. 用show lane database显示LECS数据库可容.35. 用show lane client显示LEC的状态.36. 用show module显示已安装的模块列表.37. 用物理接口建立与VLAN的连接:router# configure terminalrouter(config)# interface media module/portrouter(config-if)# de脚本ion de脚本ion-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接:router(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接:router(config)# interface atm module/portrouter(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/port.subinterface multipointrouter(config-if)# ip address ip-address subnet-namerouter(config-if)# lane client ethernet elan-namerouter(config-if)# …--------------------------------------------------------------------------------40. 为了在路由处理器上进展动态路由配置,可以用如下IOS命令来进展:router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-numberrouter(config-router)# network ip-network-number 〔FengNet.〕41. 配置默认路由:switch(enable) set ip route default gateway42. 为一个路由处理器分配VLANID,可在接口模式下使用如下命令:router(config)# interface interface numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP:router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:router(config)# interface interface numberrouter(config-if)# mls rp vtp-domain domain-name45. 查看指定的VTP域的信息:router# show mls rp vtp-domain vtp domain name46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入如下命令:router(config-if)#mls rp management-interface47. 要检验MLS-RP的配置情况:router# show mls rp48. 检验特定接口上的MLS配置:router# show mls rp interface interface number49. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:set mls flow [destination|destination-source|full]50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用如下命令:router(config)# mls rp ip input-acl--------------------------------------------------------------------------------51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输入如下命令:switch(enable) set mls enable52. 假如想改变老化时间的值,可在特权模式下输入以下命令:switch(enable) set mls agingtime agingtime53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtime pkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的容再确定:switch(enable) show mls include55. 显示MLS高速缓存记录:switch(enable) show mls entry56. 用命令show in arp显示ARP高速缓存区的容。
H3C路由器配置命令表H3C路由器配置命令表1·路由器基本配置命令1·1 接口配置命令●interface <interface_name>: 进入接口配置模式●ip address <ip_address> <subnet_mask>: 设置接口IP地质和子网掩码●description <description>: 给接口添加描述信息1·2 路由配置命令●ip route <destination_network> <subnet_mask> <next_hop>: 配置路由●ip default-gateway <default-gateway_address>: 配置默认网关●ip routing: 开启路由功能1·3 主机名与域名配置命令●hostname <hostname>: 设置路由器主机名●domn-name <domn_name>: 设置路由器域名●enable password <password>: 设置访问特权模式的密码●line vty 0 4、进入VTY线路配置模式●login: 启用登录验证●password <password>: 设置VTP登录密码●exit: 退出线路配置模式2·协议配置命令2·1 静态路由配置命令●ip route-static <destination_network><subnet_mask> <next_hop>: 配置静态路由2·2 动态路由配置命令●router rip: 进入RIP路由配置模式●network <network_address>: 配置本地网络●router ospf <process_id>: 进入OSPF路由配置模式●network <network_address> <subnet_mask> area <area_id>: 配置本地网络●router bgp <AS_number>: 进入BGP路由配置模式●network <network_address> mask<subnet_mask>: 配置本地网络●neighbor <neighbor_address> remote-as<AS_number>: 配置BGP邻居3·安全配置命令3·1 访问控制列表(ACL)配置命令●access-list <acl_number> {permit ---●deny} <protocol> <source_ip> <destination_ip>: 配置ACL规则●interface <interface_name>●inbound----outbound ip access-group<acl_number>: 将ACL应用于接口的进或出方向3·2 密码和认证配置命令●enable secret <password>: 设置特权模式密码●username <username> password <password>: 创建本地用户名和密码4·网络地质转换(NAT)配置命令4·1 静态NAT配置命令●interface <inside_interface>●nat static <inside_local_ip><outside_global_ip>4·2 动态NAT配置命令●interface <inside_interface>●nat dynamic <outside_interface>5·本地管理配置命令5·1 SSH配置命令●rsa local-key-pr create: RSA密钥对●ssh server enable: 启用SSH服务器●ssh user <username> authentication-type password: 设置SSH用户身份验证方式为密码●user-interface vty 0 4、进入VTY用户界面配置模式●authentication-mode aaa: 设置认证模式为AAA●protocol inbound ssh: 允许SSH访问5·2 SNMP配置命令●snmp-agent sys-info version <version>: 设置SNMP版本●snmp-agent community read <community_name>: 配置SNMP读社区字符串附件:本文档不涉及附件。
H3C路由器命令汇总H3C路由器命令汇总1、前言1.1 目的1.2 背景1.3 范围2、连接与访问控制2.1 登录与退出2.1.1 登录路由器2.1.2 退出路由器2.2 管理用户2.2.1 创建用户2.2.2 删除用户2.2.3 修改用户权限2.3 访问控制列表2.3.1 创建访问控制列表2.3.2 应用访问控制列表3、路由配置3.1 静态路由3.1.1 添加静态路由3.1.2 删除静态路由3.2 动态路由3.2.1 配置动态路由协议3.2.2 配置路由策略4、网络地质转换(NAT)4.1 配置源地质转换4.1.1 单一地质转换4.1.2 地质池转换4.2 配置目的地质转换5、路由器接口配置5.1 基本接口配置5.1.1 配置接口IP地质 5.1.2 开启接口5.1.3 关闭接口5.1.4 配置接口带宽5.2 VLAN配置5.2.1 配置VLAN5.2.2 添加接口到VLAN 5.3 二层链路聚合5.3.1 配置聚合接口5.3.2 添加成员接口6、安全配置6.1 访问控制6.1.1 配置防火墙6.1.2 配置安全策略6.2 安全漏洞防护6.2.1 配置DDoS防护6.2.2 配置ARP防护7、IP服务配置7.1 DHCP服务7.1.1 配置DHCP服务器7.1.2 配置DHCP客户端7.2 DNS服务7.2.1 配置DNS服务器7.2.2 配置DNS解析8、系统管理8.1 系统时间配置8.1.1 配置时间8.1.2 配置时区8.2 系统日志8.2.1 配置日志级别8.2.2 查看日志9、附件附注:1、路由器:指H3C生产的网络路由器设备,用于路由器命令的执行和配置管理。
2、访问控制列表:一种机制,用于控制网络数据包的流向和访问权限。
3、静态路由:手动配置的网络路由规则。
4、动态路由:根据网络拓扑和路由协议自动学习和更新的路由规则。
5、NAT:网络地质转换,用于将内部网络私有IP地质转换为公共IP地质。
H3C路由器交换机配置命令H3C路由器交换机配置命令大全H3C路由器交换机怎么配置?配置命令有哪些?下面一起来看看最新H3C路由器交换机配置命令详解吧!交换机命令[Quidway]super password ;修改特权用户密码[Quidway]sysname ;交换机命名[Quidway]interface ethernet 0/1 ;进入接口视图[Quidway]interface vlan x ;进入接口视图[Quidway-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0 ;配置VLAN的IP地址[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 ;静态路由=网关[Quidway]user-interface vty 0 4 ;进入虚拟终端[S3026-ui-vty0-4]authentication-mode password ;设置口令模式[S3026-ui-vty0-4]set authentication-mode password simple 222 ;设置口令[S3026-ui-vty0-4]user privilege level 3 ;用户级别[Quidway-Ethernet0/1]duplex {half|full|auto} ;配置端口工作状态[Quidway-Ethernet0/1]speed {10|100|auto} ;配置端口工作速率[Quidway-Ethernet0/1]flow-control ;配置端口流控[Quidway-Ethernet0/1]mdi {across|auto|normal} ;配置端口平接扭接[Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} ;设置端口工作模式[Quidway-Ethernet0/1]undo shutdown ;激活端口[Quidway-Ethernet0/2]quit ;退出系统视图[Quidway]vlan 3 ;创建VLAN[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 ;在VLAN中增加端口[Quidway-Ethernet0/2]port access vlan 3 ;当前端口加入到VLAN[Quidway-Ethernet0/2]port trunk permit vlan {ID|All} ;设trunk允许的VLAN[Quidway-Ethernet0/2]port trunk pvid vlan 3 ;设置trunk端口的PVID[Quidway]monitor-port ;指定镜像端口[Quidway]port mirror ;指定被镜像端口[Quidway]port mirror int_list observing-port int_type int_num ;指定镜像和被镜像[Quidway]description string ;指定VLAN描述字符[Quidway]description ;删除VLAN描述字符[Quidway]display vlan [vlan_id] ;查看VLAN设置[Quidway]stp {enable|disable} ;设置生成树,默认关闭[Quidway]stp priority 4096 ;设置交换机的优先级[Quidway]stp root {primary|secondary} ;设置为根或根的备份[Quidway-Ethernet0/1]stp cost 200 ;设置交换机端口的花费[SwitchA-vlanx]isolate-user-vlan enable ;设置主vlan[SwitchA]Isolate-user-vlan secondary ;设置主vlan 包括的'子vlan[Quidway-Ethernet0/2]port hybrid pvid vlan ;设置vlan的pvid[Quidway-Ethernet0/2]port hybrid pvid ;删除vlan的pvid[Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged ;设置无标识的vlan如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。
华为路由器交换机配置命令计算机命令PCAlogin:root;使用root用户password:linux;口令是linux#shutdown-hnow;关机#init0;关机#logout;用户注销#login;用户登录#ifconfig;显示IP地址#ifconfigeth0netmask;设置IP地址#ifconfigeht0netmaskdown;禁用IP地址#routeadd0.0.0.0gw;设置网关#routedel0.0.0.0gw;删除网关#routeadddefaultgw;设置网关#routedeldefaultgw;删除网关#route;显示网关#ping;发ECHO包#telnet;远程登录华为路由器交换机配置命令:交换机命令[Quidway]discur;显示当前配置[Quidway]displaycurrent-configuration;显示当前配置[Quidway]displayinterfaces;显示接口信息[Quidway]displayvlanall;显示路由信息[Quidway]displayversion;显示版本信息[Quidway]superpassword;修改特权用户密码[Quidway]sysname;交换机命名[Quidway]interfaceethernet0/1;进入接口视图[Quidway]interfacevlanx;进入接口视图[Quidway-Vlan-interfacex]ipaddress10.65.1.1255.255.0.0;配置VLAN的IP地址[Quidway]iproute-static0.0.0.00.0.0.010.65.1.2;静态路由=网关[Quidway]rip;三层交换支持[Quidway]local-userftp[Quidway]user-interfacevty04;进入虚拟终端[S3026-ui-vty0-4]authentication-modepassword;设置口令模式[S3026-ui-vty0-4]setauthentication-modepasswordsimple222;设置口令[S3026-ui-vty0-4]userprivilegelevel3;用户级别[Quidway]interfaceethernet0/1;进入端口模式[Quidway]inte0/1;进入端口模式[Quidway-Ethernet0/1]duplex{half|full|auto};配置端口工作状态[Quidway-Ethernet0/1]speed{10|100|auto};配置端口工作速率[Quidway-Ethernet0/1]flow-control;配置端口流控[Quidway-Ethernet0/1]mdi{across|auto|normal};配置端口平接扭接[Quidway-Ethernet0/1]portlink-type{trunk|access|hybrid};设置端口工作模式[Quidway-Ethernet0/1]portaccessvlan3;当前端口加入到VLAN[Quidway-Ethernet0/2]porttrunkpermitvlan{ID|All};设trunk允许的VLAN[Quidway-Ethernet0/3]porttrunkpvidvlan3;设置trunk端口的PVID[Quidway-Ethernet0/1]undoshutdown;激活端口[Quidway-Ethernet0/1]shutdown;关闭端口[Quidway-Ethernet0/1]quit;返回[Quidway]vlan3;创建VLAN[Quidway-vlan3]portethernet0/1;在VLAN中增加端口[Quidway-vlan3]porte0/1;简写方式[Quidway-vlan3]portethernet0/1toethernet0/4;在VLAN中增加端口[Quidway-vlan3]porte0/1toe0/4;简写方式[Quidway]monitor-port;指定镜像端口[Quidway]portmirror;指定被镜像端口[Quidway]portmirrorint_listobserving-portint_typeint_num;指定镜像和被镜像[Quidway]descriptionstring;指定VLAN描述字符[Quidway]description;删除VLAN描述字符[Quidway]displayvlan[vlan_id];查看VLAN设置[Quidway]stp{enable|disable};设置生成树,默认关闭[Quidway]stppriority4096;设置交换机的优先级[Quidway]stproot{primary|secondary};设置为根或根的备份[Quidway-Ethernet0/1]stpcost200;设置交换机端口的花费[Quidway]link-aggregatione0/1toe0/4ingress|both;端口的聚合[Quidway]undolink-aggregatione0/1|all;始端口为通道号[SwitchA-vlanx]isolate-user-vlanenable;设置主vlan[SwitchA]isolate-user-vlansecondary;设置主vlan包括的子vlan[Quidway-Ethernet0/2]porthybridpvidvlan;设置vlan的pvid[Quidway-Ethernet0/2]porthybridpvid;删除vlan的pvid[Quidway-Ethernet0/2]porthybridvlanvlan_id_listuntagged;设置无标识的vlan 如果包的vlanid与PVId一致,则去掉vlan信息.默认PVID=1。
交换机数据:寿春路营业厅的数据配置1:先连接交换机确认进入交换机内。
~~进入交换机输入:sys命令进入配置界面2:在用discur显示里面当前的所有数据3:地址段的换算,如 10.242.6.16/28 的ip和子网掩码的地址算法1)先用32-28=42)在用2进制得。
2的4次方=163)在用斜线前面的16+16-2(去掉网络不识别的全0和全1)=30 就得IP地址为 10.242.6.304)在用256-(2的4次方)得240 子网掩码为255.255.255.2405)网关是移动定好的,直接输入: ping 10.242.6.176)VLAN就直接替换成20394:在save保存数据5:ping 网关状态看是不是pi ng通。
(~~如果有rep lay from 10.242.6.17.80:bytes=32 time=<1ms ttl=1 之类的数字就是配通了。
)(~~如果出现re quest timedout 就说明没有通,检查数据和光路有没有通)例如:寿春路营业厅的数据配置需要的数据都在exl表里对照一下配数据sys#sysnam e ShouCh unLuY ingYe Ting#loopba ck-detect ion enable#radius scheme system#domain system#local-user ahydpasswo rd simple ahydservic e-type telnetlevel2#vlan 1#vlan 2039 (2039是v l an号在编辑里面全部替换成当前要配置的v lan号就可以了)#manage ment-vlan 2039#interf ace Vlan-interf ace2039ip addres s 10.242.6.30 255.255.255.240 (前面的四位进制是IP地址和后面是四位进制是子网掩码)#interf ace Aux1/0/0#interf ace Ethern et1/0/1poe enable(poe enable说明交换机端口状态是打开的,属正常状态)port access vlan 2039loopba ck-detect ion enable#interf ace Ethern et1/0/2poe enableport access vlan 2039loopba ck-detect ion enable#interf ace Ethern et1/0/3poe enableport access vlan 2039loopba ck-detect ion enable#interf ace Ethern et1/0/4poe enableport access vlan 2039loopba ck-detect ion enable#interf ace Ethern et1/0/5poe enableport access vlan 2039loopba ck-detect ion enable#interf ace Ethern et1/0/6poe enableport access vlan 2039loopba ck-detect ion enable#interf ace Ethern et1/0/7poe enableport access vlan 2039loopba ck-detect ion enable#interf ace Ethern et1/0/8poe enableport access vlan 2039loopba ck-detect ion enable#interf ace Gigabi tEthe rnet1/1/1shutdo wnport access vlan 2039#interf ace Gigabi tEthe rnet1/1/2undo shutdo wnport access vlan 2039#interf ace NULL0#manage ment-vlan 2039#ip route-static 0.0.0.0 0.0.0.0 10.242.6.17 prefer ence60 (10.242.7.17是网关)#user-interf ace aux 0user-interf ace vty 0user privil ege level2set authen ticat ion passwo rd simple ahydprotoc ol inboun d telnetuser-interf ace vty 1 4#。
华三交换机-路由器配置命令
华三交换机-路由器配置命令
第一章:登录华三交换机-路由器
1. 使用浏览器登录:
a. 打开浏览器;
b. 在地址栏中输入交换机-路由器的IP地址;
c. 输入正确的用户名和密码;
d. 单击登录按钮。
2. 使用命令行登录:
a. 打开命令提示符或终端窗口;
b. 输入telnet或ssh命令,后跟交换机-路由器的IP地址;
c. 输入正确的用户名和密码;
d. 按下回车键登录。
第二章:基本配置
1. 设置主机名:
hostname [主机名]
2. 设置登录密码:
enable password [密码]
3. 配置管理接口:
interface [接口]
ip address [IP地址] [子网掩码] 4. 配置默认网关:
ip default-gateway [默认网关]
第三章:VLAN(虚拟局域网)配置
1. 创建VLAN:
vlan [VLAN号]
name [VLAN名称]
2. 配置端口―VLAN关联:
interface [端口]
switchport mode access
switchport access vlan [VLAN号] 3. 配置交换机端口为Trunk口:
interface [端口]
switchport mode trunk
第四章:路由配置
1. 静态路由配置:
ip route [目标网络] [目标子网掩码] [下一跳IP地址] 2. OSPF(开放最短路径优先)配置:
router ospf [进程号]
network [网络地址] [通配符] area [区域号]
3. BGP(边界网关协议)配置:
router bgp [自治系统号]
neighbor [对等体IP地址] remote-as [对等体自治系统号]第五章:安全配置
1. 配置SSH(安全外壳协议):
crypto key generate rsa
ip ssh server enable
2. 配置访问控制列表(ACL):
ip access-list [ACL名称]
permit/deny [源IP地址] [目标IP地址] [协议]
第六章:性能优化配置
1. 配置端口速率限制:
interface [端口]
bandwidth [带宽]
2. 配置端口链路聚合(LACP):
interface port-channel [聚合组号]
channel-group [组号] mode active
3. 配置端口流量控制:
interface [端口]
storm-control [选项]
附件:本文档涉及的附件可在[link]。
法律名词及注释:
1. VLAN:虚拟局域网,是通过交换机将一个物理局域网划分为多个逻辑上独立的局域网。
2. IP地址:Internet协议地址,用于唯一标识网络设备。
3. 子网掩码:用于划分IP地址中网络部分和主机部分的标识符。
4. 默认网关:在网络通信中,当主机需要与其他网络通信时,将数据包发送到默认网关,由默认网关进行转发。
5. OSPF:开放最短路径优先,用于在自治系统内部动态选择路由的一种计算路径的算法。
6. BGP:边界网关协议,用于在自治系统之间交换路由信息的一种外部网关协议。
7. SSH:安全外壳协议,用于通过网络对远程计算机进行安全登录和执行命令。
8. ACL:访问控制列表,用于限制网络流量的配置。
9. LACP:端口链路聚合协议,用于将多个物理链路汇聚成一个逻辑链路,提高链路带宽和冗余性。
10. 端口速率限制:限制交换机端口的数据传输速率。
11. 端口流量控制:控制交换机端口的传入或传出流量的阈值。