《最新H3C路由器配置命令17399.doc》由会员分享,可在线阅读,更多相关《最新H3C路由器配置命令17399.doc(11页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、精品资料H3C路由器配置命令17399.H3C路由器配置命令一、路由器基本配置命令1、system-view 进入系统视图模式2、sysname R1 为设备命名为R3、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
2、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 配置默认的路由基本配置案例Quidwaydisplay version 显示版本信息Quidwaydisplay current-configuration 显示当前配置Quidwaydisplay interfaces 显示接口信息Quidwaydisplay ip route 显示路由信息Quidwaysysn
3、ame aabbcc 更改主机名Quidwaysuper passwrod 123456 设置口令Quidwayinterface serial0 进入接口Quidway-serial0ip address Quidway-serial0undo shutdown 激活端口Quidwaylink-protocol hdlc 绑定hdlc协议Quidwayuser-interface vty 0 4Quidway-ui-vty0-4authentication-mode passwordQuidway-ui-vty0-4set authentication-mode password simpl
4、e 2Quidway-ui-vty0-4user privilege level 3Quidway-ui-vty0-4quitQuidwaydebugging hdlc all serial0 显示所有信息Quidwaydebugging hdlc event serial0 调试事件信息Quidwaydebugging hdlc packet serial0 显示包的信息静态路由配置案例:Quidwayip route-static interface number|nexthopvaluereject|blackhole例如:Quidwayip route-static 129.1.0.0
5、 16 10.0.0.Quidwayip route-static 129.1.0.0 255.255.0.0 10.0.0.Quidwayip route-static 129.1.0.0 16 SerialQuidwayip route-static 0.0.0.0 0.0.0.010.0.0.动态路由配置案例(RIP):QuidwayripQuidwayrip workQuidwayrip inputQuidwayrip outputQuidway-ripnetwork 1.0.0.0 ;可以allQuidway-ripnetwork 2.0.0.0Quidway-rippeer ip-
6、addressQuidway-ripsummaryQuidwayrip versionQuidwayrip version 2 multicastQuidway-Ethernet0rip split-horizon ;水平分隔动态路由配置案例(OSPF):Quidwayrouter id A.B.C.D 配置路由器的IDQuidwayospf enable 启动OSPF协议Quidway-ospfimport-route direct 引入直联路由Quidway-Serial0ospf enable area 配置OSPF区域标准访问列表命令格式如下:acl match-order confi
7、g|auto 默认前者顺序匹配。rule normal|specialpermit|deny source source-addr source-wildcard|any例:Quidwayacl 10Quidway-acl-10rule normal permit source 10.0.0.0 0.0.0.25Quidway-acl-10rule normal deny source any二、ACL配置扩展访问控制列表配置命令1.配置TCP/UDP协议的扩展访问列表:rule normal|specialpermit|denytcp|udpsource |anydestination |a
8、nyoperate2.配置ICMP协议的扩展访问列表:rule normal|specialpermit|denyicmp source |anydestination |anyicmp-code logging扩展访问控制列表操作符的含义equal portnumber 等于greater-than portnumber 大于less-than portnumber 小于not-equal portnumber 不等range portnumber1 portnumber 区间3.扩展访问控制列表案例Quidwayacl 10Quidway-acl-101rule deny souce an
9、y destination anyQuidway-acl-101rule permit icmp source any destination any icmp-type echoQuidway-acl-101rule permit icmp source any destination any icmp-type echo-replyQuidwayacl 10Quidway-acl-102rule permit ip source 10.0.0.1 0.0.0.0 destination 202.0.0.1 0.0.0.0Quidway-acl-102rule deny ip source
10、any destination anyQuidwayacl 103Quidway-acl-103rule permit tcp source any destination 10.0.0.1 0.0.0.0 destination-port equal ftpQuidway-acl-103rule permit tcp source any destination 10.0.0.2 0.0.0.0 destination-port equal wwwQuidwayfirewall enableQuidwayfirewall default permit|denyQuidwayint e0Qui
11、dway-Ethernet0firewall packet-filter 101 inbound|outbound4. NAT的配置地址转换配置案例Quidwayfirewall enableQuidwayfirewall default permitQuidwayacl 10Quidway-acl-101rule deny ip source any destination anyQuidway-acl-101rule permit ip source 129.38.1.4 0 destination anyQuidway-acl-101rule permit ip source 129.3
12、8.1.1 0 destination anyQuidway-acl-101rule permit ip source 129.38.1.2 0 destination anyQuidway-acl-101rule permit ip source 129.38.1.3 0 destination anyQuidwayacl 10Quidway-acl-102rule permit tcp source 202.39.2.3 0 destination 202.38.160.1 0Quidway-acl-102rule permit tcp source any destination 202
13、.38.160.1 0 destination-port great-than1024Quidway-Ethernet0firewall packet-filter 101 inboundQuidway-Serial0firewall packet-filter 102 inboundQuidwaynat address-group 202.38.160.101 202.38.160.103 poolQuidwayaclQuidway-acl-1rule permit source 10.110.10.0 0.0.0.25Quidway-acl-1rule deny source anyQui
14、dway-acl-1int serial 0Quidway-Serial0nat outbound 1 address-group poolQuidway-Serial0nat server global 202.38.160.101 inside 10.110.10.1 ftp tcpQuidway-Serial0nat server global 202.38.160.102 inside 10.110.10.2 www tcpQuidway-Serial0nat server global 202.38.160.102 8080 inside 10.110.10.3 www tcpQui
15、dway-Serial0nat server global 202.38.160.103 inside 10.110.10.4 smtp udp5. PPP验证配置:主验方:pap|chapQuidwaylocal-user u2 password simple|cipher aaaQuidwayinterface serial 0Quidway-serial0ppp authentication-mode pap|chapQuidway-serial0ppp chap user u1 /pap时,不用此句 pap被验方:Quidwayinterface serial 0Quidway-serial0ppp pap local-user u2 password simple|cipher aaachap被验方:Quidwayinterface serial 0Quidway-serial0ppp chap user u1 Quidway-serial0local-user u2 password simple|cipher aaa
限制150内