两个园区校园网的配置,某化工厂ENSP配置

目录

实验:

二.添了一根线 

 实验2:

 连接外网:

 两个园区的连接:

配置服务器


交换机配置命令

配置交换机的G接口

int g0/0/0

description To_SW-2              //非自动协商模式

undo negotiation auto            全双工模式

speed 100                               配置速度100Mbs

恢复初始设置

reset saved-configuration       选择Y

reboot                                      重启。  选择Y

交换机自带生成树协议,若不小心关掉了

stp enable                                重启

链路聚合

int g0/0/0

Eth-Trunk 1                           接口添加到链路聚合组1

OSPF:

ospf 1

area 1

network 网络地址 反掩码

1、接入层交换机与核心交换机通过Eth-trunk组网保证可靠性;
2、每个部门业务划分到一个vlan中,部门间的业务在核心层上通过vlanif三层互通;

链路聚合:

链路聚合一般部署在核心节点,以便提高整个网络的数据吞吐量。链路聚合能够提高链路带宽,增强网络冗余性、可用性,支持负载分担。

[Huawei]interface Eth-Trunk 1         /创建一个聚合1
[Huawei-Eth-Trunk1]q                  /退出端口
[Huawei]interface Eth0/0/1	      /进入端口E0/0/1  
[Huawei-Ethernet0/0/1]eth-trunk 1     /将该端口加入聚合1

 如果我们需要将两个交换机之间的链路设为TRUNK,就需要进入聚合1中进行配置:

[Huawei]interface  Eth-Trunk 1	
[Huawei-Eth-Trunk1]port link-type trunk 

DHCP

 RS2:

dhcp enable

int vlanif 13

dhcp select relay

dhcp relay server-ip 192.168.100.200

删除地址池

<AR2>reset ip pool name [PC2] used
[AR2]undo ip policy-based-route [refresh-time]
[AR2]undo ip pool [PC2]

删除接口配置

[AR2-GigabitEthernet0/0/0]undo dhcp select global 

一、reset saved-configuration

输入命令后会出现:

This will delete the configuration in the flash memory.

The device configuratio

ns will be erased to reconfigure.

Are you sure? (y/n)[n]:

这时输入y

二、reboot

输入命令后会出现:

Info: The system is comparing the configuration, please wait.

Warning: All the configuration will be saved to the next startup configuration.

Continue ? [y/n]:

这时输入n

系统会继续提示:

System will reboot! Continue ? [y/n]:

这时输入y,重启

三、输入上述两个命令后,路由器恢复出厂设置

display ip int brief 

display vlan命令用来查看所有VLAN的相关信息。

display interface vlanif命令用来查看VLANIF接口的状态信息、配置信息和统计信息

E接口

(11条消息) eNSP上部署DHCP服务_梦回西游戏天真~的博客-CSDN博客_ensp交换机dhcp

(11条消息) 华为ensp模拟校园网/企业网实例(精品拓扑图)_legenndary的博客-CSDN博客_ensp拓扑图

(11条消息) 使用eNSP搭建一个局域网_weixin_45154474的博客-CSDN博客_ensp构建局域网

(11条消息) [毕设分享]基于华为eNSP的校园网设计和仿真模拟_アルジャーノン的博客-CSDN博客_华为ensp中小型网络毕业设计

感谢!!:

(11条消息) DHCP服务中继--交换机和路由器配置_wishy blog的博客-CSDN博客_dhcp在交换机还是路由器中配置(15条消息) DNS服务器配置_欢欢李的博客-CSDN博客_enspdns域名访问配置(11条消息) DHCP服务中继--交换机和路由器配置_wishy blog的博客-CSDN博客_dhcp在交换机还是路由器中配置

实验:

 二层LSW2:

1.划分VLAN

vlan bach 100 101

2.划入端口

int e0/0/0

un sh

port type-link access

port default vlan 100

quit

3.设置trunk

int e0/0/3

port type-link trunk

port trunk allow-pass vlan all

no sh

汇聚层LSW1

1.划分vlan,注意下层vlan不要分配IP,由DHCP池分

2.设置端口类型

3.开启DHCP池,VLAN设置从池中取地址

DHCP为路由器的接口的IP服务

 

路由器配置:

路由器接口设置IP

开启DHCP

设置IP池

设置静态路由

目的IP是VLAN,吓一跳是LSW1的接口

二.添了一根线 

 

二层,划分VLAN,划入端口

设置TRUNK

 <Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]undo info-center enable
Info: Information center is disabled.
[Huawei]sysname LSW3

[LSW3]vlan batch 102 103
Info: This operation may take a few seconds. Please wait for a moment...done.

[LSW3]int e0/0/1
[LSW3-Ethernet0/0/1]port link-type access
[LSW3-Ethernet0/0/1]port default vlan 102
[LSW3-Ethernet0/0/1]q
[LSW3]int e0/0/2
[LSW3-Ethernet0/0/2]port link-type access
[LSW3-Ethernet0/0/2]port default vlan 103
[LSW3-Ethernet0/0/2]q


[LSW3]int e0/0/3
[LSW3-Ethernet0/0/3]port link-type trunk

[LSW3-Ethernet0/0/3]port trunk allow-pass vlan all
[LSW3-Ethernet0/0/3]q

把LSW3重命名为了RS1

RS1的操作:

设置g0/0/2为Trunk

划分VLAN 102,103,

开启HDCP

设置VLAN 102,103的地址从地址池中取

 

 <LSW1>sys
Enter system view, return user view with Ctrl+Z.
[LSW1]sysname RS1


[RS1]int g0/0/2
[RS1-GigabitEthernet0/0/2]port link-type trunk
[RS1-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[RS1-GigabitEthernet0/0/2]quit


[RS1]vlan batch 102 103
Info: This operation may take a few seconds. Please wait for a moment...done.


[RS1]dhcp en
[RS1]int vlanif 102
[RS1-Vlanif102]ip add 192.168.102.1 24
[RS1-Vlanif102]dhcp select global
[RS1-Vlanif102]dhcp select relay
[RS1-Vlanif102]dhcp relay server-ip 192.168.11.2
[RS1-Vlanif102]q


[RS1]int vlanif 103
[RS1-Vlanif103]ip add 192.168.103.1 24
[RS1-Vlanif103]dhcp select global
[RS1-Vlanif103]dhcp select relay
[RS1-Vlanif103]dhcp relay server-ip 192.168.11.2
[RS1-Vlanif103]q

AR1

为VLAN102,103配置地址池

新增静态路由 

 

 

 [AR1]ip pool v102
[AR1-ip-pool-v102]network 192.168.102.0 mask 24
Error:Please delete the network section first.
[AR1-ip-pool-v102]gateway-list 192.168.102.1
[AR1-ip-pool-v102]dns-list 8.8.8.8
[AR1-ip-pool-v102]q

[AR1]ip pool v103
[AR1-ip-pool-v103]network 192.168.103.0 mask 24
[AR1-ip-pool-v103]gateway-list 192.168.103.1
[AR1-ip-pool-v103]dns-list 8.8.8.8
[AR1-ip-pool-v103]q
 

[AR1]ip route-static 192.168.102.0 24 192.168.11.1
[AR1]ip route-static 192.168.103.0 24 192.168.11.1

 

 实验2:

1.划分vlan
SW1:
2.vlan划入端口,打开端口
3.trunk端口设置

 [Huawei]sysname SW1
[SW1]vlan batch 100 101
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1]int e0/0/1
[SW1-Ethernet0/0/1]un sh
Info: Interface Ethernet0/0/1 is not shutdown.
[SW1-Ethernet0/0/1]port link-type access
[SW1-Ethernet0/0/1]port default vlan 100
[SW1-Ethernet0/0/1]q
[SW1]int e0/0/1
[SW1-Ethernet0/0/1]port link-type access
[SW1-Ethernet0/0/1]port default vlan 100
[SW1-Ethernet0/0/1]q

[SW1]int e0/0/2
[SW1-Ethernet0/0/1]port link-type access
[SW1-Ethernet0/0/1]port default vlan 101
[SW1-Ethernet0/0/1]q
[SW1]int e0/0/3
[SW1-Ethernet0/0/3]port link-type trunk
[SW1-Ethernet0/0/3]port trunk allow-pass vlan all
[SW1-Ethernet0/0/3]q
[SW1]int e0/0/4
[SW1-Ethernet0/0/4]port link-type trunk
[SW1-Ethernet0/0/4]port trunk allow-pass vlan all
[SW1-Ethernet0/0/4]q

SW2同理

[SW2]int e0/0/1
[SW2-Ethernet0/0/1]un sh
Info: Interface Ethernet0/0/1 is not shutdown.
[SW2-Ethernet0/0/1]port link-type access
[SW2-Ethernet0/0/1]port default vlan 102
[SW2-Ethernet0/0/1]q
[SW2]int e0/0/2
[SW2-Ethernet0/0/2]un sh
Info: Interface Ethernet0/0/2 is not shutdown.
[SW2-Ethernet0/0/2]port link-type access
[SW2-Ethernet0/0/2]port default vlan 103
[SW2-Ethernet0/0/2]q
[SW2]int e0/0/3
[SW2-Ethernet0/0/3]port link-type trunk
[SW2-Ethernet0/0/3]port trunk allow-pass vlan all
[SW2-Ethernet0/0/3]q
[SW2]int e0/0/4
[SW2-Ethernet0/0/4]port link-type trunk
[SW2-Ethernet0/0/4]port trunk allow-pass vlan all
[SW2-Ethernet0/0/4]q
[SW2]display interface vlanif

三层RS1

1.划分valn

 [RS1]vlan batch 100 101 102 103 11
Info: This operation may take a few seconds. Please wait for a moment...done.

2.汇聚链路
[RS1]int eth-trunk 1
[RS1-Eth-Trunk1]mode lacp
[RS1-Eth-Trunk1]q

3.端口划入汇聚链路,RS1并设优先级
[RS1]int g0/0/4
[RS1-GigabitEthernet0/0/4]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[RS1-GigabitEthernet0/0/4]q
[RS1]int g0/0/5
[RS1-GigabitEthernet0/0/5]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[RS1-GigabitEthernet0/0/5]q
[RS1]lacp priority 100

4.设置TRUNK

[RS1]int eth-trunk 1
[RS1-Eth-Trunk1]port link-type trunk
[RS1-Eth-Trunk1]port trunk allow-pass vlan all
[RS1-Eth-Trunk1]int g0/0/1
[RS1-GigabitEthernet0/0/1]port link-type trunk
[RS1-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[RS1-GigabitEthernet0/0/1]q

[RS1]int g0/0/3
[RS1-GigabitEthernet0/0/3]port link-type trunk
[RS1-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[RS1-GigabitEthernet0/0/3]q
 

5. 新增的vlan划入端口

[RS1]int g0/0/2
[RS1-GigabitEthernet0/0/2]port link-type access
[RS1-GigabitEthernet0/0/2]port default vlan 11
[RS1-GigabitEthernet0/0/2]un sh
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[RS1-GigabitEthernet0/0/2]quit

5.vlan设置IP地址

[RS1]int vlanif 100
[RS1-Vlanif100]ip add 192.168.100.1 24
[RS1-Vlanif100]q
[RS1]int vlanif 101
[RS1-Vlanif101]ip add 192.168.101.1 24
[RS1-Vlanif101]q
[RS1]int vlanif 102
[RS1-Vlanif102]ip add 192.168.102.1 24
[RS1-Vlanif102]q
[RS1]int vlanif 103
[RS1-Vlanif103]ip add 192.168.103.1 24
[RS1-Vlanif103]q
[RS1]int vlanif 11
[RS1-Vlanif11]ip add 192.168.11.1 24
[RS1-Vlanif11]q

RS2同理:


[RS2]vlan batch 12 100 101 102 103
Info: This operation may take a few seconds. Please wait for a moment...done.


[RS2]int eth-trunk 1
[RS2-Eth-Trunk1]mode lacp
[RS2-Eth-Trunk1]q


[RS2]int g0/0/4
[RS2-GigabitEthernet0/0/4]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[RS2-GigabitEthernet0/0/4]q


[RS2]int g0/0/5
[RS2-GigabitEthernet0/0/5]eth-trunk 1
Info: This operation may take a few seconds. Please wait for a moment...done.
[RS2-GigabitEthernet0/0/5]q


[RS2]int eth-trunk 1
[RS2-Eth-Trunk1]port link-type trunk
[RS2-Eth-Trunk1]port trunk allow-pass vlan all
[RS2-Eth-Trunk1]q
[RS2]int g0/0/1
[RS2-GigabitEthernet0/0/1]port link-type trunk
[RS2-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[RS2-GigabitEthernet0/0/1]q
[RS2]int g0/0/3
[RS2-GigabitEthernet0/0/3]port link-type trunk
[RS2-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[RS2-GigabitEthernet0/0/3]q


[RS2]int g0/0/2
[RS2-GigabitEthernet0/0/2]port link-type access
[RS2-GigabitEthernet0/0/2]port default vlan 12
[RS2-GigabitEthernet0/0/2]un sh
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[RS2-GigabitEthernet0/0/2]q


[RS2]int vlanif 100
[RS2-Vlanif100]ip add 192.168.100.1 24
[RS2-Vlanif100]q
[RS2]int vlanif 101
[RS2-Vlanif101]ip add 192.168.101.1 24
[RS2-Vlanif101]q
[RS2]int vlanif 102
[RS2-Vlanif102]ip add 192.168.102.1 24
[RS2-Vlanif102]q
[RS2]int vlanif 103
[RS2-Vlanif103]ip add 192.168.103.1 24
[RS2-Vlanif103]q

[RS2]int vlanif 12
[RS2-Vlanif12]ip add 192.168.12.1 24
[RS2-Vlanif12]q

路由器IP地址设置

[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.11.2 24
[R1-GigabitEthernet0/0/0]q
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.12.2 24
[R1-GigabitEthernet0/0/1]q

 DHCP设置:

三层RS1

地址池设置:

[RS1]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.


[RS1]ip pool v100
Info:It's successful to create an IP address pool.
[RS1-ip-pool-v100]gateway-list 192.168.100.1
[RS1-ip-pool-v100]network 192.168.100.0 mask 24
[RS1-ip-pool-v100]excluded-ip-address 192.168.100.100 192.168.100.253
[RS1-ip-pool-v100]q


[RS1]ip pool v101
Info:It's successful to create an IP address pool.
[RS1-ip-pool-v101]gateway-list 192.168.101.1
[RS1-ip-pool-v101]network 192.168.101.0 mask 24
[RS1-ip-pool-v101]excluded-ip-address 192.168.101.100 192.168.101.253
[RS1-ip-pool-v101]q


[RS1]ip pool v102
Info:It's successful to create an IP address pool.
[RS1-ip-pool-v102]gateway-list 192.168.102.1
[RS1-ip-pool-v102]network 192.168.102.0 mask 24
[RS1-ip-pool-v102]excluded-ip-address 192.168.102.100 192.168.102.253
[RS1-ip-pool-v102]q


[RS1]ip pool v103
Info:It's successful to create an IP address pool.
[RS1-ip-pool-v103]gateway-list 192.168.103.1
[RS1-ip-pool-v103]network 192.168.103.0 mask 24
[RS1-ip-pool-v103]excluded-ip-address 192.168.103.100 192.168.103.253
[RS1-ip-pool-v103]q

#错误
[RS1] interface V100
[RS1-Vlanif100]dhcp select global
[RS1-Vlanif100]q
[RS1]interface V100
[RS1-Vlanif100]undo dhcp select global
[RS1-Vlanif100]q

使用地址池:

正确
[RS1]int vlanif 100
[RS1-Vlanif100]dhcp select global
[RS1-Vlanif100]q
[RS1]int vlanif 101
[RS1-Vlanif101]dhcp select global
[RS1-Vlanif101]q
[RS1]int vlanif 102
[RS1-Vlanif102]dhcp select global
[RS1-Vlanif102]q
[RS1]int vlanif 103
[RS1-Vlanif103]dhcp select global
[RS1-Vlanif103]q

 

 

RS2做配置
[RS2]ip pool v100
Info:It's successful to create an IP address pool.
[RS2-ip-pool-v100]gateway-list 192.168.100.1
[RS2-ip-pool-v100]network 192.168.100.0 mask 24
[RS2-ip-pool-v100]excluded-ip-address 192.168.100.250 192.168.100.253
[RS2-ip-pool-v100]excluded-ip-address 192.168.100.2 192.168.100.100
[RS2-ip-pool-v100]q

excluded-ip-address 192.168.104.250 192.168.104.253

excluded-ip-address 192.168.104.2 192.168.104.100

excluded-ip-address 192.168.105.250 192.168.105.253

excluded-ip-address 192.168.105.2 192.168.105.100

excluded-ip-address 192.168.106.250 192.168.106.253

excluded-ip-address 192.168.106.2 192.168.106.100

excluded-ip-address 192.168.107.250 192.168.107.253

excluded-ip-address 192.168.107.2 192.168.107.100


[RS2]ip pool v102
Info:It's successful to create an IP address pool.
[RS2-ip-pool-v102]gateway-list 192.168.102.1
[RS2-ip-pool-v102]network 192.168.102.0 mask 24
[RS2-ip-pool-v102]excluded-ip-address 192.168.102.2 192.168.102.100
[RS2-ip-pool-v102]excluded-ip-address 192.168.102.250 192.168.102.253
[RS2-ip-pool-v102]q


[RS2]ip pool v101
Info:It's successful to create an IP address pool.
[RS2-ip-pool-v101]gateway-list 192.168.101.1
[RS2-ip-pool-v101]network 192.168.101.0 mask 24
[RS2-ip-pool-v101]excluded-ip-address 192.168.101.2 192.168.101.100
[RS2-ip-pool-v101]excluded-ip-address 192.168.101.250 192.168.101.253
[RS2-ip-pool-v101]q


[RS2]ip pool v103
Info:It's successful to create an IP address pool.
[RS2-ip-pool-v103]gateway-list 192.168.103.1
[RS2-ip-pool-v103]network 192.168.103.0 mask 24
[RS2-ip-pool-v103]excluded-ip-address 192.168.103.2 192.168.103.100
[RS2-ip-pool-v103]excluded-ip-address 192.168.103.250 192.168.103.253
[RS2-ip-pool-v103]q



[RS2]dhcp en
Info: The operation may take a few seconds. Please wait for a moment.done.


[RS2]int vlanif 100
[RS2-Vlanif100]dhcp select global
[RS2-Vlanif100]q
[RS2]int vlanif 101
[RS2-Vlanif101]dhcp select global
[RS2-Vlanif101]q
[RS2]int vlanif 102
[RS2-Vlanif102]dhcp select global
[RS2-Vlanif102]q
[RS2]int vlanif 103
[RS2-Vlanif103]dhcp select global
[RS2-Vlanif103]q

将RS1的端口关掉,看备份的RS2有用没

 [RS1]int g0/0/1
[RS1-GigabitEthernet0/0/1]shut

[RS1]int g0/0/3
[RS1-GigabitEthernet0/0/3]shut
[RS1-GigabitEthernet0/0/3]q

由于通过RS1 分配的地址是 2-100,253-255

通过RS2分配的地址是 100-250

所以加了个RC5,PC5划入V103

 

是RS2分配的地址

OSPF:

RS1:

[RS1]ospf 1
[RS1-ospf-1]area 0
[RS1-ospf-1-area-0.0.0.0]network 192.168.100.1 0.0.0.255
[RS1-ospf-1-area-0.0.0.0]network 192.168.101.1 0.0.0.255
[RS1-ospf-1-area-0.0.0.0]network 192.168.102.1 0.0.0.255
[RS1-ospf-1-area-0.0.0.0]network 192.168.103.1 0.0.0.255
[RS1-ospf-1-area-0.0.0.0]network 192.168.11.1 0.0.0.255
[RS1-ospf-1-area-0.0.0.0]q
[RS1-ospf-1]q

RS2:

[RS2]ospf 1
[RS2-ospf-1]area 0
[RS2-ospf-1-area-0.0.0.0]network 192.168.100.1 0.0.0.255
[RS2-ospf-1-area-0.0.0.0]network 192.168.101.1 0.0.0.255
[RS2-ospf-1-area-0.0.0.0]network 192.168.102.1 0.0.0.255
[RS2-ospf-1-area-0.0.0.0]network 192.168.103.1 0.0.0.255
[RS2-ospf-1-area-0.0.0.0]network 192.168.12.1 0.0.0.255
[RS2-ospf-1-area-0.0.0.0]q
[RS2-ospf-1]q

R1:

[R1]ospf 1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 192.168.11.1 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 192.168.12.1 0.0.0.255
[R1-ospf-1-area-0.0.0.0]q
[R1-ospf-1]q

 

 连接外网:

 AR1:

[AR1]int g0/0/0
[AR1-GigabitEthernet0/0/0]ip add 192.168.1.2 24
[AR1-GigabitEthernet0/0/0]q
[AR1]int g0/0/1
[AR1-GigabitEthernet0/0/1]ip add 12.1.1.1 24
[AR1-GigabitEthernet0/0/1]q
[AR1]q

R1:

[R1]int g0/0/2
[R1-GigabitEthernet0/0/2]ip add 192.168.1.1 24

R1:

[R1]ospf 1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 192.168.1.1 0.0.0.255
[R1-ospf-1-area-0.0.0.0]q

 

AR1配置静态路由:

[AR1]ip route-static 192.168.11.0 24 192.168.1.1
[AR1]ip route-static 192.168.12.0 24 192.168.1.1
[AR1]ip route-static 192.168.100.0 24 192.168.1.1
[AR1]ip route-static 192.168.101.0 24 192.168.1.1
[AR1]ip route-static 192.168.102.0 24 192.168.1.1
[AR1]ip route-static 192.168.103.0 24 192.168.1.1

[AR1]ip route-static 0.0.0.0 0  12.1.1.2

 

 

 接着在各个模块配置静态路由

[R1]ip route-static 12.1.1.0 24 192.168.1.2

[R1]ip route-static 200.1.1.0 24 192.168.1.2

[RS1]ip route-static 0.0.0.0 0 192.168.11.2

[RS2]ip route-static 0.0.0.0 0 192.168.12.2

配置NAT:

[AR1]acl 2000
[AR1-acl-basic-2000]rule permit source 192.168.0.0  0.0.255.255
[AR1-acl-basic-2000]int g0/0/1
[AR1-GigabitEthernet0/0/1]nat outbound 2000
[AR1-GigabitEthernet0/0/1]q

 

 

 

 两个园区的连接:

 右边:

[AR1]int g0/0/2
[AR1-GigabitEthernet0/0/2]ip add 192.168.2.2 24
[AR1-GigabitEthernet0/0/2]q

[R2]int g0/0/2
[R2-GigabitEthernet0/0/2]ip add 192.168.2.1 24
[R2-GigabitEthernet0/0/2]q

[R2]ospf 1
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 192.168.2.1 0.0.0.255
[R2-ospf-1-area-0.0.0.0]q

<AR1>sys
Enter system view, return user view with Ctrl+Z.
[AR1]ip route-static 192.168.13.0 24 192.168.2.1
[AR1]ip route-static 192.168.14.0 24 192.168.2.1
[AR1]ip route-static 192.168.104.0 24 192.168.2.1
[AR1]ip route-static 192.168.105.0 24 192.168.2.1
[AR1]ip route-static 192.168.106.0 24 192.168.2.1
[AR1]ip route-static 192.168.107.0 24 192.168.2.1
[AR1]q

 接着在各个模块配置静态路由
[R2]ip route-static 12.1.1.0 24 192.168.2.2
[R2]ip route-static 200.1.1.0 24 192.168.2.2
[RS3]ip route-static 0.0.0.0 0 192.168.13.2
[RS4]ip route-static 0.0.0.0 0 192.168.14.2
 

配置OSPF:

[AR1]ospf 1
[AR1-ospf-1]area 0
[AR1-ospf-1-area-0.0.0.0]network 192.168.1.2 0.0.0.255
[AR1-ospf-1-area-0.0.0.0]network 192.168.2.2 0.0.0.255
[AR1-ospf-1-area-0.0.0.0]q
[AR1-ospf-1]q 

不允许PC8,PC9访问互联网

先删掉以前的

[AR1]int g0/0/1
[AR1-GigabitEthernet0/0/1]undo nat outbound 2000
[AR1-GigabitEthernet0/0/1]q
[AR1]undo acl 2000
[AR1]dis acl all
 

[AR1]acl 2000
[AR1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[AR1-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255
[AR1-acl-basic-2000]rule permit source 192.168.11.0 0.0.0.255
[AR1-acl-basic-2000]rule permit source 192.168.12.0 0.0.0.255
[AR1-acl-basic-2000]rule permit source 192.168.13.0 0.0.0.255
[AR1-acl-basic-2000]rule permit source 192.168.14.0 0.0.0.255
[AR1-acl-basic-2000]rule permit source 192.168.100.0 0.0.0.255
[AR1-acl-basic-2000]rule permit source 192.168.101.0 0.0.0.255
[AR1-acl-basic-2000]rule permit source 192.168.102.0 0.0.0.255
[AR1-acl-basic-2000]rule permit source 192.168.103.0 0.0.0.255
[AR1-acl-basic-2000]rule permit source 192.168.104.0 0.0.0.255
[AR1-acl-basic-2000]rule permit source 192.168.107.0 0.0.0.255
[AR1-acl-basic-2000]int g0/0/1
[AR1-GigabitEthernet0/0/1]
[AR1-GigabitEthernet0/0/1]nat outbound 2000
[AR1-GigabitEthernet0/0/1]q

验证:

配置VVRP
[RS1]int vlanif 100
[RS1-Vlanif100]vrrp vrid 10 virtual-ip 192.168.100.254 
[RS1-Vlanif100]vrrp vrid 10 priority 110
[RS1-Vlanif100]vrrp vrid 10 preempt-mode timer delay 3
[RS1-Vlanif100]vrrp vrid 10 authentication-mode md5 campus
[RS1-Vlanif100]q
[RS1]int vlanif 101
[RS1-Vlanif101]vrrp vrid 1 virtual-ip 192.168.101.254
[RS1-Vlanif101]vrrp vrid 1 priority 110
[RS1-Vlanif101]vrrp vrid 1 preempt-mode timer delay 3
[RS1-Vlanif101]vrrp vrid 1 authentication-mode md5 campus
[RS1-Vlanif101]q
[RS1]int vlanif 102
[RS1-Vlanif102]vrrp vrid 2 virtual-ip 192.168.102.254
[RS1-Vlanif102]vrrp vrid 2 priority 90
[RS1-Vlanif102]vrrp vrid 2 preempt-mode timer delay 3
[RS1-Vlanif102]vrrp vrid 2 authentication-mode md5 campus
[RS1-Vlanif102]q
[RS1]int vlanif 103
[RS1-Vlanif103]vrrp vrid 3 virtual-ip 192.168.103.254
[RS1-Vlanif103]vrrp vrid 3 priority 90
[RS1-Vlanif103]vrrp vrid 3 preempt-mode timer delay 3
[RS1-Vlanif103]vrrp vrid 3 authentication-mode md5 campus
[RS1-Vlanif103]q

RS2

[RS2]int vlanif 100
[RS2-Vlanif100]vrrp vrid 10 virtual-ip 192.168.100.254
[RS2-Vlanif100]vrrp vrid 10 priority 90
[RS2-Vlanif100]vrrp vrid 10 preempt-mode timer delay 3
[RS2-Vlanif100]vrrp vrid 10 authentication-mode md5 campus
[RS2-Vlanif100]q
[RS2]int vlanif 101
[RS2-Vlanif101]vrrp vrid 1 virtual-ip 192.168.101.254
[RS2-Vlanif101]vrrp vrid 1 priority 90
[RS2-Vlanif101]vrrp vrid 1 preempt-mode timer delay 3
[RS2-Vlanif101]vrrp vrid 1 authentication-mode md5 campus
[RS2-Vlanif101]q
[RS2]int vlanif 102
[RS2-Vlanif102]vrrp vrid 2 virtual-ip 192.168.102.254 
[RS2-Vlanif102]vrrp vrid 2 priority 110
[RS2-Vlanif102]vrrp vrid 2 preempt-mode timer delay 3
[RS2-Vlanif102]vrrp vrid 2 authentication-mode md5 campus
[RS2-Vlanif102]q
[RS2]int vlanif 103
[RS2-Vlanif103]vrrp vrid 3 virtual-ip 192.168.103.254
[RS2-Vlanif103]vrrp vrid 3 priority 110
[RS2-Vlanif103]vrrp vrid 3 preempt-mode timer delay 3
[RS2-Vlanif103]vrrp vrid 3 authentication-mode md5 campus
[RS2-Vlanif103]q

RS3:

[RS3]int vlanif 104
[RS3-Vlanif104]vrrp vrid 4 virtual-ip 192.168.104.254 
[RS3-Vlanif104]vrrp vrid 4 priority 110
[RS3-Vlanif104]vrrp vrid 4 preempt-mode timer delay 3
[RS3-Vlanif104]vrrp vrid 4 authentication-mode md5 campus

[RS3-Vlanif104]q
[RS3]int vlanif 105
[RS3-Vlanif105]vrrp vrid 5 virtual-ip 192.168.105.254
[RS3-Vlanif105]vrrp vrid 5 priority 110
[RS3-Vlanif105]vrrp vrid 5 preempt-mode timer delay 3
[RS3-Vlanif105]vrrp vrid 5 authentication-mode md5 campus
[RS3-Vlanif105]q
[RS3]int vlanif 106
[RS3-Vlanif106]vrrp vrid 6 virtual-ip 192.168.106.254
[RS3-Vlanif106]vrrp vrid 6 priority 90
[RS3-Vlanif106]vrrp vrid 6 preempt-mode timer delay 3
[RS3-Vlanif106]vrrp vrid 6 authentication-mode md5 campus
[RS3-Vlanif106]q
[RS3]int vlanif 107
[RS3-Vlanif107]vrrp vrid 7 virtual-ip 192.168.107.254
[RS3-Vlanif107]vrrp vrid 7 priority 90
[RS3-Vlanif107]vrrp vrid 7 preempt-mode timer delay 3
[RS3-Vlanif107]vrrp vrid 7 authentication-mode md5 campus
[RS3-Vlanif107]q

RS4

[RS4]int vlanif 104
[RS4-Vlanif104]vrrp vrid 4 virtual-ip 192.168.104.254 
[RS4-Vlanif104]vrrp vrid 4 priority 90
[RS4-Vlanif104]vrrp vrid 4 preempt-mode timer delay 3
[RS4-Vlanif104]vrrp vrid 4 authentication-mode md5 campus
[RS4-Vlanif104]q
[RS4]int vlanif 105
[RS4-Vlanif105]vrrp vrid 5 virtual-ip 192.168.105.254 
[RS4-Vlanif105]vrrp vrid 5 priority 90
[RS4-Vlanif105]vrrp vrid 5 preempt-mode timer delay 3
[RS4-Vlanif105]vrrp vrid 5 authentication-mode md5 campus
[RS4-Vlanif105]q
[RS4]int vlanif 106
[RS4-Vlanif106]vrrp vrid 6 virtual-ip 192.168.106.254 
[RS4-Vlanif106]vrrp vrid 6 priority 110
[RS4-Vlanif106]vrrp vrid 6 preempt-mode timer delay 3
[RS4-Vlanif106]vrrp vrid 6 authentication-mode md5 campus
[RS4-Vlanif106]q
[RS4]int vlanif 107
[RS4-Vlanif107]vrrp vrid 7 virtual-ip 192.168.107.254
[RS4-Vlanif107]vrrp vrid 7 priority 110
[RS4-Vlanif107]vrrp vrid 7 preempt-mode timer delay 3
[RS4-Vlanif107]vrrp vrid 7 authentication-mode md5 campus
[RS4-Vlanif107]q

配置服务器

DNS,WEB

  

 [SW5-vlan4]q
[SW5]vlan 4
[SW5-vlan4]q
[SW5]int e0/0/1
[SW5-Ethernet0/0/1]port link-type access
[SW5-Ethernet0/0/1]port default vlan 4
[SW5-Ethernet0/0/1]un sh
Info: Interface Ethernet0/0/1 is not shutdown.
[SW5-Ethernet0/0/1]q
[SW5]int e0/0/2
[SW5-Ethernet0/0/2]port link-type access
[SW5-Ethernet0/0/2]port default vlan 4
[SW5-Ethernet0/0/2]un sh
Info: Interface Ethernet0/0/2 is not shutdown.
[SW5-Ethernet0/0/2]q

[SW5]int e0/0/3
[SW5-Ethernet0/0/3]port link-type trunk
[SW5-Ethernet0/0/3]port trunk allow-pass vlan all
[SW5-Ethernet0/0/3]q
[SW5]q

[RS1]vlan 4
[RS1-vlan4]q
[RS1]int vlanif 4
[RS1-Vlanif4]ip add 192.168.4.254 24
[RS1-Vlanif4]q
[RS1]int g0/0/6
[RS1-GigabitEthernet0/0/6]port link-type trunk
[RS1-GigabitEthernet0/0/6]port trunk allow-pass vlan all
[RS1-GigabitEthernet0/0/6]q

[RS1]ospf 1
[RS1-ospf-1]area 0
[RS1-ospf-1-area-0.0.0.0]network 192.168.4.254 0.0.0.255
[RS1-ospf-1-area-0.0.0.0]q
[RS1-ospf-1]q

[RS1]ip pool v100
[RS1-ip-pool-v100]dns-list 192.168.4.2
[RS1-ip-pool-v100]q
[RS1]ip pool v101
[RS1-ip-pool-v101]dns-list 192.168.4.2
[RS1-ip-pool-v101]q
[RS1]ip pool v102
[RS1-ip-pool-v102]dns-list 192.168.4.2
[RS1-ip-pool-v102]q
[RS1]ip pool v103
[RS1-ip-pool-v103]dns-list 192.168.4.2
[RS1-ip-pool-v103]q

[RS2]ip pool v100
[RS2-ip-pool-v100]dns-list 192.168.4.2
[RS2-ip-pool-v100]q
[RS2]ip pool v101
[RS2-ip-pool-v101]dns-list 192.168.4.2
[RS2-ip-pool-v101]q
[RS2]ip pool v102
[RS2-ip-pool-v102]dns-list 192.168.4.2
[RS2-ip-pool-v102]q
[RS2]ip pool v103
[RS2-ip-pool-v103]dns-list 192.168.4.2
[RS2-ip-pool-v103]q
[RS2]q

[RS3]dhcp en
[RS3]ip pool v104
[RS3-ip-pool-v104]dns-list 192.168.4.2
[RS3-ip-pool-v104]q
[RS3]ip pool v105
[RS3-ip-pool-v105]dns-list 192.168.4.2
[RS3-ip-pool-v105]q
[RS3]ip pool v106
[RS3-ip-pool-v106]dns-list 192.168.4.2
[RS3-ip-pool-v106]q
[RS3]ip pool v107
[RS3-ip-pool-v107]dns-list 192.168.4.2
[RS3-ip-pool-v107]q
[RS3]q

[RS4]ip pool v104
[RS4-ip-pool-v104]dns-list 192.168.4.2
[RS4-ip-pool-v104]q
[RS4]ip pool v105
[RS4-ip-pool-v105]dns-list 192.168.4.2
[RS4-ip-pool-v105]q
[RS4]ip pool v106
[RS4-ip-pool-v106]dns-list 192.168.4.2
[RS4-ip-pool-v106]q
[RS4]ip pool v107
[RS4-ip-pool-v107]dns-list 192.168.4.2
[RS4-ip-pool-v107]q

测试是否配置成功:

 PC1 ping花花化工

 

 配FPT服务器

图的更改:

 

 

TELNET:

[RS1]aaa      进入3A的配置模式
[RS1-aaa]local-user me privilege level 15
Info: Add a new user.
[RS1-aaa]local-user me password cipher mima
[RS1-aaa]q
[RS1]user-interface vty 0 4     交换机最多可以允许五个人同时在线进到交换机里去配置命令
[RS1-ui-vty0-4]
[RS1-ui-vty0-4]authentication-mode aaa        启用3A认证
[RS1-ui-vty0-4]q
[RS1]q

RS2通过telnet进入到RS1

 [RS2]aaa
[RS2-aaa]local-user me privilege level 15
Info: Add a new user.
[RS2-aaa]local-user me password cipher mima
[RS2-aaa]q
[RS2]user-interface vty 0 4
[RS2-ui-vty0-4]authentication-mode aaa
[RS2-ui-vty0-4]q

[R1]aaa
[R1-aaa]local-user me privilege level 15
Info: Add a new user.
[R1-aaa]local-user me password cipher mima
[R1-aaa]q
[R1]user-interface vty 0 4
[R1-ui-vty0-4]authentication-mode aaa
[R1-ui-vty0-4]q

[RS3]aaa
[RS3-aaa]local-user me privilege level 15
Info: Add a new user.
[RS3-aaa]local-user me password cipher mima
[RS3-aaa]q
[RS3]user-interface vty 0 4
[RS3-ui-vty0-4]authentication-mode aaa
[RS3-ui-vty0-4]q

[RS4]aaa
[RS4-aaa]local-user me privilege level 15
[RS4-aaa]local-user me password cipher mima
[RS4-aaa]q
[RS4]user-interface vty 0 4
[RS4-ui-vty0-4]authentication-mode aaa
[RS4-ui-vty0-4]q

[R2]aaa
[R2-aaa]local-user me privilege level 15
Info: Add a new user.
[R2-aaa]local-user me password cipher mima
[R2-aaa]q
[R2]user-interface vty 0 4
[R2-ui-vty0-4]authentication-mode aaa
[R2-ui-vty0-4]q

  • 1
    点赞
  • 34
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值