组网图形

       

MSTP+VRRP组合简介

  • 网络中部署VRRP负载分担时,多台设备同时承担业务,每个虚拟设备都包括一个Master设备和若干个Backup设备。如果为了接入备份需要同时部署冗余链路,则需要部署MSTP消除网络中的环路,保证流量的负载分担。

组网需求

  • 如图1所示,主机通过SwitchC接入网络,SwitchC通过双上行连接SwitchA和SwitchB来接入Internet。由于接入备份的需要,用户部署了冗余链路。冗余备份链路的存在导致出现环网,可能会引起广播风暴和MAC地址表项被破坏。
  • 用户希望在存在冗余备份链路的同时消除网络中的环路,在一条上行链路断开的时候,流量能切换到另外一条上行链路转发,还能合理利用网络带宽。
  • 此时可以在网络中部署MSTP解决环路问题。MSTP可阻塞二层网络中的冗余链路,将网络修剪成树状,达到消除环路的目的。同时在SwitchA和SwitchB上配置VRRP,HostA以SwitchA为默认网关接入Internet,SwitchB作为备份网关;HostB以SwitchB为默认网关接入Internet,SwitchA作为备份网关,以实现可靠性及流量的负载分担。

配置思路

  • 1.在处于环形网络中的交换设备上配置MSTP基本功能,包括:

    • a.配置MST域并创建多实例,配置VLAN2映射到MSTI1,VLAN3映射到MSTI2,实现流量的负载分担。
    • b.在MST域内,配置各实例的根桥与备份根桥。
    • c.配置各实例中某端口的路径开销值,实现将该端口阻塞。
    • d.使能MSTP,实现破除环路,包括:
      • •设备全局使能MSTP。
      • •除与终端设备相连的端口外,其他端口使能MSTP。
  • 2.配置保护功能,实现对设备或链路的保护。例如:在各实例的根桥设备指定端口配置根保护功能。
  • 3.配置设备的二层转发功能。
  • 4.配置各设备端口IP地址及路由协议,使各设备间网络层连通。
  • 5.在SwitchA和SwitchB上创建VRRP备份组1和VRRP备份组2,在备份组1中,配置SwitchA为Master设备,SwitchB为Backup设备;在备份组2中,配置SwitchB为Master设备,SwitchA为Backup设备。

操作步骤

  配置MSTP基本功能

  a.配置SwitchA、SwitchB、SwitchC到域名为RG1的域内,创建实例MSTI1和实例MSTI2

  # 配置SwitchA的MST域。

<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] stp region-configuration //进入MST域视图。
[SwitchA-mst-region] region-name RG1 //配置域名为RG1。
[SwitchA-mst-region] instance 1 vlan 2 //将VLAN 2映射到实例1上。
[SwitchA-mst-region] instance 2 vlan 3 //将VLAN 3映射到实例2上。
[SwitchA-mst-region] active region-configuration //激活MST域的配置。
[SwitchA-mst-region] quit

  # 配置SwitchB的MST域。

<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] stp region-configuration //进入MST域视图。
[SwitchB-mst-region] region-name RG1 //配置域名为RG1。
[SwitchB-mst-region] instance 1 vlan 2 //将VLAN 2映射到实例1上。
[SwitchB-mst-region] instance 2 vlan 3 //将VLAN 3映射到实例2上。
[SwitchB-mst-region] active region-configuration //激活MST域的配置。
[SwitchB-mst-region] quit

  # 配置SwitchC的MST域。

<HUAWEI> system-view
[HUAWEI] sysname SwitchC
[SwitchC] stp region-configuration //进入MST域视图。
[SwitchC-mst-region] region-name RG1 //配置域名为RG1。
[SwitchC-mst-region] instance 1 vlan 2 //将VLAN 2映射到实例1上。
[SwitchC-mst-region] instance 2 vlan 3 //将VLAN 3映射到实例2上。
[SwitchC-mst-region] active region-configuration //激活MST域的配置。
[SwitchC-mst-region] quit

  b.在域RG1内,配置MSTI1与MSTI2的根桥与备份根桥

  配置MSTI1的根桥与备份根桥

  # 配置SwitchA为MSTI1的根桥。

[SwitchA] stp instance 1 root primary

   # 配置SwitchB为MSTI1的备份根桥。

[SwitchB] stp instance 1 root secondary

  配置MSTI2的根桥与备份根桥

  # 配置SwitchB为MSTI2的根桥。

[SwitchB] stp instance 2 root primary

  # 配置SwitchA为MSTI2的备份根桥。

[SwitchA] stp instance 2 root secondary

  c.配置实例MSTI1和MSTI2中将要被阻塞端口的路径开销值大于缺省值

  # 配置SwitchA的端口路径开销。

[SwitchA] stp pathcost-standard legacy

  # 配置SwitchB的端口路径开销。

[SwitchB] stp pathcost-standard legacy

   # 配置SwitchC的端口路径开销计算方法为华为计算方法,将端口GE1/0/1在实例MSTI2中的路径开销值配置为20000,将端口GE1/0/4在实例MSTI1中的路径开销值配置为20000。

[SwitchC] stp pathcost-standard legacy
[SwitchC] interface gigabitethernet 1/0/1
[SwitchC-GigabitEthernet1/0/1] stp instance 2 cost 20000
[SwitchC-GigabitEthernet1/0/1] quit
[SwitchC] interface gigabitethernet 1/0/4
[SwitchC-GigabitEthernet1/0/4] stp instance 1 cost 20000
[SwitchC-GigabitEthernet1/0/4] quit

  d.使能MSTP,实现破除环路

  设备全局使能MSTP

  # 在SwitchA/B/C上启动MSTP。

[SwitchA] stp enable

[SwitchB] stp enable

[SwitchC] stp enable

  将与Host相连的端口配置为边缘端口并配置BPDU过滤

[SwitchC] interface gigabitethernet 1/0/2
[SwitchC-GigabitEthernet1/0/2] stp disable
[SwitchC-GigabitEthernet1/0/2] stp edged-port enable
[SwitchC-GigabitEthernet1/0/2] stp bpdu-filter enable
[SwitchC-GigabitEthernet1/0/2] quit
[SwitchC] interface gigabitethernet 1/0/3
[SwitchC-GigabitEthernet1/0/3] stp edged-port enable
[SwitchC-GigabitEthernet1/0/3] stp bpdu-filter enable
[SwitchC-GigabitEthernet1/0/3] quit

  将与Router相连的端口配置为边缘端口并配置BPDU过滤

  # 配置SwitchA端口。

[SwitchA] interface gigabitethernet 1/0/3
[SwitchA-GigabitEthernet1/0/3] stp edged-port enable
[SwitchA-GigabitEthernet1/0/3] stp bpdu-filter enable
[SwitchA-GigabitEthernet1/0/3] quit

  # 配置SwitchB端口。

[SwitchB] interface gigabitethernet 1/0/3
[SwitchB-GigabitEthernet1/0/3] stp edged-port enable
[SwitchB-GigabitEthernet1/0/3] stp bpdu-filter enable
[SwitchB-GigabitEthernet1/0/3] quit
  • 配置保护功能,如在各实例的根桥设备的指定端口配置根保护功能

  # 在SwitchA端口GE1/0/1上启动根保护。

[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] stp root-protection
[SwitchA-GigabitEthernet1/0/1] quit

  # 在SwitchB端口GE1/0/1上启动根保护。

[SwitchB] interface gigabitethernet 1/0/1
[SwitchB-GigabitEthernet1/0/1] stp root-protection
[SwitchB-GigabitEthernet1/0/1] quit
  • 配置处于环网中的设备的二层转发功能

  在交换设备SwitchA、SwitchB、SwitchC上创建VLAN2~3

  # 在SwitchA/B/C上创建VLAN2~3。

[SwitchA] vlan batch 2 to 3

[SwitchB] vlan batch 2 to 3

[SwitchC] vlan batch 2 to 3

  将交换设备上接入环路中的端口加入VLAN

  # 将SwitchA端口GE1/0/1加入VLAN。

[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port link-type trunk
[SwitchA-GigabitEthernet1/0/1] port trunk allow-pass vlan 2 to 3
[SwitchA-GigabitEthernet1/0/1] quit

  # 将SwitchA端口GE1/0/2加入VLAN。

[SwitchA] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] port link-type trunk
[SwitchA-GigabitEthernet1/0/2] port trunk allow-pass vlan 2 to 3
[SwitchA-GigabitEthernet1/0/2] quit

  # 将SwitchB端口GE1/0/1加入VLAN。

[SwitchB] interface gigabitethernet 1/0/1
[SwitchB-GigabitEthernet1/0/1] port link-type trunk
[SwitchB-GigabitEthernet1/0/1] port trunk allow-pass vlan 2 to 3
[SwitchB-GigabitEthernet1/0/1] quit

  # 将SwitchB端口GE1/0/2加入VLAN。

[SwitchB] interface gigabitethernet 1/0/2
[SwitchB-GigabitEthernet1/0/2] port link-type trunk
[SwitchB-GigabitEthernet1/0/2] port trunk allow-pass vlan 2 to 3
[SwitchB-GigabitEthernet1/0/2] quit

  # 将SwitchC端口GE1/0/1加入VLAN。

[SwitchC] interface gigabitethernet 1/0/1
[SwitchC-GigabitEthernet1/0/1] port link-type trunk
[SwitchC-GigabitEthernet1/0/1] port trunk allow-pass vlan 2 to 3
[SwitchC-GigabitEthernet1/0/1] quit

  # 将SwitchC端口GE1/0/2加入VLAN。

[SwitchC] interface gigabitethernet 1/0/2
[SwitchC-GigabitEthernet1/0/2] port link-type access
[SwitchC-GigabitEthernet1/0/2] port default vlan 2
[SwitchC-GigabitEthernet1/0/2] quit

  # 将SwitchC端口GE1/0/3加入VLAN。

[SwitchC] interface gigabitethernet 1/0/3
[SwitchC-GigabitEthernet1/0/3] port link-type access
[SwitchC-GigabitEthernet1/0/3] port default vlan 3
[SwitchC-GigabitEthernet1/0/3] quit

  # 将SwitchC端口GE1/0/4加入VLAN。

[SwitchC] interface gigabitethernet 1/0/4
[SwitchC-GigabitEthernet1/0/4] port link-type trunk
[SwitchC-GigabitEthernet1/0/4] port trunk allow-pass vlan 2 to 3
[SwitchC-GigabitEthernet1/0/4] quit
  • 验证配置结果

  # 在SwitchA上执行display stp brief命令,查看端口状态和端口的保护类型,结果如下:

[SwitchA] display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet1/0/1 DESI FORWARDING ROOT
0 GigabitEthernet1/0/2 DESI FORWARDING NONE
1 GigabitEthernet1/0/1 DESI FORWARDING ROOT
1 GigabitEthernet1/0/2 DESI FORWARDING NONE
2 GigabitEthernet1/0/1 DESI FORWARDING ROOT
2 GigabitEthernet1/0/2 ROOT FORWARDING NONE

  在MSTI1中,由于SwitchA是根桥,SwitchA的端口GE1/0/2和GE1/0/1成为指定端口。在MSTI2中,SwitchA的端口GE1/0/1成为指定端口,端口GE1/0/2成为根端口。

  # 在SwitchB上执行display stp brief命令,结果如下:

[SwitchB] display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet1/0/1 DESI FORWARDING ROOT
0 GigabitEthernet1/0/2 ROOT FORWARDING NONE
1 GigabitEthernet1/0/1 DESI FORWARDING ROOT
1 GigabitEthernet1/0/2 ROOT FORWARDING NONE
2 GigabitEthernet1/0/1 DESI FORWARDING ROOT
2 GigabitEthernet1/0/2 DESI FORWARDING NONE

  在MSTI2中,由于SwitchB是根桥,端口GE1/0/1和GE1/0/2在MSTI2中成为指定端口。在MSTI1中,SwitchB的端口GE1/0/1成为指定端口,端口GE1/0/2成为根端口。

  # 在SwitchC上执行display stp interface brief命令,结果如下:

[SwitchC] display stp interface gigabitethernet 1/0/1 brief
MSTID Port Role STP State Protection
0 GigabitEthernet1/0/1 ROOT FORWARDING NONE
1 GigabitEthernet1/0/1 ROOT FORWARDING NONE
2 GigabitEthernet1/0/1 ALTE DISCARDING NONE
[SwitchC] display stp interface gigabitethernet 1/0/4 brief
MSTID Port Role STP State Protection
0 GigabitEthernet1/0/4 ALTE DISCARDING NONE
1 GigabitEthernet1/0/4 ALTE DISCARDING NONE
2 GigabitEthernet1/0/4 ROOT FORWARDING NONE

  SwitchC的端口GE1/0/1在MSTI1中为根端口,在MSTI2中被阻塞。SwitchC的另一个端口GE1/0/4,在MSTI1中被阻塞,在MSTI2中为根端口。

  • 配置设备间的网络互连

  # 配置设备各端口的IP地址,以SwitchA为例。SwitchB的配置与SwitchA类似,不再赘述。

[SwitchA] vlan batch 4
[SwitchA] interface gigabitethernet 1/0/3
[SwitchA-GigabitEthernet1/0/3] port link-type trunk
[SwitchA-GigabitEthernet1/0/3] port trunk allow-pass vlan 4
[SwitchA-GigabitEthernet1/0/3] quit
[SwitchA] interface vlanif 2
[SwitchA-Vlanif2] ip address 10.1.2.102 24
[SwitchA-Vlanif2] quit
[SwitchA] interface vlanif 3
[SwitchA-Vlanif3] ip address 10.1.3.102 24
[SwitchA-Vlanif3] quit
[SwitchA] interface vlanif 4
[SwitchA-Vlanif4] ip address 10.1.4.102 24
[SwitchA-Vlanif4] quit

  # 配置SwitchA、SwitchB和路由器间采用OSPF协议进行互连。以SwitchA为例,SwitchB的配置与SwitchA类似,不再赘述。

[SwitchA] ospf 1
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 10.1.2.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] network 10.1.3.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] network 10.1.4.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] quit
[SwitchA-ospf-1] quit
  • 配置VRRP备份组

  # 在SwitchA和SwitchB上创建VRRP备份组1,配置SwitchA的优先级为120,抢占延时为20秒,作为Master设备;SwitchB的优先级为缺省值,作为Backup设备。

[SwitchA] interface vlanif 2
[SwitchA-Vlanif2] vrrp vrid 1 virtual-ip 10.1.2.100 //创建组号为1的VRRP备份组并为备份组指定虚拟IP地址10.1.2.100。
[SwitchA-Vlanif2] vrrp vrid 1 priority 120 //配置VRRP备份组1的优先级为120。
[SwitchA-Vlanif2] vrrp vrid 1 preempt-mode timer delay 20 //配置VRRP备份组1抢占延时为20秒。
[SwitchA-Vlanif2] quit
[SwitchB] interface vlanif 2
[SwitchB-Vlanif2] vrrp vrid 1 virtual-ip 10.1.2.100 //创建组号为1的VRRP备份组并为备份组指定虚拟IP地址10.1.2.100。
[SwitchB-Vlanif2] quit

  # 在SwitchA和SwitchB上创建VRRP备份组2,配置SwitchB的优先级为120,抢占延时为20秒,作为Master设备;SwitchA的优先级为缺省值,作为Backup设备。

[SwitchB] interface vlanif 3
[SwitchB-Vlanif3] vrrp vrid 2 virtual-ip 10.1.3.100 //创建组号为2的VRRP备份组并为备份组指定虚拟IP地址10.1.3.100。
[SwitchB-Vlanif3] vrrp vrid 2 priority 120 //配置VRRP备份组1的优先级为120。
[SwitchB-Vlanif3] vrrp vrid 2 preempt-mode timer delay 20 //配置VRRP备份组2抢占延时为20秒。
[SwitchB-Vlanif3] quit
[SwitchA] interface vlanif 3
[SwitchA-Vlanif3] vrrp vrid 2 virtual-ip 10.1.3.100 //创建组号为2的VRRP备份组并为备份组指定虚拟IP地址10.1.3.100。
[SwitchA-Vlanif3] quit

   # 配置主机HostA的缺省网关为备份组1的虚拟IP地址10.1.2.100,配置主机HostB的缺省网关为备份组2的虚拟IP地址10.1.3.100。

  • 验证配置结果

  # 完成上述配置后,在SwitchA上执行display vrrp命令,可以看到SwitchA在备份组1中作为Master设备,在备份组2中作为Backup设备。

[SwitchA] display vrrp
Vlanif2 | Virtual Router 1
State : Master
Virtual IP : 10.1.2.100
Master IP : 10.1.2.102
PriorityRun : 120
PriorityConfig : 120
MasterPriority : 120
Preempt : YES Delay Time : 20 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2018-05-11 11:39:18
Last change time : 2018-05-26 11:38:58 Vlanif3 | Virtual Router 2
State : Backup
Virtual IP : 10.1.3.100
Master IP : 10.1.3.103
PriorityRun : 100
PriorityConfig : 100
MasterPriority : 120
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0102
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2018-05-11 11:40:18
Last change time : 2018-05-26 11:48:58

  # 在SwitchB上执行display vrrp命令,可以看到SwitchB在备份组1中作为Backup设备,在备份组2中作为Master设备。

[SwitchB] display vrrp
Vlanif2 | Virtual Router 1
State : Backup
Virtual IP : 10.1.2.100
Master IP : 10.1.2.102
PriorityRun : 100
PriorityConfig : 100
MasterPriority : 120
Preempt : YES Delay Time : 0 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2018-05-11 11:39:18
Last change time : 2018-05-26 11:38:58 Vlanif3 | Virtual Router 2
State : Master
Virtual IP : 10.1.3.100
Master IP : 10.1.3.103
PriorityRun : 120
PriorityConfig : 120
MasterPriority : 120
Preempt : YES Delay Time : 20 s
TimerRun : 1 s
TimerConfig : 1 s
Auth type : NONE
Virtual MAC : 0000-5e00-0102
Check TTL : YES
Config type : normal-vrrp
Backup-forward : disabled
Create time : 2018-05-11 11:40:18
Last change time : 2018-05-26 11:48:58

 

网络拓扑实例10:MSTP+VRRP组合组网的更多相关文章

  1. 网络拓扑实例09:VRRP组网下同网段内配置基于全局地址池的DHCP服务器

    组网图形 DHCP服务器简介 见前面DHCP服务器文章,不再赘述. 组网需求 如图1所示,某企业内的一台主机通过Switch双归属到SwitchA和SwitchB,SwitchA为主设备,作为DHCP ...

  2. 华为交换机MSTP+VRRP配置实例说明文档

    华为交换机MSTP+VRRP配置实例说明文档 拓扑图 IP地址规划表 设备名称 设备接口 对端设备 对端接口 VLAN VLAN /接口地址 备注 SW0 GE0/0/23 SW2 GE0/0/23 ...

  3. 网络拓扑实例之VRRP负载分担(四)

    组网图形  VRRP负载分担简介 负载分担方式是指多台设备同时承担业务,因此负载分担方式需要两个或者两个以上的虚拟路由器,每个虚拟路由器都包括一个Master路由器和若干个Backup路由器,各虚拟路 ...

  4. MSTP+ VRRP 交换机的 配置过程

    配置思路采用以下思路配置: 1.在处于环形网络中的交换设备上配置MSTP基本功能,包括:a.配置MST域并创建多实例,配置VLAN2映射到MSTI1,VLAN3映射到MSTI2,实现流量的负载分担. ...

  5. 网络拓扑实例13:IPv4静态路由与NQA联动简介

    组网图形 IPv4静态路由与NQA联动简介 网络质量分析NQA(Network Quality Analysis)是一种实时的网络性能探测和统计技术,可以对响应时间.网络抖动.丢包率等网络信息进行统计 ...

  6. 【React Native开发】React Native控件之Image组件解说与美团首页顶部效果实例(10)

    ),React Native技术交流4群(458982758),欢迎各位大牛,React Native技术爱好者增加交流!同一时候博客左側欢迎微信扫描关注订阅号,移动技术干货,精彩文章技术推送! Im ...

  7. 【STM32-V5】STM32F407开发板开源, 丰富软件资源, 强劲硬件配置, 配套500实例, 10套手册带视频教程2019-12-12

    淘宝购买地址:购买地址链接 从2013年5月份发布至今,开发板硬件更新过6个版本,软件资料更新过85次.当前标准库最新版本V8.8,HAL库最新版本V1.1 安富莱微信公共平台,欢迎大家关注(打造高质 ...

  8. 网络拓扑实例之RRPP单环(五)

    组网图形 RRPP简介 在城域网和企业网的网络规划以及实际组网应用中大多会采用环网结构来提高网络的可靠性.采用环网结构的好处是:当环上任意一个节点或节点之间的链路发生故障,都可以将数据流量切换到备份链 ...

  9. 网络拓扑实例之交换机基于接口地址池作为DHCP服务器(六)

    组网图形 DHCP服务器简介 通常用户希望网络中的每台终端能够动态获取IP地址.DNS服务器的IP地址.路由信息.网关信息等网络参数,不需要手动配置终端的IP地址等网络参数:另外,针对一些移动终端(手 ...

随机推荐

  1. Cocos Creator 源码解读:引擎启动与主循环

    前言 预备 不知道你有没有想过,假如把游戏世界比作一辆汽车,那么这辆"汽车"是如何启动,又是如何持续运转的呢? 如题,本文的内容主要为 Cocos Creator 引擎的启动流程和 ...

  2. 9_Palindrome Number

    9.Palindrome Number Determine whether an integer is a palindrome. An integer is a palindrome when it ...

  3. 【SpringBoot】03.SpringBoot整合Servlet的两种方式

    SpringBoot整合Servlet的两种方式: 1. 通过注解扫描完成Servlet组件注册 新建Servlet类继承HttpServlet 重写超类doGet方法 在该类使用注解@WebServ ...

  4. Ubuntu 18.04 Tomcat 安装及配置

    转载自:https://blog.csdn.net/weixx3/article/details/80808484 1.下载Tomcat 8.5.31到Apache Tomcat官网,选择tar.gz ...

  5. FFmpeg开发笔记(九):ffmpeg解码rtsp流并使用SDL同步播放

    前言   ffmpeg播放rtsp网络流和摄像头流.   Demo   使用ffmpeg播放局域网rtsp1080p海康摄像头:延迟0.2s,存在马赛克     使用ffmpeg播放网络rtsp文件流 ...

  6. tp3.2 php sdk上传七牛云

    //获取上传token Vendor('sdk.autoload'); $accessKey='********'; $secretKey='*******'; $auth=new \Qiniu\Au ...

  7. JavaScript全局变量与局部变量

    JavaScript中存储数据值的容器称为变量.根据变量作用域可将变量分为全局变量和局部变量. 全局变量(Global Variable) 拥有全局作用域,在JavaScript代码中任何地方都有定义 ...

  8. MyBatis 使用手册

    MyBatis 是一款优秀的持久层框架,它支持自定义 SQL.存储过程以及高级映射.MyBatis 免除了几乎所有的 JDBC 代码以及设置参数和获取结果集的工作.MyBatis 可以通过简单的 XM ...

  9. 企业级工作流解决方案(六)--微服务消息处理模型之与Abp集成

    身份认证传递 对于Abp比较熟悉的朋友应该对他里面的用户身份认证比较熟悉,他是通过实现微软提供的权限认证方式实现的,用户登录身份信息存储在System.Security.Claims.ClaimsPr ...

  10. 面试阿里,首先要掌握的 Java 泛型,帮你一次性搞懂!

    引言 泛型是Java中一个非常重要的知识点,在Java集合类框架中泛型被广泛应用.本文我们将从零开始来看一下Java泛型的设计,将会涉及到通配符处理,以及让人苦恼的类型擦除. 泛型基础 泛型类 我们首 ...