跳转到内容

CCNA 认证/配置

来自维基教科书,开放的书籍,开放的世界

Cisco 入门

[编辑 | 编辑源代码]
The basic router prompt, called user exec mode, - If it's not properly configured means,
Router >
If it's configured properly means,
Hostname of router >

模式

Router>? or  Router>show ?
Router# - privileged exec mode

配置您的思科路由器

Router#show interfaces
Router#show ip protocols
Router#show ip route
Router#show ip arp

然后进入全局配置模式...

Router#config
Router(config)#

配置主机名

Router(config)#hostname ExampleName
ExampleName(config)#

指定 DNS 服务器

ExampleName(config)#ip name-server aa.bb.cc.dd
ExampleName(config)#ctrl-Z
ExampleName#

然后使用 CTRL+Z 保存配置

配置串行和以太网接口

ExampleName#config terminal
ExampleName(config)#interface ethernet 0/1
ExampleName(config-if)#ip address 192.168.10.1 255.255.255.0
ExampleName(config-if)#[Ctrl-Z]
ExampleName#config
ExampleName(config)#interface serial 1/1
ExampleName(config-if)#ip address 192.168.155.2 255.255.255.0
ExampleName(config-if)#no shutdown
ExampleName(config-if)#ctrl-Z
ExampleName#

注意 no shutdown 命令。接口可能已正确配置并物理连接,但处于“管理关闭”状态。在这种状态下,它将无法正常工作。使接口处于管理关闭状态的命令是 shutdown。

配置思科路由

ExampleName(config)#ip routing
ExampleName(config)#ctrl-Z
ExampleName#config
ExampleName(config)#ip route 172.16.0.0 255.255.255.0 192.168.150.1
ExampleName(config)#ctrl-Z
ExampleName#show ip route

配置访问列表和网络安全

Interface Serial0
ip access-group 101 in
ip access-group 6 out
access-list 10 permit 234.5.6.12
access-list 10 deny 5.10.10.32 0.0.0.31
access-list 10 permit 5.10.0.0 0.0.255.255
access-list 10 permit 123.234.0.0 0.0.0.255
access-list 101 permit tcp any any established
access-list 101 permit tcp any 204.34.5.25 host eq 80
access-list 101 permit ip 203.45.34.0 0.0.0.255 204.34.5.0 0.0.0.255
access-list 101 permit tcp 203.44.32.0 0.0.0.31 204.34.5.0 0.0.0.255 eq telnet
access-list 101 permit tcp any 204.34.5.10 eq smtp

参考资料

[编辑 | 编辑源代码]

http://www.opennet.ru/soft/cisco-configuration.html http://www.tele.pitt.edu/~telelab/labs/General%20Lab%20Documentation/pdf/GeneralLab%20Documentation~Cisco%20Router%20Configuration%20Tutorial~08.20.05.pdf

华夏公益教科书