show ip of VLANs?

mguymguy Member Posts: 167 ■■■□□□□□□□
edited May 2020 in CCNA & CCENT
Is there a switch command that show the IP networks of the VLANs in a switch?

I would just do a show run and see the ip and netmask for the interface configured of a VLAN member (and reverse engineer it).

But there must be another way..

Comments

  • MAC_AddyMAC_Addy Member Posts: 1,740 ■■■■□□□□□□
    sh ip int br (show ip interface brief) will show all VLANs on a layer 3 switch
    2017 Certification Goals:
    CCNP R/S
  • drkatdrkat Banned Posts: 703
    to add to what MAC_Addy already stated

    show ip interface brief - will give you the IP address information of ANY layer 3 interface - so this is a very helpful command to remember..
  • ZartanasaurusZartanasaurus Member Posts: 2,008 ■■■■■■■■■□
    sh ip int br | i Vlan

    Currently reading:
    IPSec VPN Design 44%
    Mastering VMWare vSphere 5​ 42.8%
  • ZartanasaurusZartanasaurus Member Posts: 2,008 ■■■■■■■■■□
    sh ip arp Vlan# will give you the IPs that are active in that VLAN as well.
    Currently reading:
    IPSec VPN Design 44%
    Mastering VMWare vSphere 5​ 42.8%
  • mguymguy Member Posts: 167 ■■■□□□□□□□
    sh ip int brief

    doesn't give you the mask of the vlan. what if i wanted to know the IP address of the gateway of the vlan? How do I go about doing that?
  • mguymguy Member Posts: 167 ■■■□□□□□□□
    if im asked what is the ip add of the default-gateway (given it is the first host in the subnet) of VLAN 1?

    show int vlan 1

    *get the mask and get the answer there
  • spd3432spd3432 Member Posts: 224
    Default gateway may not be first host in the subnet. That would be a design thing. The architect may decide that using a /24 mask, all router interfaces would be .250 - .254. Back to your statement though, I don't have any switches around me, but I believe the default gateway is defined outside the vlan database (it applies to the switch, not a particularly vlan) so perhaps "sh ip default-gateway" would work.
    ----CCNP goal----
    Route [ ] Studying
    Switch [ ] Next
    Tshoot [ ] Eventually
  • mguymguy Member Posts: 167 ■■■□□□□□□□
    spd3432 wrote: »
    Default gateway may not be first host in the subnet. That would be a design thing. The architect may decide that using a /24 mask, all router interfaces would be .250 - .254. Back to your statement though, I don't have any switches around me, but I believe the default gateway is defined outside the vlan database (it applies to the switch, not a particularly vlan) so perhaps "sh ip default-gateway" would work.


    I'm not finding this command. Anyone?
  • spd3432spd3432 Member Posts: 224
    mguy,

    I checked two places -- packet tracer and a physical switch (Catalyst 2924xl).
    Packet tracer -- "show ip default-gateway" returns a ^ under the 'd' indicating syntax error.
    Physical switch -- "show ip default-gateway" returns the address that I'd assigned (and is displayed in the running-config).
    ----CCNP goal----
    Route [ ] Studying
    Switch [ ] Next
    Tshoot [ ] Eventually
  • vrekvrek Registered Users Posts: 1 ■□□□□□□□□□
    Show run has the default gateway of a switch.
  • xXErebuSxXErebuS Member Posts: 230
    sh run interface vlan###
  • xXErebuSxXErebuS Member Posts: 230
    the default gateway of a switch maynot be the default gateway for the vlan in question
Sign In or Register to comment.