How can I find the VLAN IP for a host? I have a Linux machine and as an example my host name is vhtask01 and IP address is 10.10.20.1. Now how can I find out which VLAN the server is in, what up network the machine is and what is the VLAN IP for this particular machine?
-
What's an "Up" network? ;) Perhaps check these questions out: [Difference between LAN and VLAN](http://superuser.com/questions/242227/difference-between-lan-and-vlan?rq=1) and [What is the difference between a VLAN and a subnet?](http://superuser.com/questions/353664/what-is-the-difference-between-a-vlan-and-a-subnet?rq=1) – Ƭᴇcʜιᴇ007 Nov 09 '12 at 14:24
3 Answers
I think you are confusing several things.
you already have your IP address, which is part of a subnet. by combining the IP address and the subnet mask you can determine what network you are on, and what the broadcast and root addresses are for that network.that network itself is the VLan. there is no separate VLAN IP (are you sure you're not thinking about VPN or NAT?). VLans are defined by network hardware (routers or L3 Switches) and are almost completely invisible to the client. they are just a way to have lots of small networks without having lots of different routers and switches dedicated to each small network.
- 35,097
- 3
- 77
- 98
-
-
yes i am sorry, what i meant was the VLAN ID , can you tell me how can i find the vlan id in a machine? Thanks again – armin Nov 09 '12 at 14:38
-
2I'm not sure it's possible from the machine, you'll have to look on the switch. But what are you going to do with this information? – pjc50 Nov 09 '12 at 14:44
-
pjc50 is correct, there is no way to see the VLAN ID from a host. the host doesn't know whether its on a real lan segment or a virtual one, which is key to making the technology work. – Frank Thomas Nov 09 '12 at 15:06
Without logging into the switch you can see the switch port, VLAN ID and switch hostname or MAC with a tools like those from Fluke or netscout. If these devices can see this info I don't know why any device connecting the same way couldn't do the same.
- 101
Run ifconfig (or ipconfig on Windows) on the Server.
- 118
- 1
- 14
-
2`ifconfig` is deprecated, especially considering funky setups like vlans. Use `ip addr` instead. – BatchyX Nov 09 '12 at 15:34