【实验】华为DC VS (一虚多)
可以使用OSPF进行查看
admin
resource-template QYT_HCIE //在admin管理视图下创建资源末班 并分配资源
resource vlan upper-limit 2000
resource cpu weight 4
resource memory ratio-threshold 35
[Spine-admin-template:QYT_HCIE]qu
[Spine-admin]virtual-system QYT_HCIE //创建了虚拟系统,名字自定义
[Spine-admin-vs:QYT_HCIE]port-mode port resource-template QYT_HCIE //端口模式调用了之前配置的资源模版
Info: Operating, please wait for a moment..........done.
[Spine-admin-vs:QYT_HCIE]assign interface GE 1/0/8 to 1/0/9 //把物理接口0和1口分配到虚拟系统
Warning: All configurations of the interfaces will be deleted. Continue? [Y/N]:y //提示将清空配置
!
【验证】
[Spine] admin
[Spine-admin]dis this //有些是自动产生的
#
admin
resource-template QYT_HCIE
resource vlan upper-limit 2000
resource cpu weight 4
resource memory ratio-threshold 35
virtual-system QYT_HICE
port-mode port
resource u4route upper-limit 10000
resource m4route upper-limit 1000
resource u6route upper-limit 1000
resource m6route upper-limit 1000
resource vlan upper-limit 2000
undo resource mpls enable
undo resource trill enable
undo resource mcast enable
resource vpn-instance upper-limit 256
resource cpu weight 4
resource memory ratio-threshold 35
resource disk ratio-threshold 100
assign interface GE1/0/8
assign interface GE1/0/9
<Spine>switch virtual-system QYT_HCIE //切换到自定义的虚拟系统
<Spine-QYT_HICE>sys immediately //进入新建虚拟系统的系统视图
[Spine-QYT_HICE]int GE 1/0/8 //设置1口的 IP参数
[Spine-QYT_HICE-GE1/0/8]undo portswitch
[Spine-QYT_HICE-GE1/0/8]ip add 10.1.13.2 24
[Spine-QYT_HICE-GE1/0/8]undo shutdown
同理:1口也这样设置
interface GE1/0/1
undo portswitch
undo shutdown
ip address 23.1.1.3 255.255.255.0
【同理 admin-vs也配置IP参数】
[Spine-QYT_HICE-GE1/0/9]dis this
#
interface GE1/0/9
undo portswitch
undo shutdown
ip address 10.1.13.2 255.255.255.0
#
【验证】
[Spine-QYT_HICE]dis virtual-system resource
VS : QYT_HICE
----------------------------------------------------------------
Item Total Used Unused
----------------------------------------------------------------
u4route 10000 11 9989
m4route 1000 0 1000
u6route 1000 0 1000
m6route 1000 0 1000
vlan 2000 1 1999
vpn-instance 256 1 255
cpu weight 4 -- --
memory ratio-threshold 35 -- --
disk ratio-threshold 100 -- --
----------------------------------------------------------------
[Spine-QYT_HICE]dis virtual-system verbose
Name : QYT_HICE
Status : running
Description :
Create time : 2020-08-29 22:53:28
Port mode : port
System MAC : 707b-e83e-703b
Assigned slot(s)
pvmb : 17
pvmb : 18
CPU(s)
slot 17 : 8%
Memory(s)
slot 17 : 10%, 166456/1555821 (Used Kbytes/Max Kbytes)
Disk(s)
17#cfcard:/VS_QYT_HICE: 0%, 20/8388608 (Used Kbytes/Max Kbytes)
17#cfcard2:/VS_QYT_HICE: 0%, 20/8388608 (Used Kbytes/Max Kbytes)
Assigned interface(s)
GE1/0/1, slot 1
GE1/0/8, slot 1
Assigned resource(s)
u4route : 10000(Max)
m4route : 1000(Max)
u6route : 1000(Max)
m6route : 1000(Max)
vlan : 2000(Max)
vpn-instance : 256(Max)
cpu : 4(weight)
memory : 35(ratio-threshold)
disk : 100(ratio-threshold)
mpls : disable
trill : disable
mcast : disable
=====================================================================================
【配置OSPF】方便观察
进入admin-vs虚拟系统
[Spine]ospf 10
[Spine-ospf-10]ar
[Spine-ospf-10]area 0
[Spine-ospf-10-area-0.0.0.0] //前提必须先新建ospf进程和区域
[Spine-GE1/0/9]dis th
#
interface GE1/0/9
undo portswitch
undo shutdown
ip address 10.1.13.1 255.255.255.0
ospf enable 10 area 0.0.0.0 //接口上这样配置前提是必须创建OSPF进程和区域
进入QYT_HICE 虚拟系统
[Spine-QYT_HICE-GE1/0/8]dis this
#
interface GE1/0/8
undo portswitch
undo shutdown
ip address 10.1.13.2 255.255.255.0
ospf enable 10 area 0.0.0.0
#
return
[Spine-QYT_HICE-GE1/0/8]int ge 1/0/1
[Spine-QYT_HICE-GE1/0/1]dis th
#
interface GE1/0/1
undo portswitch
undo shutdown
ip address 23.1.1.3 255.255.255.0
ospf enable 10 area 0.0.0.0
Leaf 交换机上的配置
[leaf-GE1/0/1]dis th
#
interface GE1/0/1
undo portswitch
undo shutdown
ip address 23.1.1.2 255.255.255.0
ospf enable 10 area 0.0.0.0
[Spine]dis ip routing-table protocol ospf
Proto: Protocol Pre: Preference
Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
_public_ Routing Table : OSPF
Destinations : 3 Routes : 3
OSPF routing table status : <Active>
Destinations : 2 Routes : 2
Destination/Mask Proto Pre Cost Flags NextHop Interface
2.2.2.2/32 OSPF 10 2 D 10.1.13.2 GE1/0/9
23.1.1.0/24 OSPF 10 2 D 10.1.13.2 GE1/0/9 //下一跳是 QYT_HICE vs系统交换机的下一跳
OSPF routing table status : <Inactive>
Destinations : 1 Routes : 1
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.13.0/24 OSPF 10 1 10.1.13.1 GE1/0/9
[Spine]ping 2.2.2.2
PING 2.2.2.2: 56 data bytes, press CTRL_C to break
Reply from 2.2.2.2: bytes=56 Sequence=1 ttl=254 time=9 ms
Reply from 2.2.2.2: bytes=56 Sequence=2 ttl=254 time=7 ms
Reply from 2.2.2.2: bytes=56 Sequence=3 ttl=254 time=13 ms
Reply from 2.2.2.2: bytes=56 Sequence=4 ttl=254 time=8 ms
Reply from 2.2.2.2: bytes=56 Sequence=5 ttl=254 time=11 ms
--- 2.2.2.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 7/9/13 ms