思科路由器静态路由表的配置

首先将网段合理分配,如下是一个实验例子。

我们要实现的是对router0和router1的静态路由表的配置,具体配置步骤如下:

router0:

Router>en 

Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#ip add 192.168.0.2 255.255.255.0
Router(config-if)#no sh

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

Router(config-if)#exi
Router(config)#int f0/1
Router(config-if)#ip add 10.1.5.2 255.255.255.0
Router(config-if)#no sh

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

Router(config-if)#exi
Router(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Router(config)#ip route 10.1.5.0 255.255.255.0 f0/1
Router(config)#ip route 192.168.1.0 255.255.255.0 f0/1

router1

Router>en
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int f0/0
Router(config-if)#ip add 10.1.5.1 255.255.255.0
Router(config-if)#no sh u

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
Router(config-if)#exi
Router(config)#int f0/1
Router(config-if)#ip add 192.168.1.2
% Incomplete command.
Router(config-if)#ip add 192.168.1.2 255.255.255.0
Router(config-if)#no shu 

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

Router(config-if)#exi
Router(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

%SYS-5-CONFIG_I: Configured from console by console
Router#confi t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#ip route 192.168.0.0 255.255.255.0 f0/0
Router(config)#ip route 10.1.5.0 255.255.255.0 f0/0

按照上述的步骤配置完成后,可以在pc0上面执行ping命令:

ping 192.168.1.1

发现能ping通,说明配置成功

  • 2
    点赞
  • 26
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值