CISCO静态路由与默认路由配置
静态路由与默认路由的配置

静态路由与默认路由的配置内容:1.用静态路由使全网联通2.用默认路由使全网联通拓扑图:实验过程:一、基本配置enableconfigure terminalno ip domain-loenable sec ciscoline vty 0 15pass ciscologinexitline con 0pass ciscologinhost R二、配置接口R1:conf tint s0/0ip add 192.168.11.1 255.255.255.0clo r 64000no shexitint s0/1ip add 192.168.12.1 255.255.255.0 clo r 64000no shexitinterface loopback 0ip add 192.168.10.1 255.255.255.0 no shendsh ip int brR2:conf tint s0/0ip add 192.168.11.2 255.255.255.0 clo r 64000no shexitint s0/1ip add 192.168.21.2 255.255.255.0 clo r 64000no shexitinterface loopback 0ip add 192.168.20.1 255.255.255.0 no shendsh ip int brR3:conf tint s0/0ip add 192.168.31.3 255.255.255.0 clo r 64000no shexitint s0/1ip add 192.168.12.3 255.255.255.0 clo r 64000no shexitinterface loopback 0ip add 192.168.30.1 255.255.255.0 no shendsh ip int brR4:conf tint s0/0ip add 192.168.31.4 255.255.255.0 clo r 64000no shexitint s0/1ip add 192.168.21.4 255.255.255.0 clo r 64000no shexitint s0/2ip add 192.168.40.4 255.255.255.0 clo r 64000no shexitendsh ip int brR5:conf tint s0/0ip add 192.168.40.5 255.255.255.0 clo r 64000no shexitint f0/0ip add 192.168.50.5 255.255.255.0 no shexitint f0/1ip add 192.168.51.5 255.255.255.0 no shexitendsh ip int br三、检测连通性用ping命令去测试两个相连的接口是否连通四、配置路由1.1、静态路由的配置R1:conf tip route 192.168.20.0 255.255.255.0 192.168.11.2ip route 192.168.21.0 255.255.255.0 192.168.11.2ip route 192.168.30.0 255.255.255.0 192.168.12.3ip route 192.168.31.0 255.255.255.0 192.168.12.3ip route 192.168.40.0 255.255.255.0 192.168.11.2ip route 192.168.50.0 255.255.255.0 192.168.11.2ip route 192.168.51.0 255.255.255.0 192.168.11.2ip route 192.168.51.0 255.255.255.0 192.168.12.3ip route 192.168.50.0 255.255.255.0 192.168.12.3ip route 192.168.40.0 255.255.255.0 192.168.12.3endR2:conf tip route 192.168.10.0 255.255.255.0 192.168.11.1ip route 192.168.40.0 255.255.255.0 192.168.21.4ip route 192.168.31.0 255.255.255.0 192.168.21.4ip route 192.168.12.0 255.255.255.0 192.168.11.1ip route 192.168.30.0 255.255.255.0 192.168.11.1ip route 192.168.50.0 255.255.255.0 192.168.21.4ip route 192.168.51.0 255.255.255.0 192.168.21.4endR3:conf tip route 192.168.10.0 255.255.255.0 192.168.12.1ip route 192.168.11.0 255.255.255.0 192.168.12.1ip route 192.168.20.0 255.255.255.0 192.168.12.1ip route 192.168.21.0 255.255.255.0 192.168.31.4ip route 192.168.40.0 255.255.255.0 192.168.31.4ip route 192.168.50.0 255.255.255.0 192.168.31.4ip route 192.168.51.0 255.255.255.0 192.168.31.4endR4:conf tip route 192.168.10.0 255.255.255.0 192.168.21.2ip route 192.168.20.0 255.255.255.0 192.168.21.2ip route 192.168.30.0 255.255.255.0 192.168.31.3ip route 192.168.50.0 255.255.255.0 192.168.40.5ip route 192.168.51.0 255.255.255.0 192.168.40.5ip route 192.168.11.0 255.255.255.0 192.168.21.2ip route 192.168.12.0 255.255.255.0 192.168.31.3endR5:conf tip route 192.168.10.0 255.255.255.0 192.168.40.4ip route 192.168.30.0 255.255.255.0 192.168.40.4ip route 192.168.20.0 255.255.255.0 192.168.40.4ip route 192.168.11.0 255.255.255.0 192.168.40.4ip route 192.168.12.0 255.255.255.0 192.168.40.4ip route 192.168.21.0 255.255.255.0 192.168.40.4ip route 192.168.31.0 255.255.255.0 192.168.40.4end配置PC1:IP 192.168.50.1 255.255.255.0GA TEWAY 192.168.50.5配置PC2:IP 192.168.51.1 255.255.255.0GA TEWAY 192.168.51.51.2检测静态路由的配置a、在每台路由器上使用show ip route命令查看路由器的路由表R1路由表:R2路由表:R3路由表:R4路由表R5路由表b、在PC上使用ping命令检测到网络中的各点能否连通2.1在R5上配置默认路由将原来配置的所有静态路由条目删除,然后添加一条默认路由后,使用PC测试连通性进入全局配置模式no ip route 192.168.10.0 255.255.255.0 192.168.40.4no ip route 192.168.20.0 255.255.255.0 192.168.40.4no ip route 192.168.30.0 255.255.255.0 192.168.40.4no ip route 192.168.11.0 255.255.255.0 192.168.40.4no ip route 192.168.12.0 255.255.255.0 192.168.40.4no ip route 192.168.21.0 255.255.255.0 192.168.40.4no ip route 192.168.31.0 255.255.255.0 192.168.40.4ip route 0.0.0.0 0.0.0.0 192.168.40.4实验结果:实验成功完成,在做实验是要注意网关!免得因为网关没配好使得PC机无法与外面的网段ping通!。
思科路由器、交换机的基本管理教程

思科路由器、交换机的基本管理教程随着Internet的高速发展,网络规模不断膨胀,对于从事网络专业的学生熟练掌握路由器和交换机的配置已显得十分重要。
接下来是小编为大家收集的思科路由器、交换机的基本管理教程方法,希望能帮到大家。
思科路由器、交换机的基本管理教程的方法管理路由器和交换机的方法以及命令主要分为一下几个方面:1、了解命令行的模式。
2、配置接口的IP地址以及相关的路由条目。
3、路由器、交换机密码的管理。
4、远程管理路由器、交换机。
5、系统IOS的备份与恢复。
一、了解命令行的模式1)用户模式默认进入的是用户模式,在该模式下用户受到极大的限制,只能用来查看一些统计信息。
route> #路由器的用户模式switch> #交换机的用户模式2)特权模式在用户模式输入“enable”(可简写为“en”)命令就可以进入特权模式,在特权模式下可以查看并修改路由器或交换机的配置。
route>enable #也可以输入en进入特权模式route#switch>enswitch#在特权模式下常用的命令解释如下:show version :查看系统IOS版本show running-config :查看当前的配置信息copy running-config startup-config :保存当前的配置或者使用 writeerase startup-config :删除以保存的配置show startup-config :查看保存好的配置show mac-address-table :查看交换机的mac地址表show int 接口名称:查看接口的信息show arp :查看ARP缓存表show ip route :查看路由表信息show ip int brief :查看所有接口的IP地址信息。
no ip domain-lookup :禁用DNS查询line con 0exec-timeout 0 0 :不超时连接logging synchronous :不启用时间同步,信息不打断输入命令3)全局模式在特权模式下输入“config terminal”(可简写为conf t)命令就可以进入全局模式,用户在该模式下可以修改路由器或交换机的全局配置。
实验–配置IPv6静态路由和默认路由

实验–配置 IPv6 静态路由和默认路由拓扑地址分配表设备接口IPv6 地址/前缀长度默认网关R1 G0/1 2001:DB8:ACAD:A::/64 eui-64 N/AS0/0/1 FC00::1/64 N/A R3 G0/1 2001:DB8:ACAD:B::/64 eui-64 N/AS0/0/0 FC00::2/64 N/A PC-A NIC SLAAC SLAACPC-C NIC SLAAC SLAAC目标第 1 部分:建立网络并配置设备的基本设置•在路由器上启用 IPv6 单播路由并配置 IPv6 编址。
•禁用 IPv4 编址并启用 PC 网络接口的 IPv6 SLAAC。
•使用ipconfig和ping检验 LAN 连接。
•使用show命令检验 IPv6 设置。
第 2 部分:配置 IPv6 静态路由和默认路由•配置直连 IPv6 静态路由。
•配置递归 IPv6 静态路由。
•配置默认 IPv6 静态路由。
背景/场景在本实验中,您将配置整个网络以实现仅使用 IPv6 编址通信,包括配置路由器和 PC。
您将使用无状态地址自动配置 (SLAAC) 为主机配置 IPv6 地址。
还将在路由器上配置 IPv6 静态路由和默认路由,以实现与未直接连接的远程网络的通信。
注意:CCNA 动手实验所用的路由器是采用 Cisco IOS Release 15.2(4)M3(universalk9 映像)的 Cisco 1941 集成多业务路由器 (ISR)。
所用的交换机是采用 Cisco IOS Release 15.0(2)(lanbasek9 映像)的 Cisco Catalyst 2960 系列。
也可使用其他路由器、交换机以及 Cisco IOS 版本。
根据型号以及 Cisco IOS 版本不同,可用命令和产生的输出可能与实验显示的不一样。
请参考本实验末尾的“路由器接口摘要表”以了解正确的接口标识符。
cisco路由器的默认路由命令详细操作.

1、IP分配如下
PC机:是Route1的一个loop0接口,IP为:192.168.1.6
R1 e0/0 : 10.1.2.1/30
R2 e0/1 : 10.1.2.2/30
R2 e0/0 : 198.0.18.6/30
E1 - 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
Gateway of last resort is not set
192.168.1.0/30 is subnetted, 1 subnets
C 192.168.1.0 is directly connected, FastEthernet1/0
设置路由
各类路由协议(包括静态路由)
查看路由:
#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
(config-router)#default-information originate
在RIP协议中,不管本地路由器上是否存在"ip route 0.0.0.0 0.0.0.0"路由,则该命令“(config-router)#default-information originate”
第二情况:网关上采用OSPF协议
方式一:
(config)#ip route 0.0.0.0 0.0.0.0
(config-router)#default-information originate
Cisco怎么配置静态路由

Cisco怎么配置静态路由推荐文章cisco路由器忘记登陆密码怎么办热度:思科防火墙PIXASA怎么配置热度: cisco无线路由怎么进行安全配置热度:思科5520怎么配置ACL 热度:思科FWSM路由模式怎么配置热度:思科cisco公司已成为公认的全世界网络互联解决方案的领先厂商,该公司出产的一系列路由器更是引领世界,那么你知道Cisco怎么配置静态路由吗?下面是店铺整理的一些关于Cisco怎么配置静态路由的相关资料,供你参考。
Cisco配置静态路由的方法我们的目的是,要PC0 ping通 PC1,基本思路是设定好所有设备的IP地址,然后再在路由器上配置静态路由。
记得路由与路由之间设置时钟频率(两台路由器之间只设置一个时钟频率)拓扑编址PC0:192.168.1.1 gw:192.168.1.2 PC1:192.168.4.1 gw:192.168.4.2第一步:设置好PC机的IP地址。
第二步:配置三台路由器:Router0:Router 0 >enRouter 0 #conf tRouter 0 (config)#int f0/0Router 0 (config-if)#ip address 192.168.1.2 255.255.255.0Router 0 (config-if)#no shutRouter 0 (config-if)#int s0/0/0Router 0 (config-if)#ip address 192.168.2.1 255.255.255.0Router 0 (config-if)#clock rate 64000设置时钟频率Router 0 (config-if)#no shutRouter 0 (config-if)#exitRouter 0 (config)#Router1:Router>enRouter#conf tRouter(config)#hostname Router1把路由器的名字设置为Router1Router1(config)#int s0/0/0Router1(config-if)#ip address 192.168.2.2 255.255.255.0Router1(config-if)#no shutRouter1(config-if)#int s0/0/1Router1(config-if)#ip address 192.168.3.1 255.255.255.0Router1(config-if)#clock rate 64000Router1(config-if)#no shutRouter1(config-if)#exitRouter1(config)#Router2:Router2>enRouter2#conf tRouter2(config)#int s0/0/1Router2(config-if)#ip address 192.168.3.2 255.255.255.0Router2(config-if)#no shutRouter2(config-if)#int f0/0Router2(config-if)#ip address 192.168.4.2 255.255.255.0Router2(config-if)#no shutRouter2(config-if)#exitRouter2(config)#第三步:配置静态路由:接下来就要用到我们上面的命令了:ip router <目的网段> <目的网段掩码><下一跳>Router0的设置:Router0(config)#ip route 192.168.4.0 255.255.255.0192.168.2.2目的网段目的网段掩码下一跳(下一个路由器的入口)Router1的设置:Router1(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1Router1(config)#ip route 192.168.4.0 255.255.255.0 192.168.3.2注意这里是属于中心路由器,所以要设置两条静态路由,分别指向两边的网段。
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实验要求●通过静态路由的配置使不同网段能够相互通信。
Cisco基本网络配置

19
防火墙asa基本设置
asa特点: • (1)从高安全级别接口到低安全级别接口的流量叫outside 流量,这 种流量默认是允许的 • (2)从低安全级别接口到高安全级别接口的流量叫inbound流量,这 种流量默认是不允许的,但我们可以使用ACL来放行inbound流量 • (3)相同安全级别的接口之间的流量默认是不允许的,但是可以用 命令打开 • (4) 安全级别的范围为0-100 • (5)默认inside安全级别为100,其余接口默认为0
进入vlan 1 设置IP地址 设置默认网关
6、交换机如何划分vlan switch#vlan database switch(vlan)#vlan 2 switch(vlan)#no vlan 2 或者 switch(config)#interface vlanX
进入VLAN设置 新建VLAN 2 删除VLAN 2 X表示vlan数
一、cisco的三种设备类型
• 1、cisco 路由器 • 2、cisco switch (思科交换机) • 3、cisco asa5510(思科防火墙)
1
1、路由器设备型号
• • • • • •
871 1800 2600 2800 3600 7200
2
2、交换机设备型号
• • • • • • • • 2950 2960 2970 3550 3560 4506 4510 6050
13
Cisco 基本网络设置
17、cisco路由器查看命令 Who 查看telnet 登陆用户 Show running-configure 查看配置信息 Show running-configure interface fx/x 查看接口详细配置 Show ip route 查看路由表 Show interface fastethernet x/x 查看快速以太网接口 Show ip interface brief 查看接口链路层状态 Show arp 查看ARP地址表 Show version 查看路由器版本信息 Show user 查看登陆用户 Show processes cpu 查看cpu使用进程 Show log 查看日志
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Router1#show interfaces
Router1#show ip route
…..
保存配置
查看路由表
Router1#wr
2021/3/7
CHENLI
15
四、静态路由试验步骤
注意:对router2的配置基本与router1的配置过程相同
第四步:验证直联路由 ➢ 验证pc1与pc2的连通 ➢ 验证pc2、pc3和pc4的连通 ➢ 验证pc1与pc2、pc3和pc4无法连通
调整,所以难以应用在大型网络中; ➢ 静态路由的优点:简单、高效、可靠、安全性高
2021/3/7
CHENLI
3
一、静态路由简介
注意: 当一个路由器中既配置了动态路由,又配
置了静态路由,在路由转发时,静态路由优 先于动态路由
2021/3/7
CHENLI
4
一、静态路由简介
静态路由种类: ➢ 直联路由; ➢ 静态路由; ➢ 默认路由;
2021/3/7
CHENLI
19
2021/3/7
CHENLI
16
四、静态路由试验步骤
第五步:
➢ 在router1上添加192.168.0.0到192.168.1.0的静态 路由;
➢ 查看路由表;
➢ 验证pc1与pc3的连通性;
➢ 在router2上192.168.1.0到192.168.0.0的添加静态 路由;
➢ 查看路由表;
➢ 验证pc1与pc3的连通性
2021/3/7
CHENLI
5
二、静态路由及其配置
直联路由:当定义一个路由器接口的IP地址, 并激活此接口,路由器就自动激活接口IP地 址所在网段的直联路由。 注意:每个路由器接口必须独占一个网段,多 个接口不能同属一个网段(书上描述错误)
2021/3/7
CHENLI
6
二、静态路由及其配置
直联路由配置:
2021/3/7
CHENLI
17
四、静态路由试验步骤
第六步: ➢ 在router1上添加默认路由; ➢ 查看路由表; ➢ 验证pc1与pc4的连通性; ➢ 在router2上添加默认路由; ➢ 查看路由表; ➢ 验证pc1与pc3的连通性
2021/3/7
CHENLI
18
四、静态路由试验步骤
第七步: ➢ 整理试验结果,并针对现象给出相应解释; ➢ 书写试验报告;
2021/3/7
CHENLI
11
四、静态路由试验步骤
第一步:建立拓扑结构
2021/3/7
CHENLI
12
四、静态路由试验步骤
第二步:启动vpcs,并按照拓扑中规定进行配置 pc的ip地址和端口号
2021/3/7
CHENLI
13
四、静态路由试验步骤
第三步:运行所有IOS,并对路由器进行基本配 置,后进行直联路由验证。
路由信息。
2021/3/7
CHENLI
8
二、静态路由及其配置
配置命令:
Ip route [网络号][子网掩码][下一跳地址/本地 接口]
取消命令:
No Ip route [网络号][子网掩码]
查看命令:
Show ip route
2021/3/7
CHENLI
9
三、默认路由及其配置
默认路由: ➢ 默认路由属于最不精确匹配,即当路由器在所
激活接口
Router1(config-if)#no shutdown
2021/3/7
CHENLI
14
四、静态路由试验步骤
Router1(config-if)#int f0/1
Router1(config-if)#ip address 10.0.0.254 255.255.255.0
Router1(config-if)#no shutdown Router1(config-if)#end 查看接口配置
Router>
进入特权模式
Router>enable
进入全局配置模式
Router#configure terminal
进入接口配置模式
Router(config)#interface f0/0
Router(config-if)#ip address 192.168.1.1
255.255.255.0
配置接口IP地址
静态路由
2021/3/7
CHENLI
1
提纲
静态路由简介 静态路由及其配置 默认路由及其配置 静态路由试验步骤
2021/3/7
CHENLI
2
一、静态路由简介
➢ 路由选择的两种方式:静态路由与动态路由 ➢ 静态路由是在路由器/计算机中设置的固定路由表,
只要管理者不改变,则静态路由就不会变; ➢ 静态路由的缺点:不能对网络拓扑的改变作出动态
Router(config-if)#no shutdown
……
2021/3/7
CHENLI
激活接口
7
二、静态路由及其配置
静态路由配置步骤: 1、为路由器每个接口配置IP地址; 2、确定有那些网段与本路由器直接相连; 3、确定有那些网段属与本路由器的非直联; 4、添加所有本路由器要到达的非直联网段相关的
Router>enalbe Router#conf t
配置路由器 名称
router(config)#hontname router1 Router1(config)#int f0/0
配置IP地址
Router1(config-if)#ip address 192.168.0.254
255.255.255.0
有已知路由信息中查不到如何转发时,则使用 默认路由进行转发; ➢ 默认路由可以看作是静态路由的一种特殊形式, 采用0.0.0.0/0匹配任意地址。 注意:默认路由只在非类别路由协议中起作用
2021/3/7
CHENLI
10
三、默认路由及其配置
配置命令: Ip route 0.0.0.0 0.0.0.0[下一跳地址/本地接口] 取消命令: No Ip route [网络号][子网掩码] 查看命令: Show ip route