Cisco复习(配置、CDP、静态、RIP、OSPF)

Standard

不用就忘,复习复习.
备份配置文件

Router>en
Router#int fa 0/0
Router#ip address 192.168.0.1 255.255.255.0
Router#no shut
Router#copy running-config tftp:
Address or name of remote host []? 192.168.0.2
Destination filename [Router-confg]? Router-config-bak-2011-7-20
 
Writing running-config...!!
[OK - 463 bytes]
 
463 bytes copied in 0.063 secs (7000 bytes/sec)
Router#

通过tftp加载配置文件

Router#copy tftp://192.168.0.2/Router-config-bak-2011-7-20 running-config
Accessing tftp://192.168.0.2/Router-config-bak-2011-7-20...
Loading Router-config-bak-2011-7-20 from 192.168.0.2: !
[OK - 463 bytes]
 
463 bytes copied in 0.031 secs (14935 bytes/sec)
Router#

Copy IOS到tftp

Router#copy flash: tftp:
Source filename []? c2800nm-advipservicesk9-mz.124-15.T1.bin
Address or name of remote host []? 192.168.0.2
Destination filename [c2800nm-advipservicesk9-mz.124-15.T1.bin]? c2800nm-advipservicesk9-mz.124-15.T1_bak.bin
 
Writing c2800nm-advipservicesk9-mz.124-15.T1.bin...!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 50938004 bytes]
 
50938004 bytes copied in 27.891 secs (1826000 bytes/sec)

使用CDP获取相连设备信息

Router>en
Router#conf t
Router(config)#hostname Router0
Router0(config)#int fa 0/0
Router0(config-if)#ip address 192.168.1.1 255.255.255.0
Router0(config-if)#no shut
 
Router>en
Router#conf t
Router(config)#hostname Router1
Router1(config)#int fa 0/0
Router1(config-if)#ip address 192.168.1.2 255.255.255.0
Router1(config-if)#no shut
Router1(config)#int fa 0/1
Router1(config-if)#ip address 192.168.2.1 255.255.255.0
Router1(config-if)#no shut
Router1(config-if)#exit
Router1(config)#show cdp neighbors
Router1#no cdp run
Router1#cdp run
 
Switch>en
Switch#conf t
Switch(config)#hostname Switch0
Switch0(config)#int fa 0/1
Switch0(config-if)#cdp enable
Switch0(config-if)#no cdp enable
Switch0(config-if)#cdp enable

禁用域名解析

Router0>en
Router0#conf t
Router0(config)#no ip domain-lookup
Router0(config)#end
Router0#

静态路由

Router0#conf t
Router0(config)#ip route 192.168.4.0 255.255.255.0 192.168.2.2
 
Router1#conf t
Router1(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1
Router1(config)#ip route 192.168.4.0 255.255.255.0 192.168.3.2
 
Router2#conf t
Router2(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1
//PC0 ping 192.168.4.1 ok
//PC0 ping 192.168.3.1 unreachable
//PC1 ping 192.168.1.1 ok
//PC1 ping 192.168.2.1 unreachable
 
Router0(config)#ip route 192.168.3.0 255.255.255.0 192.168.2.2
//PC0 ping 192.168.3.1 ok
Router2(config)#ip route 192.168.2.0 255.255.255.0 192.168.3.2
//PC1 ping 192.168.2.1 ok

RIP

Router1#conf t
Router1(config)#int se 1/0
Router1(config-if)#ip address 192.168.1.1 255.255.255.0
Router1(config-if)#clock rate 64000
Router1(config)#int se 1/1
Router1(config-if)#ip address 10.3.1.1 255.255.255.0
Router1(config-if)#clock rate 64000
Router1#show interfaces serial 1/0
Serial1/1 is up, line protocol is up (connected)
...
Router1#show interfaces serial 1/1
Serial1/1 is up, line protocol is up (connected)
...
 
Router2#conf t
Router2(config)#int se 1/0
Router2(config-if)#ip address 192.168.1.2 255.255.255.0
Router2(config)#int fa 0/0
Router2(config-if)#ip address 192.168.3.1 255.255.255.0
 
Router3#conf t
Router3(config)#int se 1/1
Router3(config-if)#ip address 10.3.1.2 255.255.255.0
Router3(config)#int fa 0/0
Router3(config-if)#ip address 10.3.3.1 255.255.255.0
 
Router1(config)#router rip
Router1(config-router)#network 192.168.1.0
Router1(config-router)#network 10.3.1.0
 
Router2(config)#router rip
Router2(config-router)#network 192.168.1.0
Router2(config-router)#network 192.168.3.0
 
Router3(config)#router rip
Router3(config-router)#network 10.3.1.0
Router3(config-router)#network 10.3.3.0
 
Router1#debug ip rip
RIP protocol debugging is on
Router1#RIP: received v2 update from 10.3.1.2 on Serial1/1
      10.3.3.0/24 via 0.0.0.0 in 1 hops
      ...
 
Router1#show ip route
...
     10.0.0.0/24 is subnetted, 2 subnets
C       10.3.1.0 is directly connected, Serial1/1
R       10.3.3.0 [120/1] via 10.3.1.2, 00:00:08, Serial1/1
C    192.168.1.0/24 is directly connected, Serial1/0
R    192.168.3.0/24 [120/1] via 192.168.1.2, 00:00:15, Serial1/0
 
PC0>tracert 10.3.3.2
Tracing route to 10.3.3.2 over a maximum of 30 hops:
  1   62 ms     32 ms     31 ms     192.168.3.1
  2   62 ms     62 ms     63 ms     192.168.1.1
  3   78 ms     94 ms     94 ms     10.3.1.2
  4   *         125 ms    125 ms    10.3.3.2
Trace complete.

OSPF

采集站请慢,还没写完呢,有空再加…

转载请注明出处:http://yemaosheng.com

2 thoughts on “Cisco复习(配置、CDP、静态、RIP、OSPF)

  1. 我们能交换友情链接吗?希望我们共同学习、进步!也方便大家互动。如果你同意,请回复邮件给我,或加我QQ:1298006002,我会在第一时间链接你的博客。

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.