PDA

View Full Version : interVLAN Routing


E1or0
06-19-2011, 04:00 PM
Switch A 2950 Interface config:
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
switchport mode trunk
!
interface FastEthernet0/3
switchport access vlan 2
switchport mode access
VLANS's
SwitchA#show vlan brief

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/4, Fa0/5, Fa0/6, Fa0/7
Fa0/8, Fa0/9, Fa0/10, Fa0/11
Fa0/12, Fa0/13, Fa0/14, Fa0/15
Fa0/16, Fa0/17, Fa0/18, Fa0/19
Fa0/20, Fa0/21, Fa0/22, Fa0/23
Fa0/24
2 SwitchA active Fa0/3
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
SwitchA#
Trunking Ports
SwitchA#show interface trunk

Port Mode Encapsulation Status Native vlan
Fa0/1 on 802.1q trunking 1
Fa0/2 on 802.1q trunking 1

Port Vlans allowed on trunk
Fa0/1 1-4094
Fa0/2 1-4094

Port Vlans allowed and active in management domain
Fa0/1 1-2
Fa0/2 1-2

Port Vlans in spanning tree forwarding state and not pruned
Fa0/1 1-2
Fa0/2 1-2
SwitchA#
------------------------------------------------------

Switch B 2950 config:
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
!
interface FastEthernet0/3
switchport access vlan 3
switchport mode access
VLAN's
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/2, Fa0/4, Fa0/5, Fa0/6
Fa0/7, Fa0/8, Fa0/9, Fa0/10
Fa0/11, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/21, Fa0/22
Fa0/23, Fa0/24
3 SwitchB active Fa0/3
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
SwitchB#
Trunking Ports
SwitchB#show interface trunk

Port Mode Encapsulation Status Native vlan
Fa0/1 on 802.1q trunking 1

Port Vlans allowed on trunk
Fa0/1 1-4094

Port Vlans allowed and active in management domain
Fa0/1 1,3

Port Vlans in spanning tree forwarding state and not pruned
Fa0/1 1,3
SwitchB#
-------------------------------------------------------------------

Router 2620XM config:
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.2
encapsulation dot1Q 2
ip address 192.168.2.1 255.255.255.0
!
interface FastEthernet0/0.3
encapsulation dot1Q 3
ip address 192.168.3.1 255.255.255.0
Interface Status
Router#show ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES NVRAM up up
FastEthernet0/0.2 192.168.2.1 YES manual up up
FastEthernet0/0.3 192.168.3.1 YES manual up up
Serial1/0 unassigned YES NVRAM down down
Serial1/0.1 192.168.0.31 YES NVRAM down down
Serial1/1 unassigned YES NVRAM administratively down down
Serial1/2 unassigned YES NVRAM administratively down down
Serial1/3 unassigned YES NVRAM administratively down down
Router#
Hello guys, I'm trying to set up a interVLAN Routing Lab here but for some reason I can't ping between my host from switch A and B, this host have their default gateway manually set up, Am I missing something in this config?

Thanks

Topology

[Router]
¦
¦
¦
¦
[SwitchA]------------[SwitchB]

One Host per Switch

E1or0
06-19-2011, 06:33 PM
FYI !!! Both of my switches are in the same Domain

E1or0
06-19-2011, 07:25 PM
Running config of Router
Router#show run
Building configuration...

Current configuration : 1345 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
no network-clock-participate slot 1
no network-clock-participate wic 0
ip cef
!
!
!
!
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.2
encapsulation dot1Q 2
ip address 192.168.2.1 255.255.255.0
!
interface FastEthernet0/0.3
encapsulation dot1Q 3
ip address 192.168.3.1 255.255.255.0
!
interface Serial1/0
no ip address
encapsulation frame-relay
no fair-queue
!
interface Serial1/0.1 multipoint
ip address 192.168.0.31 255.255.255.192
frame-relay map ip 192.168.0.2 33 broadcast
frame-relay map ip 192.168.0.21 33 broadcast
frame-relay interface-dlci 31
!
interface Serial1/1
no ip address
shutdown
!
interface Serial1/2
no ip address
shutdown
!
interface Serial1/3
no ip address
shutdown
!
router eigrp 1
network 192.168.0.0
network 192.168.2.0
network 192.168.3.0
no auto-summary
!
ip forward-protocol nd
!
!
ip http server
no ip http secure-server
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
!
!
end

Router#

DonB
06-20-2011, 12:44 AM
On switch a you have vlans 1 and 2 and on switch b you have vlans 1 and 3. On the router you have vlans 2 and 3.

E1or0
06-20-2011, 08:50 AM
On switch a you have vlans 1 and 2 and on switch b you have vlans 1 and 3. On the router you have vlans 2 and 3.
I just noticed that thank you, I added both vlans on each side now I'm able to ping forth and back no problem, someone told me that I need it to assign ip addresses on both vlans plus a default-gateway on teh switch is this correct as well? from my understanding you only assign an ip address to the management vlan which is vlan1

DonB
06-20-2011, 01:03 PM
someone told me that I need it to assign ip addresses on both vlans

Each vlan needs to be on its own subnet. All devices assigned to that vlan must be in that same subnet. The subinterface on the router for the vlan must also be in the same subnet.

plus a default-gateway on teh switch is this correct as well? from my understanding you only assign an ip address to the management vlan which is vlan1

The IP address and default gateway that you assign to vlan1 on the switch is for managing the switch remotely so you can log into the switch from your pc for example. Each switch will have a different ip address assigned to the managment vlan on the switch. Neither the Ip address or the default gateway have anything to do with vlans other than the management vlan.