一.实验拓扑
二.实验需求
1.学校内部的HTTP客户端可以正常通过域名www.baidu.com访问到百度网络中的HTTP服务器
2.学校网络内部网段基于192.168.1.0/24划分,PC1可以正常访问3.3.3.0/24网段,但是PC2不允许
3.学校内部路由使用静态路由,R1和R2之间两条链路进行浮动静态
4.运营商网络内部使用动态路由协议
5.AR1可以被telnet远程控制
三.实验步骤
1.划分子网,并且配置网络
对学校网络以192.168.1.0/24划分,对运营商网络以3.3.3.0/24网段划分,百度网络也是私网,在私网中找到一个网段进行划分,这里以10.0.0.0/24网段。
1.LSW1
[Huawei]vlan batch 2 3
[Huawei]int g0/0/4
[Huawei-GigabitEthernet0/0/4]port link-type access
[Huawei-GigabitEthernet0/0/4]port default vlan 2
[Huawei-GigabitEthernet0/0/4]q
[Huawei]int g0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type access
[Huawei-GigabitEthernet0/0/2]port default vlan 3
[Huawei]int g0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type access
[Huawei-GigabitEthernet0/0/3]port default vlan 3
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type trunk
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan 2 3
2.AR2
[Huawei]int g0/0/0.1
[Huawei-GigabitEthernet0/0/0.1]ip add 192.168.1.1 26
[Huawei-GigabitEthernet0/0/0.1]dot1q termination vid 3
Dec 19 2024 11:20:11-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocolIP on the interface GigabitEthernet0/0/0.1 has entered the UP state.
[Huawei-GigabitEthernet0/0/0.1]arp broadcast enable
[Huawei-GigabitEthernet0/0/0.1]q
[Huawei]int g0/0/0.2
[Huawei-GigabitEthernet0/0/0.2]ip add 192.168.1.65 26
[Huawei-GigabitEthernet0/0/0.2]dot1q termination vid 2
Dec 19 2024 11:20:58-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocolIP on the interface GigabitEthernet0/0/0.2 has entered the UP state.
[Huawei-GigabitEthernet0/0/0.2]arp broadcast enable
[Huawei]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[Huawei]ip pool 1
Info: It's successful to create an IP address pool.
[Huawei-ip-pool-1]network 192.168.1.0 mask 26
[Huawei-ip-pool-1]gateway-list 192.168.1.1
[Huawei-ip-pool-1]dns-list 114.114.114.114
[Huawei]int g0/0/0.1
[Huawei-GigabitEthernet0/0/0.1]dhcp select global
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 192.168.1.129 26
Dec 19 2024 11:24:09-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[2]:The line protocolIP on the interface GigabitEthernet0/0/1 has entered the UP state.
[Huawei-GigabitEthernet0/0/1]q
[Huawei]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip add 192.168.1.193 26
3.AR1
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 192.168.1.130 26
Dec 19 2024 11:24:53-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocolIP on the interface GigabitEthernet0/0/0 has entered the UP state.
[Huawei-GigabitEthernet0/0/0]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 192.168.1.194 26
[Huawei-GigabitEthernet0/0/1]q
[Huawei]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip add 3.3.3.1 27
[Huawei-GigabitEthernet0/0/2]q
[Huawei]ip route-static 192.168.1.0 26 192.168.1.129
[Huawei]ip route-static 192.168.1.0 26 192.168.1.193 preference 70
[Huawei]ip route-static 192.168.1.64 26 192.168.1.129
[Huawei]ip route-static 192.168.1.64 26 192.168.1.193 preference 70
[Huawei]ip route-static 0.0.0.0 0 3.3.3.2
[Huawei]acl 2000
[Huawei-acl-basic-2000]
[Huawei-acl-basic-2000]
[Huawei-acl-basic-2000]
[Huawei-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.127
[Huawei-acl-basic-2000]q
[Huawei]int g0/0/2
[Huawei-GigabitEthernet0/0/2]nat outbound 2000
4.AR3
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 3.3.3.2 27
Dec 19 2024 11:31:05-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocolIP on the interface GigabitEthernet0/0/0 has entered the UP state.
[Huawei-GigabitEthernet0/0/0]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 3.3.3.33 27
Dec 19 2024 11:31:21-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocolIP on the interface GigabitEthernet0/0/1 has entered the UP state.
[Huawei-GigabitEthernet0/0/1]q
[Huawei]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip add 3.3.3.97 27
[Huawei-GigabitEthernet0/0/2]
Dec 19 2024 11:31:57-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[2]:The line protocolIP on the interface GigabitEthernet0/0/2 has entered the UP state.
[Huawei]rip 1
[Huawei-rip-1]version 2
[Huawei-rip-1]network 3.0.0.0
5.AR4
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 3.3.3.34 27
Dec 19 2024 11:32:21-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocolIP on the interface GigabitEthernet0/0/0 has entered the UP state.
[Huawei-GigabitEthernet0/0/0]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 3.3.3.65 27
Dec 19 2024 11:32:39-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocolIP on the interface GigabitEthernet0/0/1 has entered the UP state.
[Huawei]rip 1
[Huawei-rip-1]version 2
[Huawei-rip-1]network 3.0.0.0
6.AR5
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 3.3.3.98 27
Dec 19 2024 11:33:18-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocolIP on the interface GigabitEthernet0/0/0 has entered the UP state.
[Huawei-GigabitEthernet0/0/0]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 3.3.3.129 27
Dec 19 2024 11:33:45-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocolIP on the interface GigabitEthernet0/0/1 has entered the UP state.
[Huawei-GigabitEthernet0/0/1]q
[Huawei]rip 1
[Huawei-rip-1]version 2
[Huawei-rip-1]network 3.0.0.0
7.AR6
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 3.3.3.130 27
Dec 19 2024 11:34:04-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocolIP on the interface GigabitEthernet0/0/0 has entered the UP state.
[Huawei-GigabitEthernet0/0/0]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 10.0.0.1 24
Dec 19 2024 11:35:08-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocolIP on the interface GigabitEthernet0/0/1 has entered the UP state.
8.学校内网HTTP客户端
9.DNS服务器
10.百度HTTP服务器