R1
Router>en
Router#conf t
Enter configuration commands, .e per line. End with CNTL/Z.
Router(config)#host r1
enable password cisco
定义特权口令
r1(config)#line vty 0 4
定义
telnet
口令
r1(config-line)#password ccna
r1(config-line)#login
r1(config-line)#exit
r1(config)#int s0/0
给接口分配
ip
r1(config-if)#ip addr 192.168.2.1 255.255.255.0
r1(config-if)#no shut
r1(config-if)#exit
r1(config)#router eigrp 100
配置
eigrp
路由协议
r1(config-router)#network 192.168.2.0
R2
Router>en
Router#conf t
Enter configuration commands, .e per line. End with CNTL/Z.
Router(config)#host r2
r2(config)#enable password cisco
r2(config)#line vty 0 4
r2(config-line)#password ccna
r2(config-line)#login
r2(config-line)#exit
r2(config)#int s0/0
r2(config-if)#ip addr 192.168.2.2 255.255.255.0
r2(config-if)#no shut
r2(config-if)#exit
r2(config)#int s0/1
r2(config-if)#ip addr 192.168.3.1 255.255.255.0
r2(config-if)#no shut
r2(config-if)#exit
r2(config)#router eigrp 100
r2(config-router)#network 192.168.2.0
r2(config-router)#network 192.168.3.0
r2(config-router)#exit
R3
Router>en
Router#conf t
Enter configuration commands, .e per line. End with CNTL/Z.
Router(config)#host r3
r3(config)#enable password cisco
r3(config)#line vty 0 4
r3(config-line)#password ccna
r3(config-line)#login
r3(config-line)#exit
r3(config)#int s0/1
r3(config-if)#ip addr 192.168.3.2 255.255.255.0
r3(config-if)#no shut
r3(config-if)#exit
r3(config)#int s0/2
r3(config-if)#ip addr 192.168.4.1 255.255.255.0
r3(config-if)#no shut
r3(config-if)#exit
r3(config-router)#network 192.168.3.0
r3(config-router)#network 192.168.4.0
r3(config-router)#exit
R4
Router>en
Router#conf t
Enter configuration commands, .e per line. End with CNTL/Z.
Router(config)#host r4
r4(config)#enable password cisco
r4(config)#line vty 0 4
r4(config-line)#password ccna
r4(config-line)#login
r4(config-line)#exit
r4(config)int s0/2
r4(config)ip addr 192.168.4.2 255.255.255.0
r4(config-if)#no shut
r4(config-if)#exit
r4(config)#router eigrp 100
r4(config-router)#network 192.168.4.0
基本配置完成!
下面配置扩展
ACL
。
r2(config)#access-list 100 deny icmp 192.168.4.2 0.0.0 .0 192.168.2.1 0.0.0.0 echo
r2(config)#access-list 100 deny icmp 192.168.4.2 0.0.0 .0 192.168.2.1 0.0.0.0 echo-reply
r2(config)#access-list 100 deny tcp 192.168.3.2 0.0.0 .0 192.168.2.1 0.0.0.0 eq 23
r2(config)#access-list 100 permit ip any any
r2(config)#int s0/0
r2(config-if)#ip access-group 100 out