AI智能
改变未来

VLAN+VRRP+OSPF+RIP+DHCP+MSTP+路由引入

文章目录

  • R1配置
  • R2配置
  • LSW3配置
  • LSW4配置
  • LSW1配置
  • LSW2配置


上图为某公司网络组网模式。其中R1为核心路由器(网络出口),LSW1,LSW2为汇聚交换机,LSW3,LSW4为接入交换机,R2模拟DHCP Server。请完成以下配置:
1、 配置MSTP (20分)
配置LSW1,LSW2,LSWW3,LSW4都运行MSTP;且要求instance1映射vlan2,instance2映射vlan3,region-name为RG1;并配置LSW3为instance1的主根桥,instance2的备根桥,LSW4为instance2的主根桥,instance1的备根桥。
2、配置VLAN (15分)
所有交换机之间的互连接口都配置为trunk模式。所有trunk接口仅允许除了vlan1之外的所有vlan通过。
在LSW3上配置:
Vlanif2的iP地址为192.168.2.254/24,vlanif3的iP地址为192.168.3.253/24
在LSW4上配置:
Vlanif2的iP地址为192.168.2.253/24,vlanif3的iP地址为192.168.3.254/24
3、配置VRRP (20分)
在vlanif2下配置VRRP VRID 1的Maste 为SW3,Backup为SW4,虚拟IP地址为192.168.2.1;
在vlanif3下配置VRRP VRID 2的Maste 为SW4,Backup为SW3,虚拟IP地址为192.168.3.1;
在两个备份组中,分别配置Master路由器的优先级为120,抢占时延为5S,监视上行GE0/0/1接口来实现主备快速切换功能。
4、配置 DHCP及DHCP Relay(20分)
使能DHCP server的G0/0/0和G0/0/1接口从全局地址池分配地址;配置地址池vlan2,网关为192.168.2.1,网段为192.168.2.0/24,排除192.168.2.254和192.168.2.253,DNS为10.1.12.1;配置地址池vlan3,网关为192.168.3.1,网段为192.168.3.0/24,排除192.168.3.254和192.168.3.253,DNS为10.1.22.1。在DHCP Relay LSW3、LSW4设备上,分别在vlanif2,vlanif3下配置DHCP中继所对应的DHCP服务组。
5、配置 RIP、OSPF (20分)
在AR2,SW1,SW2上配置RIP v2,关闭自动汇总。配置AR1的G0/0/0,G0/0/1,LOOPBACK0,SW1和SW2的使用OSPF,且都属于Area 0
6、配置Import-route(5分)
在LSW3、LSW4上配置路由引入。

配置完成后,要求公司内网任意网络之间都可以通信,PC1和PC2能获得相应的IP地址,能与R1的Loopback0通信,VRRP主备切换后PC能正常通信。

R1配置

undo info-center enable

sysname R1

interface GigabitEthernet0/0/0
ip address 10.0.11.1 255.255.255.252

interface GigabitEthernet0/0/1
ip address 10.0.12.1 255.255.255.252

interface LoopBack0
ip address 1.1.1.1 255.255.255.255

ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.0.11.0 0.0.0.3
network 10.0.12.0 0.0.0.3

R2配置

undo info-center enable

sysname R2

dhcp enable

ip pool vlan2
gateway-list 192.168.2.1
network 192.168.2.0 mask 255.255.255.0
excluded-ip-address 192.168.2.253 192.168.2.254
dns-list 10.1.12.1

ip pool vlan3
gateway-list 192.168.3.1
network 192.168.3.0 mask 255.255.255.0
excluded-ip-address 192.168.3.253 192.168.3.254
dns-list 10.1.22.1

interface GigabitEthernet0/0/0
ip address 10.0.14.1 255.255.255.252
dhcp select global

interface GigabitEthernet0/0/1
ip address 10.0.13.1 255.255.255.252
dhcp select global

interface LoopBack0
ip address 2.2.2.2 255.255.255.255

rip 1
undo summary
version 2
network 10.0.0.0
network 2.0.0.0

LSW3配置

undo info-center enable

sysname S3

vlan batch 2 to 3 100 200

stp instance 1 root primary
stp instance 2 root secondary

dhcp enable

dhcp server group 13.1
dhcp-server 10.0.13.1 0

stp region-configuration
region-name RG1
revision-level 1
instance 1 vlan 2
instance 2 vlan 3
active region-configuration

interface Vlanif2
ip address 192.168.2.254 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.2.1
vrrp vrid 1 priority 120
vrrp vrid 1 preempt-mode timer delay 5
vrrp vrid 1 track interface GigabitEthernet0/0/2
dhcp select relay
dhcp relay server-select 13.1

interface Vlanif3
ip address 192.168.3.253 255.255.255.0
vrrp vrid 2 virtual-ip 192.168.3.1
vrrp vrid 2 priority 115
dhcp select relay
dhcp relay server-select 13.1

interface Vlanif100
ip address 10.0.13.2 255.255.255.252

interface Vlanif200
ip address 10.0.11.2 255.255.255.252

interface GigabitEthernet0/0/1
port link-type access
port default vlan 200

interface GigabitEthernet0/0/2
port link-type access
port default vlan 100

interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 4094

interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 4094

ospf 1
area 0.0.0.0
network 192.168.2.0 0.0.0.255
network 192.168.3.0 0.0.0.255
network 10.0.11.0 0.0.0.3
import-route rip 1

rip 1
undo summary
version 2
network 192.168.2.0
network 192.168.3.0
network 10.0.0.0
import-route ospf 1

LSW4配置

undo info-center enable

sysname S1

vlan batch 2 to 3 100 200

stp instance 1 root secondary
stp instance 2 root primary

dhcp enable

dhcp server group 14.1
dhcp-server 10.0.14.1 0

stp region-configuration
region-name RG1
revision-level 1
instance 1 vlan 2
instance 2 vlan 3
active region-configuration

interface Vlanif2
ip address 192.168.2.253 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.2.1
vrrp vrid 1 priority 115
dhcp select relay
dhcp relay server-select 14.1

interface Vlanif3
ip address 192.168.3.254 255.255.255.0
vrrp vrid 2 virtual-ip 192.168.3.1
vrrp vrid 2 priority 120
vrrp vrid 2 preempt-mode timer delay 5
vrrp vrid 2 track interface GigabitEthernet0/0/1
dhcp select relay
dhcp relay server-select 14.1

interface Vlanif100
ip address 10.0.14.2 255.255.255.252

interface Vlanif200
ip address 10.0.12.2 255.255.255.252

interface GigabitEthernet0/0/1
port link-type access
port default vlan 100

interface GigabitEthernet0/0/2
port link-type access
port default vlan 200

interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 4094

interface GigabitEthernet0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 4094

ospf 1
area 0.0.0.0
network 192.168.2.0 0.0.0.255
network 192.168.3.0 0.0.0.255
network 10.0.12.0 0.0.0.3
import-route rip 1

rip 1
undo summary
version 2
network 192.168.2.0
network 192.168.3.0
network 10.0.0.0
import-route ospf 1

LSW1配置

undo info-center enable

sysname S1

vlan batch 2 to 3

stp region-configuration
region-name RG1
revision-level 1
instance 1 vlan 2
instance 2 vlan 3
active region-configuration

interface Ethernet0/0/1
port hybrid pvid vlan 2
port hybrid untagged vlan 2
stp bpdu-filter enable
stp edged-port enable

interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094

interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094

LSW2配置

undo info-center enable

sysname S2

vlan batch 2 to 3

stp region-configuration
region-name RG1
revision-level 1
instance 1 vlan 2
instance 2 vlan 3
active region-configuration

interface Ethernet0/0/1
port hybrid pvid vlan 3
port hybrid untagged vlan 3
stp bpdu-filter enable
stp edged-port enable

interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094

interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094

赞(0) 打赏
未经允许不得转载:爱站程序员基地 » VLAN+VRRP+OSPF+RIP+DHCP+MSTP+路由引入