![](http://datasheet.mmic.net.cn/370000/IP175C_datasheet_16697074/IP175C_35.png)
IP175C/IP175C LF/IP175CH/IP175CH LF
Data Sheet
2.5
Copyright
2004, IC Plus Corp.
35/111
Mar 09, 2007
IP175C/IP175CH-DS-R14
Tag VLAN / Tag and un-tag function
2.5.1
IP175C/IP175CH inserts or removes a tag of a frame if tagging/ un-tagging function is enabled. It is
enabled by programming MII register 29.23. The operation is illustrated as follows. The tag information is
defined in MII register 29.24~29.30 and EEPROM register 24~38.
The operation of a port which forwards the packet
Frame type of the
received packet
Forward to a untagged filed
Untagged
Forward the packet without modification
Tag and un-tag function
Forward to a tagged field
1. Insert a tag using the default VLAN tag
value of the source port
2. Calculate new CRC
3. The default VLAN tag value is defined
in the MII register 29.24~29.30.
1. Keep priority field.
2. Replace the tag with the default VLAN
tag value of the source port
3. Calculate new CRC
4. The default VLAN tag value is defined
in the MII register 29.24~29.30.
Forward the packet without modification
Priority-tagged
(VLAN ID=0)
1. Strip tag
2. Calculate new CRC
VLAN-tagged
1. Strip tag
2. Calculate new CRC
2.5.2
If tag VLAN function is enabled (MII register 30.9.7 TAG_VLAN_EN is logic high), IP175C/IP175CH
forwards a packet according to MAC address and VLAN output port masks, defined in MII register
30.1~30.8. A tagged packet is forwarded to the ports belonging to the same VLAN of the packet. One of
the sixteen VLAN output port masks is selected by VID index, which is four bits selected from VID field in
a tag. VID index is defined in MII register 30.9[6:4] VID_IDX_SEL. For example, VLAN output port mask
1 is selected if VID index selected by VID_IDX_SEL is equal to 1.
IP175C/IP175CH handles an un-tagged packet using the default VLAN tag value of its source port. A
packet with VID equal to 12’b0 will be handled as un-tag frame.
2.5.3
Tag/ un-tag function and Tag VLAN function in a router application
Tag/ un-tag and Tag VALN are necessary in a router application with one-MAC CPU, MII0 is connected
to CPU and MII1 is disabled (DIS_MII1=1). PHY0~4 are connected to switching engine MAC 0~4 and
MII0 is connected to switching engine MAC5.
In this application, MII0 is defined as a tagged port and the other ports (port 0~4) are defined as
un-tagged ports. IP175C/IP175CH inserts VLAN tag into packets withsource port information when it
forwards the packets to MII0. The VLAN tags are defined in MII register 29.24~29.30. CPU can identify
the source port of a packet by examining the VLAN tag.
CPU inserts VLAN tag into packets with destination port information following the content in MII register
29.24~29.30 when it sends packets to MII0. IP175C/IP175CH forwards a packet from MII0 to the
appropriate port according to the MAC address and VLAN tag. IP175C/IP175CH removes the VLAN tag
when it forwards the packet.
Tag VLAN