Due to hardware restrictions of interface cards, some Ethernet interfaces work in only Layer 2 or Layer 3 mode, whereas other Ethernet interfaces can work in both Layer 2 and Layer 3 modes.
As shown in Figure 1, PC1, PC2, PC3, and PC4 are on four network segments, and SwitchB, SwitchC, SwitchD, and SwitchE are access switches for these four network segments, respectively. It is required that four physical Ethernet interfaces on SwitchA be configured as gateway interfaces for these four network segments.
The configuration roadmap is as follows:
Change interfaces to Layer 3 mode.
Configure IP addresses of Layer 3 Ethernet interfaces as gateway addresses.
# Change an interface to Layer 3 mode.
<HUAWEI> system-view [HUAWEI] sysname SwitchA [SwitchA] interface gigabitethernet 1/0/1 [SwitchA-GigabitEthernet1/0/1] undo portswitch [SwitchA-GigabitEthernet1/0/1] quit
# Change Ethernet interfaces to Layer 3 mode in a batch.
[SwitchA] undo portswitch batch gigabitethernet 1/0/2 to 1/0/4
# Configure the IP address of GE1/0/1 as a gateway address. The configurations of GE1/0/2, GE1/0/3, and GE1/0/4 are similar to the configuration of GE1/0/1, and are not mentioned here. For details, see the configuration files.
[SwitchA] interface gigabitethernet 1/0/1 [SwitchA-GigabitEthernet1/0/1] ip address 10.10.1.1 24 [SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] display interface gigabitethernet 1/0/1 ... Description: Route Port,The Maximum Frame Length is 9216 Internet Address is 10.10.1.1/24 ...
If Switch Port is displayed, the interface works in Layer 2 mode. If Route Port is displayed, the interface works in Layer 3 mode. The preceding command output shows that the interface works in Layer 3 mode.
Similarly, run the display interface gigabitethernet 1/0/2, display interface gigabitethernet 1/0/3, and display interface gigabitethernet 1/0/4 commands on GE1/0/2, GE1/0/3, and GE1/0/4 respectively to check the interface working mode.
SwitchA configuration file
# sysname SwitchA # interface GigabitEthernet1/0/1 undo portswitch ip address 10.10.1.1 255.255.255.0 # interface GigabitEthernet1/0/2 undo portswitch ip address 10.10.2.1 255.255.255.0 # interface GigabitEthernet1/0/3 undo portswitch ip address 10.10.3.1 255.255.255.0 # interface GigabitEthernet1/0/4 undo portswitch ip address 10.10.4.1 255.255.255.0 # return
Series |
Product Model |
Software Version |
---|---|---|
S5700 |
S5700-EI |
V200R005C00&C01 |
S5700-HI |
V100R005C01, V100R006C01, V200R001C00, V200R002C00, V200R003C00, V200R005C00&C01 |
|
S5710-EI |
V200R002C00, V200R003C00, V200R005C00 |
|
S5710-HI |
V200R003C00, V200R005(C00&C02&C03) |
|
S5720-EI |
V200R007C00, V200R008C00, V200R009C00, V200R010C00, V200R011C00, V200R011C10, V200R012C00, V200R013C00, V200R019C00, V200R019C10 |
|
S5720-HI |
V200R006C00, V200R007(C00&C10), V200R008C00, V200R009C00, V200R010C00, V200R011C00, V200R011C10, V200R012C00, V200R013C00, V200R019C00, V200R019C10 |
|
S5730-HI |
V200R012C00, V200R013C00, V200R019C00, V200R019C10 |
|
S5731-H |
V200R013C02, V200R019C00, V200R019C10 |
|
S5731-S, S5731S-S |
V200R019C00, V200R019C10 |
|
S5731S-H |
V200R019C00, V200R019C10 |
|
S5732-H |
V200R019C00, V200R019C10 |
|
S6700 |
S6700-EI |
V200R005C00&C01 |
S6720-EI |
V200R008C00, V200R009C00, V200R010C00, V200R011C00, V200R011C10, V200R012C00, V200R013C00, V200R019C00, V200R019C10 |
|
S6720S-EI |
V200R009C00, V200R010C00, V200R011C00, V200R011C10, V200R012C00, V200R013C00, V200R019C00, V200R019C10 |
|
S6720-HI |
V200R012C00, V200R013C00, V200R019C00, V200R019C10 |
|
S6730-H |
V200R013C02, V200R019C00, V200R019C10 |
|
S6730S-H |
V200R019C10 |
|
S6730-S, S6730S-S |
V200R019C00, V200R019C10 |
|
S7700 |
S7703, S7706, S7712 |
V200R001(C00&C01), V200R002C00, V200R003C00, V200R005C00, V200R006C00, V200R007C00, V200R008C00, V200R009C00, V200R010C00, V200R011C10, V200R012C00, V200R013C00, V200R013C02, V200R019C00, V200R019C10 |
S7703 PoE |
V200R013C00, V200R019C00, V200R019C10 |
|
S7706 PoE |
V200R013C00, V200R019C00, V200R019C10 |
|
S9700 |
S9703, S9706, S9712 |
V200R001(C00&C01), V200R002C00, V200R003C00, V200R005C00, V200R006C00, V200R007(C00&C10), V200R008C00, V200R009C00, V200R010C00, V200R011C10, V200R012C00, V200R013C00 |
For details about software mappings, visit Hardware Query Tool and search for the desired product model.