Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inter vlan routing question 1

Status
Not open for further replies.

shenmue232

Technical User
Jan 4, 2009
11
GB
Hi

I was wondering if it was possible for the switch connected to the router via a trunk link to ping the router, All the switches can ping each other its just that none of the switches can ping the router.

Regards

shenmue232
 
Sounds like the gateway configured in the switches. Post a sh run of all three devices please...

Burt
 
The gateway in the switches has the ip address 172.16.99.1 this is the ip address of the sub interface on the router

!
interface FastEthernet0/1.99
description VLAN99
encapsulation dot1Q 99 native
ip address 172.16.99.1 255.255.255.0
no shutdown
!

 
you should be able to if the switch is configured correctly.Check to make sure the native vlan on the switch side is correct. Maybe you can post the switch side also . Switch side should look something like this .

int fx/x
switchport
switchport access vlan 99
switchport trunk encapsulation dot1q
swutchport trunk native vlan 99
switchport nonegotiate
switchport mode trunk
 
I don't think anyone can help too much without those configs...

Burt
 
Router

!
interface FastEthernet0/1.1
description VLAN1
encapsulation dot1Q 1
ip address 172.16.1.1 255.255.255.0
no shutdown
!
interface FastEthernet0/1.10
description VLAN10
encapsulation dot1Q 10
ip address 172.16.10.1 255.255.255.248
no shutdown
!
interface FastEthernet0/1.20
description VLAN10
encapsulation dot1Q 20
ip address 172.16.20.1 255.255.255.240
no shutdown
!
interface FastEthernet0/1.25
description VLAN10
encapsulation dot1Q 25
ip address 172.16.25.1 255.255.255.248
no shutdown
!
interface FastEthernet0/1.99
description VLAN99
encapsulation dot1Q 99 native
ip address 172.16.99.1 255.255.255.0
no shutdown
!

switch
interface FastEthernet0/13
switchport trunk encapsulation dot1q
switchport trunk native vlan 99
switchport mode trunk
no ip address
!
!
interface vlan99
ip address 172.16.1.2 255.255.255.0
no shutdown
!
ip default-gateway 172.16.99.1
ip http server
!

There is alot of code in the configs so i have cut the sections that relate to inter vlan routing

 
Your SVI needs to be that of the native vlan configured in the router. Also, this will NEVER work without any access ports configured in the switch. One more thing---the "no shut" needs to be on the int fa0/1, the physical interface, not the subinterfaces.

Burt
 
As Burt indicated you have vlan 99 on the switch SVI but the address is in the vlan 1 address range so you can either switch the SVI into vlan 1 or you can change the address on the switch to match the vlan 99 address range and gateway. Once you do this you should be able to ping everything . Make your switch address 172.16.99.X .

 
Does the default gateway on the switch have to be the native vlan ip address on the router?
 
Yes, since the SVI is layer three, and the native vlan is the SVI, and therefore the gateway must be in the same subnet as the SVI. Simply put, that's the IP portion of the switch.

Burt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top