communication between 2 VLANS

binarysoulbinarysoul Member Posts: 993
On a simulator, I've a switch that has 2 VLANS. Hosts within each VLAN can ping each other. I used the command "switchport mode trunk vlan 3", but the two VLANs still don't each other.

What do I need to do on the router.

Is it necessary two VLAN on a switch be on different subnet?

Comments

  • KomkommerKomkommer Member Posts: 18 ■□□□□□□□□□
    You need a router with support the same trunk encapsulation protocol as on the switch. (assuming you have a L2 switch, not a L3 switch)

    On your switch then add the commando: switchport trunk encapsulation dot1q (or ISL depending on the model)
    Also add IP adress for each VLAN. (e.g. 192.168.2.2 for VLAN2)

    On your router: add subinterfaces. Add the command: encapsulation dot1Q 2. ("2" as in VLAN 2) Add with each subinterface an according IP address. (e.g. int fa0/0.2 192.168.2.1 for VLAN 2)
  • larkspurlarkspur Member Posts: 235
    What do I need to do on the router.


    the router will require a sub interface on the fast ethernet interface connecting to the switches where teh vlans reside. The sub itn will need to be trunked as the router will handle teh routing between each vlan. This is as known as "router on a stick".
    Is it necessary two VLAN on a switch be on different subnet?

    yes. becasue if you think about one of the purposes of vlans, to logical segment a network, having a subnet would make sense. why else would you need a vlans if you did not require an addtional subnet.

    hth!!
    just trying to keep it all in perspective!
  • freetechfreetech Member Posts: 154
    Think of the two VLANS as people speaking different languages (subnets) and the router as the translator. The two vlans need to use the router and the router needs the vlans in its routing table and all need to use a common trunking protocol. Also the port that lnks to the router from the switch must be a trunk.
    Experience is a harsh teacher. She gives the test first, the lesson afterwards.
  • NetstudentNetstudent Member Posts: 1,693 ■■■□□□□□□□
    Did you try any of the configs I wrote up the other day? here:
    http://www.techexams.net/forums/viewtopic.php?t=28948
    There is no place like 127.0.0.1 BUT 209.62.5.3 is my 127.0.0.1 away from 127.0.0.1!
  • binarysoulbinarysoul Member Posts: 993
    Netstudent wrote:
    Did you try any of the configs I wrote up the other day? here:
    http://www.techexams.net/forums/viewtopic.php?t=28948

    Thanks, that's my next step. I'm actually creating my own scenarios as I find the book materials too rigid, sometimes they miss important stuff. For example, I made all ports members of the same VLAN, but then I didn't know how to remove 5 of them. So, I just made the 5 part of VLAN 1 (where they originally belonged). Is that how one can remove VLAN members, e.g. make them members of VLAN 1?
  • larkspurlarkspur Member Posts: 235
    yep basically remove the switchport access vlan x from the target interface and it will automatically become part of vlan 1 again. All swicthports bt default or until assigned elsewhere are assigned to the default vlan or vlan 1
    just trying to keep it all in perspective!
  • binarysoulbinarysoul Member Posts: 993
    i managed to setup the router and the switch and 2 vlans. The router can ping hosts in both VLANS, but the VLANs still don't communicate to one another. Router is 2600 and switch is 2950 and dot1q is enabled.
  • NetstudentNetstudent Member Posts: 1,693 ■■■□□□□□□□
    Make sure the switchport connected to the router is trunking. Can the hosts ping thier default gateway? Make sure the hosts connected to the VLAN switchport has an IP address from the correct subnet for that vlan. The host's default gateway should be the router's subinterface IP. Double check your router's subinterface configuration command, "encap dot1q X" and make sure the right subnets are linked with the correct vlan. Can you post running configs?
    There is no place like 127.0.0.1 BUT 209.62.5.3 is my 127.0.0.1 away from 127.0.0.1!
Sign In or Register to comment.