互联网

当前位置 /首页/游戏数码/互联网/列表

静态路由的配置方法和技巧

学校有新旧两个校区,每个校区是一个独立的局域网,为了使新旧校区能够正常相互通讯,共享资源。每个校区出口利用一台路由器进行连接,两台路由器间学校申请了一条专线进行相连,要求做适当配置实现两个校区的正常相互访问。

静态路由的配置方法和技巧

操作方法

(01)配置计算机PC1:IP:   Submask:  Gateway:  

静态路由的配置方法和技巧 第2张

(02)配置计算机PC2:IP:Submask:Gateway:

静态路由的配置方法和技巧 第3张

(03)测试连通性PC1 ping PC2Ping

静态路由的配置方法和技巧 第4张

(04)配置路由器R1Router>enRouter#conf tRouter(config)#hostname R1R1(config)#int fa1/0R1(config-if)#no shutR1(config-if)#R1(config-if)#ip address R1(config-if)#exitR1(config)#int s2/0R1(config-if)#ip address R1(config-if)#clock rate 64000R1(config-if)#no shutR1(config-if)#endR1#clock rate 64000(必须配置时钟才可通信)

静态路由的配置方法和技巧 第5张

(05)配置路由器R2R2>enR2#conf tR2(config)#hostname R2R2(config)#int fa1/0R2(config-if)#ip address R2(config-if)#no shutR2(config-if)#R2(config-if)#exitR2(config)#int s2/0R2(config-if)#ip address R2(config-if)#no shutR2(config-if)#R2(config-if)#clock rate 64000This command applies only to DCE interfacesR2(config-if)#R2(config-if)#endR2#

静态路由的配置方法和技巧 第6张

(06)配置R1路由:R1>enR1#conf tR1(config)#ip route R1(config)#endR1#R1#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setC     is directly connected, FastEthernet1/0S     [1/0] via C     is directly connected, Serial2/0R1#

静态路由的配置方法和技巧 第7张

(07)配置路由R2R2>enR2#conf tEnter configuration commands, one per line.  End with CNTL/Z.R2(config)#ip route R2(config)#endR2#R2#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not setS     [1/0] via C     is directly connected, FastEthernet1/0C     is directly connected, Serial2/0

静态路由的配置方法和技巧 第8张

(08)测试连通性:PC1 Ping PC2Ping

静态路由的配置方法和技巧 第9张

特别提示

静态路由是指有网络管理员手工配置的路由信息。

静态路由除了具有简单、高效、可靠的优点外,它的另一个好处是网络安全保密性高。

缺省路由可以看做是静态路由的一种特殊情况。当数据在查找路由表时,没有找到和目标相匹配的路由表项时,为数据指定路由。

路由器属于网络层设备,能够根据IP包头的信息,选择一条最佳路径,将数据包转发出去。实现不同网段的主机之间的互相访问。路由器是根据路由表进行选路和转发的。而路由表里就是由一条条路由信息组成。

TAG标签:路由 静态 配置 #