浅谈CCNA的模式与RIP的简单配置
       在CCNA中要配置路由器时,在不同的模式下命令有不同的用处,但是有时候在不同模式命令是不支持的下面我来简单说一下在路由器进入不同的模式的命令。
 打开路由器输入enable进入特权模式
在特权模式下输入configure  terminal进入全局模式,课简写为conf  t
在全局模式下输入Interface加上端口号,进入此端口,可简写为如:int  s0/0
在此模式下我们可以把ip地址下上ip  address 加上ip也可简写如:ip addr  192.168.1.1 255.255.255.0
写完ip以后输入no  shut激活此端口,在串口之间用上时钟频率输入clock  rate  64000
在全局模式下输入hosstname  r1定义路由器的名字,也可以简写为host   r1
在全局模式下输line  con  0进入线控(线路控制)模式
rip的协议端口号是120
rip距离矢量协议,用信息管理包所经过的网管来做为距离单位,超过15跳便不可到达
下面来简单用RIP配置一下路由器,拓扑如下:
我们可以在一个文本里面写上步骤然后粘贴到路由器中
步骤:
r1:
en
conf t
host r1
no ip domain-lookup
line con 0
logging syn
exec-timeout 0 0
exit
int s0/0
ip addr 192.168.1.1 255.255.255.0
no shut
clockrate 64000
exit
router rip
network 192.168.1.0
exit
r2:
en
conf t
host r2
no ip domain-lookup
line con 0
logging syn
exec-timeout 0 0
exit
int s0/0
ip addr 192.168.1.2 255.255.255.0
no shut
clock  rate  64000
int s0/1
ip addr 192.168.2.1 255.255.255.0
no shut
exit
router rip
network 192.168.1.0
network 192.168.2.0
exit
r3:
en
conf t
host r3
no ip domain-lookup
line con 0
logging syn
exec-timeout 0 0
exit
int s0/0
ip addr 192.168.2.2255.255.255.0
no shut
clockrate 64000
exit
router rip
network 192.168.2.0
exit
我们来粘贴一下看是否能人那个ping通
能ping通实验成功!
是开启并简单配置缺省路由的语法,我以后会写到的
no ip domain-lookup
line con 0
logging syn
exec-timeout 0 0