Continue with configuration dialog? [yes/no]: no        


Press RETURN to get started!

 

Router>en                                 
Router>enable        《 ===================================进入特权模式
Router#conf
Router#configure
Router#configure terminal   《================================进入全局模式 
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#h
Router(config)#hostname R1    《=============================配置主机名
R1(config)#ena
R1(config)#enable p
R1(config)#enable password 123456   《===========================配置特权密码
R1(config)#in f
R1(config)#in fastEthernet 0/0    《=============================进入F0/0端口
R1(config-if)#ip add
R1(config-if)#ip address 192.168.1.1 255.255.255.0 《==============配置该端口IP地址
R1(config-if)#no shu
R1(config-if)#no shutdown     《=============================开启该端口

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

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

R1(config-if)#exit       《=============================返回上层模式
R1(config)#in s
R1(config)#in serial 0/0/0    
R1(config-if)#ip add
R1(config-if)#ip address 192.168.2.1 255.255.255.0
R1(config-if)#clock rate 64000             《=====================配置DCE串口时钟频率
R1(config-if)#no shu
R1(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
R1(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up

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

R1(config-if)#exit
R1(config)#ip r
R1(config)#ip route 192.168.3.0 255.255.255.0 192.168.2.2 《======配置静态路由

192.168.3.0为所需到达的网段 255.255.255.0为所需到达的子网掩码 192.168.2.2 为下一跳地址(该路由器出去所经过的一个接口的IP地址)