In a comment on another Answer to this Question, you said, "Also, when I tried to setup vlan in my router, everything worked great except vlan2 computer could only open certain websites."
This is a tipoff that your router may have been doing VLANs in software instead of hardware.
Ethernet hardware that doesn't know about VLANs (before 802.3ac and 802.1Q) expects the maximum frame size to be 1518 bytes (1500 byte payload, plus 14 bytes of header and 4 bytes of CRC checksum trailer). But the VLAN header is 4 bytes, so to keep the same 1500 byte max payload most higher-layer protocols expect Ethernets to be capable of, the maximum Ethernet frame size was extended to 1522 bytes in 802.3ac (now part of 802.3-2008). But many OSes realized you could do VLANs in software on the host even if you don't have VLAN-aware hardware, but you had to shrink the payload size (the IP MTU) to 1496 instead of 1500 to make room for 4-byte VLAN header when using old hardware that could only handle 1518-byte frames.
So! A workaround to the problem that drove you crazy for two days might have been to adjust the MTUs on all of your machines on VLAN 2 (including your router) to use 1496 instead of 1500, since it sounds like your router was doing VLANs in software.
What would have been happening when loading some websites is that either the web browser or the web server tried to send a max-Ethernet-payload-sized 1500-byte IP datagram, but that would have needed to become a 1522-byte Ethernet frame, which your router's hardware couldn't handle, so it got dropped. Sites that could be loaded without requiring any 1500+ -byte IP datagrams to be sent or received (including sites that use lower MTUs or sites where Path MTU Discovery was working well) would still load fine.