要求:
1、R6为ISP,接口IP地址均为公有地址,该设备只能配置IP地址,之后不能冉对其进行任何配置;
2、R1-R5为局域网,私有IP地址192.168.1.0/24;请合理分配;
3、R1、R2、R4,各有两个环回IP地址; R5, R6各有一个环回地址;所有路由器上环回均代表连接用户的接口;
4、R3下面的两台PC通过DHCP自动获取Ip地址;
5、选路最佳,路由表尽量小,避免环路;
6、R1-R5均可以访问R6的环回;
7、R6 telnet R5的公有地址时,实际登录到R1上;
8、R4与R5正常通过1000M链路,故障时通过100m链路.
R1--R6:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.1 30
Mar 20 2024 20:26:33-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.1.9 30
[R1]int LoopBack 0
[R1-LoopBack0]ip add 192.168.1.33 28
[R1-LoopBack0]
[R1-LoopBack0]int l1
[R1-LoopBack1]ip add 192.168.1.49 28
[R1-LoopBack1]display ip interface brief
R2:
R3:
R4:
R5
R6:
R3上配置DHCP服务器:
[R3]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[R3]ip pool aa
Info: It's successful to create an IP address pool.
[R3-ip-pool-aa]network 192.168.1.96 mask 27
[R3-ip-pool-aa]gateway-list 192.168.1.97
[R3-ip-pool-aa]dns-list 114.114.114.114
[R3-ip-pool-aa]q
[R3]int g0/0/2
[R3-GigabitEthernet0/0/2]dhcp select global
R3详细配置
路由条目的配置问题:
[R1]ip route-static 1.1.1.0 24 192.168.1.10 //目标网段 子网掩码 下一跳
[R1]undo ip route-static 192.168.1.128 27 192.168.1.6 //删除该路由条目
一:缺省路由配置(以R1为例,其他R2--R5都差不多)
[R1]ip route-static 0.0.0.0 0 192.168.1.10
配置空接口,避免路由黑洞:
[R1]ip route-static 192.168.1.32 27 NULL 0
R1路由条目:
[R1]display ip routing-table protocol static
R2:
R3:
R4:
Talnet配置环境:{R6 telnet R5的公有地址时,实际登录到R1上}
[R1]aaa
[R1-aaa]local-user admin privilege level 15 password cipher 123456
[R1-aaa]local-user admin service-type telnet
[R1-aaa]user-interface vty 0 4
[R1-ui-vty0-4]authentication-mode aaa
通路转换:
[R4]ip route-static 0.0.0.0 0 192.168.1.22 preference 61
环回分配:
192.168.1.0/24
分配6个网段
2的三次方,借三位
192.168.1.00000000/24----骨干链路共6个小段、
2的三次方=8
分6个小网段,借三位
192.168.1.0/27
192.168.1.0000 0000---192.168.1.0/30
192.168.1.0000 0100---192.168.1.4/30
192.168.1.0000 1000---192.168.1.8/30
192.168.1.0000 1100---192.168.1.12/30
192.168.1.0001 0000---192.168.1.16/30
192.168.1.0001 0100---192.168.1.20/30
192.168.1.0001 1000
192.168.1.0001 1100
192.168.1.00100000/27
R1环回:
192.168.1.32/27
192.168.1.0010 0000---192.168.1.32/28
192.168.1.0011 0000---192.168.1.48/28
192.168.1.01000000/27
R2环回:
192.168.1.64/27
192.168.1.0100 0000---192.168.1.64/28
192.168.1.0101 0000---192.168.1.80/28
192.168.1.01100000/27
R3用户:
192.168.1.96/27
192.168.1.0110 0000---192.168.1.96/28
192.168.1.10000000/27
R4环回:
192.168.1.128/27
192.168.1.1000 0000---192.168.1.128/28
192.168.1.1001 0000---192.168.1.144/28
192.168.1.10100000/27
R5环回:
192.168.1.160/27
192.168.1.11000000/27
192.168.1.11100000/27