Use of sub-interfaces

Dear friends,

Kindly clarify my doubts regarding the use of Sub-interfaces,

1. Are we allowed to use diffrenet subnets in main interface and its sub-interfaces ??

2. Any additional command requires in main interface while we allowing a particular vlan in its subinterface  in a routed port ??

 

Thanks

rYs

Comments

  • Yes, you are allowed to do so, but make sure that you need "encapsulation dot1q <vlan-id>" before configuring an ip address in the sub interface. No restriction for main interface.

     

    interface Ethernet0/0

     ip address 192.168.20.1 255.255.255.0

     half-duplex

    !

    interface Ethernet0/0.10

     encapsulation dot1Q 10

     ip address 10.1.1.1 255.255.255.0


    Good luck!
  • Dear friends,

    Kindly clarify my doubts regarding the use of Sub-interfaces,

    1. Are we allowed to use diffrenet subnets in main interface and its sub-interfaces ??

    Yep; it is just fine, each interface can and should be on a different subnet. While it is not common to see an IP on the main interface, you can sure do it, if you want to. In Ethernet, if you use an IP address on the main interface the traffic will be sent untagged.

    2. Any additional command requires in main interface while we allowing a particular vlan in its subinterface  in a routed port ??

    Are you talking about Frame-Relay or Ethernet sub-interfaces?

    In Ethernet, if you are filtering the VLANs on your switch's trunk port (best practice), you would have to allow the new VLAN on the switch's trunk port.

     

    HTH

    Good luck!

     

Sign In or Register to comment.