【
【路由器
R-A
的配置】
初次进入路由器
R-A
时,咱们进行以下的基本配置,配置主机名和各端口
IP
地址,配置信息以下
.
仍是被忘了陪时钟速率,其实能够用命令查看那端是
DCE
和
DTE
的,为了保险起见,就都设置了吧!呵呵
Router>enable
Router# conf ter
Router (config)# hostname R-A
R-A(config)# interface fa0/0
R-A (config-if)# ip address
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>
Switch>enable
Switch#configure terminal .
Switch(config)#hostname sw-A
sw-A(config)#interface fa0/22