H3C路由学习笔记静态路由.docx

上传人:b****5 文档编号:4610080 上传时间:2022-12-07 格式:DOCX 页数:19 大小:89.59KB
下载 相关 举报
H3C路由学习笔记静态路由.docx_第1页
第1页 / 共19页
H3C路由学习笔记静态路由.docx_第2页
第2页 / 共19页
H3C路由学习笔记静态路由.docx_第3页
第3页 / 共19页
H3C路由学习笔记静态路由.docx_第4页
第4页 / 共19页
H3C路由学习笔记静态路由.docx_第5页
第5页 / 共19页
点击查看更多>>
下载资源
资源描述

H3C路由学习笔记静态路由.docx

《H3C路由学习笔记静态路由.docx》由会员分享,可在线阅读,更多相关《H3C路由学习笔记静态路由.docx(19页珍藏版)》请在冰豆网上搜索。

H3C路由学习笔记静态路由.docx

H3C路由学习笔记静态路由

H3C路由(MSR26-30)

1、进入系统视图

Startupconfigurationfiledoesnotexist.

Performingautomaticconfiguration...PressCTRL_Dtobreak.

------------------------按Ctrl+D键终止设备查找自动配置

Automaticconfigurationattempt:

1.

Notreadyforautomaticconfiguration:

nointerfaceavailable.

Waitingforthenext...

Automaticconfigurationisaborted.-------按Ctrl+D键后放弃自动配置的尝试

Lineaux0isavailable.

 

PressENTERtogetstarted.---------------到这里系统启动完毕,按回车键

%Aug2209:

19:

53:

3182014H3CSHELL/5/SHELL_LOGIN:

TTYloggedinfromaux0.

--------------再按一次回车键

system-view

[H3C]

2、修改路由器名称

sys

[H3C]sysname名称

如将默认的路由器名称改为RoNetwork_Dept,Ro表示设备类型为路由器,Network_Dept表示部门名称,以后看到这个名称就知道这是什么设备、在什么位置。

建议以后都采用这种方式来给设备命名,以方便管理。

[H3C]sysnameRoNetwork_Dept

[RoNetwork_Dept]

如果要恢复默认名称,使用undosysname命令:

[RoNetwork_Dept]undosysname

[H3C]

3、显示路由表

(1)IPv4

显示路由表概要信息:

[RoNetwork_Dept]displayiprouting-table

显示路由表详细信息:

[RoNetwork_Dept]displayiprouting-tableverbose

显示某种路由协议的信息:

[RoNetwork_Dept]displayiprouting-tableprotocol{bgp|direct|guard|isis|ospf|rip|static}

还有其他信息,可使用?

显示帮助以便选择:

[RoNetwork_Dept]displayiprouting-table?

(2)IPv6

只需将IPv4的命令中ip替换成ipv6即可。

4、配置接口

sys

system-view

[H3C]int接口名称

如配置G0/0接口:

[RoNetwork_Dept]intg0/0

[RoNetwork_Dept-GigabitEthernet0/0]---------进入接口配置视图

配置IP地址:

[RoNetwork_Dept-GigabitEthernet0/0]ipadd12.0.0.1?

-----后面跟掩码长度也行,跟掩码也行

INTEGER<1-31>IPmasklength

X.X.X.XIPmask

[RoNetwork_Dept-GigabitEthernet0/0]ipadd12.0.0.124----24表示掩码长度为24位,和255.255.255.0等效

[RoNetwork_Dept-GigabitEthernet0/0]undoshutdown-----激活接口

[RoNetwork_Dept-GigabitEthernet0/0]disintg0/0-----查看接口信息

5、信息回显及tracert

为了防止命令被系统输出的消息打断,可以配置信息回显:

[RoNetwork_Dept]info-centersynchronous

为防止tracert超时,链路两端的设备都要开启以下功能:

[RoNetwork_Dept]ipredirectsenable开启设备的ICMP重定向报文的发送功能

[RoNetwork_Dept]ipttl-expiresenable  开启设备的ICMP超时报文的发送功能

[RoNetwork_Dept]ipunreachableenable开启设备的ICMP目的不可达报文的发送功能

6、配置静态路由

拓扑图:

RoNetwork_Dept端:

sys

SystemView:

returntoUserViewwithCtrl+Z.

[H3C]sysRoNetwork_Dept

[RoNetwork_Dept]infosync

Info-centersynchronousoutputison.

[RoNetwork_Dept]intlo0

[RoNetwork_Dept-LoopBack0]ipadd192.168.1.124

[RoNetwork_Dept-LoopBack0]intg0/0

[RoNetwork_Dept-GigabitEthernet0/0]ipadd12.0.0.124

[RoNetwork_Dept-GigabitEthernet0/0]undosh

[RoNetwork_Dept-GigabitEthernet0/0]iproute192.168.2.2255.255.255.25512.0.0.2

[RoNetwork_Dept]%Aug2211:

45:

32:

4152014RoNetwork_DeptIFNET/3/PHY_UPDOWN:

PhysicalstateontheinterfaceGigabitEthernet0/0changedtoup.

%Aug2211:

45:

32:

4162014RoNetwork_DeptIFNET/5/LINK_UPDOWN:

LineprotocolstateontheinterfaceGigabitEthernet0/0changedtoup.-------系统发出的消息,g0/0接口已经up了

[RoNetwork_Dept]disipro

Destinations:

17Routes:

17

Destination/MaskProtoPreCostNextHopInterface

0.0.0.0/32Direct00127.0.0.1InLoop0

12.0.0.0/24Direct0012.0.0.1GE0/0

12.0.0.0/32Direct0012.0.0.1GE0/0

12.0.0.1/32Direct00127.0.0.1InLoop0

12.0.0.255/32Direct0012.0.0.1GE0/0

127.0.0.0/8Direct00127.0.0.1InLoop0

127.0.0.0/32Direct00127.0.0.1InLoop0

127.0.0.1/32Direct00127.0.0.1InLoop0

127.255.255.255/32Direct00127.0.0.1InLoop0

192.168.1.0/24Direct00192.168.1.1Loop0

192.168.1.0/32Direct00192.168.1.1Loop0

192.168.1.1/32Direct00127.0.0.1InLoop0

192.168.1.255/32Direct00192.168.1.1Loop0

192.168.2.2/32Static60012.0.0.2GE0/0

224.0.0.0/4Direct000.0.0.0NULL0

224.0.0.0/24Direct000.0.0.0NULL0

255.255.255.255/32Direct00127.0.0.1InLoop0

[RoNetwork_Dept]ping192.168.2.2---------使用ping命令测试路由是否配置正确

Ping192.168.2.2(192.168.2.2):

56databytes,pressCTRL_Ctobreak

56bytesfrom192.168.2.2:

icmp_seq=0ttl=255time=1.457ms

56bytesfrom192.168.2.2:

icmp_seq=1ttl=255time=1.113ms

56bytesfrom192.168.2.2:

icmp_seq=2ttl=255time=1.168ms

56bytesfrom192.168.2.2:

icmp_seq=3ttl=255time=1.189ms

56bytesfrom192.168.2.2:

icmp_seq=4ttl=255time=1.049ms

---Pingstatisticsfor192.168.2.2---

5packetstransmitted,5packetsreceived,0.0%packetloss

round-tripmin/avg/max/std-dev=1.049/1.195/1.457/0.140ms

[RoNetwork_Dept]%Aug2211:

49:

29:

3042014RoNetwork_DeptPING/6/PING_STATISTICS:

Pingstatisticsfor192.168.2.2:

5packetstransmitted,5packetsreceived,0.0%packetloss,round-tripmin/avg/max/std-dev=1.049/1.195/1.457/0.140ms.

[RoNetwork_Dept]

RoNetCenter端:

sys

SystemView:

returntoUserViewwithCtrl+Z.

[H3C]sysRoNetCenter

[RoNetCenter]infosync

Info-centersynchronousoutputison.

[RoNetCenter]intlo0

[RoNetCenter-LoopBack0]ipadd192.168.2.232

[RoNetCenter-LoopBack0]intg0/0

[RoNetCenter-GigabitEthernet0/0]ipadd12.0.0.224

[RoNetCenter-GigabitEthernet0/0]undosh

[RoNetCenter-GigabitEthernet0/0]quit

[RoNetCenter]ipro192.168.1.1255.255.255.25512.0.0.1

[RoNetCenter]disipro

Destinations:

14Routes:

14

Destination/MaskProtoPreCostNextHopInterface

0.0.0.0/32Direct00127.0.0.1InLoop0

12.0.0.0/24Direct0012.0.0.2GE0/0

12.0.0.0/32Direct0012.0.0.2GE0/0

12.0.0.2/32Direct00127.0.0.1InLoop0

12.0.0.255/32Direct0012.0.0.2GE0/0

127.0.0.0/8Direct00127.0.0.1InLoop0

127.0.0.0/32Direct00127.0.0.1InLoop0

127.0.0.1/32Direct00127.0.0.1InLoop0

127.255.255.255/32Direct00127.0.0.1InLoop0

192.168.1.1/32Static60012.0.0.1GE0/0

192.168.2.2/32Direct00127.0.0.1InLoop0

224.0.0.0/4Direct000.0.0.0NULL0

224.0.0.0/24Direct000.0.0.0NULL0

255.255.255.255/32Direct00127.0.0.1InLoop0

[RoNetCenter]

配置等价静态路由

RoNetwork_Dept端:

[RoNetwork_Dept]intg0/1

[RoNetwork_Dept-GigabitEthernet0/1]ipadd21.0.0.124

[RoNetwork_Dept-GigabitEthernet0/1]undosh

[RoNetwork_Dept-GigabitEthernet0/1]quit

[RoNetwork_Dept]ipro192.168.2.2255.255.255.25521.0.0.2

[RoNetwork_Dept]disipro

Destinations:

21Routes:

22

Destination/MaskProtoPreCostNextHopInterface

0.0.0.0/32Direct00127.0.0.1InLoop0

12.0.0.0/24Direct0012.0.0.1GE0/0

12.0.0.0/32Direct0012.0.0.1GE0/0

12.0.0.1/32Direct00127.0.0.1InLoop0

12.0.0.255/32Direct0012.0.0.1GE0/0

21.0.0.0/24Direct0021.0.0.1GE0/1

21.0.0.0/32Direct0021.0.0.1GE0/1

21.0.0.1/32Direct00127.0.0.1InLoop0

21.0.0.255/32Direct0021.0.0.1GE0/1

127.0.0.0/8Direct00127.0.0.1InLoop0

127.0.0.0/32Direct00127.0.0.1InLoop0

127.0.0.1/32Direct00127.0.0.1InLoop0

127.255.255.255/32Direct00127.0.0.1InLoop0

192.168.1.0/24Direct00192.168.1.1Loop0

192.168.1.0/32Direct00192.168.1.1Loop0

192.168.1.1/32Direct00127.0.0.1InLoop0

192.168.1.255/32Direct00192.168.1.1Loop0

192.168.2.2/32Static60012.0.0.2GE0/0

21.0.0.2GE0/1

224.0.0.0/4Direct000.0.0.0NULL0

224.0.0.0/24Direct000.0.0.0NULL0

255.255.255.255/32Direct00127.0.0.1InLoop0

RoNetCenter端:

[RoNetCenter]intg0/1

[RoNetCenter-GigabitEthernet0/1]ipadd21.0.0.224

[RoNetCenter-GigabitEthernet0/1]undosh

[RoNetCenter-GigabitEthernet0/1]quit

[RoNetCenter]ipro192.168.1.1255.255.255.25521.0.0.1

[RoNetCenter]disipro

Destinations:

18Routes:

19

Destination/MaskProtoPreCostNextHopInterface

0.0.0.0/32Direct00127.0.0.1InLoop0

12.0.0.0/24Direct0012.0.0.2GE0/0

12.0.0.0/32Direct0012.0.0.2GE0/0

12.0.0.2/32Direct00127.0.0.1InLoop0

12.0.0.255/32Direct0012.0.0.2GE0/0

21.0.0.0/24Direct0021.0.0.2GE0/1

21.0.0.0/32Direct0021.0.0.2GE0/1

21.0.0.2/32Direct00127.0.0.1InLoop0

21.0.0.255/32Direct0021.0.0.2GE0/1

127.0.0.0/8Direct00127.0.0.1InLoop0

127.0.0.0/32Direct00127.0.0.1InLoop0

127.0.0.1/32Direct00127.0.0.1InLoop0

127.255.255.255/32Direct00127.0.0.1InLoop0

192.168.1.1/32Static60012.0.0.1GE0/0

21.0.0.1GE0/1

192.168.2.2/32Direct00127.0.0.1InLoop0

224.0.0.0/4Direct000.0.0.0NULL0

224.0.0.0/24Direct000.0.0.0NULL0

255.255.255.255/32Direct00127.0.0.1InLoop0

测试:

[RoNetwork_Dept]ping192.168.2.2

Ping192.168.2.2(192.168.2.2):

56databytes,pressCTRL_Ctobreak

56bytesfrom192.168.2.2:

icmp_seq=0ttl=255time=0.935ms

56bytesfrom192.168.2.2:

icmp_seq=1ttl=255time=1.156ms

56bytesfrom192.168.2.2:

icmp_seq=2ttl=255time=0.732ms

56bytesfrom192.168.2.2:

icmp_seq=3ttl=255time=1.301ms

56bytesfrom192.168.2.2:

icmp_seq=4ttl=255time=0.733ms

---Pingstatisticsfor192.168.2.2---

5packetstransmitted,5packetsreceived,0.0%packetloss

round-tripmin/avg/max/std-dev=0.732/0.971/1.301/0.227ms

[RoNetCenter]ping-r192.168.1.1-------“-r”表示“Recordroute”,记录路由

Ping192.168.1.1(192.168.1.1):

56databytes,pressCTRL_Ctobreak

56bytesfrom192.168.1.1:

icmp_seq=0ttl=255time=0.827ms

RR:

21.0.0.1

12.0.0.2

56bytesfrom192.168.1.1:

icmp_seq=1ttl=255time=0.964ms

RR:

12.0.0.1

12.0.0.2

56bytesfrom192.168.1.1:

icmp_seq=2ttl=255time=1.895ms

RR:

21.0.0.1

12.0.0.2

56bytesfrom192.168.1.1:

icmp_seq=3ttl=255time=0.673ms

RR:

12.0.0.1

12.0.0.2

56bytesfrom192.168.1.1:

icmp_seq=4ttl=255time=0.905ms

RR:

21.0.0.1

12.0.0.2

---Pingstatisticsfor192.168.1.1---

5packetstransmitted,5packetsreceived,0.0%packetloss

round-tripmin/avg/max/std-dev=0.673/1.053/1.895/0.432ms

---数据包被轮流在两条链路上发送,但是奇怪的是,只从一条链路返回,这与GNS3的Cisco路由器不一样,Cisco的是从哪条链路出去就从哪条链路返回:

参考:

R1#ping

Protocol[ip]:

TargetIPaddress:

192.168.2.2

Repeatcount[5]:

Datagramsize[100]:

Timeoutinseconds[2]:

Extendedcommands[n]:

y

Sourceaddressorinterface:

Typeofservice[0]:

SetDFbitinIPheader?

[no]:

Validatereplydata?

[no]:

Datapattern[0xABCD]:

Loose,Strict,Record,Timestamp,Verbose[none]:

r

Numberofhops[9]:

Loose,Strict,Record,Timestamp,Verbose[RV]:

r

%Noroomforthatoption

Loose,Strict,Record,Timestamp,Verbose[RV]:

Record

%Noroomforthatoption

Loose,Strict,Record,Timestamp,Verbose[RV]:

Sweeprangeofsizes[n]:

Typeescapesequence

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高中教育 > 高中教育

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1