cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
25766
Views
3
Helpful
11
Replies

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

nasdriver
Level 1
Level 1

        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

1 Accepted Solution

Accepted Solutions

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

HTH

Rick

View solution in original post

11 Replies 11

usasigcis
Level 1
Level 1

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

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?

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"

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

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

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

HTH

Rick

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

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

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

!

i presume the other side is a switch

what is the below results;

sh ip int br | ex unas

sh span vlan 109

sh int trun

sh ip protocol

sh ip route

great,

After this, issued a no ip route followed by default gateway x.x.x.x and can go out now

Thanks

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card