一、拓补图
二、实验需求
1、整张网络使用192.168.1.0/24网段进行划分
2、R1、R2、R3、R4均有两个环回来模拟用户网段
3、R5使用DHCP为PC分配IP地址
4、R2、R3、R4、R5开启Telnet功能;账号密码:admin/admin
5、完成所有路由器的静态路由配置,要求使用最简化路由表的方式
6、全网可达
三、需求分析
1、划分网段
2、配置IP
3、配置telnet
4、配路由
5、缺省路由
6、空接口路由
7、浮动静态路由
四、配置过程
1、将192.168.1.0/24划分网段
对于AR1—AR2而言需要两个网段最为合适,所以为192.168.1.0/30----192.168.1.000 000 11/30
原理相同,依次类推
2、配IP
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r5
[r5]int g 0/0/0
[r5-GigabitEthernet0/0/0]ip add 192.168.1.18 30
[r5]int g 0/0/1
[r5-GigabitEthernet0/0/1]ip add 192.168.1.22 30
[r5]int g 0/0/2
[r5-GigabitEthernet0/0/2]ip add 192.168.1.161 27
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r4
[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip add 192.168.1.14 30
[r4]int g 0/0/1
[r4-GigabitEthernet0/0/1]ip add 192.168.1.20 30
[r4]int g 0/0/2
[r4-GigabitEthernet0/0/2]ip add 192.168.1.17 30
[r4]int g 4/0/0
[r4-GigabitEthernet0/0/2]ip add 192.168.1.21 30
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r3
[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip add 192.168.1.6 30
[r3]int g 0/0/1
[r3-GigabitEthernet0/0/1]ip add 192.168.1.13 30
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r2
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip add 192.168.1.2 30
[r2]int g 0/0/1
[r2-GigabitEthernet0/0/1]ip add 192.168.1.9 30
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys r1
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.1.1 30
[r1]int g 0/0/1
[r1-GigabitEthernet0/0/1]ip add 192.168.1.5 30
2、配DHCP
[r5]dhcp enable
[r5]ip pool aaa
[r5-ip-pool-aaa]network 192.168.1.160 mask 27
[r5-ip-pool-aaa]gateway-list 192.168.1.161
[r5-ip-pool-aaa]dns-list 8.8.8.8
[r5-ip-pool-aaa]int g 0/0/2
[r5-GigabitEthernet0/0/2]dhcp select global
在PC1和PC2上启用DHCP并应用
3、配telnet
[r5]user-interface vty 0 4
[r5-ui-vty0-4]authentication-mode aaa
[r5]aaa
[r5-aaa]local-user admin password cipher admin privilege level 15
[r5-aaa]local-user admin service-type telnet
在直连路由上登陆,如
5、配路由
[r1]ip route-static 192.168.1.8 30 192.168.1.2
[r1]ip route-static 192.168.1.12 30 192.168.1.6
[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.96 27 192.168.1.6
[r1]ip route-static 192.168.1.128 27 192.168.1.6
[r2]ip route-static 192.168.1.4 30 192.168.1.1
[r2]ip route-static 192.168.1.12 30 192.168.1.10
[r2]ip route-static 192.168.1.32 27 192.168.1.1
[r2]ip route-static 192.168.1.128 27 192.168.1.10
[r2]ip route-static 192.168.1.96 27 192.168.1.10
[r2]ip route-static 192.168.1.96 27 192.168.1.1
[r3]ip route-static 192.168.1.0 30 192.168.1.5
[r3]ip route-static 192.168.1.8 30 192.168.1.12
[r3]ip route-static 192.168.1.32 27 192.168.1.5
[r3]ip route-static 192.168.1.128 27 192.168.1.14
[r3]ip route-static 192.168.1.64 27 192.168.1.14
[r3]ip route-static 192.168.1.64 27 192.168.1.5
[r4]ip route-static 192.168.1.0 30 192.168.1.9
[r4]ip route-static 192.168.1.4 30 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.9
[r4]ip route-static 192.168.1.632 27 192.168.1.9
[r5]ip route-static 192.168.1.0 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.4 30 192.168.1.17
[r5]ip route-static 192.168.1.32 27 192.168.1.17
[r5]ip route-static 192.168.1.64 30 192.168.1.17
[r5]ip route-static 192.168.1.96 30 192.168.1.17
[r5]ip route-static 192.168.1.128 30 192.168.1.17
6、缺省路由
[r4]ip route-static 0.0.0.0 0 192.168.1.18
[r3]ip route-static 0.0.0.0 0 192.168.1.14
[r2]ip route-static 0.0.0.0 0 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.6
7、空接口路由
[r1]ip route-static 192.168.1.32 27 NULL 0
[r2]ip route-static 192.168.1.96 27 NULL 0
[r3]ip route-static 192.168.1.96 27 NULL 0
[r4]ip route-static 192.168.1.128 27 NULL 0
8、浮动静态路由
[r5]ip route-static 192.168.1.0 30 192.168.1.21 pre 61
[r5]ip route-static 192.168.1.8 30 192.168.1.21 pre 61
[r5]ip route-static 192.168.1.12 30 192.168.1.21 pre 61
[r5]ip route-static 192.168.1.4 30 192.168.1.21 pre 61
[r5]ip route-static 192.168.1.32 27 192.168.1.21 pre 61
[r5]ip route-static 192.168.1.64 30 192.168.1.21 pre 61
[r5]
[r5]ip route-static 192.168.1.96 30 192.168.1.21 pre 61
[r5]ip route-static 192.168.1.128 30 192.168.1.21 pre 61
[r5]int g 0/0/0
[r5-GigabitEthernet0/0/0]shutdown