当前位置:网站首页>hcia综合实验

hcia综合实验

2022-07-26 00:28:00 浔枫

拓扑图

在这里插入图片描述

要求:
使用172.16.0.0/16划分网络
使用ospf协议合理规划区域保证更新安全
加快收敛速度
router1为DR没有BDR
pc2345自动获取ip地址 pc1为外网pc要求可以互相访问
router7为运营商只能配置ip地址
pc1远程登录router7实际登录router4
pc4 可以ping通router6但不能登录router6
pc3可以ping通pc5但pc5不能ping通pc3

一、 划分网段

将172.16.0.0/16划分四段
172.16.1.0/24
172.16.2.0/24
172.16.3.0/24
172.16.4.0/24

二、 配置接口ip

R7

给0/0/0配置11.1.1.1/24
给0/0/1配置10.1.1.1/24

R6

给g0/0/0配置10.1.1.2/24
给g0/0/1配置172.16.1.1/24

R1

给g0/0/0配置172.16.1.2/24
给g0/0/1配置172.16.2.1/24

R2

给g0/0/0配置172.16.2.2/24
给g0/0/1配置172.16.3.2/24

R8

给g0/0/0配置172.16.3.1/24
给g0/0/1.1配置192.168.1.1/24
给g0/0/1.2配置192.168.2.1/24

R3

给g0/0/0配置172.16.2.3/24
给g0/0/1配置172.16.4.1/24

R4

给g0/0/0配置172.16.4.2/24
给g0/0/1.1配置192.168.3.1/24
给g0/0/1.1配置192.168.4.1/24

二、 开启OSPF

分别在R1上创建环回1.1.1.1
R2上创建环回2.2.2.2,以此类推

R6

ospf
area 1
network 172.16.1.0 0.0.0.255
network 6.6.6.6 0.0.0.0

R1

ospf
area 1
network 0.0.0.0 255.255.255.255
quit
area 0
network 0.0.0.0 255.255.255.255

R2

ospf
area 2
network 0.0.0.0 255.255.255.255
quit
area 0
network 0.0.0.0 255.255.255.255

R3

ospf
area 3
network 0.0.0.0 255.255.255.255
quit
area 0
network 0.0.0.0 255.255.255.255

R8

ospf
area 2
network 0.0.0.0 255.255.255.255

R4

ospf
area 3
network 0.0.0.0 255.255.255.255

配置DHCP

lsw2

划分vlan

vlan batch 2 3
interface e0/0/1
port link-type trunk
port trunk allow-pass vlan all
interface e0/0/2
port link-type access
port default vlan 2
interface e0/0/3
port link-type access
port default vlan 3

R8

创建两个地址池 分别为aa bb

ip pool aa
network 192.168.1.0 mask 24
gateway-list 192.168.1.1
dns-list 8.8.8.8
ip pool bb
network 192.168.2.0 mask 24
gateway-list 192.168.2.1
dns-list 8.8.8.8

开启dhcp

dhcp enable

g0/0/1.1

dhcp select global
dot1q termination vid 2
arp broadcast enable

g0/0/1.2

dhcp select global
dot1q termination vid 3
arp broadcast enable

R4

与R8相似,此处省略一万字

配置R1为DR没有BDR

在r2,r3的g0/0/0扣输入

ospf dr-priority 0

R6配置nat

nat address-group 1 10.1.1.4 10.1.1.10
interface g0/0/0
nat outbound 2000 address-group 1

远程登录转R4

在R6上g0/0/0接口上

nat server protocol tcp global 10.1.1.3 telnet inside 172.16.4.2 telnet 

禁用pc4登录R6

在R4上

acl 3000
rule deny tcp source 192.168.3.0 0.0.0.255 destination 172.16.1.1 255.255.255.255  destination-port eq 23
interface g0/0/1.1
traffic-filter outbound acl 3000

禁用pc5 icmp 到pc3

在R4上

acl 3001
rule 5 deny icmp source 192.168.4.0 0.0.0.255 destination 192.168.2.0 0.0.0.255 icmp-type echo
interface g0/0/1.2
traffic-filter outbound acl 3000

加快收敛

在所有运行ospf路由器的相关接口上输入

ospf timer hello 5
原网站

版权声明
本文为[浔枫]所创,转载请带上原文链接,感谢
https://blog.csdn.net/xun_fong/article/details/125963935