Options

Inter-Vlan Routing

adam041590adam041590 Member Posts: 6 ■□□□□□□□□□
Ok so I made a simple lab to assess my understanding of inter-vlan routing. I use PT so its not that advanced. The problem I am having is the Vlans can not communicate with each other yet they can communicate with the router and the router can ping them. It's driving me insane because I've looked through all my configs and they are perfect... It's a basic lab set up and I cant upload my pkt tracer lab on here for some reason. Here is my router output and switch. I notice that the native vlan is down I know I have issued no shutdown commands on that vlan but I dont know whats going on


Current configuration : 828 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
!
interface FastEthernet0/0.10
encapsulation dot1Q 10
ip address 192.168.0.254 255.255.255.0
!
interface FastEthernet0/0.20
encapsulation dot1Q 20
ip address 192.168.1.254 255.255.255.0
!
interface FastEthernet0/0.30
encapsulation dot1Q 30
ip address 192.168.2.4 255.255.255.248
!
interface FastEthernet0/0.40
encapsulation dot1Q 40 native
ip address 192.168.2.10 255.255.255.252
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
!
!
!
!
!
!
line con 0
line vty 0 4
login
!
!
!
end

The Switch:
Switch#show run
Building configuration...

Current configuration : 1465 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 access vlan 10
switchport mode access
!
interface FastEthernet0/2
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/3
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/4
switchport trunk native vlan 40
switchport trunk allowed vlan 10,20,30,40
switchport mode trunk
!
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 Vlan1
no ip address
shutdown
!
interface Vlan10
ip address 192.168.0.1 255.255.255.0
!
interface Vlan20
ip address 192.168.1.1 255.255.255.0
!
interface Vlan30
ip address 192.168.2.1 255.255.255.248
!
interface Vlan40
ip address 192.168.2.9 255.255.255.252
!
ip default-gateway 192.168.2.10
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
end

Comments

  • Options
    DCDDCD Member Posts: 473 ■■■■□□□□□□
    What are the IP address of your PC and there default gateways? If you could add a show vlan switch and show ip int brief from your router. Everything else look fine.
  • Options
    adam041590adam041590 Member Posts: 6 ■□□□□□□□□□
    I just figured it out. I beileve I was suppose to have configured my switch's default gateway to whatever the management vlan ip address for the router was going to be. So from my understanding about vlans they can not talk to each other at all right? Only the vlan that you make the management can talk to the other vlans. When I say management I mean the one host you configure to run the hole network... Because so far the only computer that can ping to the other vlans is the one I set up for the management vlan interface. Is this correct? Or can all vlans talk to each other through the router
  • Options
    MrXpertMrXpert Member Posts: 586 ■■■□□□□□□□
    All VLANS can talk to each other provided the VLANS are setup on the switch and the router is configured correctly with the sub interfaces assigned to those VLANS and the appropriate IP addresses.


    This is what I labbed up. 1 router, 1 switch, 3 hosts. I am able to telnet to switch and router from hosts and have full reachability between hosts in vlans 10,20,30


    hostname Router
    !
    !
    !
    enable password cisco
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    interface FastEthernet0/0
    no ip address
    duplex auto
    speed auto
    !
    interface FastEthernet0/0.1
    encapsulation dot1Q 1 native
    ip address 192.168.1.1 255.255.255.0
    !
    interface FastEthernet0/0.10
    encapsulation dot1Q 10
    ip address 192.168.10.1 255.255.255.0
    !
    interface FastEthernet0/0.20
    encapsulation dot1Q 20
    ip address 192.168.20.1 255.255.255.0
    !
    interface FastEthernet0/0.30
    encapsulation dot1Q 30
    ip address 192.168.30.1 255.255.255.0
    !
    interface FastEthernet0/1
    no ip address
    duplex auto
    speed auto
    shutdown
    !
    interface Vlan1
    no ip address
    !
    interface Vlan20
    no ip address
    !
    ip classless
    !
    !
    !
    !
    !
    !
    !
    line con 0
    exec-timeout 0 0
    logging synchronous
    line vty 0 4
    password cisco1
    login
    !
    !
    !
    end



    Switch#show run
    Building configuration...

    Current configuration : 1290 bytes
    !
    version 12.1
    no service timestamps log datetime msec
    no service timestamps debug datetime msec
    no service password-encryption
    !
    hostname Switch
    !
    enable password cisco
    !
    !
    !
    interface FastEthernet0/1
    switchport mode trunk
    switchport nonegotiate
    !
    interface FastEthernet0/2
    switchport access vlan 20
    switchport mode access
    !
    interface FastEthernet0/3
    switchport access vlan 30
    switchport mode access
    !
    interface FastEthernet0/4
    switchport access vlan 10
    switchport mode access
    !
    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 Vlan1
    ip address 192.168.1.2 255.255.255.0
    !
    ip default-gateway 192.168.1.1
    !
    !
    line con 0
    logging synchronous
    exec-timeout 0 0
    !
    line vty 0 4
    password cisco1
    login
    line vty 5 15
    password cisco1
    I'm an Xpert at nothing apart from remembering useless information that nobody else cares about.
  • Options
    adam041590adam041590 Member Posts: 6 ■□□□□□□□□□
    Ok so vlans can talk to each other than right. So it doesnt matter which default gateway you set for the switch? For example if you used 192.168.30.1 you would still have basic connectivity. If I was implementing a network where I only wanted one vlan to be able to talk to all vlans and the others to be able to only connect to the internet and not talk to each other would I use the command vlans allowed on the trunk from the switch?
  • Options
    leonlimsgleonlimsg Member Posts: 10 ■□□□□□□□□□
    Hi,

    All vlans will be able to communicate with one another. That is why we call it INTER-VLAN routing.

    Without default-gateway, it will work too.


    Regards.
Sign In or Register to comment.