Network diagram
Figure 8-3 Network diagram for IP address configuration
Configuration procedure
# Configure an IP address for VLAN-interface 1.
<Switch> system-view
[Switch] interface Vlan-interface 1
[Switch-Vlan-interface1] ip address 129.2.2.1 255.255.255.0
IP Address Configuration Example II
Network requirements
As shown in
Figure
172.16.1.0/24 and 172.16.2.0/24.
To enable the hosts on the two network segments to communicate with the external network through the
switch, and the hosts on the LAN can communicate with each other, do the following:
Assign two IP addresses to VLAN-interface 1 on the switch.
Set the switch as the gateway on all PCs of the two networks.
Network diagram
Figure 8-4 Network diag
C
onfiguration procedure
# Assign a primary IP address and a secondary
<Switch> system-view
[Switch] interface Vlan-interface 1
[Switch-Vlan-interface1] ip address 172.16.1.1 255.255.255.0
[Switch-Vlan-interface1] i
8-4, VLAN-interface 1 on a switch is connected to a LAN comprising two segments:
ram for IP address configuration
p address 172.16.2.1 255.255.255.0 sub
IP address to VLAN-interface 1.
8-5