0

enter image description here

hello , i have a question ! how can i connect two pc in different vlan connection together.it must be refer to loopback test and virtual interface. and which techology can i solve this ploblem!THX

i have try set make pc1 port bind to vlan10 and pc2 port bind to vlan20 , and put them to sw1's interface g1/0/2 and sw2's interface g1/0/2.last make sw1's interface g1/0/1 and sw2's interface g1/0/1 connect use a netline and configure two interface to trunk mode.but havn't konw the answer.THX!

6
  • One of your switches must be l3 capable, it is not, you can not be able to ping from one pc located on "vlan x" , to another located on "vlan y" Commented May 14, 2016 at 12:45
  • yes,both switch support L3,and how can i configure,THX
    – chen
    Commented May 14, 2016 at 12:48
  • Can you put your model devices?? Commented May 14, 2016 at 12:50
  • sorry ! in our country we use H3C device , can you give me an example device to solve this ploblem . THX
    – chen
    Commented May 14, 2016 at 12:53
  • and my leader told me to use loopback to test and want me to refer to vlan-interface.are they useful to this ploblem?
    – chen
    Commented May 14, 2016 at 12:58

2 Answers 2

1
  1. Get sw1 and sw2 and define 2 vlans, vlan10 and vlan20.

  2. Enable ip routing on your L3 switches.

  3. Create on one of they, eg, sw1 2 vlan interfaces and set on it, his respective ip address:

interface vlan 10 ip address x.x.10.x 255.255.255.0

interface vlan 20 ip address x.x.20.x 255.255.255.0

  1. On pc connected to vlan 10 access port, declare it gateway like x.x.10.x, and on pc on vlan20 port, x.x.20.x

  2. Declare link between sw1 and sw2 link trunk port.

With this, your vlan communication will work

2
  • thank you for your answer ! and i will test on workdays if have any other ploblems i will consult you!
    – chen
    Commented May 14, 2016 at 13:23
  • No problem, i hope you can solve with this Commented May 14, 2016 at 13:30
-1

Typically you don't set VLAN id on the PC/endpoint. The VLAN is set by the network equipment (switch). You will need a router (sometimes also called a layer 3 switch) in order to route between the VLAN's.

There is something called inter-VLAN bridging where you essentially put both VLAN's in a configuration where each sees the others frames. In this case, the secondary-address would enable you to talk to the other VLAN, provided each VLAN had a corresponding IP subnet associated with it.

3
  • VLAN 10 and 20 are layer-2 isolated. It doesn't matter how many secondary address one adds to the vlan 10 layer-3 interface, nothing in vlan 20 will be able to talk to it.
    – Ricky
    Commented May 14, 2016 at 21:47
  • VLAN10 does talk IP to VLAN20. The corresponding subnets would normally talk via their default gateway (the int VLAN). The secondary ip address is in case they are on a flat network with separated VLANs. Maybe I misunderstood the diagram. Commented May 14, 2016 at 22:44
  • Only if there's a router in there, which there isn't -- or wasn't included in the diagram or question. (which, btw, is his entire question.)
    – Ricky
    Commented May 14, 2016 at 22:51

Your Answer

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

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