CISCO静态路由实例
ciscoIPV6实验手册

实验一:IPV6 的静态路由实验实验目的:IPV6是为了解决IPV4地址即将用尽而开发出的一个新的IP地址,虽然他是IPV4 升级版本,但有很多方面都和IPV4 不同,分为单播、任意播和多播,其中多播地址的所有结点地址代替了IPV4 中的广播,而且他们都有自己的地址格式,因此我们要最简单的静态路由做起。
Page 1 of 39实验拓扑:R1 R2S1实验内容:路由器的基本配置:R1 上:interface Loopback0no ip addressipv6 address 2000:0:0:1::1/64!interface Serial1no ip addressipv6 address 2001:0:0:2::1/64clockrate 64000!ipv6 unicast-routing(一定要打这条命令,因为默认情况下IPV6 路由选择功能是关闭的)!ipv6 route 2002:0:0:3::/64 2001:0:0:2::2 和IPV4 一样只不过变成了IPV6 格式R2 上:interface Loopback0no ip addressipv6 address 2002:0:0:3::2/64!interface Serial1no ip addressPage 2 of 39ipv6 address 2001:0:0:2::2/64!ipv6 unicast-routing!ipv6 route ::/0 2001:0:0:2::1 (这里用::/0 表示默认静态路由)R1 上的路由表:用sh ipv6 route 打开rack01#sh ipv routeIPv6 Routing Table - 9 entriesCodes: C - Connected, L - Local, S - Static, R - RIP, B - BGPU - Per-user Static routeI1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summaryO - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2C 2000:0:0:1::/64 [0/0]via ::, Loopback0L 2000:0:0:1::1/128 [0/0]via ::, Loopback0C 2001:0:0:2::/64 [0/0]via ::, Serial1L 2001:0:0:2::1/128 [0/0]via ::, Serial1S 2002:0:0:3::/64 [1/0]via 2001:0:0:2::2L FE80::/10 [0/0]via ::, Null0L FF00::/8 [0/0]via ::, Null0我们可以看到有一条S 的路由,是我们写的,他的管理距离是1,下一条是R2的S1 口。
静态路由实验报告

实验二静态路由实验一、实验目的1. 掌握静态路由配置方法2. 启用路由器的路由功能3. 查看路由表4. ping和trace命令的使用二、设备需求本实验需要以下设备:1. 4台2811Cisco路由器,四台都有两个FastEthernet口。
2. 2条双绞线,1对V.35背靠背线缆3. 4台带有超级终端程序的PC机,以及4条Console电缆三、拓扑结构及配置说明本实验的拓扑如图2-1所示。
图2-1网络拓扑结构4台路由器分别命名为R1、R2、R3和R4。
所使用的ip地址分配如图1-1所示。
图中的“/24”表示子网掩码为24位,即255.255.255.0。
实验中,应使用静态路由的设置,实现R1到R4在IP层的连通性,即要求从R1可以ping通R4,反之亦然。
四、实验步骤1. 恢复路由器的初始配置。
(若路由器末被配置过则直接做第三步)2. 给路由器命名router>enable //进入特权模式Router #config terminal //进入配置模式Enter configuration commands, one per line. End with CNTL/Z.Router (config) #Router (config)#hostname r1 //给路由器命名R1 (config)#其它路由器配置类似3. 配置端口IPR1 (config)# interface FastEthernet0/1 //进入FastEthernet0/1端口r1(config-if)#ip address 10.1.1.1 255.255.255.0 //指定端口的IP地址及子网掩码r1(config-if)#no shut //开启端口r1(config-if)#exit //退出端口模式R1 (config)#interface Loopback0 //进入本地回环接口0r1(config-if)#ip address 192.168.100.1 255.255.255.0其它路由器配置类似配完各个路由器的名字及IP后,通过sh run(特权模式下的命令)命令查看路由器的配置把你所看到的结果记录下来。
Cisco(思科)路由器静态路由的配置

Cisco(思科)路由器静态路由的配置实验拓扑实验步骤我们要使得 1.1.1.0/24、2.2.2.0/24、3.3.3.0/24 ⽹络之间能够互相通信。
(1)步骤 1:在各路由器上配置 IP 地址、保证直连链路的连通性R1(config)#int loopback0R1(config-if)#ip address 1.1.1.1 255.255.255.0R1(config)#int s0/0/0R1(config-if)#ip address 192.168.12.1 255.255.255.0R1(config-if)#no shutdownR2(config)#int loopback0R2(config-if)#ip address 2.2.2.2 255.255.255.0R2(config)#int s0/0/0R2(config-if)#clock rate 128000R2(config-if)#ip address 192.168.12.2 255.255.255.0R2(config-if)#no shutdownR2(config)#int s0/0/1R2(config-if)#clock rate 128000R2(config-if)#ip address 192.168.23.2 255.255.255.0R2(config-if)#no shutdownR3(config)#int loopback0R3(config-if)#ip address 3.3.3.3 255.255.255.0R3(config)#int s0/0/1R3(config-if)#ip address 192.168.23.3 255.255.255.0R3(config-if)#no shutdown(2)步骤 2:R1上配置静态路由R1(config)#ip route 2.2.2.0 255.255.255.0 s0/0/0//下⼀跳为接⼝形式,s0/0/0 是点对点的链路,注意应该是 R1 上的s0/0/0 接⼝R1(config)#ip route 3.3.3.0 255.255.255.0 192.168.12.2//下⼀跳为IP 地址形式,192.168.12.2 是R2 上的IP 地址(3)步骤 3:R2上配置静态路由R2(config)#ip route 1.1.1.0 255.255.255.0 s0/0/0R2(config)#ip route 3.3.3.0 255.255.255.0 s0/0/1(4)步骤 4:R3上配置静态路由R3(config)#ip route 1.1.1.0 255.255.255.0 s0/0/1R3(config)#ip route 2.2.2.0 255.255.255.0 s0/0/1实验调试(1)在 R1、R2、R3 上查看路由表R1#show ip routeCodes: C - connected, S - static, 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 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not setC 192.168.12.0/24 is directly connected, Serial0/0/01.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopback02.0.0.0/24 is subnetted, 1 subnetsS 2.2.2.0 is directly connected, Serial0/0/03.0.0.0/24 is subnetted, 1 subnetsS 3.3.3.0 [1/0] via 192.168.12.2R2#show ip routeCodes: C - connected, S - static, 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 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not setC 192.168.12.0/24 is directly connected, Serial0/0/01.0.0.0/24 is subnetted, 1 subnetsS 1.1.1.0 is directly connected, Serial0/0/02.0.0.0/24 is subnetted, 1 subnetsC 2.2.2.0 is directly connected, Loopback03.0.0.0/24 is subnetted, 1 subnetsS 3.3.3.0 is directly connected, Serial0/0/1C 192.168.23.0/24 is directly connected, Serial0/0/1R3#show ip routeCodes: C - connected, S - static, 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 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set1.0.0.0/24 is subnetted, 1 subnetsS 1.1.1.0 is directly connected, Serial0/0/12.0.0.0/24 is subnetted, 1 subnetsS 2.2.2.0 is directly connected, Serial0/0/13.0.0.0/24 is subnetted, 1 subnets C 3.3.3.0 is directly connected, Loopback0C 192.168.23.0/24 is directly connected, Serial0/0/1(2)从各路由器的环回⼝ ping 其他路由器的环回⼝:R1#ping//不带任何参数的 ping命令,允许我们输⼊更多的参数Protocol [ip]:Target IP address: 2.2.2.2 //⽬标IP地址Repeat count [5]: //发送的ping 次数Datagram size [100]: //ping包的⼤⼩Timeout in seconds [2]: //超时时间Extended commands [n]: y //是否进⼀步扩展命令Source address or interface: 1.1.1.1 //源IP地址Type of service [0]:Set DF bit in IP header? [no]:Validate reply data? [no]:Data pattern [0xABCD]:Loose, Strict, Record, Timestamp, Verbose[none]:Sweep range of sizes [n]:Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:Packet sent with a source address of 1.1.1.1Success rate is 100 percent (5/5), round-trip min/avg/max = 12/14/16 ms//以上说明从 R1 的 loopback0 可以ping 通R2 上的 loopback0。
静态路由(cisco)

1.5教学实验 1.5.1实验主题●配置静态路由协议1.5.2实验设备●cisco 路由器 超五类双绞线 V.35线缆 pc1.5.3实验拓扑IP 地址分配:R1:F0/0: 191.16.1.254 255.255.255.0 S0/0: 12.12.12.1 255.255.255.0 LOOPBACK1: 171.16.1.1 255.255.255.0 LO2: 171.16.2.1 255.255.255.0 LO3: 171.16.3.1 255.255.255.0 R2:F0/0: 192.16.1.254 255.255.255.0 S0/0: 23.23.23.2 255.255.255.0 S0/1: 12.12.12.2 255.255.255.0s0/0 s0/0 S0/1S0/1 loopback1 lo1 lo2 lo3loopback2 loopback3loopback1 loopback2loopback3DCEDCEDTEDTE12.12.12.0/24 23.23.23.0/24191.16.1.0/24192.16.1.0/24193.16.1.0/24f0/0 f0/0 f0/0 Fa0/24Fa0/24Fa0/24 Fa0/1Fa0/1Fa0/1Fa0/2 Fa0/2 Fa0/2.1.2.1.1.2.2LO1: 172.16.1.1 255.255.255.0LO2: 172.16.2.1 255.255.255.0LO3: 172.16.3.1 255.255.255.0R3:F0/0: 193.16.1.254 255.255.255.0S0/1: 23.23.23.3 255.255.255.0LO1: 173.16.1.1 255.255.255.0LO2: 173.16.2.1 255.255.255.0LO3: 173.16.3.1 255.255.255.0PC1:191.16.1.1 255.255.255.0PC2:191.16.1.2 255.255.255.0PC3:192.16.1.1 255.255.255.0PC4:192.16.1.2 255.255.255.0PC5:193.16.1.1 255.255.255.0PC6:193.16.1.2 255.255.255.0Sw1: 191.16.1.253 255.255.255.0Sw2: 192.16.1.253 255.255.255.0Sw3: 193.16.1.253 255.255.255.01.5.4实验要求●通过静态路由的配置使不同网段能够相互通信。
静态路由表配置详细实例

静态路由表配置实例当一个局域网内存在2台以上的路由器时,由于其下主机互访的需求,往往需要设置路由。
由于网络规模较小且不经常变动,所以静态路由是最合适的选择。
随着宽带接入的普及,很多家庭和小企业都组建了局域网来共享宽带接入。
而且随着局域网规模的扩大,很多地方都涉及到2台或以上路由器的应用。
当一个局域网内存在2台以上的路由器时,由于其下主机互访的需求,往往需要设置路由。
由于网络规模较小且不经常变动,所以静态路由是最合适的选择。
本文作为一篇初级入门类文章,会以几个简单实例讲解静态路由,并在最后讲解一点关于路由汇总(归纳)的知识。
由于这类家庭和小型办公局域网所采用的一般都是中低档宽带路由器,所以这篇文章就以最简单的宽带路由器为例。
(其实无论在什么档次的路由器上,除了配置方式和命令不同,其配置静态路由的原理是不会有差别的。
)常见的1WAN口、4LAN口宽带路由器可以看作是一个最简单的双以太口路由器+一个4口小交换机,其W AN 口接外网,LAN口接内网以做区分。
路由就是把信息从源传输到目的地的行为。
形象一点来说,信息包好比是一个要去某地点的人,路由就是这个人选择路径的过程。
而路由表就像一张地图,标记着各种路线,信息包就依靠路由表中的路线指引来到达目的地,路由条目就好像是路标。
在大多数宽带路由器中,未配置静态路由的情况下,内部就存在一条默认路由,这条路由将LAN口下所有目的地不在自己局域网之内的信息包转发到WAN口的网关去。
宽带路由器只需要进行简单的WAN 口参数的配置,内网的主机就能访问外网,就是这条路由在起作用。
本文将分两个部分,第一部分讲解静态路由的设置应用,第二部分讲解关于路由归纳的方法和作用。
下面就以地瓜这个网络初学者遇到的几个典型应用为例,让高手大虾来说明一下什么情况需要设置静态路由,静态路由条目的组成,以及静态路由的具体作用。
例一:最简单的串连式双路由器型环境这种情况多出现于中小企业在原有的路由器共享Internet的网络中,由于扩展的需要,再接入一台路由器以连接另一个新加入的网段。
Cisco路由器静态、动态路由配置

Cisco路由器静态、动态路由配置2010-07-22 20:31Cisco路由器静态、动态路由配置本文介绍Cisco路由器静态、动态路由配置,动态路由协议这里只介绍RIP、EIGRP、OSPF三种。
下面是网络拓扑图:如上图网络拓扑,配置路由协议使其网络连通(PC0和PC1互通)。
一、配置静态路由1.配置IP地址信息台式机的IP地址配置很简单,我这里不用多说,PC0 IP:10.3.0.2 NETMASK:255.255.255.0 PC1 IP:192.16.3.2 NETMASK:255.255.255.0 。
下面配置router0下面配置router1这里我们来试试PC0和PC1互通性PC0 ping PC1如图所示:这里我们看到PC0和PC1并不能相通。
PC1 ping PC0如图所示:这里我们看到PC1和PC0也并不能相通。
2.配置静态路由协议Router(config)#ip route 192.16.3.0 255.255.255.0 172.16.2.2 R1(config)#ip route 10.3.0.0 255.255.255.0 172.16.2.1 下面我们再来试试PC0和PC1互通性PC0 ping PC1如图所示:这里我们看到PC0和PC1能相通,我们配置的静态路由协议起作用了。
PC1 ping PC0如图所示:这里我们看到PC1和PC0能相通,我们配置的静态路由协议也起作用了。
二、 RIP路由协议的配置1. 配置IP地址信息配置IP地址信息见上面配置静态路由中配置IP地址信息,我这里不多说。
这里配置了ip地址以后如静态路由中一样,PC0和PC1不能相通。
2. 配置rip路由协议配置router0Router(config)#router ripRouter(config-router)#version 2Router(config-router)#network 10.3.0.0Router(config-router)#network 172.16.2.0配置router1R1(config)#router ripR1(config-router)#version 2R1(config-router)#network 192.16.3.0R1(config-router)#network 172.16.2.03. 查看rip路由信息查看router0查看router1这里我们可以看到R开头的路由信息即是通过rip协议得到的路由信息。
思科Cisco路由器配置——浮动静态路由配置实验详解

思科Cisco路由器配置——浮动静态路由配置实验详解本⽂实例讲述了思科Cisco浮动静态路由配置实验。
分享给⼤家供⼤家参考,具体如下:⼀、实验⽬的:利⽤⼀条静态路由作为两条负载均衡的浮动静态路由⼆、拓扑图如下:三、具体步骤配置(1)R1路由器配置Router>enable --进⼊特权模式Router#configure terminal --进⼊全局配置模式Enter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R1 --修改路由器名为R1R1(config)#interface s0/0/0 --进⼊端⼝R1(config-if)#clock rate 64000 --设置时钟同步速率R1(config-if)#ip address 192.168.12.1 255.255.255.0 --给端⼝配置ip地址R1(config-if)#no shutdown --激活端⼝%LINK-5-CHANGED: Interface Serial0/0/0, changed state to downR1(config-if)#interface s0/0/1 --进⼊端⼝R1(config-if)#clock rate 64000 --设置时钟同步速率R1(config-if)#ip address 192.168.23.2 255.255.255.0 --给端⼝配置ip地址R1(config-if)#no shutdown --激活端⼝%LINK-5-CHANGED: Interface Serial0/0/1, changed state to downR1(config-if)#exit --返回上⼀级R1(config)#interface l0 --进⼊回环端⼝R1(config-if)#ip address 10.1.1.1 255.255.255.0 --给端⼝配置ip地址R1(config-if)#no shutdown --激活端⼝R1(config-if)#interface f0/0 --进⼊端⼝R1(config-if)#ip address 192.168.13.1 255.255.255.0 --给端⼝配置ip地址R1(config-if)#no shutdown --激活端⼝R1(config-if)#exit --返回上⼀级R1(config)#route rip --开启rip协议R1(config-router)#version 2 --版本2R1(config-router)#no auto-summary --关闭⾃动汇总R1(config-router)#network 192.168.12.0 --添加直连⽹段到RIPR1(config-router)#network 192.168.23.0R1(config-router)#network 10.1.1.0R1(config-router)#exit --返回上⼀级R1(config)#ip route 20.1.1.0 255.255.255.0 192.168.13.2 121 --配置浮动静态路由,级别为121R1(config)#end --返回特权模式(2)R2路由器配置Router>enable --进⼊特权模式Router#configure terminal --进⼊全局配置模式Enter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R2 --修改路由器名为R2R2(config)#interface s0/0/1 --进⼊端⼝R2(config-if)#clock rate 64000 --配置时钟速率This command applies only to DCE interfacesR2(config-if)#ip address 192.168.12.2 255.255.255.0 --给端⼝配置ip地址R2(config-if)#no shutdown --激活端⼝R2(config-if)#interface s0/0/0 --进⼊端⼝R2(config-if)#clock rate 64000 --为端⼝配置时钟速率This command applies only to DCE interfacesR2(config-if)#ip address 192.168.23.1 255.255.255.0 --给端⼝配置ip地址R2(config-if)#no shutdown --激活端⼝R2(config-if)#exit --返回上⼀级R2(config)#interface l0 --进⼊回环端⼝R2(config-if)#ip address 20.1.1.1 255.255.255.0 --给端⼝配置ip地址R2(config-if)#no shutdown --激活端⼝R2(config-if)#interface f0/1 --进⼊端⼝R2(config-if)#ip address 192.168.13.2 255.255.255.0 --给端⼝配置ip地址R2(config-if)#no shutdown --激活端⼝R2(config-if)#exit --返回上⼀级R2(config)#route rip --开启rip协议R2(config-router)#version 2 --版本2R2(config-router)#no auto-summary --关闭⾃动汇总R2(config-router)#network 192.168.12.0 --添加直连⽹段到RIPR2(config-router)#network 192.168.23.0R2(config-router)#network 20.1.1.0R2(config-router)#exit --返回上⼀级R2(config)#ip route 10.1.1.0 255.255.255.0 192.168.13.1 121 --配置浮动静态路由,级别为121 R2(config)#end --返回特权模式四、验证1、分别查看R1与R2路由表信息(1)R1路由表信息(2)R2路由表信息2、断开两条负载均衡路径(12.0与23.0⽹段)并查看路由表信息(1)R1路由表信息(2)R2路由表信息解释:当两条负载均衡路径断掉,这条浮动的静态路由就会出现。
《计算机网络》实验六 静态路由配置 实验报告

实验报告六班级:07东方信息姓名:学号:实验时间:10年5月17日机房:9#205 组号:机号:A一、实验题目静态路由配置二、实验设备CISCO路由器、专用电缆、网线、CONSOLE线、PC机三、实验内容1了解路由器的功能2在CISCO路由器上设置和验证静态路由3配置缺省路由四、原理实现网络的互连互通,从而实现信息的共享和传输。
静态路由实验网络拓扑结构图:五、实际步骤步骤1:初始化设置(1)按照图4-1的网络拓扑结构,连接好PC与路由器的网线、PC与路由器Console端口的调试电缆、路由器与路由器之间的V.35电缆。
(2)按照图4-1要求,在PC1、PC2计算机中设置好IP地址、子网掩码、默认网关。
然后利用Ping命令测试两台PC机之间的连通性。
模拟器也按以上配置。
(3)在PC机上启动“超级终端”。
步骤2:路由器 Route A 的基础配置7-A#show runBuilding configuration...Current configuration : 826 bytes!version 12.3service timestamps debug datetime msecservice timestamps log datetime msecno service password-encryption!hostname 7-A!boot-start-markerboot-end-marker!enable password cisco!no network-clock-participate aim 0no network-clock-participate aim 1no aaa new-modelip subnet-zero!!ip cef!!no ftp-server write-enable!!!!interface FastEthernet0/0ip address 10.7.3.1 255.255.255.0duplex autospeed auto!interface FastEthernet0/1ip address 10.7.1.1 255.255.255.0 duplex autospeed auto!interface Serial0/3/0ip address 172.17.200.5 255.255.255.252 no fair-queue!interface Serial0/3/1no ip addressshutdownclockrate 2000000!ip classlessip http server!!!control-plane!!line con 0line aux 0line vty 0 4password ciscologin!scheduler allocate 20000 1000!End步骤3:路由器Route B 的基础配置7-B#show runBuilding configuration...Current configuration : 868 bytes!version 12.3service timestamps debug datetime msec service timestamps log datetime msecno service password-encryption!hostname 7-B!boot-start-markerboot-end-marker!enable password cisco!no network-clock-participate aim 0no network-clock-participate aim 1no aaa new-modelip subnet-zero!!ip cef!!no ftp-server write-enable!!!!interface FastEthernet0/0ip address 10.7.3.1 255.255.255.0 shutdownduplex autospeed auto!interface FastEthernet0/1ip address 10.7.2.1 255.255.255.0 duplex autospeed auto!interface Serial0/3/0ip address 172.17.200.6 255.255.255.252 no fair-queueclockrate 128000!interface Serial0/3/1bandwidth 64no ip addressshutdownclockrate 2000000!ip classlessip http server!!!control-plane!!line con 0line aux 0line vty 0 4password ciscologin!scheduler allocate 20000 1000!end步骤4:在 Route A 上配置静态路由7-A(config)#ip route 10.7.2.0 255.255.255.0 172.17.200.67-A(config)#10.7.4.0 255.255.255.0 172.17.200.6步骤5:检查9-A上的路由表7-A#show ip routeCodes: C - connected, S - static, 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 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static routeGateway of last resort is not set172.17.0.0/30 is subnetted, 1 subnetsC 172.17.200.4 is directly connected, Serial0/3/010.0.0.0/24 is subnetted, 4 subnetsS 10.7.4.0 [1/0] via 172.17.200.6C 10.7.1.0 is directly connected, FastEthernet0/1C 10.7.3.0 is directly connected, FastEthernet0/0S 10.7.2.0 [1/0] via 172.17.200.6步骤6:Ping 7-B的FastEthernet端口的地址。