昨天下午做了这个实验,在实验过程中,也第一次用到了Dynamips这个软件(由众博友推荐),它确实是可以模拟出cisco路由器的硬件环境,然后直接在这个环境下运行cisco的IOS,呵呵,初次使用,不是很灵活,但经过整整一下午,也掌握了它的使用方法(以后有些实验估计boson netsim会有些命令没有),但是今天的实验还是贴出在boson netsim上配置的情况,但会贴一张Dynamips下的图。 先说说ppp和chap,ppp(point to point protocol)是点到点型线路的数据链路层协议, 它支持在各种物理类型的点到点串行线路上传输上层协议报文,而chap则是ppp可选的身份认证协议之一,另外一种叫pap,好像安全性不及chap。下面看实验。 拓扑图如下所示: 在配置的时候需要注意的是:要分别在r1和r2上的全局模式下用username ** password ##来为本地口令数据库添加记录,而此处的**应该是对端路由器的名字,##则为设定的密码,两个路由器的该命令要写同一密码。如下所示: r1(config)#username r2 password cisco r2(config)#username r1 password cisco; 接下来看详细的配置情况:1.1 在r1上show runr1#show run Building configuration... Version 12.1 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname r1 ! username r2 password cisco ! ! ! ip subnet-zero ! ! ! ! ! ! ! ! ! ! interface Serial0 ip address 192.168.2.1 255.255.255.0 no ip directed-broadcast clock rate 64000 encapsulation ppp ppp authentication chap ! interface Ethernet0 ip address 192.168.1.2 255.255.255.0 no ip directed-broadcast ! ! router rip network 192.168.1.0 network 192.168.2.0 ! ip classless no ip http server ! ! ! line con 0 transport input none line aux 0 line vty 0 4 ! no scheduler allocate end Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route C 192.168.1.0 is directly connected, Ethernet0 192.168.2.0/24 is subnetted, 1 subnets C 192.168.2.0 is directly connected, Serial0 192.168.3.0/24 is subnetted, 1 subnets R 192.168.3.0 [120/1] via 192.168.2.2, 00:05:25, Serial0 Routing Protocol is "rip" Sending updates every 30 seconds, next due in 17 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is Incoming update filter list for all interfaces is Redistributing: rip Default version control: send version 1, receive any version Interface Send Recv Key-chain Serial0 1 1 2 Ethernet0 1 1 2 Routing for Networks: 192.168.1.0 192.168.2.0 Routing Information Sources: 192.168.2.2 120 00:00:09 Distance: (default is 120)
2.1 在r2上show runr2# show run Building configuration... Version 12.1 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname r2 ! username r1 password cisco ! ! ! ip subnet-zero ! ! ! ! ! ! ! ! ! ! interface Serial0 ip address 192.168.2.2 255.255.255.0 no ip directed-broadcast encapsulation ppp ppp authentication chap ! interface Ethernet0 ip address 192.168.3.1 255.255.255.0 no ip directed-broadcast ! ! router rip network 192.168.2.0 network 192.168.3.0 ! ip classless no ip http server ! ! ! line con 0 transport input none line aux 0 line vty 0 4 ! no scheduler allocate end Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route C 192.168.2.0 is directly connected, Serial0 192.168.1.0/24 is subnetted, 1 subnets R 192.168.1.0 [120/1] via 192.168.2.1, 00:07:18, Serial0 192.168.3.0/24 is subnetted, 1 subnets C 192.168.3.0 is directly connected, Ethernet0 r2#show ip pro Routing Protocol is "rip" Sending updates every 30 seconds, next due in 17 seconds Invalid after 180 seconds, hold down 180, flushed after 240 Outgoing update filter list for all interfaces is Incoming update filter list for all interfaces is Redistributing: rip Default version control: send version 1, receive any version Interface Send Recv Key-chain Serial0 1 1 2 Ethernet0 1 1 2 Routing for Networks: 192.168.2.0 192.168.3.0 Routing Information Sources: 192.168.2.2 120 00:00:09 Distance: (default is 120)