If I have a trunk connection that should allow only two VLANs(100 and 200 for example), is it neccessary to also allow the default vlan 1 or VLANs 1002-1005. I am trying to configure a switch port for a trunk connection in packet tracer, and I am not sure about this aspect. I would be most grateful if you could help me out. Thanks.
Depends on the equipment. I'm assuming that you're using Cisco gear, from their treatment of 1002-1005? Some of their stuff can drop those vlans from the allow list, some cannot.
As long as you don't want the traffic for those vlans going over the link, then there's certainly no reason to allow them. The fastest way to find out whether you equipment agrees with you will be to try:
interface x0/x switchport trunk allowed vlan remove 1
If it bombs with a
Bad VLAN allowed list error, then you're stuck with them.