VLANIF配置

2023-09-22 06:45:00

目录

实验原理:

案例:

设备配置

用ping验证不同vlan之间实现相互通信


实验原理:

VLANIF接口是一种第三层的逻辑接口,用于在第三层实现不同VLAN 之间的通信。

每个VALN有一个VLANIF接口,并通过该接口在网络层转发 VLAN通信。由于每个VLAN是一个广播域,每个 VLAN 可以被看作是一个 IP 网段,因此可以把 VLANIF 接口当作该VLAN的网关,通过在VLANIF 接口上配置IP地址,并允许其基于IP地址进行第三层分组转发,就可以实现VLAN之间在第三层上的互相通信。 

案例:

设备配置

 

LSW1的配置 

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname LSW1
[LSW1]vlan batch 10 30
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW1]
Sep 17 2023 11:07:12-08:00 LSW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.2
5.191.3.1 configurations have been changed. The current change number is 5, the 
change loop count is 0, and the maximum number of records is 4095.
[LSW1]undo info-center enable
Info: Information center is disabled.
[LSW1]port-group pvlan10
[LSW1-port-group-pvlan10]group-member g0/0/9 to g0/0/12
[LSW1-port-group-pvlan10]port link-type access
[LSW1-GigabitEthernet0/0/9]port link-type access
[LSW1-GigabitEthernet0/0/10]port link-type access
[LSW1-GigabitEthernet0/0/11]port link-type access
[LSW1-GigabitEthernet0/0/12]port link-type access
[LSW1-port-group-pvlan10]port default vlan 10
[LSW1-GigabitEthernet0/0/9]port default vlan 10
[LSW1-GigabitEthernet0/0/10]port default vlan 10
[LSW1-GigabitEthernet0/0/11]port default vlan 10
[LSW1-GigabitEthernet0/0/12]port default vlan 10
[LSW1-port-group-pvlan10]q
[LSW1]port-group pvlan30
[LSW1-port-group-pvlan30]group-member g0/0/13 to g0/0/16
[LSW1-port-group-pvlan30]port link-type access
[LSW1-GigabitEthernet0/0/13]port link-type access
[LSW1-GigabitEthernet0/0/14]port link-type access
[LSW1-GigabitEthernet0/0/15]port link-type access
[LSW1-GigabitEthernet0/0/16]port link-type access
[LSW1-port-group-pvlan30]port default vlan 30
[LSW1-GigabitEthernet0/0/13]port default vlan 30
[LSW1-GigabitEthernet0/0/14]port default vlan 30
[LSW1-GigabitEthernet0/0/15]port default vlan 30
[LSW1-GigabitEthernet0/0/16]port default vlan 30
[LSW1-port-group-pvlan30]qu
[LSW1]interface g0/0/24
[LSW1-GigabitEthernet0/0/24]port link-type trunk
[LSW1-GigabitEthernet0/0/24]port trunk allow-pass vlan 10 30
[LSW1-GigabitEthernet0/0/24]qu
[LSW1]display vlan
The total number of vlans is : 3
--------------------------------------------------------------------------------
U: Up;         D: Down;         TG: Tagged;         UT: Untagged;
MP: Vlan-mapping;               ST: Vlan-stacking;
#: ProtocolTransparent-vlan;    *: Management-vlan;
--------------------------------------------------------------------------------

VID  Type    Ports                                                          
--------------------------------------------------------------------------------
1    common  UT:GE0/0/1(D)      GE0/0/2(D)      GE0/0/3(D)      GE0/0/4(D)      
                GE0/0/5(D)      GE0/0/6(D)      GE0/0/7(D)      GE0/0/8(D)      
                GE0/0/17(D)     GE0/0/18(D)     GE0/0/19(D)     GE0/0/20(D)     
                GE0/0/21(D)     GE0/0/22(D)     GE0/0/23(D)     GE0/0/24(U)     

10   common  UT:GE0/0/9(U)      GE0/0/10(D)     GE0/0/11(D)     GE0/0/12(D)     

             TG:GE0/0/24(U)                                                     

30   common  UT:GE0/0/13(U)     GE0/0/14(D)     GE0/0/15(D)     GE0/0/16(D)     

             TG:GE0/0/24(U)                                                     


VID  Status  Property      MAC-LRN Statistics Description      
--------------------------------------------------------------------------------

1    enable  default       enable  disable    VLAN 0001                         
10   enable  default       enable  disable    VLAN 0010                         
30   enable  default       enable  disable    VLAN 0030                         
[LSW1]display IP routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 2        Routes : 2        

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0

 LSW2也是相同的配置 

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname LSW2
[LSW2]
Sep 17 2023 11:14:23-08:00 LSW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.2
5.191.3.1 configurations have been changed. The current change number is 4, the 
change loop count is 0, and the maximum number of records is 4095.
[LSW2]undo info-center enable
Info: Information center is disabled.
[LSW2]vlan batch 10 30
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW2]port-group pvlan10
[LSW2-port-group-pvlan10]group-member g0/0/9 to g0/0/12
[LSW2-port-group-pvlan10]port link-type access
[LSW2-GigabitEthernet0/0/9]port link-type access
[LSW2-GigabitEthernet0/0/10]port link-type access
[LSW2-GigabitEthernet0/0/11]port link-type access
[LSW2-GigabitEthernet0/0/12]port link-type access
[LSW2-port-group-pvlan10]port default vlan 10
[LSW2-GigabitEthernet0/0/9]port default vlan 10
[LSW2-GigabitEthernet0/0/10]port default vlan 10
[LSW2-GigabitEthernet0/0/11]port default vlan 10
[LSW2-GigabitEthernet0/0/12]port default vlan 10
[LSW2-port-group-pvlan10]qu
[LSW2]port-group pvlan30
[LSW2-port-group-pvlan30]group-member g0/0/13 to g0/0/16
[LSW2-port-group-pvlan30]port link-type access
[LSW2-GigabitEthernet0/0/13]port link-type access
[LSW2-GigabitEthernet0/0/14]port link-type access
[LSW2-GigabitEthernet0/0/15]port link-type access
[LSW2-GigabitEthernet0/0/16]port link-type access
[LSW2-port-group-pvlan30]port default vlan 30
[LSW2-GigabitEthernet0/0/13]port default vlan 30
[LSW2-GigabitEthernet0/0/14]port default vlan 30
[LSW2-GigabitEthernet0/0/15]port default vlan 30
[LSW2-GigabitEthernet0/0/16]port default vlan 30
[LSW2-port-group-pvlan30]qu
[LSW2]interface g0/0/24
[LSW2-GigabitEthernet0/0/24]port link-type trunk
[LSW2-GigabitEthernet0/0/24]port trunk allow-pass vlan 10 30
[LSW2-GigabitEthernet0/0/24]qu
[LSW2]display vlan
The total number of vlans is : 3
--------------------------------------------------------------------------------
U: Up;         D: Down;         TG: Tagged;         UT: Untagged;
MP: Vlan-mapping;               ST: Vlan-stacking;
#: ProtocolTransparent-vlan;    *: Management-vlan;
--------------------------------------------------------------------------------

VID  Type    Ports                                                          
--------------------------------------------------------------------------------
1    common  UT:GE0/0/1(D)      GE0/0/2(D)      GE0/0/3(D)      GE0/0/4(D)      
                GE0/0/5(D)      GE0/0/6(D)      GE0/0/7(D)      GE0/0/8(D)      
                GE0/0/17(D)     GE0/0/18(D)     GE0/0/19(D)     GE0/0/20(D)     
                GE0/0/21(D)     GE0/0/22(D)     GE0/0/23(D)     GE0/0/24(U)     

10   common  UT:GE0/0/9(U)      GE0/0/10(D)     GE0/0/11(D)     GE0/0/12(D)     
             TG:GE0/0/24(U)                                                     

30   common  UT:GE0/0/13(U)     GE0/0/14(D)     GE0/0/15(D)     GE0/0/16(D)     

             TG:GE0/0/24(U)                                                     


VID  Status  Property      MAC-LRN Statistics Description      
--------------------------------------------------------------------------------

1    enable  default       enable  disable    VLAN 0001                         
10   enable  default       enable  disable    VLAN 0010                         
30   enable  default       enable  disable    VLAN 0030                         
[LSW2]display IP routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 2        Routes : 2        

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0

[LSW2]

 在PC-10-1命令窗口中输入以下命令,测试是否能与PC-10-2和PC-30-2通信


PC>ping 192.168.10.12

Ping 192.168.10.12: 32 data bytes, Press Ctrl_C to break
From 192.168.10.12: bytes=32 seq=1 ttl=128 time=78 ms
From 192.168.10.12: bytes=32 seq=2 ttl=128 time=93 ms
From 192.168.10.12: bytes=32 seq=3 ttl=128 time=125 ms
From 192.168.10.12: bytes=32 seq=4 ttl=128 time=94 ms
From 192.168.10.12: bytes=32 seq=5 ttl=128 time=110 ms

--- 192.168.10.12 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 78/100/125 ms

PC>ping 192.168.30.12

Ping 192.168.30.12: 32 data bytes, Press Ctrl_C to break
From 192.168.10.11: Destination host unreachable
From 192.168.10.11: Destination host unreachable
From 192.168.10.11: Destination host unreachable
From 192.168.10.11: Destination host unreachable
From 192.168.10.11: Destination host unreachable

--- 192.168.10.1 ping statistics ---
  5 packet(s) transmitted
  0 packet(s) received
  100.00% packet loss

 在PC-30-1命令窗口中输入以下命令,测试是否能与PC-30-2和PC-10-2通信


PC>ping 192.168.30.12

Ping 192.168.30.12: 32 data bytes, Press Ctrl_C to break
From 192.168.30.12: bytes=32 seq=1 ttl=128 time=47 ms
From 192.168.30.12: bytes=32 seq=2 ttl=128 time=78 ms
From 192.168.30.12: bytes=32 seq=3 ttl=128 time=78 ms
From 192.168.30.12: bytes=32 seq=4 ttl=128 time=62 ms
From 192.168.30.12: bytes=32 seq=5 ttl=128 time=109 ms

--- 192.168.30.12 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 47/74/109 ms

PC>ping 192.168.10.12

Ping 192.168.10.12: 32 data bytes, Press Ctrl_C to break
From 192.168.30.11: Destination host unreachable
From 192.168.30.11: Destination host unreachable
From 192.168.30.11: Destination host unreachable
From 192.168.30.11: Destination host unreachable
From 192.168.30.11: Destination host unreachable

--- 192.168.30.1 ping statistics ---
  5 packet(s) transmitted
  0 packet(s) received
  100.00% packet loss

可以看到,在同一vlan的PC可以互相ping通,不在同一PC不能ping通 

在交换机LSW1或在LSW2上配置VLANIF都可以,这里选择LSW1

#配置到vlan 10的vlanif接口的ip地址
[LSW1]interface vlanif 10
[LSW1-Vlanif10]ip address 192.168.10.1 24
[LSW1-Vlanif10]qu
#配置到vlan 30的vlanif接口的ip地址
[LSW1]interface vlanif 30
[LSW1-Vlanif30]ip address 192.168.30.1 24
[LSW1-Vlanif30]qu
#查看所有端口的状态
[LSW1]display interface brief
PHY: Physical
*down: administratively down
(l): loopback
(s): spoofing
(b): BFD down
(e): ETHOAM down
(dl): DLDP down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface                   PHY   Protocol InUti OutUti   inErrors  outErrors
GigabitEthernet0/0/1        down  down        0%     0%          0          0
GigabitEthernet0/0/2        down  down        0%     0%          0          0
GigabitEthernet0/0/3        down  down        0%     0%          0          0
GigabitEthernet0/0/4        down  down        0%     0%          0          0
GigabitEthernet0/0/5        down  down        0%     0%          0          0
GigabitEthernet0/0/6        down  down        0%     0%          0          0
GigabitEthernet0/0/7        down  down        0%     0%          0          0
GigabitEthernet0/0/8        down  down        0%     0%          0          0
GigabitEthernet0/0/9        up    up          0%     0%          0          0
GigabitEthernet0/0/10       down  down        0%     0%          0          0
GigabitEthernet0/0/11       down  down        0%     0%          0          0
GigabitEthernet0/0/12       down  down        0%     0%          0          0
GigabitEthernet0/0/13       up    up          0%     0%          0          0
GigabitEthernet0/0/14       down  down        0%     0%          0          0
GigabitEthernet0/0/15       down  down        0%     0%          0          0
GigabitEthernet0/0/16       down  down        0%     0%          0          0
GigabitEthernet0/0/17       down  down        0%     0%          0          0
GigabitEthernet0/0/18       down  down        0%     0%          0          0
GigabitEthernet0/0/19       down  down        0%     0%          0          0
GigabitEthernet0/0/20       down  down        0%     0%          0          0
GigabitEthernet0/0/21       down  down        0%     0%          0          0
GigabitEthernet0/0/22       down  down        0%     0%          0          0
GigabitEthernet0/0/23       down  down        0%     0%          0          0
GigabitEthernet0/0/24       up    up          0%     0%          0          0

#查看所有端口的ip信息  
[LSW1]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 2

Interface                         IP Address/Mask      Physical   Protocol  
MEth0/0/1                         unassigned           down       down      
NULL0                             unassigned           up         up(s)     
Vlanif1                           unassigned           up         down      
Vlanif10                          192.168.10.1/24      up         up        
Vlanif30                          192.168.30.1/24      up         up 

#查看vlanif接口ip配置
[LSW1]display IP interface vlanif 10
Vlanif10 current state : UP 
Line protocol current state : UP
The Maximum Transmit Unit : 1500 bytes
input packets : 0, bytes : 0, multicasts : 0
output packets : 0, bytes : 0, multicasts : 0
Directed-broadcast packets:
 received packets:            0, sent packets:            0 
 forwarded packets:           0, dropped packets:           0 
Internet Address is 192.168.10.1/24 
Broadcast address : 192.168.10.255
TTL being 1 packet number:         0
TTL invalid packet number:         0
ICMP packet input number:          0
  Echo reply:                      0
  Unreachable:                     0
  Source quench:                   0
  Routing redirect:                0
  Echo request:                    0
  Router advert:                   0
  Router solicit:                  0
  Time exceed:                     0
  IP header bad:                   0
  Timestamp request:               0
  Timestamp reply:                 0


[LSW1]display IP interface vlanif 30
Vlanif30 current state : UP 
Line protocol current state : UP
The Maximum Transmit Unit : 1500 bytes
input packets : 0, bytes : 0, multicasts : 0
output packets : 0, bytes : 0, multicasts : 0
Directed-broadcast packets:
 received packets:            0, sent packets:            0 
 forwarded packets:           0, dropped packets:           0 
Internet Address is 192.168.30.1/24 
Broadcast address : 192.168.30.255
TTL being 1 packet number:         0
TTL invalid packet number:         0
ICMP packet input number:          0
  Echo reply:                      0
  Unreachable:                     0
  Source quench:                   0
  Routing redirect:                0
  Echo request:                    0
  Router advert:                   0
  Router solicit:                  0
  Time exceed:                     0
  IP header bad:                   0
  Timestamp request:               0
  Timestamp reply:                 0

#查看交换机ip路由表
[LSW1]display IP routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 6        Routes : 6        

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
   192.168.10.0/24  Direct  0    0           D   192.168.10.1    Vlanif10
   192.168.10.1/32  Direct  0    0           D   127.0.0.1       Vlanif10
   192.168.30.0/24  Direct  0    0           D   192.168.30.1    Vlanif30
   192.168.30.1/32  Direct  0    0           D   127.0.0.1       Vlanif30

[LSW1]
用ping验证不同vlan之间实现相互通信

此时,在PC-10-1命令窗口中输入以下命令,测试是否能与PC-10-2和PC-30-2通信

通过tracert 192.168.30.12可以看出

192.168.10.11---->192.168.10.1---->192.168.30.12

PC>ping 192.168.10.12

Ping 192.168.10.12: 32 data bytes, Press Ctrl_C to break
From 192.168.10.12: bytes=32 seq=1 ttl=128 time=78 ms
From 192.168.10.12: bytes=32 seq=2 ttl=128 time=94 ms
From 192.168.10.12: bytes=32 seq=3 ttl=128 time=78 ms
From 192.168.10.12: bytes=32 seq=4 ttl=128 time=62 ms
From 192.168.10.12: bytes=32 seq=5 ttl=128 time=62 ms

--- 192.168.10.12 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 62/74/94 ms

PC>ping 192.168.30.12

Ping 192.168.30.12: 32 data bytes, Press Ctrl_C to break
From 192.168.30.12: bytes=32 seq=1 ttl=127 time=125 ms
From 192.168.30.12: bytes=32 seq=2 ttl=127 time=63 ms
From 192.168.30.12: bytes=32 seq=3 ttl=127 time=62 ms
From 192.168.30.12: bytes=32 seq=4 ttl=127 time=62 ms
From 192.168.30.12: bytes=32 seq=5 ttl=127 time=94 ms

--- 192.168.30.12 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 62/81/125 ms

PC>tracert 192.168.30.12

traceroute to 192.168.30.12, 8 hops max
(ICMP), press Ctrl+C to stop
 1  192.168.10.1   31 ms  32 ms  31 ms
 2  192.168.30.12   94 ms  78 ms  94 ms

在PC-30-1命令窗口中输入以下命令,测试是否能与PC-10-2和PC-30-2通信

通过tracert 192.168.10.12可以看出

192.168.30.11---->192.168.30.1---->192.168.10.12

PC>ping 192.168.30.12

Ping 192.168.30.12: 32 data bytes, Press Ctrl_C to break
From 192.168.30.12: bytes=32 seq=1 ttl=128 time=63 ms
From 192.168.30.12: bytes=32 seq=2 ttl=128 time=63 ms
From 192.168.30.12: bytes=32 seq=3 ttl=128 time=79 ms
From 192.168.30.12: bytes=32 seq=4 ttl=128 time=62 ms
From 192.168.30.12: bytes=32 seq=5 ttl=128 time=93 ms

--- 192.168.30.12 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 62/72/93 ms

PC>ping 192.168.10.12

Ping 192.168.10.12: 32 data bytes, Press Ctrl_C to break
From 192.168.10.12: bytes=32 seq=1 ttl=127 time=125 ms
From 192.168.10.12: bytes=32 seq=2 ttl=127 time=94 ms
From 192.168.10.12: bytes=32 seq=3 ttl=127 time=78 ms
From 192.168.10.12: bytes=32 seq=4 ttl=127 time=93 ms
From 192.168.10.12: bytes=32 seq=5 ttl=127 time=78 ms

--- 192.168.10.12 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 78/93/125 ms

PC>tracert 192.168.10.12

traceroute to 192.168.10.12, 8 hops max
(ICMP), press Ctrl+C to stop
 1  192.168.30.1   32 ms  15 ms  31 ms
 2  192.168.10.12   79 ms  78 ms  78 ms

佬们可以到移步到下篇看看:单臂路由的配置

更多推荐

每日一练 | 华为认证真题练习Day1

Day1华为认证中级考试真题1、IP报文中用Tos字段进行QOS标记,Tos字段中是使用前6bit来标记DSCP的。A.正确​B.错误2、传统的丢包策略采用尾部丢弃(Tail-Drop)的方法,这种丢弃方法会导致TCP全局同步现场。A.正确B.错误3、下列选项中,属于AgileController的业务编排的亮点的是:

JavaScript函数this指向

一、this的指向规则1.this到底指向什么呢?我们先来看一个让人困惑的问题:定义一个函数,我们采用三种不同的方式对它进行调用,它产生了三种不同的结果//定义函数functionfoo(name){console.log("foo函数:",this)}//1.方式一:直接调用//foo()//2.方式二:通过对象调起

Revopoint的3D输出格式及转换工具

在CES展会期间,许多参观者向我们询问与我们的3D扫描仪相关的问题。最常见的问题包括我们的扫描仪导出的文件格式,以及该文件是否与3D打印机兼容?因此,我们决定回答这些问题,并在本文中对常见的3D文件格式进行一些简要介绍。计算机文件记录和存储数据,包括文本、图片、视频、计算机程序或其他类型的数据。就3D文件而言,顾名思义

代理IP在各种业务情境中的应用和优势

随着现代互联网的迅速发展,代理IP已成为一种广泛应用于各行业的网络技术。特别是在数据采集、网站建设、安全维护等领域,代理IP的应用越来越受到重视。那么,具体有哪些业务会使用到代理IP呢?我们一起来看一看。1.网络爬虫和数据采集网络爬虫和数据采集是代理IP的主要应用场景之一。大规模数据采集由于需要频繁对目标网站发送请求,

Docker快速入门到项目部署,docker自定义镜像

https://blog.csdn.net/m0_67184231/article/details/1331495792.3.自定义镜像前面我们一直在使用别人准备好的镜像,那如果我要部署一个Java项目,把它打包为一个镜像该怎么做呢?2.3.1.镜像结构要想自己构建镜像,必须先了解镜像的结构。之前我们说过,镜像之所以能

使用Jaeger进行分布式跟踪:学习如何在服务网格中使用Jaeger来监控和分析请求的跟踪信息

🌷🍁博主猫头虎带您GotoNewWorld.✨🍁🦄博客首页——猫头虎的博客🎐🐳《面试题大全专栏》文章图文并茂🦕生动形象🦖简单易学!欢迎大家来踩踩~🌺🌊《IDEA开发秘籍专栏》学会IDEA常用操作,工作效率翻倍~💐🌊《100天精通Golang(基础入门篇)》学会Golang语言,畅玩云原生,走遍大

FL Studio21中文免费版编曲制作软件

我们都知道,FLStudio是一款非常好用的音乐编曲软件。随着商业音乐的兴起,编曲这一词汇逐渐被大家所熟知,而有些小伙伴可能也听说过编曲是由四大件进行编写的,所以今天就和大家分享一下,编曲中的四大件是什么,学编曲要先学什么。大家常听到的音乐编曲制作软件大多是Cubase、Nuendo、ProTools、SONAR等等,

【深度学习】实验12 使用PyTorch训练模型

文章目录使用PyTorch训练模型1.线性回归类2.创建数据集3.训练模型4.测试模型附:系列文章使用PyTorch训练模型PyTorch是一个基于Python的科学计算库,它是一个开源的机器学习框架,由Facebook公司于2016年开源。它提供了构建动态计算图的功能,可以更自然地使用Python语言编写深度神经网络

数据结构与算法(六)--链表的遍历,查询和修改,删除操作

一、前言上篇文章我们了解了链表的概念以及链表底层的搭建以及向链表中添加元素的操作。本次我们继续学习链表剩余的操作:遍历,查询和修改、删除操作。二、链表查询以及遍历①获得链表的第index(0-based)个位置的元素(不常用,仅做练习)和add不一样的是,add我们是要找到第Index的前一个元素,所以,我们起点从du

MyBatis 动态 SQL、MyBatis 标签、MyBatis关联查询

MyBatis动态SQL、MyBatis标签、MyBatis关联查询1、MyBatis动态sql的特性2、MyBatis标签2.1、if标签:条件判断2.2、where+if标签2.3、set标签2.4、choose(when,otherwise)语句2.5、trim2.6、MyBatisforeach标签3、整合案例

Linux内核源码分析 (B.8)深度解析 slab 内存池回收内存以及销毁全流程

Linux内核源码分析(B.8)深度解析slab内存池回收内存以及销毁全流程文章目录Linux内核源码分析(B.8)深度解析slab内存池回收内存以及销毁全流程1\.内存释放之前的校验工作2\.slabcache在快速路径下回收内存3\.slabcache在慢速路径下回收内存3.1直接释放对象回slab,调整slab相

热文推荐