encapsulation dot1q

Unanswered Question
Sep 23rd, 2010

Hi All,

I have  a problem pinging the ip of the router when i configure encapsulation dot1q in its router fastethernet 0/1

here's the router configuration

Current configuration : 533 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
!
interface FastEthernet0/1.1
encapsulation dot1Q 2
ip address 1.1.1.254 255.255.255.0
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
line con 0
line vty 0 4
login
!
end


below is the configuration of the switch where the router is connected


Building configuration...

Current configuration : 1328 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
interface FastEthernet0/1
switchport mode trunk
spanning-tree portfast
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
switchport access vlan 2
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/22
switchport access vlan 4
spanning-tree portfast
!
interface FastEthernet0/23
switchport access vlan 3
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/24
switchport access vlan 2
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet1/1
!
interface GigabitEthernet1/2
!
interface Vlan1
no ip address
shutdown
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
end

and here is the diagram.

router.png

all the pc can ping the core switch but if it pings the router it failed.

all vlan configuration are configured on the core switch.

here's the running config of the core switch

Building configuration...

Current configuration : 1288 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!

ip routing
!
interface FastEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
interface Vlan2
ip address 1.1.1.64 255.255.255.0
!
interface Vlan3
ip address 1.1.2.64 255.255.255.0
!
interface Vlan4
ip address 1.1.3.64 255.255.255.0
!
ip classless
!
line con 0
line vty 0 4
login
!
end

what must be wron on my configuration?

Please help!!!!

thanks,

nhel

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Jon Marshall Thu, 09/23/2010 - 03:09

Looking at the diagram fa0/24 is the uplink  to the router but you have fa0/24 configured as an access port ie.

interface FastEthernet0/24
switchport access vlan 2
switchport mode access
spanning-tree portfast

if you only want vlan 2 on that link then your router config is wrong, ie. you do not need subinterfaces and you can just configuer the router as -

interface FastEthernet0/1
ip address 1.1.1.254 255.255.255.0
duplex auto
speed auto
!

and then remove the subinterface configuration.

If you want to actually have other vlans on this link and have mutliple subinterfaces on the router then you need to change the switchport config on your switch to -

int fa0/24

switchport mode trunk

switchport trunk encapsulation dot1q

Not sure which one you actually want to do ?

Jon

glen.grant Thu, 09/23/2010 - 06:19

  Also you need to determine who is going to do the routing for vlan 2  , the router or the switch .  It should not be in both places the way you have it now .

Actions

This Discussion