CCNA课程笔记五 静态路由

配置路由:
一,什么是路由:数据包从原设备到目的设备所经过的路径。
二, 路由的分类:
 1 静态路由:管理员手工配置
 2 动态路由:通过“路由协议”学习路径
三,配置静态路由
其中 a e0 网卡连接 pc1 s0 网卡连接 b 路由的 s0 网卡由 a 提供时钟频率
a e0 网卡 ip 192.168.10.1 s0 网卡 ip 202.100.10.1
b e0 网卡 ip 192.168.20.1 s0 网卡 ip 202.100..10.2
pc1 网卡 ip 192.168.10.2 网关: 192.168.10.1
pc2 网卡 ip 192.168.20.2 网关: 192.168.20.1
a 路由器的配置如下:
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname a
a(config)#int e0
a(config-if)#ip address 192.168.10.1 255.255.255.0
a(config-if)#no shutdown
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
a(config-if)#int s0
a(config-if)#ip address 202.100.10.1 255.255.255.0
a(config-if)#encap ppp
a(config-if)#clock rate 56000
a(config-if)#no shutdown
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%LINK-3-UPDOWN: Interface Serial0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
a(config-if)#exit
a(config)#ip route 192.168.20.0 255.255.255.0 202.100.10.2
b 路由器的配置如下:
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname a
a(config)#int e0
a(config-if)#ip address 192.168.10.1 255.255.255.0
a(config-if)#no shutdown
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
a(config-if)#int s0
a(config-if)#ip address 202.100.10.1 255.255.255.0
a(config-if)#encap ppp
a(config-if)#clock rate 56000
a(config-if)#no shutdown
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%LINK-3-UPDOWN: Interface Serial0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
a(config-if)#exit
a(config)#ip route 192.168.20.0 255.255.255.0 202.100.10.2
注:如果目的网络太多或不明确时写成:
a(config)#ip route 0.0.0.0  0.0.0.0  下一跳 ip 地址
典型应用:企业访问 internet

本文出自 “网络技术成长笔记” 博客,谢绝转载!

你可能感兴趣的:(休闲,CCNA,静态路由,课程笔记)