08-08-2007 06:59 AM - edited 03-05-2019 05:47 PM
Is there a problem with running an IP address on the main interface with sub-interfaces for Vlans or should the IP addresses all be sub-interfaces?
EXAMPLE:
interface GigabitEthernet0/0
ip address 172.16.1.2 255.255.0.0
bridge-group 1
media-type rj45
!
interface GigabitEthernet0/0.1
encapsulation dot1Q 11
ip address 192.168.11.254 255.255.255.0
no cdp enable
!
interface GigabitEthernet0/0.3
encapsulation dot1Q 33
ip address 192.168.33.254 255.255.255.0
no cdp enable
or
interface GigabitEthernet0/0
no ip address
media-type rj45
!
interface GigabitEthernet0/0.1
encapsulation dot1Q 11
ip address 172.16.1.2 255.255.0.0
bridge-group 1
!
interface GigabitEthernet0/0.2
encapsulation dot1Q 11
ip address 192.168.11.254 255.255.255.0
no cdp enable
!
interface GigabitEthernet0/0.3
encapsulation dot1Q 33
ip address 192.168.33.254 255.255.255.0
no cdp enable
What would the repercusions be?
Both seem to work the same.
Solved! Go to Solution.
08-08-2007 07:52 AM
The big difference is that packets traveling from "interface GigabitEthernet0/0 " are not send encapsulated. They don't have 802.1Q tags, and therefore do not belong to any VLAN. They will be received by either NATIVE VLAN on other side (if it's a switch with trunk port), or interface that has no encapsulation on another side (if it's a router).
In second configuration you are throwing two IP networks in one VLAN (172.16.1.2 255.255.0.0 and 192.168.11.254 255.255.255.0 )
Not that it won't work, but it's not recommended and is not a good design practice. You are creating VLANs to separate broadcast domains, and create separate networks, but here you have two networks in one VLAN - VLAN 11
Where does bridge-group 1 lead to?
08-08-2007 07:19 AM
Both configs are ok , it will work fine.
Regards,
~JG
08-08-2007 07:52 AM
The big difference is that packets traveling from "interface GigabitEthernet0/0 " are not send encapsulated. They don't have 802.1Q tags, and therefore do not belong to any VLAN. They will be received by either NATIVE VLAN on other side (if it's a switch with trunk port), or interface that has no encapsulation on another side (if it's a router).
In second configuration you are throwing two IP networks in one VLAN (172.16.1.2 255.255.0.0 and 192.168.11.254 255.255.255.0 )
Not that it won't work, but it's not recommended and is not a good design practice. You are creating VLANs to separate broadcast domains, and create separate networks, but here you have two networks in one VLAN - VLAN 11
Where does bridge-group 1 lead to?
08-08-2007 09:24 AM
good catch but the 172.16.x.x is supposed to be in vlan 1 (typo) sorry.
The bridge-group is over a serial link.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide