1

So I have this problem in trunking that the outside hosts cant ping one another. Here is my configuration please help me and what network should I put in my OSPF?

enter image description here

VLAN Number - Port assignment

10 - Fa0/4
20 – Fa0/3, Fa0/1   
30 - FA0/2  
60 - VLAN 60    

Switch 0:

vlan 10
name Servers
!
vlan 20
name PC1, PC4
!
vlan 30
name Native
!
vlan 60
name Management
!
int f0/4
 sw mode access
 sw access vlan 10
!
int f0/3
 sw mode access
 sw access vlan 20
!
int f0/1
 sw mode access
 sw access vlan 20
!
int f0/2
 sw mode access
 sw access vlan 30
!
int vlan 60
 ip add 172.20.0.209 255.255.255.248
 no shut
!
ip default-gateway 172.20.0.1
!
int f0/2
 sw mode trunk
 sw trunk allowed vlan 10,20,30,60
!
3
  • 1
    You need to include the router configuration. Routing from one VLAN to another happens on a router, not a switch. A single router doesn't need OSPF.
    – Ron Maupin
    Dec 1, 2015 at 18:27
  • To clarify, what @RonMaupin means is layer 2 switches cannot route between VLANs, though layer 3 switches can. In regards to your question, you're going to have to provide a lot more information. Which are the "outside hosts", which devices (routers & switches) are you trying to configure OSPF on?
    – OzNetNerd
    Dec 1, 2015 at 23:50
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide your own answer and accept it.
    – Ron Maupin
    Aug 7, 2017 at 15:30

2 Answers 2

4

you really should start reading a bit more about what you're doing. A VLAN is a broadcast domain, so computers on separate VLANs are unable to communicate without the intervention of a routing device. Any device that supports Layer 3 routing, such as a router or a multilayer switch, can be used to perform the necessary routing functionality. Regardless of the device used, the process of forwarding network traffic from one VLAN to another VLAN using routing is known as inter-VLAN routing.

I will show you an example:

Inter-Vlan Router on a stick

This called a Router-on-a-Stick, if you ping from PC1 to PC2 it goes through the router. You need to configure the VLANs on the subinterfaces on the router.

interface GigabitEthernet0/0.10
 encapsulation dot1Q 10
 ip address 172.20.0.1 255.255.255.128
!
interface GigabitEthernet0/0.20
 encapsulation dot1Q 20
 ip address 192.168.0.1 255.255.255.0

This is my subinterface configuration on the router.

With the router-on-a-stick option, appropriate IP addressing and VLAN information must be configured on each logical subinterface and a trunk encapsulation must be configured to match that of the trunking interface of the switch.

0

In case you're using Layer 3 device, you should start by enabling the routing on L3 device, than configure for each VLAN a SVI (Switch Virtual Interface):

ip routing
interface Vlan 10
 ip address 172.20.0.1 255.255.255.128
!
interface Vlan 20
 ip address 192.168.0.1 255.255.255.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.