企业网三层架构实验

题目

企业网三层架构实验_第1张图片

1、划分IP地址

R1与R2之间公有地址使用12.1.1.0/24 网段

ISP环回地址为1.1.1.1/24

内网ip地址划分:

172.16.0.0/30   左边骨干  
172.16.0.4/30   右边骨干
172.16.1.0/24   vlan 1
172.16.2.0/24   vlan 2


2、配置

1)在SW1与SW2 之间创建二层通道,使两条链路逻辑的变为一条

 interface Eth-Trunk1 
 port link-type trunk   //改变接口模式为trunk模式
 port trunk allow-pass vlan 2 to 4094
 interface GigabitEthernet0/0/2
 eth-trunk 1
 interface GigabitEthernet0/0/3
 eth-trunk 1

在两边交换机上均创建interface Eth-Trunk1,进入两条链路接口,配置到eth-trunk 1 中。

2)在交换机上创建 vlan ,将PC2 和PC4 划分入vlan 2 中

 vlan 2
 interface Ethernet 0/0/2
 port link-type access
 port default vlan 2

3)在各个交换机接口上,将接口模式调为trunk模式

 port link-type trunk
 port trunk allow-pass vlan 2 to 4094

4)开启stp(生成树)

 stp region-configuration
 region-name a
 instance 1 vlan 1
 instance 2 vlan 2
 active region-configuration

修改SW1为vlan 1 根网桥,vlan 2 的备份网桥,SW2为vlan2 的根网桥,vlan 1 的备份网桥

 stp instance 1 root primary
 stp instance 2 root secondary

5)开启Svi,配置ip,并配置虚拟网关(网关冗余)
配置DHCP池,使得PC可以通过此获得IP。

SW1:

 interface Vlanif1
 ip address 172.16.1.1 255.255.255.0
 vrrp vrid 1 virtual-ip 172.16.1.10
 vrrp vrid 1 priority 101
 vrrp vrid 1 track interface GigabitEthernet0/0/1
 dhcp select global

 interface Vlanif2
 ip address 172.16.2.1 255.255.255.0
 vrrp vrid 1 virtual-ip 172.16.2.10
 dhcp select global

 ip pool a
 gateway-list 172.16.1.10
 network 172.16.1.0 mask 255.255.255.0
 dns-list 114.114.114.114
 ip pool b
 gateway-list 172.16.2.10 
 network 172.16.2.0 mask 255.255.255.0
 dns-list 114.114.114.114

SW2:

 interface Vlanif1
 ip address 172.16.1.2 255.255.255.0
 vrrp vrid 1 virtual-ip 172.16.1.10
 dhcp select global

 interface Vlanif2
 ip address 172.16.2.2 255.255.255.0
 vrrp vrid 1 virtual-ip 172.16.2.10
 vrrp vrid 1 priority 101
 vrrp vrid 1 track interface GigabitEthernet0/0/1
 dhcp select global

 ip pool a
 gateway-list 172.16.1.10
 network 172.16.1.0 mask 255.255.255.0
 dns-list 114.114.114.114
 ip pool b
 gateway-list 172.16.2.10
 network 172.16.2.0 mask 255.255.255.0
 dns-list 114.114.114.114

6)将两个接口模式改为access模式,左边划入vlan 3 ,右边划入 vlan 4 ;

interface Vlanif3
ip address 172.16.0.1 255.255.255.252

interface Vlanif4
ip address 172.16.0.5 255.255.255.252


配置路由器IP,然后开启ospf路由协议,宣告网段,保证内网全网可达

ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 172.16.0.0 0.0.255.255

ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 172.16.0.0 0.0.255.255

ospf 1 router-id 1.1.1.1 
default-route-advertise always
area 0.0.0.0 
network 172.16.0.0 0.0.255.255 

7)制定ACl、NAT,使得内网可以访问互联网;

acl number 2000  
rule 5 permit source 172.16.0.0 0.0.255.255 
nat out bound 2000

结果

企业网三层架构实验_第2张图片

 

你可能感兴趣的:(HCIP作业,架构,网络,运维)