- Table of Contents
-
- H3C Low-End and Mid-Range Ethernet Switches Configuration Examples(V1.01)
- 00-1Cover
- 01-Login Configuration Guide
- 02-VLAN Configuration Guide
- 03-GVRP Configuration Guide
- 04-Voice VLAN Configuration Guide
- 05-IP Addressing and Performance Configuration Guide
- 06-QinQ Configuration Guide
- 07-BPDU Tunnel Configuration Guide
- 08-VLAN Mapping Configuration Guide
- 09-MAC Address Table Management Configuration Guide
- 10-Link Aggregation Configuration Guide
- 11-IP Source Guard Configuration Guide
- 12-DLDP Configuration Guide
- 13-MSTP Configuration Guide
- 14-IPv4 Routing Configuration Guide
- 15-IPv6 Configuration Guide
- 16-IPv6 Routing Configuration Guide
- 17-IPv4 Multicast Configuration Guide
- 18-IPv6 Multicast Configuration Examples
- 19-802.1x Configuration Guide
- 20-AAA Configuration Guide
- 21-MAC Authentication Configuration Guide
- 22-Portal Configuration Guide
- 23-ARP Configuration Guide
- 24-DHCP Configuration Guide
- 25-ACL Configuration Guide
- 26-QoS Configuration Guide
- 27-Port Mirroring Configuration Guide
- 28-Cluster Management Configuration Guide
- 29-SNMP-RMON Configuration Guide
- 30-NTP Configuration Guide
- 31-FTP-TFTP Configuration Guide
- 32-UDP Helper Configuration Guide
- 33-Information Center Configuration Guide
- 34-DNS Configuration Guide
- 35-File System Management Configuration Guide
- 36-Remote Upgrade Configuration Guide
- 37-NQA Configuration Guide
- 38-VRRP Configuration Guide
- 39-SSH Configuration Guide
- 40-Port Security Configuration Guide
- 41-Port Isolation Configuration Guide
- 42-LLDP Configuration Guide
- 43-MCE Configuration Guide
- 44-PoE Configuration Guide
- 45-OAM Configuration Guide
- 46-Connectivity Fault Detection Configuration Guide
- 47-RRPP Configuration Guide
- 48-sFlow Configuration Guide
- 49-SSL-HTTPS Configuration Guide
- 50-PKI Configuration Guide
- 51-Track Configuration Guide
- 52-EPON-OLT Configuration Guide
- 53-Smart Link Configuration Guide
- 54-MPLS Configuration Guide
- Related Documents
-
05-IP Addressing and Performance Configuration Guide
1 IP Addressing and Performance Configuration Guide
Networking and Configuration Requirements
Networking and Configuration Requirements
1 IP Addressing and Performance Configuration Guide
Configuring IP Addressing
Network Diagram
Figure 1-1 Network diagram for IP address configuration
Networking and Configuration Requirements
As shown in the above figure, VLAN-interface 1 on Switch is connected to a LAN in which hosts belong to two subnets: 172.16.1.0/24 and 172.16.2.0/24. It is required to enable the hosts in the LAN to communicate with external networks through Switch, and to enable the hosts in the two network segments to communicate with each other.
Applicable Product Matrix
Product series |
Software version |
Hardware version |
S3610 Series Ethernet Switches |
Release 5301 Release 5303 |
All versions |
S5510 Series Ethernet Switches |
Release 5301 Release 5303 |
All versions |
S5500-SI Series Ethernet Switches |
Release 1207 |
All versions except S5500-20TP-SI |
Release 1301 |
S5500-20TP-SI |
|
S5500-EI Series Ethernet Switches |
Release 2102 |
All versions |
S7500E Series Ethernet Switches |
Release 6100 Release 6300 |
All versions |
S3500-EA Series Ethernet Switches |
Release 5303 |
All versions |
Configuration Procedure
Assign a primary IP address and a secondary IP address to VLAN-interface 1 of Switch to ensure that all the hosts on the LAN can access external networks through Switch. Set Switch as the gateway on all the hosts of the two subnets to ensure that they can communicate with each other.
# Assign a primary IP address and a secondary IP address to VLAN-interface 1.
<Switch> system-view
[Switch] interface vlan-interface 1
[Switch-Vlan-interface1] ip address 172.16.1.1 255.255.255.0
[Switch-Vlan-interface1] ip address 172.16.2.1 255.255.255.0 sub
[Switch-Vlan-interface1] return
# Set the gateway address to 172.16.1.1 on the hosts in subnet 172.16.1.0/24, and to 172.16.2.1 on the hosts in subnet 172.16.2.0/24.
# Ping Host B on Switch to verify the connectivity to subnet 172.16.1.0/24.
<Switch> ping 172.16.1.2
PING 172.16.1.2: 56 data bytes, press CTRL_C to break
Reply from 172.16.1.2: bytes=56 Sequence=1 ttl=255 time=25 ms
Reply from 172.16.1.2: bytes=56 Sequence=2 ttl=255 time=27 ms
Reply from 172.16.1.2: bytes=56 Sequence=3 ttl=255 time=26 ms
Reply from 172.16.1.2: bytes=56 Sequence=4 ttl=255 time=26 ms
Reply from 172.16.1.2: bytes=56 Sequence=5 ttl=255 time=26 ms
--- 172.16.1.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 25/26/27 ms
Information shows that Switch and Host B are reachable to each other.
# Ping Host A on Switch to verify the connectivity to subnet 172.16.2.0/24.
<Switch> ping 172.16.2.2
PING 172.16.2.2: 56 data bytes, press CTRL_C to break
Reply from 172.16.2.2: bytes=56 Sequence=1 ttl=255 time=25 ms
Reply from 172.16.2.2: bytes=56 Sequence=2 ttl=255 time=26 ms
Reply from 172.16.2.2: bytes=56 Sequence=3 ttl=255 time=26 ms
Reply from 172.16.2.2: bytes=56 Sequence=4 ttl=255 time=26 ms
Reply from 172.16.2.2: bytes=56 Sequence=5 ttl=255 time=26 ms
--- 172.16.2.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 25/25/26 ms
Information shows that Switch and Host A are reachable to each other.
Complete Configuration
#
interface Vlan-interface1
ip address 172.16.1.1 255.255.255.0
ip address 172.16.2.1 255.255.255.0 sub
#
Configuration Guidelines
l The primary IP address you assigned to the interface can overwrite the old one if there is any.
l You cannot assign secondary IP addresses to an interface that has BOOTP, or DHCP configured.
l The primary and secondary IP addresses you assign to the interface can be located on the same network segment. However, this should not violate the rule that different interfaces on the switch must reside on different network segments.
Configuring IP Performance
Network Diagram
Figure 1-2 Network diagram for configuring reception and forwarding of directed broadcasts
Networking and Configuration Requirements
As shown in the figure above, the host’s interface and VLAN-interface 3 on Switch A are on the same subnet (1.1.1.0/24). VLAN-interface 2 on Switch A and VLAN-interface 2 on Switch B are on the other subnet (2.2.2.0/24). Set the default gateway on the host to VLAN-interface 3 on Switch A. Configure a static route to the host on Switch B.
Applicable Product Matrix
Product series |
Software version |
Hardware version |
S3610 Series Ethernet Switches |
Release 5301 Release 5303 |
All versions |
S5510 Series Ethernet Switches |
Release 5301 Release 5303 |
All versions |
S5500-SI Series Ethernet Switches |
Release 1207 |
All versions except S5500-20TP-SI |
Release 1301 |
S5500-20TP-SI |
|
S5500-EI Series Ethernet Switches |
Release 2102 |
All versions |
S7500E Series Ethernet Switches |
Release 6100 Release 6300 |
All versions |
S3500-EA Series Ethernet Switches |
Release 5303 |
All versions |
Configuration Procedure
l Configure Switch A
# Enable Switch A to receive directed broadcasts.
<SwitchA> system-view
[SwitchA] ip forward-broadcast
# Create VLAN 2 and VLAN 3.
[SwitchA] Vlan 2
[SwitchA-Vlan2] quit
[SwitchA] Vlan 3
[SwitchA–Vlan3] quit
# Configure IP addresses for VLAN-interface 3 and VLAN-interface 2 respectively.
[SwitchA] interface vlan-interface 3
[SwitchA-Vlan-interface3] ip address 1.1.1.2 24
[SwitchA-Vlan-interface3] quit
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] ip address 2.2.2.2 24
# Enable VLAN-interface 2 to forward directed broadcasts.
[SwitchA-Vlan-interface2] ip forward-broadcast
l Configure Switch B
# Enable Switch B to receive directed broadcasts.
<SwitchB> system-view
[SwitchB] ip forward-broadcast
# Create VLAN 2.
[SwitchB] Vlan 2
[SwitchB-Vlan2] quit
# Configure a static route to the host.
[SwitchB] ip route-static 1.1.1.1 24 2.2.2.2
# Configure an IP address for VLAN-interface 2.
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] ip address 2.2.2.1 24
After the above configuration, if you ping the subnet broadcast address (2.2.2.255) on the host, ping packets can be received by VLAN-interface 2 of Switch B. However, if you undo the ip forward-broadcast command, ping packets cannot be received by VLAN-interface 2 of Switch B.
Complete Configuration
l Configure Switch A
#
ip forward-broadcast
#
vlan 2
#
vlan 3
#
interface Vlan-interface2
ip address 2.2.2.2 255.255.255.0
ip forward-broadcast
#
interface Vlan-interface3
ip address 1.1.1.2 255.255.255.0
l Configure Switch B
#
ip forward-broadcast
#
vlan 2
#
interface Vlan-interface2
ip address 2.2.2.1 255.255.255.0
#
ip route-static 1.1.1.0 255.255.255.0 2.2.2.2
Configuration Guidelines
None.