h3c路由命令 下载本文

内容发布更新时间 : 2024/12/22 1:47:24星期一 下面是文章的全部内容请认真阅读。

[Quidway]display

version 显示版本信息

[Quidway]display current-configuration 显示当前配置 [Quidway]display

interfaces 显示接口信息 [Quidway]display ip

route 显示路由信息 [Quidway]sysname

aabbcc 更改主机名 [Quidway]super passwrod

123456 设置口令 [Quidway]interface

serial0 进入接口 [Quidway-serial0]ip address [Quidway-serial0]undo

shutdown 激活端口 [Quidway]link-protocol

hdlc 绑定hdlc协议 [Quidway]user-interface vty 0 4

[Quidway-ui-vty0-4]authentication-mode password

[Quidway-ui-vty0-4]set authentication-mode password simple 222 [Quidway-ui-vty0-4]user privilege level 3 [Quidway-ui-vty0-4]quit

[Quidway]debugging hdlc all serial0 显示所有信息

[Quidway]debugging hdlc event serial0 调试事件信息 [Quidway]debugging hdlc packet serial0 显示包的信息 静态路由:

[Quidway]ip route-static {interface number|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]rip work [Quidway]rip input

[Quidway]rip output [Quidway-rip]network

1.0.0.0 ;可以all [Quidway-rip]network 2.0.0.0 [Quidway-rip]peer ip-address [Quidway-rip]summary [Quidway]rip version 1

[Quidway]rip version 2 multicast

[Quidway-Ethernet0]rip split-horizon ;水平分隔 [Quidway]router id

A.B.C.D 配置路由器的ID [Quidway]ospf

enable 启动OSPF协议

[Quidway-ospf]import-route direct 引入直联路由

[Quidway-Serial0]ospf enable area 配置OSPF区域

标准访问列表命令格式如下:

acl [match-order config|auto] 默认前者顺序匹配。 rule [normal|special]{permit|deny} [source source-addr source-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 {|any}destination |any} [operate]

配置ICMP协议的扩展访问列表:

rule {normal|special}{permit|deny}icmp source {|any]destination {|any] [icmp-code] [logging]

扩展访问控制列表操作符的含义

equal portnumber 等于 greater-than portnumber 大于

less-than portnumber 小于 not-equal portnumber 不等 range portnumber1 portnumber2 区间

扩展访问控制列表举例 [Quidway]acl 101

[Quidway-acl-101]rule deny souce any destination any

[Quidway-acl-101]rule permit icmp source any destination any icmp-type echo

[Quidway-acl-101]rule permit icmp source any destination any icmp-type echo-reply

[Quidway]acl 102

[Quidway-acl-102]rule permit ip source 10.0.0.1 0.0.0.0 destination 202.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.1 0.0.0.0 destination-port equal ftp [Quidway-acl-103]rule permit tcp source any destination 10.0.0.2 0.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]acl 101

[Quidway-acl-101]rule deny ip source any destination any

[Quidway-acl-101]rule permit ip source 129.38.1.4 0 destination any [Quidway-acl-101]rule permit ip source 129.38.1.1 0 destination any [Quidway-acl-101]rule permit ip source 129.38.1.2 0 destination any [Quidway-acl-101]rule permit ip source 129.38.1.3 0 destination any [Quidway]acl 102

[Quidway-acl-102]rule permit tcp source 202.39.2.3 0 destination 202.38.160.1 0

[Quidway-acl-102]rule permit tcp source any destination 202.38.160.1 0 destination-port great-than 1024