三层交换机的配置

一、实验:全网互通

1.二层交换机之间做lacp链路聚合
2.R1与R4有一条链路做浮动路由
三层交换机的配置_第1张图片
配置SW1
三层交换机的配置_第2张图片
三层交换机的配置_第3张图片
三层交换机的配置_第4张图片

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys SW1

[SW1]vlan  batch 10 20 30 40 50 60
Info: This operation may take a few seconds. Please wait for a moment...done.

[SW1]int e0/0/2
[SW1-Ethernet0/0/2]p l a 

[SW1-Ethernet0/0/2]int e0/0/1
[SW1-Ethernet0/0/1]p l a 
[SW1-Ethernet0/0/1]p d v 10
[SW1-Ethernet0/0/1]
Apr  7 2021 16:15:09-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 9, the c
hange loop count is 0, and the maximum number of records is 4095.

<SW1>sys
Enter system view, return user view with Ctrl+Z.
[SW1]int eth2
[SW1-Eth-Trunk2]p l a 
[SW1-Eth-Trunk2]
Apr  7 2021 16:32:59-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 10, the 
change loop count is 0, and the maximum number of records is 4095.


[SW1-Eth-Trunk2]p l t
[SW1-Eth-Trunk2]p t a v a
[SW1-Eth-Trunk2]
Apr  7 2021 16:33:49-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 12, the 
change loop count is 0, and the maximum number of records is 4095.
[SW1-Eth-Trunk2]mode lacp-	
[SW1-Eth-Trunk2]mode lacp-static 
[SW1-Eth-Trunk2]tru
Apr  7 2021 16:34:09-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 13, the 
change loop count is 0, and the maximum number of records is 4095.nk	
[SW1-Eth-Trunk2]trunkport e0/0/3
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1-Eth-Trunk2]
Apr  7 2021 16:34:18-08:00 SW1 %%01IFNET/4/IF_STATE(l)[0]:Interface Eth-Trunk2 h
as turned into UP state.
Apr  7 2021 16:34:19-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 14, the 
change loop count is 0, and the maximum number of records is 4095.
[SW1-Eth-Trunk2]trunkport e0/0/6
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1-Eth-Trunk2]trunkport e0/0/5
Apr  7 2021 16:34:29-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 15, the 
change loop count is 0, and the maximum number of records is 4095.
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1-Eth-Trunk2]dis eth	
[SW1-Eth-Trunk2]dis eth-trunk 2
Eth-Trunk2's state information is:
Local:
LAG ID: 2                   WorkingMode: STATIC                               
Preempt Delay: Disabled     Hash arithmetic: According to SIP-XOR-DIP         
System Priority: 32768      System ID: 4c1f-ccef-4460                         
Least Active-linknumber: 1  Max Active-linknumber: 8                          
Operate status: up          Number Of Up Port In Trunk: 3                     
--------------------------------------------------------------------------------
ActorPortName          Status   PortType PortPri PortNo PortKey PortState Weight
Ethernet0/0/3          Selected 100M     32768   4      545     10111100  1     
Ethernet0/0/6          Selected 100M     32768   7      545     10111100  1     
Ethernet0/0/5          Selected 100M     32768   6      545     10111100  1     

Partner:
--------------------------------------------------------------------------------
ActorPortName          SysPri   SystemID        PortPri PortNo PortKey PortState
Ethernet0/0/3          32768    4c1f-cc57-5c1d  32768   4      545     10111100
Ethernet0/0/6          32768    4c1f-cc57-5c1d  32768   8      545     10111100
Ethernet0/0/5          32768    4c1f-cc57-5c1d  32768   7      545     10111100
    
[SW1-Eth-Trunk2]
Apr  7 2021 16:34:39-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 16, the 
change loop count is 0, and the maximum number of records is 4095.

[SW1-Eth-Trunk2]	
[SW1-Eth-Trunk2]q
[SW1]int e0/0/4
[SW1-Ethernet0/0/4]p l t 
[SW1-Ethernet0/0/4]p t a v a
[SW1-Ethernet0/0/4]
Apr  7 2021 16:37:59-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 18, the 
change loop count is 0, and the maximum number of records is 4095.

[SW1-Ethernet0/0/4] User interface con0 is available

配置sw2

三层交换机的配置_第5张图片
三层交换机的配置_第6张图片
三层交换机的配置_第7张图片
三层交换机的配置_第8张图片
三层交换机的配置_第9张图片


***<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int e0/0/1
[Huawei-Ethernet0/0/1]
[Huawei-Ethernet0/0/1]
[Huawei-Ethernet0/0/1]dis this
#
interface Ethernet0/0/1
 port link-type access
 port default vlan 30
#
return
[Huawei-Ethernet0/0/1]
Apr  7 2021 15:55:40-08:00 Huawei %%01PHY/1/PHY(l)[0]:    Ethernet0/0/5: change 
status to down
Apr  7 2021 15:56:57-08:00 Huawei %%01PHY/1/PHY(l)[1]:    Ethernet0/0/5: change 
status to up
[Huawei-Ethernet0/0/1]int e0/0/5
[Huawei-Ethernet0/0/5]p l t
[Huawei-Ethernet0/0/5]p t a v a
[Huawei-Ethernet0/0/5]
Apr  7 2021 15:57:49-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
.25.191.3.1 configurations have been changed. The current change number is 22, t
he change loop count is 0, and the maximum number of records is 4095.
[Huawei-Ethernet0/0/5]
<Huawei>
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys SW2
[SW2]vlan batch 10 20 30 40 50 60
[SW2]int e0/0/1
[SW2-Ethernet0/0/1]p l a
[SW2-Ethernet0/0/1]p d v 3
Apr  7 2021 16:16:08-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 6, the c
hange loop count is 0, and the maximum number of records is 4095.0
[SW2-Ethernet0/0/1]int e0/0/2
[SW2-Ethernet0/0/2]p l a
[SW2-Ethernet0/0/2]p d v40
                   ^
Error:Ambiguous command found at '^' position.
[SW2-Ethernet0/0/2]p d v 40
[SW2-Ethernet0/0/2]
Apr  7 2021 16:16:58-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 9, the c
hange loop count is 0, and the maximum number of records is 4095.
<SW2>sys
Enter system view, return user view with Ctrl+Z.
[SW2]int eth1
[SW2-Eth-Trunk1]p l t
[SW2-Eth-Trunk1]p t a v a
[SW2-Eth-Trunk1]
Apr  7 2021 16:29:29-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 11, the 
change loop count is 0, and the maximum number of records is 4095.
[SW2-Eth-Trunk1]mode lacp-s	
[SW2-Eth-Trunk1]mode lacp-static 
[SW2-Eth-Trunk1]ru
Apr  7 2021 16:29:49-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 12, the 
change loop count is 0, and the maximum number of records is 409
[SW2-Eth-Trunk1]trunk	
[SW2-Eth-Trunk1]trunkport e0/0/4
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2-Eth-Trunk1]
Apr  7 2021 16:30:03-08:00 SW2 %%01IFNET/4/IF_STATE(l)[0]:Interface Eth-Trunk1 h
as turned into UP state.
[SW2-Eth-Trunk1]
Apr  7 2021 16:30:09-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 13, the 
change loop count is 0, and the maximum number of records is 4095.
[SW2-Eth-Trunk1]trunkport e0/0/8
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2-Eth-Trunk1]trunkport e0/0/9
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2-Eth-Trunk1]
Apr  7 2021 16:30:19-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 15, the 
change loop count is 0, and the maximum number of records is 4095.
[SW2-Eth-Trunk1]q
[SW2]int eth2
[SW2-Eth-Trunk2]p l t 
[SW2-Eth-Trunk2]p t 
Apr  7 2021 16:31:09-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 16, the 
change loop count is 0, and the maximum number of records is 4095.a v a
[SW2-Eth-Trunk2]
Apr  7 2021 16:31:19-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 17, the 
change loop count is 0, and the maximum number of records is 4095.
[SW2-Eth-Trunk2]mode lacp-	
[SW2-Eth-Trunk2]mode lacp-static 
[SW2-Eth-Trunk2]trunk	
[SW2-Eth-Trunk2]trunkport 
Apr  7 2021 16:31:39-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 18, the 
change loop count is 0, and the maximum number of records is 4095.
                          ^
Error:Incomplete command found at '^' position.
[SW2-Eth-Trunk2]trunk	
[SW2-Eth-Trunk2]trunkport e0/0/3
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2-Eth-Trunk2]trunkport e0/0/7
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2-Eth-Trunk2]trunkport e0/0/7
Apr  7 2021 16:32:09-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 20, the 
change loop count is 0, and the maximum number of records is 40956
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2-Eth-Trunk2]
Apr  7 2021 16:32:19-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 21, the 
change loop count is 0, and the maximum number of records is 4095.
[SW2-Eth-Trunk2]dis eth	
[SW2-Eth-Trunk2]dis eth-trunk 2
Eth-Trunk2's state information is:
Local:
LAG ID: 2                   WorkingMode: STATIC                               
Preempt Delay: Disabled     Hash arithmetic: According to SIP-XOR-DIP         
System Priority: 32768      System ID: 4c1f-cc57-5c1d                         
Least Active-linknumber: 1  Max Active-linknumber: 8                          
Operate status: down        Number Of Up Port In Trunk: 0                     
--------------------------------------------------------------------------------
ActorPortName          Status   PortType PortPri PortNo PortKey PortState Weight
Ethernet0/0/3          Unselect 100M     32768   4      545     10100010  1     
Ethernet0/0/7          Unselect 100M     32768   8      545     10100010  1     
Ethernet0/0/6          Unselect 100M     32768   7      545     10100010  1     
Partner:
--------------------------------------------------------------------------------
ActorPortName          SysPri   SystemID        PortPri PortNo PortKey PortState
Ethernet0/0/3          0        0000-0000-0000  0       0      0       10100011
Ethernet0/0/7          0        0000-0000-0000  0       0      0       10100011
Ethernet0/0/6          0        0000-0000-0000  0       0      0       10100011
    
[SW2-Eth-Trunk2]
Apr  7 2021 16:34:18-08:00 SW2 %%01IFNET/4/IF_STATE(l)[1]:Interface Eth-Trunk2 h
as turned into UP state.
[SW2-Eth-Trunk2]q
[SW2]int e0/0/5
[SW2-Ethernet0/0/5]p l t
[SW2-Ethernet0/0/5]
Apr  7 2021 16:38:49-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 23, the 
change loop count is 0, and the maximum number of records is 4095.***

配置sw3
三层交换机的配置_第10张图片
三层交换机的配置_第11张图片
三层交换机的配置_第12张图片
三层交换机的配置_第13张图片
**三层交换机的配置_第14张图片
三层交换机的配置_第15张图片

**


<sw1>sys
Enter system view, return user view with Ctrl+Z.

[sw1]int e0/0/4
[sw1-Ethernet0/0/4]p l t
[sw1-Ethernet0/0/4]p t a
Apr  7 2021 15:58:13-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 16, the 
change loop count is 0, and the maximum number of records is 4095. v a
[sw1-Ethernet0/0/4]
[sw1-Ethernet0/0/4]
[sw1-Ethernet0/0/4]dis this
#
interface Ethernet0/0/4
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
return
[sw1-Ethernet0/0/4]
Apr  7 2021 15:58:23-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 17, the 
change loop count is 0, and the maximum number of records is 4095.

[sw1-Ethernet0/0/4]
<Huawei>
<Huawei>sys 
Enter system view, return user view with Ctrl+Z.
[Huawei]sys SW3

[SW3]
[SW3]vlan batch 10 20 30 40 50 60
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW3]int e0/0/1

[SW3-Ethernet0/0/1]p l a
[SW3-Ethernet0/0/1]p d v 
Apr  7 2021 16:17:48-08:00 SW3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 6, the c
hange loop count is 0, and the maximum number of records is 4095.50
[SW3-Ethernet0/0/1]int e
Apr  7 2021 16:17:58-08:00 SW3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 7, the c
hange loop count is 0, and the maximum number of records is 4
                   ^
Error:Ambiguous command found at '^' position.
[SW3-Ethernet0/0/1]int e0/0/2
[SW3-Ethernet0/0/2]p l a 
[SW3-Ethernet0/0/2]p d v 60
[SW3-Ethernet0/0/2]dis this
Apr  7 2021 16:18:38-08:00 SW3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 9, the c
hange loop count is 0, and the maximum number of records is 4095.
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 60
#
return
[SW3-Ethernet0/0/2]q
[SW3]int eth	
[SW3]int Ethernet-t	
[SW3]int Ethernet-tr	
[SW3]int Ethernet-trunk
         ^
Error: Wrong parameter found at '^' position.
[SW3]int Eth	
[SW3]int Ethernet-t	
[SW3]int eth	
[SW3]int Eth-	
[SW3]int Eth-Trunk 1
[SW3-Eth-Trunk1]p l t
[SW3-Eth-Trunk1]p t a v a
Apr  7 2021 16:24:38-08:00 SW3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 10, the 
change loop count is 0, and the maximum number of records is 4095.
[SW3-Eth-Trunk1]mode 
Apr  7 2021 16:24:48-08:00 SW3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 11, the 
change loop count is 0, and the maximum number of records is 4095.
                     ^
Error:Incomplete command found at '^' position.
[SW3-Eth-Trunk1]mode lacp-s	
[SW3-Eth-Trunk1]mode lacp-static 
[SW3-Eth-Trunk1]
Apr  7 2021 16:25:18-08:00 SW3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 12, the 
change loop count is 0, and the maximum number of records is 4095.
[SW3-Eth-Trunk1]tunkp	
[SW3-Eth-Trunk1]trunp	
[SW3-Eth-Trunk1]trunkp	
[SW3-Eth-Trunk1]trunkport e0/0/3
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW3-Eth-Trunk1]
Apr  7 2021 16:25:58-08:00 SW3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 13, the 
change loop count is 0, and the maximum number of records is 4095.
[SW3-Eth-Trunk1]trunkport e0/0/5
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW3-Eth-Trunk1]trunkport e0/0/6
Apr  7 2021 16:26:08-08:00 SW3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 14, the 
change loop count is 0, and the maximum number of trunkport e0/0/3
Info: This operation may take a few seconds. Please wait for a moment...
Error: Failed to add the port into the trunk because the port has been a member 
of the trunk.
The error port is Ethernet0/0/3.
[SW3-Eth-Trunk1]dis this
#
interface Eth-Trunk1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
 mode lacp-static
#
return
[SW3-Eth-Trunk1]dis eth	
[SW3-Eth-Trunk1]dis eth-	
[SW3-Eth-Trunk1]dis eth-trunk 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1                   WorkingMode: STATIC                               
Preempt Delay: Disabled     Hash arithmetic: According to SIP-XOR-DIP         
System Priority: 32768      System ID: 4c1f-ccc0-4490                         
Least Active-linknumber: 1  Max Active-linknumber: 8                          
Operate status: down        Number Of Up Port In Trunk: 0                     
--------------------------------------------------------------------------------
ActorPortName          Status   PortType PortPri PortNo PortKey PortState Weight
Ethernet0/0/3          Unselect 100M     32768   4      289     10100010  1     
Ethernet0/0/5          Unselect 100M     32768   6      289     10100010  1     

Partner:
--------------------------------------------------------------------------------
ActorPortName          SysPri   SystemID        PortPri PortNo PortKey PortState
Ethernet0/0/3          0        0000-0000-0000  0       0      0       10100011
Ethernet0/0/5          0        0000-0000-0000  0       0      0       10100011
    
[SW3-Eth-Trunk1]trunkp	
[SW3-Eth-Trunk1]trunkport e0/0/6
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW3-Eth-Trunk1]dis 
Apr  7 2021 16:27:08-08:00 SW3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 15, the 
change loop count is 0, and the maximum number of records is 4095.
                    ^
Error:Incomplete command found at '^' position.
[SW3-Eth-Trunk1]dis eth-	
[SW3-Eth-Trunk1]dis eth-trunk 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1                   WorkingMode: STATIC                               
Preempt Delay: Disabled     Hash arithmetic: According to SIP-XOR-DIP         
System Priority: 32768      System ID: 4c1f-ccc0-4490                         
Least Active-linknumber: 1  Max Active-linknumber: 8                          
Operate status: down        Number Of Up Port In Trunk: 0                     
--------------------------------------------------------------------------------
ActorPortName          Status   PortType PortPri PortNo PortKey PortState Weight
Ethernet0/0/3          Unselect 100M     32768   4      289     10100010  1     
Ethernet0/0/5          Unselect 100M     32768   6      289     10100010  1     
Ethernet0/0/6          Unselect 100M     32768   7      289     10100010  1     

Partner:
--------------------------------------------------------------------------------
ActorPortName          SysPri   SystemID        PortPri PortNo PortKey PortState
Ethernet0/0/3          0        0000-0000-0000  0       0      0       10100011
Ethernet0/0/5          0        0000-0000-0000  0       0      0       10100011
Ethernet0/0/6          0        0000-0000-0000  0       0      0       10100011
    
[SW3-Eth-Trunk1]
[SW3-Eth-Trunk1]
[SW3-Eth-Trunk1]q
[SW3]int e0/0/4
[SW3-Ethernet0/0/4]p l t
[SW3-Ethernet0/0/4]
Apr  7 2021 16:39:09-08:00 SW3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 16, the 
change loop count is 0, and the maximum number of records is 4095.
[SW3-Ethernet0/0/4]p t a v a

``配置RSW
三层交换机的配置_第16张图片

三层交换机的配置_第17张图片

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys RSW
[RSW]
Apr  7 2021 16:39:58-08:00 RSW DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 4, the c
hange loop count is 0, and the maximum number of records is 4095.
[RSW]vlan batch 10 20 30 40 50 60
Info: This operation may take a few seconds. Please wait for a moment...done.
[RSW]
Apr  7 2021 16:50:18-08:00 RSW DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 5, the c
hange loop count is 0, and the maximum number of records is 4095.
[RSW]int vlanif 10

[RSW-Vlanif10]ip a 192.168.10.254 24

[RSW-Vlanif10]int vlanif 20
[RSW-Vlanif20]ip a 192.168.20.254 24
[RSW-Vlanif20]
Apr  7 2021 16:51:18-08:00 RSW DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 7, the c
hange loop count is 0, and the maximum number of records is 4095.
[RSW-Vlanif20]int vlanif 30
[RSW-Vlanif30]ip a 192.168.30.254 24
[
[RSW-Vlanif30]int vlanif 40 
[RSW-Vlanif40]ip a 192.168.40.254 24

[RSW-Vlanif40]int vlanif 50 
[RSW-Vlanif50]ip a 192.168.50.254 24

[RSW-Vlanif50]int vlanif 60
[RSW-Vlanif60]ip a 192.168.60.254 24
[RSW-Vlanif60]
Apr  7 2021 16:52:58-08:00 RSW DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 11, the 
change loop count is 0, and the maximum number of records is 4095.

[RSW-Vlanif60]	
[RSW-Vlanif60]q
[RSW]ping 192.168.10.1
  PING 192.168.10.1: 56  data bytes, press CTRL_C to break
    Request time out
    Request time out
    Request time out
    Request time out
    Request time out

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



[RSW]int g0/0/2
[RSW-GigabitEthernet0/0/2]dis this
#
interface GigabitEthernet0/0/2
#
return
[RSW-GigabitEthernet0/0/2]p l t 
[RSW-GigabitEthernet0/0/2]p t a v a
[RSW-GigabitEthernet0/0/2]
Apr  7 2021 16:55:05-08:00 RSW %%01IFNET/4/IF_STATE(l)[0]:Interface Vlanif10 has
 turned into UP state.
Apr  7 2021 16:55:05-08:00 RSW %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface Vlanif10 has entered the UP state.
Apr  7 2021 16:55:05-08:00 RSW %%01IFNET/4/IF_STATE(l)[2]:Interface Vlanif20 has
 turned into UP state.
Apr  7 2021 16:55:05-08:00 RSW %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
 on the interface Vlanif20 has entered the UP state.
Apr  7 2021 16:55:05-08:00 RSW %%01IFNET/4/IF_STATE(l)[4]:Interface Vlanif30 has
 turned into UP state.
Apr  7 2021 16:55:05-08:00 RSW %%01IFNET/4/LINK_STATE(l)[5]:The line protocol IP
 on the interface Vlanif30 has entered the UP state.
Apr  7 2021 16:55:05-08:00 RSW %%01IFNET/4/IF_STATE(l)[6]:Interface Vlanif40 has
 turned into UP state.
Apr  7 2021 16:55:05-08:00 RSW %%01IFNET/4/LINK_STATE(l)[7]:The line protocol IP
 on the interface Vlanif40 has entered the UP state.
Apr  7 2021 16:55:05-08:00 RSW %%01IFNET/4/IF_STATE(l)[8]:Interface Vlanif50 has
 turned into UP state.
Apr  7 2021 16:55:05-08:00 RSW %%01IFNET/4/LINK_STATE(l)[9]:The line protocol IP
 on the interface Vlanif50 has entered the UP state.
Apr  7 2021 16:55:05-08:00 RSW %%01IFNET/4/IF_STATE(l)[10]:Interface Vlanif60 ha
s turned into UP state.
Apr  7 2021 16:55:05-08:00 RSW %%01IFNET/4/LINK_STATE(l)[11]:The line protocol I
P on the interface Vlanif60 has entered the UP state.
[RSW-GigabitEthernet0/0/2]
Apr  7 2021 16:55:08-08:00 RSW DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 13, the 
change loop count is 0, and the maximum number of records is 4095.
[RSW-GigabitEthernet0/0/2]int g0/0/1
[RSW-GigabitEthernet0/0/1]p l t 

[RSW-GigabitEthernet0/0/1]p t a v a
[RSW-GigabitEthernet0/0/1]
Apr  7 2021 16:55:38-08:00 RSW DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 15, the 
change loop count is 0, and the maximum number of records is 4095.
[RSW-GigabitEthernet0/0/1]int g0/0/3
[RSW-GigabitEthernet0/0/3]p l t
[RSW-GigabitEthernet0/0/3]
Apr  7 2021 16:55:58-08:00 RSW DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 16, the 
change loop count is 0, and the maximum number of records is 4095.p
Error: The interface is already a L2 interface.
[RSW-GigabitEthernet0/0/3]p t a v a
[RSW-GigabitEthernet0/0/3]
Apr  7 2021 16:56:08-08:00 RSW DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 17, the 
change loop count is 0, and the maximum number of records is 4095.
[RSW-GigabitEthernet0/0/3]	
[RSW-GigabitEthernet0/0/3]q
[RSW]ping 192.168.10.1
  PING 192.168.10.1: 56  data bytes, press CTRL_C to break
    Reply from 192.168.10.1: bytes=56 Sequence=1 ttl=128 time=90 ms
    Reply from 192.168.10.1: bytes=56 Sequence=2 ttl=128 time=60 ms
    Reply from 192.168.10.1: bytes=56 Sequence=3 ttl=128 time=60 ms
    Reply from 192.168.10.1: bytes=56 Sequence=4 ttl=128 time=50 ms
    Reply from 192.168.10.1: bytes=56 Sequence=5 ttl=128 time=50 ms

  --- 192.168.10.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 50/62/90 ms

[RSW]
Apr  7 2021 17:01:38-08:00 RSW %%01PHY/1/PHY(l)[12]:    GigabitEthernet0/0/4: ch
ange status to down
Apr  7 2021 17:04:22-08:00 RSW %%01PHY/1/PHY(l)[13]:    GigabitEthernet0/0/4: ch
ange status to up User interface con0 is available



Please Press ENTER.


<RSW>sys
Enter system view, return user view with Ctrl+Z.
[RSW]int e0/0/4
         ^
Error: Wrong parameter found at '^' position.
[RSW]int g0/0/4

[RSW-GigabitEthernet0/0/4]int vlan 1
[RSW-Vlanif1]ip a 192.168.5.2 24
[RSW-Vlanif1]
Apr  7 2021 17:26:09-08:00 RSW %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface Vlanif1 has entered the UP state.
Apr  7 2021 17:26:09-08:00 RSW DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 18, the 
change loop count is 0, and the maximum number of records is 4095.
[RSW-Vlanif1]ip route-static 192.168.70.0 24 192.168.5.1
[RSW]
Apr  7 2021 17:26:49-08:00 RSW DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 19, the 
change loop count is 0, and the maximum number of records is 4095. User interface con0 is available

配置R1
三层交换机的配置_第18张图片
三层交换机的配置_第19张图片配置R2
三层交换机的配置_第20张图片配置R3
三层交换机的配置_第21张图片配置R4
三层交换机的配置_第22张图片
三层交换机的配置_第23张图片

二、三层交换机的概述

1.三层交换机就是具有部分路由器功能的交换机,工作在TCP/IP网络标准模型的第三层:网络层。
2.三层交换技术就是两层交换技术+三层转发技术,传统交换技术是在TCP/IP网络标准模型第二层:在数据链路层进行操作的。而三层交换技术实在网络模型中的第三层实现数据包的高速转发,既可实现网络路由功能,有可根据不同的网络状况做到最优网络性能

三、三层交换技术

1.使用三层交换技术实现VLAN通信
2.三层交换=二层交换+三层转发
3.三层转发过程中药重新封装2层(三层交换机上,第三层引擎处理数据流的第一个包)
4.交换ASIC从3层引擎中获悉2层重写信息在硬件中创建一个MLS条目
5.负责冲重写和转发数据流中的后续数据包
三、基于CEF的MLS
1.CEF是一种基于拓扑转发的模型
转发信息库
邻接关系表
2.虚接口概述
在三层交换机上配置的VLAN接口为虚接口

Switch(config)#interface vlan vlan-id

虚接口的引入使得应用更加灵活
三层交换机的特点:一次路由,多次交换

四、链路聚合的概述

1.链路聚合是将一组物理接口捆绑在一起作为一个逻辑接口来增加带宽的一种方法,又称为多接口负载均衡组或链路聚合组,相关协议标准请参考IEEE802.3ad
2.通过在两台设备之间建立链路聚合组,可以提供更高的通讯带宽和更高的可靠性。链路聚合不仅为设备之间通信提供了冗余保护,而且不需要对硬件进行升级
三层交换机的配置_第24张图片
在SW1上将GE0/0/1及GE0/0/2接口进行聚合,从而形成一个逻辑接口Eth-trunk,SW2同理。如此SW1和SW2之间互联的链路就成为逻辑上的一条链路。这样,链路的带宽增加了,冗余性也增加了。
3.Eth-trunk的工作模式
华为的网络设备支持两种Eth-trunk工作模式:
手工负载分担模式
LACP模式

五、工作模式

1.手工负载分担
*手工负载分担模式下,Eth-trunk的建立、成员接口的加入由手工配置,没有LACP协议报文的参与。
*该分担模式下所有的活动链路都会参与数据的转发,平均分担流量,因此成为负载分担模式
*如果某条活动链路故障,链路聚合组自动在剩余的活动链路中平均分担流量。
*当需要在两个设备间提供一个较大的链路带宽而设备又不支持LACP协议时,可以使用手工负载分担模式
2.静态LACP
*静态LACP模式是一种利用LACP协议进行聚合参数协商、确定活动接口和非活动接口的链路聚合方式。
*该模式下,需要手工创建Eth-Trunk,手工加入Eth-Trunk成员接口,由LACP协议协商确定活动接口和非活动接口。
*静态LACP模式也称为M:N模式。这种方式同时可以实现链路负载分担和链路冗余备份的双重功能,在链路聚合组中M条链路处于活动状态。
3.静态LACP(cont.)
静态LACP模式与手工负载模式的主要区别为:静态LACP模式由备份链路,而手工负载分担模式所有成员接口处于转发状态,分担负载流量。

你可能感兴趣的:(三层交换机的配置)