- 论坛徽章:
- 0
|
RouterRouter#show ?
Router#show running-config // 显示运行得参数
Router#show protocol // 显示协议 Serial Ethernet Bri
Router#show flash // FLAH使用情况
Router#show clock // 时间
Router#show interface // 各接口情况
Router#show hosts
CDP ----------------------------------------------------4
//[Cisco Discovery Protocol ] [share basic configuration;at Layer 2 of the OSI ;]
R1#show cdp // how often,how long it is about cdp
R1#show cdp interface // 显示CDP
R1#show cdp neighbors // provide information about directly connected neighbors
R1#show cdp entry R4 // provide information about the specific device "R4"
R1(config)#cdp timer 45 // sending cdp packets every 45 seconds
R1(config)#cdp holdtime 60 // a hold time value of 60 seconds
Router#configure terminal
Router(config)#hostname R1
R1(config)#interface Serial 0
R1(config-if)#no shutdown // Enable the Serial 0 interface on R1.
R1(config)#interface Ethernet 0
R1(config-if)#no shutdown // Enable the Ethernet 0 interface on R1
R1(config)#cdp run // [no cdp run]
R1(config)#interface Ethernet 0
R1(config-if)#no cdp enable // R1 Disable CDP for only eth0 [cdp enable]
EXTEND BASIC-----------------------------------------------5
#?
R1#configure terminal // Configuration Mode
R2(config)#hostname R1 // Setting Host Name
R1(config)#enable password att // Setting Enable Password
R1(config)#enable secret att1 // Setting Enable Password
R1(config)#banner motd z // Setting the Banner MOTD (Message of the Day)
R1#show running-config // script is not automatically saved on a Cisco router
R1#show startup-config // configuration stored in NVRAM
R1#copy running-config startup-config // you can power off anytime if you wish
R1#erase startup-config // delete ALL configuration on the router
R1#reload // =del
Ethernet 0 is Line protocol is Meaning
administratively down down The interface is turned off with the shutdown command
up down Cable is connected but keep alives are not being received.
down down Cabling problem or no clock rate set on DCE. Or other router interface is shutdown.
up up connected and receiving keep alives. This is what we want!!!
R1#show ip int brief // show interface serial 0
R1#show controllers serial 0 // [DTE- other end to providing clocking,DCE- must provide the clocking]
R1(config)int eth 0
R1(config-if)#no shutdown
R1(config-if)#end
R1(config)#int ser 0
R1(config-if)#clock rate 56000
R1(config-if)#end
R1(config)#int e0
R1(config-if)#description to samba
Basic IP Configuration and Verification------------------9
R1#conf t
R1(config)#int e0
R1(config-if)#ip address 10.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#int s0
R1(config-if)#ip address 172.16.10.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#end
R1#sh ip int brief
R1#sh running-config
R1#sh ip int
R2#conf t
R2(config)#int e0
R2(config-if)#ip address 10.1.1.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#end
R2#show ip int brief
R4#conf t
R4(config)#int s0
R4(config-if)#ip address 172.16.10.2 255.255.255.0
R4(config-if)#no shut
R4(config-if)#end
R4#sh ip int brief
R1#sh arp //
R1#clear arp //清除了好像就只剩本身了
Creating a Host table-------------------------------11
R1#conf t
R1(config)#int e0
R1(config-if)#ip address 175.42.36.10 255.255.255.0
R1(config-if)#no shut
R1(config-if)#end
R2#conf t
R2(config)#int e0
R2(config-if)#ip address 175.42.36.12 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#ip host R1 175.42.36.10 //ip表
R2(config)#exit
R2#ping R1
R2#sh hosts
Static Routes-----------------------------------12
//手动添加网关,路由R4/s0连接到R2/E0
R1 R2 R4
E0 10.1.1.1/24 10.1.1.2/24
S0 12.5.10.1/24 12.5.10.2/24
R1#conf t
R1(config)#int e0
R1(config-if)#ip address 10.1.1.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#int s0
R1(config-if)#ip address 12.5.10.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#end
R2#conf t
R2(config)#int e0
R2(config-if)#ip address 10.1.1.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#end
R4#conf t
R4(config)#int s0
R4(config-if)#ip address 12.5.10.2 255.255.255.0
R4(config-if)#no shut
R4(config-if)#exit
R4(config)#ip route 10.1.1.0 255.255.255.0 12.5.10.1 //R4e0>R1e0>R1S0>R2s0>null
R2(config)#ip route 12.5.10.0 255.255.255.0 10.1.1.1
R2#show ip route //Conected 10.1.1.0/24 eth0; Static 12.5.10.0/24 via 10.1.1.1
Routing Information Protocol (RIP) --------------------------13
//interior gateway protocol (IGP);15hops max in rip
//RIP version 1 is classful > without subnet mask
//RIP version 2 is classless > within subnet mask
//network statement > tell the router which networks it is connected to
//指定接口IP,指定路由网段;30/s;
R1#conf t
R1(config)#int e0
R1(config-if)#ip address 10.1.1.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#int s0
R1(config-if)#ip address 172.16.10.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#router rip //enable router RIP as router protocol
R1(config-router)#network 10.0.0.0
R1(config-router)#network 172.16.0.0
R1(config-router)#end
R1#sh ip int brief
R2#conf t
R2(config)#int e0
R2(config-if)#ip address 10.1.1.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#router rip
R2(config-router)#network 10.0.0.0
R2(config-router)#end
R2#sh ip int brief
R4#conf t
R4(config)#int s0
R4(config-if)#ip address 172.16.10.2 255.255.255.0
R4(config-if)#no shut
R4(config-if)#exit
R4(config)#router rip
R4(config-router)#network 172.16.0.0
R4(config-router)#end
R4#sh ip route //没有'r',妈的,就说么,咋么货呢
R4#sh ip protocols //显示路由协议,有时间间隔,可能稍等
//administrative distance 120 >可信任路由,数值低则优先;hops 跳跃点
IGRP Overview-----------------------------------------------14
// Interior Gateway Routing Protocol (IGRP)
// 默认优先级100 ,90/s,273based on bandwidth delay带宽延时
// (config)#router IGRP 100
// RIP 30s R4 > R 10.1.1.0/24 [120/1] via 172.16.10.2, 00:00:21, Serial0
// IGRP 90s R4 > I 10.1.1.0/24 [100/273] via 172.16.10.1, 00:00:21, Serial0
R1#conf t
R1(config)#int e0
R1(config-if)#ip address 10.1.1.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#int s0
R1(config-if)#ip address 172.16.10.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#router igrp 100
R1(config-router)#network 10.0.0.0
R1(config-router)#network 172.16.0.0
R1(config-router)#end
R1#sh ip int brief
R2#conf t
R2(config)#int e0
R2(config-if)#ip address 10.1.1.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#router igrp 100
R2(config-router)#network 10.0.0.0
R2(config-router)#end
R4#conf t
R4(config)#int s0
R4(config-if)#ip address 172.16.10.2 255.255.255.0
R4(config-if)#no shut
R4(config-if)#exit
R4(config)#router igrp 100
R4(config-router)#network 172.16.0.0
R4(config-router)#end
R4#sh ip route
R4#sh ip protocO
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/74076/showart_1098434.html |
|