Options

Inter VLAN routing.

Bad_RequestBad_Request Member Posts: 10 ■■■□□□□□□□
Hello everyone! This is my first post here, so please be gentle icon_wink.gif. So I've been studying for my CCNA (ICDN 1 and 2 route) for about a little less than a week. I have my own lab set-up consisting of 3x1841, 2x2590 and 1x3550, and I'm running to an issue. So I have PC1 and PC2 connected to switch 1 which is a 2950 on ports fa0/1 and fa0/2 in VLAN 10 & 20 respectively. I'm using a subnet mask of 255.255.255.252. So Pc1 is 192.168.10.1 with a default gateway of 192.168.10.2 and PC 2 is 192.168.10.5 with default gateway 192.168.10.6. The switch is then connected to the router via trunking fa0/15 to the router on fa0/0. I then configured sub-interfaces fa0/0.10 and fa0/0.20 on the router using 192.168.10.2/30 and 192.168.10.4/30, both using dot1q. Now the problem is that both PC's can ping their default gateways. but fail to ping each other. I then enabled EIGRP, but the issue thet hosts still cannot ping each other. Heres the running config of the router:
Router3#sh run
Building configuration...

Current configuration : 1408 bytes
!
! Last configuration change at 06:48:08 UTC Sun Jul 19 2015
version 15.1
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname Router3
!
boot-start-marker
boot-end-marker
!
!
enable secret 5 $1$YL6t$bZp3PuMBB9B3y.iG2MxH40
!
no aaa new-model
!
memory-size iomem 5
dot11 syslog
ip source-route
!
!
!
!
!
ip cef
ip domain name evan.local
no ipv6 cef
!
multilink bundle-name authenticated
!
crypto pki token default removal timeout 0
!
!
!
!
license udi pid CISCO1841 sn FTX145302LT
username evan password 7 000E1A1C1E5E07565E75
!
redundancy
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/0.10
 encapsulation dot1Q 10
 ip address 192.168.10.2 255.255.255.252
!
interface FastEthernet0/0.20
 encapsulation dot1Q 20
 ip address 192.168.10.6 255.255.255.252
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/1/0
 no ip address
 shutdown
!
!
router eigrp 10
 network 192.168.10.0 0.0.0.3
 network 192.168.10.4 0.0.0.3
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
!
!
!
!
!
!
!
!
control-plane
!
!
!
line con 0
 logging synchronous
line aux 0
line vty 0 4
 logging synchronous
 login local
 transport input ssh
line vty 5 15
 logging synchronous
 login local
 transport input ssh
!
scheduler allocate 20000 1000
end

If anyone could help me out it would be much appreciated!

Comments

  • Options
    AlceoAlceo Member Posts: 80 ■■□□□□□□□□
    in the config fa0/0.20 has 192.168.10.6
    in the description you say that it has 192.168.10.4
    with the correct ip it works, you don't need EIGRP to route betweend directly connected network.
  • Options
    DeyColeDeyCole Member Posts: 29 ■□□□□□□□□□
    I just studied this topic yesterday, so I could be wrong.

    Try creating a different subnet for Vlan 20. Currently, all your IP addresses are in subnet 192.168.10.0. Each Vlan should have it's own subnet.
  • Options
    AlceoAlceo Member Posts: 80 ■■□□□□□□□□
    They are already in different subnets, he is using this mask 255.255.255.252.
  • Options
    HAMPHAMP Member Posts: 163
    DeyCole wrote: »
    I just studied this topic yesterday, so I could be wrong.

    Try creating a different subnet for Vlan 20. Currently, all your IP addresses are in subnet 192.168.10.0. Each Vlan should have it's own subnet.
    Pay close attention to the subnet mask. He is using a /30 (the same as 255.255.255.252) which are in blocks of 4.
    192.168.10.0
    192.168.10.4
    192.168.10.8
    192.168.10.12

    Using a 255.255.255.252 will make each of those its own network. For each network he has 2 usable IP's for host.
    192.168.10.0 - Network ID
    192.168.10.1 - usable for a host
    192.168.10.2 - usable for a host
    192.168.10.3 - broadcast


    As the OP explained he is using the first network and trying to ping to the second network.

    He stated "I then configured sub-interfaces fa0/0.10 and fa0/0.20 on the router using 192.168.10.2/30 and 192.168.10.4/30"

    As I showed you, the 192.168.10.4 is a network ID, and not a usable for an interface.


    Looking at his router config, he is using the right IP's for the default gateway.

    interface FastEthernet0/0.10
    encapsulation dot1Q 10
    ip address 192.168.10.2 255.255.255.252

    interface FastEthernet0/0.20
    encapsulation dot1Q 20
    ip address 192.168.10.6 255.255.255.252

    Pretty sure he has the IP's mixed on the PC's
  • Options
    DeyColeDeyCole Member Posts: 29 ■□□□□□□□□□
    Alceo wrote: »
    They are already in different subnets, he is using this mask 255.255.255.252.

    Ah, Thanks Alceo and Hamp!
  • Options
    james43026james43026 Member Posts: 303 ■■□□□□□□□□
    I would say either you have your switch misconfigured or you have a host misconfigured. As your router has a config on it for this. Just tested your setup on my home lab. Works just fine.
  • Options
    Bad_RequestBad_Request Member Posts: 10 ■■■□□□□□□□
    Thanks a lot for the input guys. I'll double check my It's once I get home and post results. Wouldn't be surprised if I got them mixed up, was exhausted when I was setting everything up. Thanks again guys!
  • Options
    Bad_RequestBad_Request Member Posts: 10 ■■■□□□□□□□
    Thanks a lot for the input guys. I'll double check my It's once I get home and post results. Wouldn't be surprised if I got them mixed up, was exhausted when I was setting everything up. Thanks again guys!
    Double check my IP's.
  • Options
    Bad_RequestBad_Request Member Posts: 10 ■■■□□□□□□□
    Alright, so I decided to start from scratch and I'm still having the same issue. Both hosts can ping their default gateways, but not each other. Another strange thing I noticed was that host B, which is on vlan 20 is able to ping both default gateways 192.168.10.1/30 and 192.168.10.5/30. But host A is only able to ping one of the gateways 192.168.10.1/30. I've looked over everything I can think of, but cant seem to sort it out.

    Running-config of the router:
    Router3#sh run
    Building configuration...
    
    Current configuration : 1360 bytes
    !
    ! Last configuration change at 00:18:07 UTC Mon Jul 20 2015
    version 15.1
    service timestamps debug datetime msec
    service timestamps log datetime msec
    service password-encryption
    !
    hostname Router3
    !
    boot-start-marker
    boot-end-marker
    !
    !
    enable secret 5 $1$YL6t$bZp3PuMBB9B3y.iG2MxH40
    !
    no aaa new-model
    !
    memory-size iomem 5
    dot11 syslog
    ip source-route
    !
    !
    !
    !
    !
    ip cef
    ip domain name evan.local
    no ipv6 cef
    !
    multilink bundle-name authenticated
    !
    crypto pki token default removal timeout 0
    !
    !
    !
    !
    license udi pid CISCO1841 sn FTX145302LT
    username evan password 7 0451021C1524401E584D
    !
    redundancy
    !
    !
    !
    !
    !
    !
    !
    !
    !
    interface FastEthernet0/0
     no ip address
     duplex auto
     speed auto
    !
    interface FastEthernet0/0.10
     encapsulation dot1Q 10
     ip address 192.168.10.1 255.255.255.252
    !
    interface FastEthernet0/0.20
     encapsulation dot1Q 20
     ip address 192.168.10.5 255.255.255.252
    !
    interface FastEthernet0/0.100
    !
    interface FastEthernet0/1
     no ip address
     shutdown
     duplex auto
     speed auto
    !
    interface Serial0/1/0
     no ip address
     shutdown
    !
    ip forward-protocol nd
    no ip http server
    no ip http secure-server
    !
    !
    !
    !
    !
    !
    !
    !
    !
    control-plane
    !
    !
    !
    line con 0
     logging synchronous
    line aux 0
    line vty 0 4
     logging synchronous
     login local
     transport input ssh
    line vty 5 15
     logging synchronous
     login local
     transport input ssh
    !
    scheduler allocate 20000 1000
    end
    

    And the switch
    Switch1#sh run
    Building configuration...
    
    Current configuration : 4086 bytes
    !
    version 12.1
    no service pad
    service timestamps debug uptime
    service timestamps log uptime
    service password-encryption
    !
    hostname Switch1
    !
    enable secret 5 $1$eXVX$B2lKC0uDrVMJRPJCLvz411
    !
    username evan password 7 151802161E2F27747967
    ip subnet-zero
    !
    ip domain-name evan.local
    ip ssh time-out 120
    ip ssh authentication-retries 3
    !
    spanning-tree mode pvst
    no spanning-tree optimize bpdu transmission
    spanning-tree extend system-id
    !
    !
    !
    !
    interface FastEthernet0/1
     switchport access vlan 10
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/2
     switchport access vlan 20
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/3
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/4
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/5
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/6
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/7
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/8
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/9
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/10
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/11
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/12
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/13
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/14
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/15
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/16
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/17
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/18
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/19
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/20
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/21
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/22
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/23
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/24
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/25
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/26
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/27
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/28
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/29
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/30
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/31
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/32
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/33
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/34
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/35
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/36
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/37
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/38
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/39
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/40
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/41
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/42
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/43
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/44
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/45
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/46
     switchport mode access
     no cdp enable
    !
    interface FastEthernet0/47
     switchport mode trunk
     no cdp enable
    !
    interface FastEthernet0/48
     switchport mode trunk
    !
    interface GigabitEthernet0/1
    !
    interface GigabitEthernet0/2
    !
    interface Vlan1
     no ip address
     no ip route-cache
     shutdown
    !
    interface Vlan100
     ip address 192.168.5.3 255.255.255.0
     no ip route-cache
    !
    ip http server
    !
    line con 0
     logging synchronous
    line vty 0 4
     logging synchronous
     login local
    line vty 5 15
     logging synchronous
     login local
    !
    !
    end
    

    Also, just to clarify, host A is attached to fa0/1(VLAN 10) with ip address 192.168.10.2/30 and gateway 192.168.10.1/30
    Host B is attached to fa0/2(VLAN 20) with ip address 192.168.10.6/30 and gateway 192.168.10.5.

    Once again, any help would be much appreciated!
  • Options
    Bad_RequestBad_Request Member Posts: 10 ■■■□□□□□□□
    So I decided to traceroute from host A to host B. What was happening is that when sending packets to host B, instead of sending to gateway 192.168.10.1 it was sending the packets to the default gateway that was configured on my Wireless NIC, very strange. So I disabled my wireless NIC and now host a and b can communicate with out issue!
  • Options
    HAMPHAMP Member Posts: 163
    I see you have fa0/1 going to host A and fa0/2 for host B, but which port on the switch are you using for the router?
  • Options
    techfiendtechfiend Member Posts: 1,481 ■■■■□□□□□□
    Trunk ports on the switch?
    2018 AWS Solutions Architect - Associate (Apr) 2017 VCAP6-DCV Deploy (Oct) 2016 Storage+ (Jan)
    2015 Start WGU (Feb) Net+ (Feb) Sec+ (Mar) Project+ (Apr) Other WGU (Jun) CCENT (Jul) CCNA (Aug) CCNA Security (Aug) MCP 2012 (Sep) MCSA 2012 (Oct) Linux+ (Nov) Capstone/BS (Nov) VCP6-DCV (Dec) ITILF (Dec)
  • Options
    [Deleted User][Deleted User] Senior Member Posts: 0 ■■□□□□□□□□
    Where is the trunk link from switch to router to allow intervlan traffic to pass? You should have a statement with something like switchport trunk allowed vlan (vlans you want to trunk) if memory serves me right. The 2 hosts will communicate because the traffic is not going through the router. On fa 0/48 type switchport trunk allowed vlan () this will allow vlans to reach the router to communicate.

    Look here for example:https://networklessons.com/switching/intervlan-routing/

    Also you have no ip default gateway statement pointing to a gateway. Really look over your configs and you will see what I mean.

    Dont paste a config with the service password encryption encrypting your password either can easily be decrypted :)
  • Options
    Bad_RequestBad_Request Member Posts: 10 ■■■□□□□□□□
    Trunking port is fa0/47. Im well aware that even though the passwords are encrypted, they can be cracked, the password I used though is used for nothing else so Im not too worried icon_wink.gif. As I posted earlier though, I was able to solve the problem. Issue was that for some reason host a was sending packets to the default gateway for my wireless NIC. After disabling the wireless NIC, both hosts were able to communicate fine!
    Thanks again for all the help everyone!
  • Options
    CiscoWayneCiscoWayne Member Posts: 57 ■■□□□□□□□□
    I had the EXACT same issue a couple of weeks ago. Spent ages trying to work it out, then realised that my Wi-Fi NIC's were still active on both PC's/Laptops. Worked a treat afterwards.

    You live and learn!
    CCENT [X] CCNA [X] CCNP Switch [ ] CCNP Route [ ] CCNP Troubleshoot [ ]
    Now working on CCNP Switch
Sign In or Register to comment.