cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
896
Views
0
Helpful
2
Replies

VLAN trunking on a 2821 interface

drumrb0y
Level 1
Level 1

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

mihai.gagea
Level 1
Level 1

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

View solution in original post

2 Replies 2

mihai.gagea
Level 1
Level 1

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

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

Review Cisco Networking products for a $25 gift card