cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
633
Views
4
Helpful
3
Replies

Routing VLAN

skiver
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

Pavel Bykov
Level 5
Level 5

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?

View solution in original post

3 Replies 3

Jagdeep Gambhir
Level 10
Level 10

Both configs are ok , it will work fine.

Regards,

~JG

Pavel Bykov
Level 5
Level 5

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?

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.

Review Cisco Networking for a $25 gift card