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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Interface in vlan question 1

Status
Not open for further replies.

marcq

Technical User
Aug 18, 2011
34
PL
Hello. Please correct me if I'm wrong or confirm that I'm right.
If I have two linux machines. Each of two machines have one phisical interface connected to the same switch.
Now. Both machines have (two) vlans defined on it's interface (let's say 10 and 20). Addressing assigned on it's interfaces accordingly from two different subnets. If switch is not configured but default. Can both nodes from now on see each other on the vlans? In other words. For example. If ping is executed on machine a using ip of machine b assigned in vlan 10 - is it successfull?
 
VLAN 10 will not see VLAN 20. They are in 2 separate subnets and you would need either a router or layer 3 switch to communicate between these machines.

Dan
 
Dan.
I will try to be more specific.
Machine a has:
eth1.10 IP:x.x.x.a
eth1.20 IP:y.y.y.a
Machine b has
eth1.10 IP:x.x.x.b
eth1.20 IP:y.y.y.b

Machine a is connected eth1 to swX:p1
Machine b is connected eth1 to swX:p2

eth1.10 on a and eth1.10 on b should see each other?
eth1.20 on a and eth1.20 on b should see each other?

And then what if beeing on a I will ping x.x.x.b or y.y.y.b
Does traffic goes out through eth1 with correct source IP reaching its destination?
(Sorry I don't have where to test it.)







 
So you have 1 physical Interface on each box with one IP plumbed on the interface and one IP configured on the virtual interface?

They are all plugged into the same Switch (not a hub) that has no VLAN's configured (just a simple switch port)?

Then

Assuming you have correct routing tables on your hosts (so that they use the correct address to route out of for the host you are pinging & that host reply's back using the correct address to reply) then; both your x.x.x.a/b interfaces should be able to talk to each other as should both of your y.y.y.a/b interfaces be able to talk to each other.

That is also assuming that the "netmasks" for your interfaces and IP range is correctly configured within scope of each other.

You can also bypass the routing tables with ping -r see your man pages for ping.

If you are asking the questions rather actually testing on the machines that's the best I can offer. However if you have access to both machines then I suggest that you snoop/tcpdump while testing to identify what's occurring and you will learn so much more.

Good Luck
Laurie.
 
Hi.
Thank you for answer.
It is what I was assumed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top