DOC

CCNA

By Brent Thomas,2014-06-02 23:13
15 views 0
CCNA

    CCNA

路由器实验?

     router> enable 从用户模 式进入特权模

     router# exit 从特权模式退出到用户模式

     router# show users 查看本机上的用户

     router# reload 重启路由器

     router# conf t 从用户模式进入特权模式

     router(config)# hostname rl 配置用户名为rl ;改名;

     router# show controllers serial0 查看串口0的物理层信息;主要是查看DTE/DCE

     router# show ip interface 查看端口的IP配置信息

     rl(config)# int s0 进入s0的接口配置模式

     rl(config-if)# no shutdown 路由器出厂默认所有端口关闭?使用此命令使它们打开

     rl(config-if)# clock rate 64000 如果是DCE使需要设置时钟速率

     rl(config-if) ctrl+z 快捷键退出到特权模式

     rl# show cdp neighbors 查看CDP邻居信息

     rl(config-if)# ip add 10.0.0.1 255.0.0.0 进入相应的接口?配置相应的IP地址

    rl# ping 10.0.0.2 使用ping命令查看邻居的连通

     rl# show ip route 查看路由表?可以看到以C打头的路由 信息,这是直连的路由信息,

    静态路由

    Router NetworkAddress Interface Address

    RouterA 192.168.10. 0 fa0/0 192.168.10.1

    192.168.20.0 s0 192.168.20.1

    RouterB 192.168.20.0 s0 192.168.20.2

    192.168.40.0 s1 192.168.40.1

    192.168.30.0 fa0/0 192.168.30.1

    RouterC 192.168.40.0 s0 192.168.40.2

    192.168.50.0 fa0 192.168.50.1

    基本配置

    RouterA.>en

    RouterA#conf t

    RouterA(config)#int fa0/0

    RouterA(config-if)#ip address 192.168.10.1 255.255.255.0 RouterA(config-if)#no shut

    RouterA(config-if)#int s 0

    RouterA(config-if)#ip address 192.168.20.1 255.255.255.0 RouterA(config-if)#clock rate 64000

    RouterA(config-if)#no shut

    RouterA(config-if)#exit

    RouterA(config)#ip route 192.168.30.0 255.255.255.0 192.168.20.2 RouterA(config)#ip route 192.168.40.0 255.255.255.0 192.168.20.2

    RouterA(config)#ip route 192.168.50.0 255.255.255.0 192.168.20.2 RouterA(config) #end

    RouterA#

RouterB(config)#int fa0/0

    RouterB(config-if)#ip address 192.168.30.1 255.255.255.0 RouterB(config-if)#no shut

    RouterB(config-if)#int s 0

    RouterB(config-if)#ip address 192.168.20.2 255.255.255.0 RouterB(config-if)#clock rate 64000

    RouterB(config-if)#no shut

    RouterB(config-if)#int s1

    RouterB(config-if)#ip address 192.168.40.1 255.255.255.0 RouterB(config-if)#clock rate 64000

    RouterB(config-if)#no shut

    RouterB(config-if)#exit

    RouterB(config)#ip route 192.168.10.0 255.255.255.0 192.168.20.1 RouterB(config)#ip route 192.168.50.0 255.255.255.0 192.168.40.2 RouterB(config)#end

    RouterB#

RouterC(config)#int fa0/0

    RouterC(config-if)#ip address 192.168.50.1 255.255.255.0 RouterC(config-if)#no shut

    RouterC(config-if)#int s 0

    RouterC(config-if)#ip address 192.168.40.2 255.255.255.0 RouterC(config-if)#clock rate 64000

    RouterC(config-if)#no shut

    RouterC(config-if)#exit

    RouterC(config)#ip route 192.168.10.0 255.255.255.0 192.168.40.1 RouterC(config)#ip route 192.168.20.0 255.255.255.0 192.168.40.1 RouterC(config)#ip route 192.168.30.0 255.255.255.0 192.168.40.1 RouterC(config)#end

    RouterC#

    配置完可以用路由器或PC机来ping?看能否ping

    或可以用Show runn \ sh ip router 查看配置

    静态路由

    Router NetworkAddress Interface Address

    RouterA 192.168.10. 0 fa0/0 192.168.10.1

    192.168.20.0 s0 192.168.20.1

    RouterB 192.168.20.0 s0 192.168.20.2

    192.168.40.0 s1 192.168.40.1

    192.168.30.0 fa0/0 192.168.30.1

    RouterC 192.168.40.0 s0 192.168.40.2

    192.168.50.0 fa0 192.168.50.1

在配置动态路由前必须保证没有静态路由表?如果配过静态路由?可以先去掉静

    态路由

    RouterA(config)#no ip route 192.168.30.0 255.255.255.0 192.168.20.2 RouterA(config)#no ip route 192.168.40.0 255.255.255.0 192.168.20.2 RouterA(config)#no ip route 192.168.50.0 255.255.255.0 192.168.20.2

RouterA#conf t

RouterA(config)#router rip

    RouterA(config-router)#network 192.168.10.0 RouterA(config-router)#network 192.168.20.0 RouterA(config-router)#^Z

    RouterA#

RouterB#conf t

    RouterB(config)#router rip

    RouterB(config-router)#network 192.168.20.0 RouterB(config-router)#network 192.168.30.0 RouterB(config-router)#network 192.168.40.0 RouterB(config-router)#^Z

    RouterB#

RouterC#conf t

    RouterC(config)#router rip

    RouterC(config-router)#network 192.168.50.0 RouterC(config-router)#network 192.168.40.0 RouterC(config-router)#^Z

    RouterC#

密码

RouterC(config)#host li //更改路由器名为

Liqian(config)#enable password 1234 /配置密码1234

Report this document

For any questions or suggestions please email
cust-service@docsford.com