3com 4210 User Manual

Page of 336
28
C
HAPTER
 3: IP A
DDRESS
 C
ONFIGURATION
 G
UIDE
Configuration Procedure
Assign a primary and secondary IP addresses 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 network segments 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 
# 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 Host A to verify the connectivity.
Complete Configuration
#
interface Vlan-interface 1
ip address 172.16.1.1 255.255.255.0
ip address 172.16.2.1 255.255.255.0 sub
Precautions
You can assign at most five IP addresses to an interface, among which one is 
the primary IP address and the others are secondary IP addresses. A newly 
specified primary IP address overwrites the previous one.
The primary and secondary IP addresses of an interface cannot reside on the 
same network segment; an IP address of a VLAN interface must not be on the 
same network segment as that of a loopback interface on a device.
A VLAN interface cannot be configured with a secondary IP address if the 
interface has obtained an IP address through BOOTP or DHCP.