IP第一次作业

 

一、进行IP地址的划分 

192.168.1.0/24   --划分6个网段,借三位 /24-->/27

192.168.1.0/27  ---作为骨干链路,划分6个网段,借3位

192.168.1.0/30

192.168.1.4/30

192.168.1.8/30

192.168.1.12/30

192.168.1.16/30

192.168.1.20/30

192.168.1.32/27  --R1

192.168.1.32/28   --借1位,根据题目要求需划分2个环回地址

192.168.1.48/28

192.168.1.64/27  --R2

192.168.1.64/28

192.168.1.80/28

192.168.1.96/27  --R3

192.168.1.128/27  --R4

192.168.1.128/28

192.168.1.144/28

192.168.1.160/27  --R5

192.168.1.160/28

192.168.1.192/27    ---剩余2个网段,用不要本次实验,作为保留网段;

192.168.1.224/27


二、配置接口IP和环回
R1

[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.1.1 30
[r1]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 192.168.1.9 30
[r1]int l0
[r1-LoopBack0]ip add 192.168.1.49 28
[r1-LoopBack0]ip add 192.168.1.33 28

R2

[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 192.168.1.2 30
[r2-GigabitEthernet0/0/0]q
[r2]int g0/0/1
[r2-GigabitEthernet0/0/1]ip add 192.168.1.5 30
[r2]int l0
[r2-LoopBack0]ip add 192.168.1.65 28
[r2-LoopBack0]ip add 192.168.1.81 28

R3

[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 192.168.1.10 30
[r3]int g0/0/1
[r3-GigabitEthernet0/0/1]ip add 192.168.1.13 30
[r3]int g0/0/2
[r3-GigabitEthernet0/0/2]ip add 192.168.1.97 27

R4

[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 192.168.1.14 30
[r4]int g0/0/1
[r4-GigabitEthernet0/0/1]ip add 192.168.1.6 30
[r4]int g1/0/0
[r4-GigabitEthernet1/0/0]ip add 192.168.1.17 30
[r4]int g0/0/2
[r4-GigabitEthernet0/0/2]ip add 192.168.1.21 30

R5

[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip add 192.168.1.22 30
[r5]int g0/0/1
[r5-GigabitEthernet0/0/1]ip add 192.168.1.18 30
[r5]int g0/0/2
[r5-GigabitEthernet0/0/2]ip add 12.0.0.1 24 
[r5]int l0
[r5-LoopBack0]ip add 192.168.1.161 28

R6

[r6]int g0/0/0
[r6-GigabitEthernet0/0/0]ip add 12.0.0.2 24
[r6]int l0
[r6-LoopBack0]ip add 1.1.1.1 24

三、在R3上配置DHCP,给PC1,PC2分配地址

[r3]dhcp enable ----开启DHCP服务
[r3]ip pool 1	----创建地址池
[r3-ip-pool-1]network 192.168.1.96 mask 27 ----配置下发的地址段
[r3-ip-pool-1]gateway-list 192.168.1.97	----配置网关地址IP
[r3-ip-pool-1]dns-list 114.114.114.114 ----配置DNS
[r3-ip-pool-1]int g0/0/2 
[r3-GigabitEthernet0/0/2]dhcp select global 

四、给各个路由器配置静态路由、缺省路由

R1

[r1]ip route-static 192.168.1.64 27 192.168.1.2
[r1]ip route-static 192.168.1.128 27 192.168.1.2
[r1]ip route-static 192.168.1.160 27 192.168.1.2
[r1]ip route-static 192.168.1.128 27 192.168.1.10
[r1]ip route-static 192.168.1.160 27 192.168.1.10
[r1]ip route-static 192.168.1.96 27 192.168.1.10
[r1]ip route-static 192.168.1.0 30 192.168.1.2
[r1]ip route-static 192.168.1.4 30 192.168.1.2
[r1]ip route-static 192.168.1.16 30 192.168.1.2
[r1]ip route-static 192.168.1.20 30 192.168.1.2
[r1]ip route-static 192.168.1.8 30 192.168.1.10
[r1]ip route-static 192.168.1.12 30 192.168.1.10
[r1]ip route-static 192.168.1.16 30 192.168.1.10
[r1]ip route-static 192.168.1.20 30 192.168.1.10
[r1]ip route-static 0.0.0.0 0 192.168.1.2
[r1]ip route-static 0.0.0.0 0 192.168.1.10

R2

[r2]ip route-static 192.168.1.32 27 192.168.1.1
[r2]ip route-static 192.168.1.96 27 192.168.1.1
[r2]ip route-static 192.168.1.128 27 192.168.1.6
[r2]ip route-static 192.168.1.160 27 192.168.1.6
[r2]ip route-static 192.168.1.0 30 192.168.1.1
[r2]ip route-static 192.168.1.8 30 192.168.1.1
[r2]ip route-static 192.168.1.4 30 192.168.1.6
[r2]ip route-static 192.168.1.12 30 192.168.1.6
[r2]ip route-static 192.168.1.16 30 192.168.1.6
[r2]ip route-static 192.168.1.20 30 192.168.1.6
[r2]ip route-static 0.0.0.0 0 192.168.1.6

R3

[r3]ip route-static 192.168.1.32 27 162.168.1.9
[r3]ip route-static 192.168.1.64 27 162.168.1.9
[r3]ip route-static 192.168.1.128 27 162.168.1.14
[r3]ip route-static 192.168.1.160 27 162.168.1.14
[r3]ip route-static 192.168.1.64 27 162.168.1.14
[r3]ip route-static 192.168.1.8 30 192.168.1.9
[r3]ip route-static 192.168.1.0 30 192.168.1.9
[r3]ip route-static 192.168.1.4 30 192.168.1.14
[r3]ip route-static 192.168.1.12 30 192.168.1.14
[r3]ip route-static 192.168.1.16 30 192.168.1.14
[r3]ip route-static 192.168.1.20 30 192.168.1.14
[r3]ip route-static 0.0.0.0 0 192.168.1.14

R4

[r4]ip route-static 192.168.1.32 27 192.168.1.5
[r4]ip route-static 192.168.1.32 27 192.168.1.13
[r4]ip route-static 192.168.1.96 27 192.168.1.13
[r4]ip route-static 192.168.1.64 27 192.168.1.5
[r4]ip route-static 192.168.1.160 27 192.168.1.18
[r4]ip route-static 192.168.1.160 27 192.168.1.22
[r4]ip route-static 192.168.1.0 30 192.168.1.5
[r4]ip route-static 192.168.1.4 30 192.168.1.5
[r4]ip route-static 192.168.1.8 30 192.168.1.13
[r4]ip route-static 192.168.1.12 30 192.168.1.13
[r4]ip route-static 0.0.0.0 0 192.168.1.18
[r4]ip route-static 0.0.0.0 0 192.168.1.22

R5

[r5]ip route-static 192.168.1.32 27 192.168.1.17
[r5]ip route-static 192.168.1.64 27 192.168.1.17
[r5]ip route-static 192.168.1.96 27 192.168.1.17
[r5]ip route-static 192.168.1.128 27 192.168.1.17
[r5]ip route-static 192.168.1.0 30 192.168.1.17
[r5]ip route-static 192.168.1.4 30 192.168.1.17
[r5]ip route-static 192.168.1.8 30 192.168.1.17
[r5]ip route-static 192.168.1.12 30 192.168.1.17
[r5]ip route-static 192.168.1.128 27 192.168.1.21 p 70
[r5]ip route-static 192.168.1.96 27 192.168.1.21 p 70
[r5]ip route-static 192.168.1.64 27 192.168.1.21 p 70
[r5]ip route-static 192.168.1.32 27 192.168.1.21 p 70
[r5]ip route-static 192.168.1.0 30 192.168.1.21 p 70
[r5]ip route-static 192.168.1.4 30 192.168.1.21 p 70
[r5]ip route-static 192.168.1.8 30 192.168.1.21 p 70
[r5]ip route-static 192.168.1.12 30 192.168.1.21 p 70

五、给路由器配置空接口防止环路

[r1]ip route-static 192.168.1.32 27 null0
[r2]ip route-static 192.168.1.64 27 null0
[r3]ip route-static 192.168.1.96 27 null0
[r4]ip route-static 192.168.1.128 27 null0
[r5]ip route-static 192.168.1.160 27 null0

六、R1启动telnet服务

[r1]aa	
[r1-aaa]local-user huawei password cipher 123456
Info: Add a new user.	
[r1-aaa]local-user huawei service-type telnet
[r1-aaa]local-user huawei privilege level 15
[r1-aaa]q
[r1]user	
[r1]user-interface vty 0 4	
[r1-ui-vty0-4]authentication-mode aaa

七、R5配置nat转换以及端口映射

[r5]acl 2000	
[r5-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r5-acl-basic-2000]int g0/0/0	
[r5-GigabitEthernet0/0/0]nat outbound 2000
[r5-GigabitEthernet0/0/0]nat server protocol tcp global current-interface 23 ins
ide 192.168.1.1 23

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值