HCIP作业2

步骤1:配置IP地址

R1:[R1]int s3/0/0
[R1-Serial3/0/0]ip ad 192.168.1.1 24
[R1-Serial3/0/0]
Mar 23 2024 15:06:06-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PPP
 IPCP on the interface Serial3/0/0 has entered the UP state. 
[R1-Serial3/0/0]

R2:[R2]int s3/0/0
[R2-Serial3/0/0]ip ad 192.168.1.2 24
[R2-Serial3/0/0]

创建一个ip逻辑口:

[R2]int mp    
[R2]int Mp-group 0/0/0
[R2-Mp-group0/0/0]

给R3也创建一个逻辑口:

[Huawei]sysname R3
[R3]int mp    
[R3]int Mp-group 0/0/0
[R3-Mp-group0/0/0]

然后将R2物理口加到逻辑口:

[R2]int Serial 3/0/1
[R2-Serial3/0/1]ppp mp mp    
[R2-Serial3/0/1]ppp mp Mp-group 0/0/0

[R2-Serial3/0/1]q
[R2]int s    
[R2]int Serial 4/0/0
[R2-Serial4/0/0]ppp mp mp    
[R2-Serial4/0/0]ppp mp Mp-group 0/0/0

给R3也将物理口加到逻辑口:

[R3]int s    
[R3]int Serial 3/0/0
[R3-Serial3/0/0]ppp mp mp    
[R3-Serial3/0/0]ppp mp Mp-group 0/0/0

[R3]int s    
[R3]int Serial 3/0/1
[R3-Serial3/0/1]ppp mp mp    
[R3-Serial3/0/1]ppp mp Mp-group 0/0/0

进入R2给逻辑口配ip地址:

[R2]int mp    
[R2]int Mp-group 0/0/0
[R2-Mp-group0/0/0]ip ad 192.168.2.2 24

进入R3给逻辑口配ip地址:

[R3]int  mp    
[R3]int mp    
[R3]int Mp-group 0/0/0
[R3-Mp-group0/0/0]ip ad 192.168.2.3 24

3、在R2进入aaa模式配置用户:

[R2-aaa]local-user wangdaye pa    
[R2-aaa]local-user wangdaye password ci    
[R2-aaa]local-user wangdaye password cipher wdy12345
Info: Add a new user.
[R2-aaa]lo    
[R2-aaa]local-user wangdaye se    
[R2-aaa]local-user wangdaye service-type ppp\
                                         ^
Error: Unrecognized command found at '^' position.
[R2-aaa]local-user wangdaye service-type ppp

进入接口主验证方配置:[R2]int s    
[R2]int Serial 3/0/0
[R2-Serial3/0/0]ppp au    
[R2-Serial3/0/0]ppp authentication-mode ?
  chap  Enable CHAP authentication
  pap   Enable PAP authentication
[R2-Serial3/0/0]ppp authentication-mode chap

进入R1被验证方配置:

[R1]int     
[R1]interface 
[R1]interface s    
[R1]int s    
[R1]int Serial 3/0/0
[R1-Serial3/0/0]ppp chap u    
[R1-Serial3/0/0]ppp chap user wangdaye
[R1-Serial3/0/0]ppp chap pa    
[R1-Serial3/0/0]ppp chap password ci    
[R1-Serial3/0/0]ppp chap password cipher wdy12345
[R1-Serial3/0/0]q
[R1]ping 192.168.1.2

4、进入R2主验证方 aaa模式配置用户:

[R2]aaa
[R2-aaa]lo    
[R2-aaa]local-user wangdaye pa    
[R2-aaa]local-user wangdaye password ci    
[R2-aaa]local-user wangdaye password cipher wdy12345
[R2-aaa]lo    
[R2-aaa]local-user wangdaye ser    
[R2-aaa]local-user wangdaye service-type ppp
[R2-aaa]q
[R2]int s    
[R2]int Serial 3/0/1
[R2-Serial3/0/1]ppp au    
[R2-Serial3/0/1]ppp authentication-mode chap
[R2-Serial3/0/1]q
[R2]int s    
[R2]int Serial 4/0/0
[R2-Serial4/0/0]ppp au    
[R2-Serial4/0/0]ppp authentication-mode chap
[R2-Serial4/0/0]

进入R3被验证方进行配置:

[R3]int s    
[R3]int Serial 3/0/0
[R3-Serial3/0/0]ppp chap u    
[R3-Serial3/0/0]ppp chap user wangdaye
[R3-Serial3/0/0]ppp chap pa    
[R3-Serial3/0/0]ppp chap password ci    
[R3-Serial3/0/0]ppp chap password cipher wdy12345

[R3]int Serial 3/0/1
[R3-Serial3/0/1]ppp chap u    
[R3-Serial3/0/1]ppp chap user wangdaye
[R3-Serial3/0/1]ppp chap pa    
[R3-Serial3/0/1]ppp chap password ci    
[R3-Serial3/0/1]ppp chap password cipher wdy12345

双向验证:R3为主验证方,R2为被验证方

进入R3主验证配置:[R3]aaa
[R3-aaa]lo    
[R3-aaa]local-user wangdaye pa    
[R3-aaa]local-user wangdaye password ci    
[R3-aaa]local-user wangdaye password cipher wdy12345
Info: Add a new user.
[R3-aaa]lo    
[R3-aaa]local-user wangdaye ser    
[R3-aaa]local-user wangdaye service-type ppp
[R3-aaa]int    
[R3-aaa]int se    
[R3-aaa]int s    
[R3-aaa]q
[R3]int s    
[R3]int Serial 3/0/0
[R3-Serial3/0/0]ppp au    
[R3-Serial3/0/0]ppp authentication-mode chap
[R3-Serial3/0/0]q
[R3]int     
[R3]int s    
[R3]int Serial 3/0/1
[R3-Serial3/0/1]ppp au    
[R3-Serial3/0/1]ppp authentication-mode chap
[R3-Serial3/0/1]

再进入R2被验证方配置:

R2>sys
Enter system view, return user view with Ctrl+Z.
[R2]int se    
[R2]int Serial 3/0/1
[R2-Serial3/0/1]ppp chap u    
[R2-Serial3/0/1]ppp chap user wangdaye
[R2-Serial3/0/1]ppp chap pa    
[R2-Serial3/0/1]ppp chap password ci    
[R2-Serial3/0/1]ppp chap password cipher wdy12345
[R2-Serial3/0/1]q
[R2]int s    
[R2]int Serial 4/0/0
[R2-Serial4/0/0]ppp chap user wangdaye
[R2-Serial4/0/0]ppp chap password c    
[R2-Serial4/0/0]ppp chap password cipher wdy12345
[R2-Serial4/0/0]q
[R2]int s    
[R2]int Serial 3/0/1

然后关掉
[R2-Serial3/0/1]shutdown

[R2-Serial3/0/1]q
[R2]int     
[R2]interface 
[R2]int s    
[R2]int Serial 4/0/0
[R2-Serial4/0/0]shu    
[R2-Serial4/0/0]shutdown 

然后打开

[R2]int Serial 3/0/1
[R2-Serial3/0/1]undo shut    
[R2-Serial3/0/1]undo shutdown

[R2]int Serial 4/0/0
[R2-Serial4/0/0]undo shu    
[R2-Serial4/0/0]undo shutdown

最后R2去pingR3

[R2]ping 192.168.2.3

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值