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

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

How to put router in trunk mode and link to switch [Solved]

        Hi,

The idea is to configure the wifi on the C870 router.

So, I have this switch prepared to receive the router on one port with vlan 109.

The router is with c870-advipservicesk9-mz.124-24.T2.bin

The router is connected from f4 to the switch port, but when I try to put the router port on trunk its not accepting the switchport mode trunk

interface FastEthernet4

description secondary-TO_SW

no ip address

duplex auto

speed 100

no cdp enable

!

interface Vlan109

ip address 192.168.71.4 255.255.255.0

!

ip default-gateway 192.168.71.1

!

interface Dot11Radio0

no ip address

!

encryption vlan 10 mode ciphers tkip

!

broadcast-key vlan 10 change 45

Any idea?

Thanks

** the router its not accepting the switchport command once Im inside the interface

  • LAN Switching and Routing
1 ACCEPTED SOLUTION

Accepted Solutions
Hall of Fame Super Silver

How to put router in trunk mode and link to switch

No it is the subinterface that you should associate with the VLAN (and which you already have associated with the VLAN). You do not need the switchport mode trunk and it does not work on the interface (as you have discovered). You achieved the same result of this command when you configured

interface fastEthernet 4.109

encapsulation dot1Q 109

now what you need to do is to remove interface vlan 109 from the configuration and to configure the IP address under the subinterface.

HTH

Rick

11 REPLIES
New Member

How to put router in trunk mode and link to switch

yeah it wont work because it is a router not a switch. so you just need to tag the dot1q with the correct encapsulation id to your subinterface;

in your example it 109

interface FastEthernet4.109

encapsulation dot1Q 109

New Member

How to put router in trunk mode and link to switch

and this is the result.

R(config)#interface fastEthernet 4.109

R(config-subif)#encapsulation dot1

R(config-subif)#encapsulation dot1Q 109

R(config-subif)#exit

R(config)#int fastEthernet 4

R(config-if)#switchport mode trunk

                        ^

% Invalid input detected at '^' marker.

its the phisical interface that I should associate witht the vlan, right?

New Member

Re: How to put router in trunk mode and link to switch

yeah thats normal. you dont need to run switchport mode nor it will work.

just do no shut on the physical interface.  and print "show ip int br"

New Member

How to put router in trunk mode and link to switch

this is what I have

R#sh ip int br

Interface                  IP-Address      OK? Method Status                Protocol

Dot11Radio0                unassigned      YES NVRAM  reset                 down

FastEthernet0              unassigned      YES unset  administratively down down

FastEthernet1              unassigned      YES unset  administratively down down

FastEthernet2              unassigned      YES unset  administratively down down

FastEthernet3              unassigned      YES unset  administratively down down

FastEthernet4              unassigned      YES manual up                    up

FastEthernet4.109          unassigned      YES unset  up                    up

Vlan1                      unassigned      YES NVRAM  administratively down down

Vlan109                    192.168.71.4    YES manual up                    down

New Member

How to put router in trunk mode and link to switch

apply the ip address under the sub interface

so '

no int vlan 109

int f4/109

ip address 192.168.71.4 255.255.255.0

Hall of Fame Super Silver

How to put router in trunk mode and link to switch

No it is the subinterface that you should associate with the VLAN (and which you already have associated with the VLAN). You do not need the switchport mode trunk and it does not work on the interface (as you have discovered). You achieved the same result of this command when you configured

interface fastEthernet 4.109

encapsulation dot1Q 109

now what you need to do is to remove interface vlan 109 from the configuration and to configure the IP address under the subinterface.

HTH

Rick

New Member

How to put router in trunk mode and link to switch

nice!

can reach the default gateway already,

can see the router on the switch arp

but can't go outside

Will check further on the switch and find why

New Member

How to put router in trunk mode and link to switch

see if you have a reverse route from the outside router to R

New Member

How to put router in trunk mode and link to switch

can see the ip configured on the router, but can't ping it.

The switch port interface config:

!

interface FastEthernet0/19

description ToWifiRouter

switchport trunk allowed vlan 109

switchport mode trunk

!

438
Views
3
Helpful
11
Replies