【路由器 R-A 的配置】 <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

初次进入路由器 R-A 时,我们进行如下的基本配置,配置主机名和各端口 IP 地址,配置信息如下 . 还是被忘了陪时钟速率,其实可以用命令查看那端是 DCE DTE 的,为了保险起见,就都设置了吧!呵呵

Router&gt;enable

Router# conf ter

Router (config)# hostname R-A

R-A(config)# interface fa0/0

R-A (config-if)# ip address <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />10.1.1.1 255.255.255.0

R-A (config-if)# no shutdown

R-A (config-if)# exit

R-A(config)# interface fa0/1

R-A (config-if)# ip address 20.2.2.1 255.255.255.0

R-A (config-if)# no shutdown

R-A (config-if)# exit

R-A (config)# interface serial 3/0

R-A (config-if)# ip address 30.1.1.1 255.255.255.0

R-A(config-if)# clock rate 64000

R-A (config-if)#no shutdown

上面只是路由器 R-A 的基本配置,下面在 R-A 上启用动态路由协议 Ripv2 ,同时配置 ppp 中的 pap 验证,还要一条默认路由,配置信息如下:

R-A(config)#router rip

R-A(config-router)# version 2

R-A(config-router)# no au

R-A(config-router)# network 10.0.0.0

R-A(config-router)# network 20.0.0.0

R-A(config-router)# network 30.0.0.0

R-A(config-router)# exit

R-A(config)# ip route 0.0.0.0 0.0.0.0 30.1.1.2 (配置一条到 R-B 默认路由)

R-A(config)#username R-B password cisco // 建立用户 R-B ,密码 cisco
R-A (config)#interface serial3/0

R-A(config-if)#encapsulation ppp // PPP 封装
R-A (config-if)#ppp authentication pap //PPP
验证方式为 pap
R-A (config-if)#ppp pap sent-username R-A password cisco 

// 发送用户名 R-B ,密码 cisco R-B 上验证

以上就是路由器 R-A 的配置,配置完成,下面就配置交换机 SW-A

【交换机 SW-A 的配置】

Switch&gt;

Switch&gt;enable

Switch#configure terminal .

Switch(config)#hostname sw-A

sw-A(config)#interface fa0/22