思科路由器静态路由配置

简介:

                     静态路由配置

拓朴结构

    

   

Router1上配置全部代码

Router>enable

Router#conf

Router(config)#int f0/0

Router(config-if)#ip address 192.168.0.1 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#int s2/0

Router(config-if)#ip address 192.168.1.1 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#ip route 192.168.2.0 255.255.255.0 192.168.1.2

Router(config)#ip route 192.168.3.0 255.255.255.0 192.168.1.2

Router(config)#

Router2上的全部配置代码

Router>enable

Router#conf

Router(config)#int s2/0

Router(config-if)#ip address 192.168.1.2 255.255.255.0

Router(config-if)#clock rate 128000

Router(config-if)#no shutdown

Router(config-if)#int s3/0

Router(config-if)#ip address 192.168.2.1 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#ip route 192.168.0.0 255.255.255.0 192.168.1.1

Router(config)#ip route 192.168.3.0 255.255.255.0 192.168.2.2

Router3上的全部配置代码

Router>enable

Router#conf

Router(config)#int s3/0

Router(config-if)#ip address 192.168.2.2 255.255.255.0

Router(config-if)#clock rate 128000

Router(config-if)#no shutdown

Router(config-if)#int f0/0

Router(config-if)#ip address 192.168.3.1 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#ip route 192.168.0.0 255.255.255.0 192.168.2.1

Router(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1

Router(config)#exit

Router#

这时可以在三个路由器的特权模式下:show ip route

Router#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

       i - 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 - ODR

       P - periodic downloaded static route

Gateway of last resort is not set

S    192.168.0.0/24 [1/0] via 192.168.2.1

S    192.168.1.0/24 [1/0] via 192.168.2.1

C    192.168.2.0/24 is directly connected, Serial3/0

C    192.168.3.0/24 is directly connected, FastEthernet0/0

pc4  ip配置

pc5  ip配置

测试连通性

使用pc5 ping pc4测试










本文转自 guodong810 51CTO博客,原文链接:http://blog.51cto.com/guodong810/1033265,如需转载请自行联系原作者
目录
相关文章
|
7月前
|
网络虚拟化 网络架构
交换机与路由器技术-09-虚拟局域网VLAN
交换机与路由器技术-09-虚拟局域网VLAN
47 0
|
7月前
|
网络架构
交换机与路由器技术-13-三层交换
交换机与路由器技术-13-三层交换
23 0
|
7月前
|
网络架构
交换机与路由器技术-07-静态路由配置
交换机与路由器技术-07-静态路由配置
30 0
|
7月前
|
网络架构
交换机与路由器技术-14-三层交换机配置
交换机与路由器技术-14-三层交换机配置
38 0
|
7月前
|
网络架构
交换机与路由器技术-08-路由器上配置DHCP
交换机与路由器技术-08-路由器上配置DHCP
21 0
|
7月前
|
网络架构
交换机与路由器技术
交换机与路由器技术
29 0
|
7月前
|
网络架构
交换机与路由器技术-12-单臂路由
交换机与路由器技术-12-单臂路由
38 0
|
vr&ar 网络虚拟化 数据中心
华为网络配置(VLAN与单臂路由)
设备概述、VLAN、VLAN介绍、案例、配置过程、测试、单臂路由、单臂路由介绍、案例、配置过程、测试
249 0
华为网络配置(VLAN与单臂路由)
|
网络虚拟化
三层交换机配置说明(华为S5700设置三个网段互通)
1.配置Switch # 创建VLAN system-view[HUAWEI] sysname Switch[Switch] vlan batch 10 20 30# 配置接口加入VLAN [Switch] interface gigabitethernet 0/0/1[Switch-Gig...
2216 0
|
网络虚拟化 网络架构 ARouter