VLAN trunking on a 2821 interface

Answered Question
Aug 31st, 2007
User Badges:

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

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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer

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

drumrb0y Fri, 08/31/2007 - 06:11
User Badges:

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

Actions

This Discussion