Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

VLAN trunking on a 2821 interface

I've configured switch ports to trunk multiple VLANs many times, but for the first time I now need to configure a router interface for this; can someone give me the standard IOS commands to set VLAN trunking up on a router port and to define the VLANs in IOS on a 2821 router?

Thanks,

Marc

1 ACCEPTED SOLUTION

Accepted Solutions
Community Member

Re: VLAN trunking on a 2821 interface

Here's a sample of the config on one of my routers. It's a Cisco 2811 with IOS v12.4(3g), close enough i'd say. 2821 has GigabitEthernet interfaces instead of FastEthernet.

interface FastEthernet0/0

no ip address

duplex auto

speed auto

!

interface FastEthernet0/0.1

encapsulation dot1Q 1 native

ip address 172.16.144.1 255.255.255.240

!

interface FastEthernet0/0.2

encapsulation dot1Q 2

ip address 172.16.144.17 255.255.255.240

!

interface FastEthernet0/0.3

encapsulation dot1Q 3

ip address 172.16.144.33 255.255.255.224

The port on the switch is configured like this:

interface FastEthernet0/1

switchport trunk encapsulation dot1q

switchport mode trunk

switchport trunk allowed allowed vlan 1,2,3

2 REPLIES
Community Member

Re: VLAN trunking on a 2821 interface

Here's a sample of the config on one of my routers. It's a Cisco 2811 with IOS v12.4(3g), close enough i'd say. 2821 has GigabitEthernet interfaces instead of FastEthernet.

interface FastEthernet0/0

no ip address

duplex auto

speed auto

!

interface FastEthernet0/0.1

encapsulation dot1Q 1 native

ip address 172.16.144.1 255.255.255.240

!

interface FastEthernet0/0.2

encapsulation dot1Q 2

ip address 172.16.144.17 255.255.255.240

!

interface FastEthernet0/0.3

encapsulation dot1Q 3

ip address 172.16.144.33 255.255.255.224

The port on the switch is configured like this:

interface FastEthernet0/1

switchport trunk encapsulation dot1q

switchport mode trunk

switchport trunk allowed allowed vlan 1,2,3

Community Member

Re: VLAN trunking on a 2821 interface

I had a hunch it had to do with sub-interfaces; that was perfect!

I'll plug in my IP info and be good to go - thanks!

Marc

371
Views
0
Helpful
2
Replies
CreatePlease to create content