交换机命令
~~~~~~~~~~
[Quidway]discur
[Quidway]displaycurrent-configuration
[Quidway]displayinterfaces
[Quidway]display vlanall
[Quidway]displayversion
[Quidway]superpassword
[Quidway]sysname
[Quidway]interface ethernet0/1
[Quidway]interface vlanx
[Quidway-Vlan-interfacex]ip address 10.65.1.1255.255.0.0
[Quidway]ip route-static 0.0.0.0 0.0.0.010.65.1.2
[Quidway]rip
[Quidway]local-user ftp
[Quidway]user-interface vty 04
[S3026-ui-vty0-4]authentication-modepassword
[S3026-ui-vty0-4]set authentication-mode password simple 222;设置口令
[S3026-ui-vty0-4]user privilege level3
[Quidway]interface ethernet0/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]port link-type {trunk|access|hybrid};设置端口工作模式
[Quidway-Ethernet0/1]port access vlan3
[Quidway-Ethernet0/2]port trunk permit vlan{ID|All}
[Quidway-Ethernet0/3]port trunk pvid vlan3
[Quidway-Ethernet0/1]undoshutdown
[Quidway-Ethernet0/1]shutdown
[Quidway-Ethernet0/1]quit
[Quidway]vlan3
[Quidway-vlan3]port ethernet 0/1
[Quidway-vlan3]porte0/1
[Quidway-vlan3]port ethernet 0/1 to ethernet0/4
[Quidway-vlan3]port e0/1 toe0/4
[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
[Quidway]description
[Quidway]display vlan[vlan_id]
[Quidway]stp{enable|disable}
[Quidway]stp priority4096
[Quidway]stp root{primary|secondary}
[Quidway-Ethernet0/1]stp cost200
[Quidway]link-aggregation e0/1 to e0/4ingress|both
[Quidway]undo link-aggregatione0/1|all
[SwitchA-vlanx]isolate-user-vlanenable
[SwitchA]isolate-user-vlan <x> secondary<list>
[Quidway-Ethernet0/2]port hybrid pvid vlan<id>
[Quidway-Ethernet0/2]port hybridpvid
[Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged ;设置无标识的vlan
如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。
所以设置PVID为所属vlan id, 设置可以互通的vlan为untagged.
----------------------------------------
路由器命令
~~~~~~~~~~
[Quidway]displayversion
[Quidway]displaycurrent-configuration
[Quidway]displayinterfaces
[Quidway]display iproute
[Quidway]sysnameaabbcc
[Quidway]super passwrod123456
[Quidway]interfaceserial0
[Quidway-serial0]ip address <ip> <mask|mask_len> ;配置端口IP地址
[Quidway-serial0]undoshutdown
[Quidway]link-protocolhdlc
[Quidway]user-interface vty 0 4
[Quidway-ui-vty0-4]authentication-mode password
[Quidway-ui-vty0-4]set authentication-mode password simple222
[Quidway-ui-vty0-4]user privilege level 3
[Quidway-ui-vty0-4]quit
[Quidway]debugging hdlc allserial0
[Quidway]debugging hdlc eventserial0
[Quidway]debugging hdlc packetserial0
静态路由:
[Quidway]ip route-static <ip><mask>{interfacenumber|nexthop}[value][reject|blackhole]
例如:
[Quidway]ip route-static 129.1.0.0 16 10.0.0.2
[Quidway]ip route-static 129.1.0.0 255.255.0.0 10.0.0.2
[Quidway]ip route-static 129.1.0.0 16 Serial 2
[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.0.0.2
动态路由:
[Quidway]rip
[Quidway]ripwork
[Quidway]ripinput
[Quidway]ripoutput
[Quidway-rip]network1.0.0.0
[Quidway-rip]networkall
[Quidway-rip]peerip-address
[Quidway-rip]summary
[Quidway]rip version1
[Quidway]rip version 2multicast
[Quidway-Ethernet0]ripsplit-horizon
[Quidway]router idA.B.C.D
[Quidway]ospfenable
[Quidway-ospf]import-routedirect
[Quidway-Serial0]ospf enable area<area_id>
标准访问列表命令格式如下:
acl <acl-number> [match-orderconfig|auto]
rule [normal|special]{permit|deny} [source source-addrsource-wildcard|any]
例:
[Quidway]acl 10
[Quidway-acl-10]rule normal permit source 10.0.0.0 0.0.0.255
[Quidway-acl-10]rule normal deny source any
扩展访问控制列表配置命令
配置TCP/UDP协议的扩展访问列表:
rule {normal|special}{permit|deny}{tcp|udp}source {<ipwild>|any}destination <ip wild>|any}
[operate]
配置ICMP协议的扩展访问列表:
rule {normal|special}{permit|deny}icmp source {<ipwild>|any]destination {<ip wild>|any]
[icmp-code] [logging]
扩展访问控制列表操作符的含义
equalportnumber
greater-thanportnumber
less-thanportnumber
not-equalportnumber
range portnumber1portnumber2
扩展访问控制列表举例
[Quidway]acl 101
[Quidway-acl-101]rule deny souce any destination any
[Quidway-acl-101]rule permit icmp source any destination anyicmp-type echo
[Quidway-acl-101]rule permit icmp source any destination anyicmp-type echo-reply
[Quidway]acl 102
[Quidway-acl-102]rule permit ip source 10.0.0.1 0.0.0.0 destination202.0.0.1 0.0.0.0
[Quidway-acl-102]rule deny ip source any destination any
[Quidway]acl 103
[Quidway-acl-103]rule permit tcp source any destination 10.0.0.10.0.0.0 destination-port equal ftp
[Quidway-acl-103]rule permit tcp source any destination 10.0.0.20.0.0.0 destination-port equal www
[Quidway]firewall enable
[Quidway]firewall default permit|deny
[Quidway]int e0
[Quidway-Ethernet0]firewall packet-filter 101 inbound|outbound
地址转换配置举例
[Quidway]firewall enable
[Quidway]firewall default permit
[Quidway]acl101
[Quidway-acl-101]rule deny ip source any destination any
[Quidway-acl-101]rule permit ip source 129.38.1.1 0 destinationany
[Quidway-acl-101]rule permit ip source 129.38.1.2 0 destinationany
[Quidway-acl-101]rule permit ip source 129.38.1.3 0 destinationany
[Quidway-acl-101]rule permit ip source 129.38.1.4 0 destinationany
[Quidway-acl-101]quit
[Quidway]int e0
[Quidway-Ethernet0]firewall packet-filter 101 inbound
[Quidway]acl102
[Quidway-acl-102]rule deny ip source any destination any
[Quidway-acl-102]rule permit tcp source 202.39.2.3 0 destination202.38.160.1 0
[Quidway-acl-102]rule permit tcp source any destination202.38.160.1 0 destination-port great-than
1024
[Quidway-acl-102]quit
[Quidway]int s0
[Quidway-Serial0]firewall packet-filter 102inbound
[Quidway-Serial0]nat outbound 101interface
内部服务器地址转换配置命令(静态nat):
nat server global <ip> [port] inside <ip> port[protocol]
[Quidway-Serial0]nat server global 202.38.160.1 inside 129.38.1.1ftp tcp
[Quidway-Serial0]nat server global 202.38.160.1 inside 129.38.1.2telnet tcp
[Quidway-Serial0]nat server global 202.38.160.1 inside 129.38.1.3www tcp
设有公网IP:202.38.160.101~202.38.160.103可以使用。
[Quidway]nat address-group 202.38.160.101 202.38.160.103pool1
[Quidway]acl 1
[Quidway-acl-1]rule permit source 10.110.10.00.0.0.255
[Quidway-acl-1]rule deny source any
[Quidway-acl-1]int serial 0
[Quidway-Serial0]nat outbound 1 address-grouppool1
[Quidway-Serial0]nat server global 202.38.160.101 inside10.110.10.1 ftp tcp
[Quidway-Serial0]nat server global 202.38.160.102 inside10.110.10.2 www tcp
[Quidway-Serial0]nat server global 202.38.160.102 8080 inside10.110.10.3 www tcp
[Quidway-Serial0]nat server global 202.38.160.103 inside10.110.10.4 smtp udp
PPP设置:
[Quidway-s0]link-protocolppp
PPP验证:
主验方:pap|chap
[Quidway]local-user q2 password {simple|cipher}hello
[Quidway]interface serial 0
[Quidway-serial0]ppp authentication-mode {pap|chap}
[Quidway-serial0]ppp chap userq1
pap被验方:
[Quidway]interface serial0
[Quidway-serial0]ppp pap local-user q2 password {simple|cipher}hello
chap被验方:
[Quidway]interface serial0
[Quidway-serial0]ppp chap userq2
[Quidway-serial0]local-user q1 password {simple|cipher} hello;对方路由器名
帧中继frame-relay
[q1]fr switching
[q1]int s1
[q1-Serial1]ip address 192.168.34.51 255.255.255.0
[q1-Serial1]link-protocolfr
[q1-Serial1]fr interface-type dce
[q1-Serial1]fr dlci 100
[q1-Serial1]fr inarp
[q1-Serial1]fr map ip 192.168.34.52 dlci 100
[q2]int s1
[q2-Serial1]ip address 192.168.34.52 255.255.255.0
[q2-Serial1]link-protocol fr
[q2-Serial1]fr interface-type dte
[q2-Serial1]fr dlci 100
[q2-Serial1]fr inarp
[q2-Serial1]fr map ip 192.168.34.51 dlci 100
帧中继监测
[q1]display fr lmi-info[]interface type number]
[q1]display fr map
[q1]display fr pvc-info[serial interface-number][dlcidlci-number]
[q1]display fr dlci-switch
[q1]display fr interface
[q1]reset fr inarp-info
[q1]debugging fr all[interface type number]
[q1]debugging fr arp[interface type number]
[q1]debugging fr event[interface type number]
[q1]debugging fr lmi[interface type number]
启动ftp服务:
[Quidway]local-user ftp password {simple|cipher} aaa service-typeftp
[Quidway]ftp server enable
版权说明:如非注明,本站文章均为 扬州驻场服务-网络设备调试-监控维修-南京泽同信息科技有限公司 原创,转载请注明出处和附带本文链接。
请在这里放置你的在线分享代码