一、实验拓扑图
二、实验要求:
要求:
1.ISP路由器仅配置IP地址
2.内网基于192.168.1.0/24网段进行IP划分
3.R1/R2之间使用OSPF做到内网全通,单区域
4.PC1-PC4使用DHCP获取地址
5.PC2-PC4可以访问pc5,pc1不行
6.R2出口只拥有一个公网IP
7.test-1设备可以登录内网telnet服务器,test-2不行
三、实验ip地址划分
192.168.1.0/26--骨干
192.168.1.64/28--VLAN2
192.168.1.80/28--VLAN3
192.168.1.96/28--VLAN4
192.168.1.112/28--预留
192.168.1.128/26-R2下的网络
192.168.1.128/27--VLAN2
192.168.1.160/27--VLAN3
192.168.1.192/26-预留
202.1.1.0/30--R1-ISP
203.1.1.0/24---ISP下方网络
四、实验配置命令
SW1:
vlan 2
vlan 3
vlan 4
int g0/0/2
port link-type access
port default v2
int g0/0/3
port link-type access
port default v3
int g0/0/4
port link-type access
port default v4
int g0/0/1
port link-type trunk
port tr allow-pass vlan 2 3 4
SW2:
vlan 2
vlan 3
int g0/0/2
port link-type access
port default v2
int g0/0/3
port link-type access
port default v3
port link-type trunk
port tr allow-pass vlan 2 3
AR1:
int g0/0/1
ip add 192.168.1.1 26
int g0/0/0.1
ip add 192.168.65 28
dot1q termination vid 2
arp broadcast enable
int g0/0/0.2
ip add 192.168.1.81 28
dot1q termination vid 3
arp broadcast enable
int g0/0/0.3
ip add 192.168.1.97 28
dot1q termination vid 4
arp broadcast enable
ospf 1 rou 1.1.1.1
area 0
network 192.168.1.1 0.0.0.0
network 192.168.1.65 0.0.0.0
network 192.168.1.81 0.0.0.0
network 192.168.1.97 0.0.0.0
dhcp enable
ip pool 1
network 192.168.1.64 mask 27
gateway-list 192.168.1.65
ip pool 2
network 192.168.1.80 mask 27
gateway-list 192.168.1.81
int g0/0/1
arp broadcast global
int g0/0/2
arp broadcast global
acl 3000
rule deny ip source 192.168.1.64 0.0.0.15 destination 203.1.1.100 0
int g0/0/0.1
traffic-filter inbound acl 3000
AR2:
int g0/0/1
ip add 192.168.1.2 26
int g0/0/0.1
ip add 192.168.1.129 27
dot1q termination vid 2
arp broadcast enable
int g0/0/0.2
ip add 192.168.1.161 27
dot1q termination vid 3
arp broadcast enable
int g0/0/2
ip add 202.1.1.1 30
network 192.168.1.2 0.0.0.0
network 192.168.1.129 0.0.0.0
network 192.168.1.161 0.0.0.0
ip pool 1network 192.168.1.128 mask 27gateway-list 192.168.1.129
ip pool 2network 192.168.1.160 mask 27gateway-list 192.168.1.161
int g0/0/1
arp broadcast global
int g0/0/2
arp broadcast global
acl 2000 rule permit source 192.168.1.0 0.0.0.255
int g0/0/2
nat outbound 2000
ip route-static 0.0.0.0 0 202.1.1.2
ospf 1
default-route-advertise
int g0/0/2
nat server protocol tcp global current-interface telent inside 192.168.1.98 telent
acl 3000
rule deny tcp source 203.1.1.3 0 destination-port eq 23
traffic-filter inbound acl 3000
ISP:
int g0/0/0
ip add 202.1.1.2 30
int g0/0/1
ip add 203.1.1.1 24
Telnet Server:
int g0/0/0
ip add 192.168.1.98 28
user-interface vty 0 4
authentication-mode aaa
q
aaa
local-user huawei password cipher huawei
local-user huawei privilege lever 15
local-user huawei service-type telnet
q
ip rou 0.0.0.0 192.168.1.97
test-1:
int g0/0/0
ip add 203.1.1.2 24
ip rou 202.1.1.1 203.1.1.1
test-2
int g0/0/0
ip add 203.1.1.3 24
ip rou 202.1.1.1 203.1.1.1
PC1:
DHCP自动获取
PC2:
DHCP自动获取
PC3:
DHCP自动获取
PC4:
DHCP自动获取
PC5: