Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Why does a VLAN have an IP address?
A dumb question for the majority, but I am interested to know "why does a VLAN have an IP address?"
Is this address different from the default gateway? Or is this address, same as broadcast address for this VLAN?
IP address 192.168.4.100 255.255.255.0
- What kind of hardware are you talking about? – Bill Weiss Commented Mar 2, 2010 at 21:56
- This is part of configuring a vlan on a netgear switch, after enabling routing on the vlan. – RainDoctor Commented Mar 2, 2010 at 22:15
7 Answers 7
I believe this is merely an IP address for the VLAN-aware device that happens to be on that VLAN. You need it if the device in question is going to be doing routing involving that VLAN, or if you expect to manage the device (ie through SNMP) on that VLAN.
(after your update) I see you are enabling routing through the Netgear switch this VLAN is defined on. This IP is the address that local systems will use as the router.
A VLAN doesn't have an IP address. It's the devices communicating on the VLAN which have IP addresses
- 6 +1 - A vlan (an 802.1q vlan anyway) in and of itself doesn't have any IP addresses: It's an ethernet-header-level thing and doesn't much care what you're running on top of it (IP, IPX/SPX, whatever). VLAN-aware devices tend to be managed devices though, and they usually have IP addresses like David said in the other answer. – voretaq7 Commented Mar 2, 2010 at 20:30
You can think of a VLAN as a network if that helps. So where I work we have all kinds of networks, ones for PLCs, Servers, Networking Devices, Wireless, etc. To make things easy with our networking environment we created VLANs for each one of these. This way we can have multiple devices from each main category connected to any switch we want but we can have that device in it's own VLAN.
In other words, without VLANs you would need a lot more networking devices because each access layer switch would have to be on it's own network, just like your home network. Any switch(es) you plug into your router or modem at home is going to be on the same network. With VLANs we can plug a server, PLC, regular user, and wireless AP into the same switch if needed and still have them all be in their respective VLANs.
VLANs themselves do not have IPs assigned to them like computers and servers do. Instead they are assigned networks. Which is why many people exchange the word VLAN for network and vice versa. So at home your probably have a 192.168.0.0 255.255.255.0 network or something similar. Well for VLANs we do the same thing...
We might assign 192.168.1.0 255.255.255.0 to servers, 192.168.2.0 255.255.255.0 to PLCs, 192.168.3.0 255.255.255.0 to regular users, and 192.168.4.0 255.255.255.0 to wireless. This means a server will get a different IP than a PLC, etc. Thus our segregation with VLANs. And if you understand how IPs and Subnet masks work, you will know that each VLAN above will have its own network and communication and be separate from each other.
Your IP you mentioned above, 192.168.4.100 255.255.255.0, is likely an IP within a VLAN and not a gateway for that VLAN or anything like that. Typically the gateway is the first or last usable IP in the network range but it doesn't have to be. The broadcast address is always the last IP in the range and can never be assigned to anything, in your case the broadcast IP would be 192.168.4.255.
I hope this ramble helps...
From the wikipedia (since it says it well):
Virtual LANs are essentially Layer 2 constructs, compared with IP subnets which are Layer 3 constructs. In an environment employing VLANs, a one-to-one relationship often exists between VLANs and IP subnets, although it is possible to have multiple subnets on one VLAN or have one subnet spread across multiple VLANs. Virtual LANs and IP subnets provide independent Layer 2 and Layer 3 constructs that map to one another and this correspondence is useful during the network design process.
The IP address the OP listed as:
ip address 192.168.4.100 255.255.255.0
This would indeed be the IP addressed assigned to the VLAN itself. Specifically, it is the IP address of the "switch" the VLAN is on. It doesn't necessarily have to be the gateway IP for the VLAN but typically is since you typically setup IP addresses on the VLAN at the Layer 3 "router" for the VLAN and thus use this IP address for the gateway for clients on that VLAN. The Layer3 switch will have IP routing/forwarding enabled if necessary.
The mask basically says that the VLAN is the 192.168.4.0/24 network. It's up to you to decide if you want to actually use the 192.168.4.100 as the actual client gateway IP or if this is simply a management IP for the switch/vlan.
For most Level 3 switches out there, the line you specified represents the gateway address of the VLAN.
Don't confuse it with default gateway, which only applies when routing is turned OFF.
Informally, yes, a VLAN can have an IP address. Technically this is called a VLAN interface, as you configure it from interface configuration mode and it will be listed in the config as interface VLAN 100 (example). These are virtual interfaces (not physical ports) and are named "VLAN #"
On a layer two switch you are generally limited to only having one active VLAN interface. On a multilayer switch there can be multiple. These VLAN interfaces are virtual interfaces and can be pinged as well as provide the connection point for remote management. This IP address can only be used as the default gateway on a multilayer switch.
A VLAN (Virtual Local Area Network) is its own logically segregated broadcast domain. You assign networks, or subnets, just as you would with a physically separated broadcast domain.
@TheCleaner:
This would indeed be the IP addressed assigned to the VLAN itself
VLANs do not really have IP addresses assigned to them. They have a network assigned to them, or a subnet, or a network range, however you want to refer to it. The address the OP supplied us is an assignable address within the range of 192.168.4.1-255. So lets say the range is applied to a group of servers so on a Cisco switch and we give the VLAN a description of "Server VLAN", 4.100 would be an address that can be given to an individual server. When referring to the Server VLAN, generally one may use the VLAN number or the network address, but typically not a specific address and the whole mask. At least the network admins I work with do not.
As I mentioned above, the OPs address can be a gateway address, but typically would not be because when you think of an environment like a large corporation, if you do not have a system of how gateway addresses are assigned, keeping track of them can be rather difficult. Thus most network admins use the first or last assignable address of a given range for the gateway. In the case of the OP, that would be 192.168.4.1 or 192.168.4.254. I'm not saying this is always the case, rather best practice and generally makes the most sense.
Specifically, it is the IP address of the "switch" the VLAN is on. It doesn't necessarily have to be the gateway IP for the VLAN but typically is since you typically setup IP addresses on the VLAN at the Layer 3 "router" for the VLAN and thus use this IP address for the gateway for clients on that VLAN.
This statement is confusing to me. We don't know anything about the address the OP gave us except the range it exists in, because the OP never said on what device it was found. We do not know if it is the address of a switch, a server, an AP, a computer, a printer, etc. So how you would know that from the small post from the OP wrote is beyond me.
I agree it doesn't have to be the gateway and I have already mentioned this. As I already explained, when you look at most large companies (but this is Cisco's best practice and is usually applied to most businesses) you actually find that gateway addresses will be the last or first assignable address in a range. 4.100 would be in the middle and would make no sense to be a gateway address. While some network admins might assign it that way, keeping track of this would be cumbersome, especially in increasing network sizes. This becomes even more true when HSRP and such technologies are used which take up two address on each layer 3 interface and give out a third address for the gateway. Keeping track of hundreds of such gateways when HSRP is being used becomes very difficult if there isn't a system for assigning addresses. Think of a company that might have 100 different VLANs...
- 1 @"this statement is confusing to me"...the OP clarified in his comments that it was an IP on the netgear switch...that's how I knew. – TheCleaner Commented Mar 7, 2010 at 2:49
- Yes he did, I just saw that. With a /24 I have to say that is an odd IP to use as a mask. I know some home routers can configure themselves that way, but in a business environment it seems to make more sense to stick to the last or first usable IP of a range. – Webs Commented Mar 9, 2010 at 16:24
You must log in to answer this question.
Not the answer you're looking for browse other questions tagged networking ip-address vlan ..
- The Overflow Blog
- Legal advice from an AI is illegal
- Featured on Meta
- The December 2024 Community Asks Sprint has been moved to March 2025 (and...
- Stack Overflow Jobs is expanding to more countries
Hot Network Questions
- How to reject Host header if different than URL of request in Apache?
- Ideal diode circuit resistor ratio
- Tikz: access a color defined in hex format out of list?
- Snowshoe design for satyrs and fauns
- What are the main views on the question of the relation between logic and human cognition?
- How many rings does cubane have?
- Is it normal to connect the positive to a fuse and the negative to the chassis
- Is it normal for cabinet nominees to meet with senators before hearings?
- Why are straight-in approaches dangerous at uncontrolled airfields?
- PSE Advent Calendar 2024 (Day 17): The Sun Will Come Out Tomorrow
- Joining two lists by matching elements of the two
- How to buy residential realty, without conveying purchase money to any lawyer’s trust account?
- Should I remove the ground plane under AC traces in my PCB?
- Brain ship 'eats' hijacker
- Are there actual correct representations of curved spacetime?
- How to use `\let` with body-capturing inside `\NewDocumentEnvironment`?
- Does a denser feedback function in LFSRs improve security for known feedback LFSR stream ciphers?
- In CMBR anisotropy experiments like Boomerang, how do we know the true spacing of hot spots in the CMB?
- I was given a used road bike, should I be concerned about the age of the frame, and can I replace it and reuse the other parts?
- Is SQL Injection possible if we're using only the IN keyword (no equals = operator) and we handle the single quote
- Why am I not seeing continuity between MC cable sheathing and ground wires?
- A sad-looking tree with a secret
- Is "the book" mentioned in Daniel 12:1 the same as the Book of Life in Revelation?
- Is there an English equivalent of Arabic "gowatra" - performing a task with none of the necessary training?
Log in to ask questions, share your expertise, or stay connected to content you value. Don’t have a login? Learn how to become a member .
- Terms and Conditions
- Communities
- Community Home
- Topic Thread
- Discussion 11.7K
- Library 225
- Members 1.3K
How do I assign IP addresses to each of my VLANs?
Erdem 06-25-2018 08:12
smanju 06-25-2018 11:08 Best Answer
1. how do i assign ip addresses to each of my vlans.
Forgive me, I'm very new to JunOS. On ArubaOS I was able to assign IP addresses to VLANs like this:
(vlan100)#ip address 172.16.4.3 netmask 255.255.255.0
(vlan100)#exit
(vlan 200)#ip address 172.16.5.3 netmask 255.255.255.0
And so on. I'm trying to look for the equivalent way to configure this in JunOS. I need to assign IP addresses to a couple different VLANs. How can I accomplish this? I believe the idea is that I need to assing inet to the unit #, but I'm not sure how a unit # differs from a VLAN on JunOS.
To be clear, I do not want the switch to do the routing, I want the routing to happen at my firewall on port 23.
Here's my interface config:
2. RE: How do I assign IP addresses to each of my VLANs? Best Answer
A vlan on a juniper switch is its own boadcast domain. It groups all devices into a specific (vlan) group as per the vlan membership of the interface on the switch through which the devices are connected.
Whenever there is a need to split a interface into multiple sub interfaces then the unit # is referenced. A unit number identifies the particular subinterface of the main interface. JunOS supports 4094 logical subinterfaces per main interface. As a general practise it is recomended to use vlan id as the unit number for better clarity and visibility of the configuration/network.
In your case you can use irb to configure ip address to the vlans on the switch. However the switch does routing for the packets which are have gateway/nexhop as the vlan ip address on the switch. You can still point to the Firewall ip address connected to switch port 23 as the gateway for the hosts in your network so that your routing is performed by the firewall.
Following is an example vlan configuration.
set vlans vlan100 vlan-id 100
set vlans vlan100 l3-interface irb.100
set interfaces irb unit 100 family inet address 172.16.4.3/24
set interfaces ge-0/0/5 unit 0 family ethernet-switching vlan members vlan100
set interfaces ge-0/0/23 unit 0 family ethernet-switching interface-mode trunk set interfaces ge-0/0/23 unit 0 family ethernet-switching vlan members vlan100
In the above configuration the traffic from port ge-0/0/5 will be switched to interface ge-0/0/23 as long as the default gateway for the device connected on port ge-0/0/5 is set to Firewall ip address connected to port ge-0/0/23.
Please refer to the following documentation for further details.
https://www.juniper.net/documentation/en_US/junos/topics/concept/interfaces-layer3-subinterfaces-ex-series.html
https://www.juniper.net/documentation/en_US/junos/topics/reference/configuration-statement/vlan-id-edit-interfaces-interfaces-ex-series.html
https://www.juniper.net/documentation/en_US/junos/topics/example/interfaces-layer3-subinterfaces-ex-series.html
https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/bridging-vlans-ex-series-cli.html
New Best Answer
VLAN Configuration Commands Step by Step Explained
Switches do not understand broadcast messages. They forward them from all ports. VLAN is a switch feature. It allows us to create a group of devices that share broadcast messages.
We use the vlan command in global configuration mode to create a new VLAN or to update an existing VLAN. We use the switchport mode access vlan command in the interface configuration mode of a port to assign it to a VLAN.
Let's take an example to understand how to use these commands on Cisco switches.
Create a Packet Tracer lab as shown in the following image.
I explained the steps to create this practice lab in the following tutorial.
VLAN Practice Lab Setup in Packet Tracer
Packet Tracer is a network simulator software. You can download it from the following link.
Download Packet Tracer
In this lab, we have three switches and six PCs. Each switch has a connection to two PCs. All PCs have IP configurations. Three PCs have an IP configuration from the network 10.0.0.0/8, and the remaining three have an IP configuration from the network 20.0.0.0/8. The lab also has a router to provide connectivity between VLANs.
Configuring VLANs on switches
We will configure two VLANs in this network: VLAN-10 and VLAN-20 . We will use VLAN-10 for the network 10.0.0.0/8. We will use VLAN-20 for the network 20.0.0.0/8. We will keep one PC from each switch in a VLAN.
Access the first switch's CLI prompt. Enter global configuration mode and use the vlan command to create a new VLAN. This command needs a VLAN number as an argument. It checks the specified VLAN number for an existing VLAN before creating a new VLAN. If it finds an existing VLAN having the specified number, it does not create a new VLAN. It enters VLAN configuration mode for the existing VLAN. If it does not find an existing VLAN having the specified number, it creates a new VLAN and enters VLAN configuration mode for the new VLAN.
VLAN configuration mode allows us to configure additional options such as name and RSPAN . In a basic configuration, we do not need to configure these options. Use the exit command to exit VLAN configuration mode.
The following commands create VLAN-10.
The following commands create VLAN-20.
Since all three switches have PCs in these VLANs, you need to run the above commands on all switches.
After creating VLANs, we need to assign them to the switch ports. The switchport mode access vlan command assigns a VLAN to the switch port. It accepts a VLAN number as an argument. It runs in the interface configuration mode of the port. It assigns the specified VLAN number to the port. The device connected to the port becomes a member of the specified port.
The following commands make the device connected to port-1 a member of VLAN-10 .
The following commands make the device connected to port-2 a member of VLAN-20 .
You need to run the above commands on all switches.
A switch port can work in two modes: access and trunk. In access mode, it works with a single VLAN. In trunk mode, it works with multiple VLANs.
Access mode is the default mode on all switch ports. If you connect an end device to a switch port, you do not need to change the default mode. But if you connect a switch port to another switch port, you need to change the default mode to trunk mode on both ports.
Change default mode to trunk mode on ports you used to connect switches. Use the switchport mode trunk command to change the default mode. Run this command in the interface configuration mode of the port.
The following commands change the default mode to trunk mode on GigabitEtherent 0/1 .
The following commands change the default mode to trunk mode on GigabitEtherent 0/2 .
Run the above commands on all switches.
Testing and verifying VLANs
To test and verify VLAN configuration, you can check connectivity between PCs in the same VLAN.
Click the PC icon, click Desktop , and click Command prompt . Use the ping command to test connectivity.
PC0 is a member of VLAN-10. As we can see in the above image, it has connectivity with PC2 and PC4. PC2 and PC4 are other members of VLAN-10.
Similarly, you can also test connectivity between PC1, PC3, and PC5. These are members of VLAN-20.
PCs in the same VLAN have connectivity. It verifies VLAN configuration.
Connecting different VLANs
VLANs are logical subnets. PCs in different VLANs do not have connectivity. To provide connectivity between different VLANs, you need to configure a router. The last tutorial in this tutorial series explains how to configure a router to provide connectivity between different VLANs.
This tutorial is a part of the tutorial series on VLAN, VTP, and DTP Concepts and Configurations on Cisco Routers. Other parts of this series are the following.
Chapter 01 VLAN Basic Concepts Explained with Examples
Chapter 02 Advantages and Disadvantages of VLANs
Chapter 03 Static and Dynamic VLAN Membership Explained
Chapter 04 Access Link and Trunk Link Explained
Chapter 05 VLAN Tagging Explained with DTP Protocol
Chapter 06 DTP Modes and Protocol Explained
Chapter 07 802.1Q Native VLAN concept Explained
Chapter 08 Cisco Inter-Switch Link (ISL) Explained
Chapter 09 Trunk Tagging and Frame Tagging Explained
Chapter 10 VTP Modes and VTP Protocol Explained
Chapter 11 VTP Pruning on switches Explained
Chapter 12 VLAN Practice Lab Setup in Packet Tracer
Chapter 13 Configure VTP Server and Client in Switch
Chapter 14 VLAN Configuration Commands Step by Step Explained
Chapter 15 Router on Stick Configuration Explained
That's all for this tutorial. In this tutorial, we learned how to configure, test, and verify VLANs on switches.
By ComputerNetworkingNotes Updated on 2024-10-13
ComputerNetworkingNotes CCNA Study Guide VLAN Configuration Commands Step by Step Explained
- EtherChannel Load Distribution Explained
- Link Aggregation Control Protocol (LACP) Explained
- Port Aggregation Protocol (PAgP) Explained
- EtherChannel Manual Configuration
- EtherChannel Basic Concepts Explained
- STP, RSTP, PVST, RPVST, and MSTP
- Similarities and Differences between STP and RSTP
- RSTP / RPVST Explained with Examples
- PVST/RPVST and EtherChannel Explained
- STP/RSTP Timers Explained
We do not accept any kind of Guest Post. Except Guest post submission, for any other query (such as adverting opportunity, product advertisement, feedback, suggestion, error reporting and technical issue) or simply just say to hello mail us [email protected]
Legal Disclaimer : The resource assets in this website may include abbreviated and/or legacy terminology for HPE Aruba Networking products. See www.arubanetworks.com for current and complete HPE Aruba Networking product lines and names.
Assign an IP Address to a VLAN
A VLAN Virtual Local Area Network. In computer networking, a single Layer 2 network may be partitioned to create multiple distinct broadcast domains, which are mutually isolated so that packets can only pass between them through one or more routers; such a domain is referred to as a Virtual Local Area Network, Virtual LAN, or VLAN. on the managed device obtains its IP address in one of the following ways:
- You can manually assign a static IP address to a VLAN Virtual Local Area Network. In computer networking, a single Layer 2 network may be partitioned to create multiple distinct broadcast domains, which are mutually isolated so that packets can only pass between them through one or more routers; such a domain is referred to as a Virtual Local Area Network, Virtual LAN, or VLAN. . This is the default method and is described in Assigning a Static IP Address to a VLAN . At least one VLAN Virtual Local Area Network. In computer networking, a single Layer 2 network may be partitioned to create multiple distinct broadcast domains, which are mutually isolated so that packets can only pass between them through one or more routers; such a domain is referred to as a Virtual Local Area Network, Virtual LAN, or VLAN. on the managed device must be assigned a static IP address.
- Dynamically assigned from a DHCP Dynamic Host Configuration Protocol. A network protocol that enables a server to automatically assign an IP address to an IP-enabled device from a defined range of numbers configured for a given network. or PPPoE Point-to-Point Protocol over Ethernet. PPPoE is a method of connecting to the Internet, typically used with DSL services, where the client connects to the DSL modem. server. This is described in Configuring a VLAN to Receive a Dynamic Address .
- Skip to content
- Skip to search
- Skip to footer
Configure VLAN Interface IPv4 Address on an Sx350 or SG350X Switch through the CLI
Available languages, download options.
- PDF (641.2 KB) View with Adobe Reader on a variety of devices
- ePub (739.7 KB) View in various apps on iPhone, iPad, Android, Sony Reader, or Windows Phone
- Mobi (Kindle) (511.8 KB) View on Kindle device or Kindle app on multiple devices
Bias-Free Language
The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
The switch can have multiple IP addresses and can be configured either on a port, a Link Aggregation Group (LAG), a Virtual Local Area Network (VLAN), or a loopback interface. If a switch does not have a Dynamic Host Configuration Protocol (DHCP) server then the IP address needs to be assigned statically. The switch routes traffic between the directly-attached IP subnets configured on the device and continues to bridge traffic between devices in the same VLAN. Traffic is routed by the device in layer 3 mode.
This article provides instructions on how to configure VLAN interface IPv4 address on the switch through the Command Line Interface (CLI).
Note: To learn how to configure VLAN on your switch, click here . For instructions on how to configure IPv4 management interfaces on the switch, click here .
If you are unfamiliar with terms in this document, check out Cisco Business: Glossary of New Terms .
Applicable Devices
- Sx350 Series
- SG350X Series
Software Version
Configure vlan interface ipv4 address.
Important : When the switch is in a stacking mode with a Standby switch present, it is recommended to configure the IP address as a static address to prevent disconnecting from the network during a Stacking Active switchover. This is because when the standby switch takes control of the stack, when using DHCP, it might receive a different IP address than the one that was received by the original active-enabled unit on the stack.
Step 1. Log in to the switch console. The default username and password is cisco/cisco. If you have configured a new username or password, enter the credentials instead.
Note: To learn how to access an SMB switch CLI through SSH or Telnet, click here .
Note: The commands may vary depending on the exact model of your switch. In this example, the SG350X switch is accessed through Telnet.
Step 2. From the Privileged EXEC mode of the switch, enter the Global Configuration mode by entering the following:
Step 3. To enable IP routing on the switch, enter the following:
Note: If you want to configure VLAN mapping on your switch, you must disable this feature.
Step 4. (Optional) To disable IP routing on the switch, enter the following:
Step 5. In the Global Configuration mode, enter the Interface Configuration context by entering the following:
- interface-id — Specifies an interface ID on which IP addresses are defined.
Note: In this example, vlan 20 is used.
Step 6. Enter the IP address and the corresponding network mask of the interface:
Note: In this example, the IP address configured is 192.168.100.66 with 255.255.255.224 as subnet mask.
Step 7. Enter the exit command to go back to the Global Configuration context:
Step 8. (Optional) Repeat steps 5 to 7 to configure more interfaces.
Note: In this example, vlan 30 and vlan 40 are configured.
Step 9. Enter the end command to go back to the Privileged EXEC mode:
You should now have successfully configured the VLAN interface IPv4 addresses on your switch through the CLI.
Display VLAN IPv4 Interfaces
Step 1. To display the usability status of configured IP interfaces, enter the following:
The IPv4 Interface table contains the following information:
- IP Address — The Unit or interface for which the IP address is defined. This can also be a loopback interface.
- I/F — The name of the specific interface.
- I/F Status: admin/oper — Displays the administrative and operational status of the interface.
- Type — The IP address type. The available options are:
- DHCP — Received from Dynamic Host Configuration Protocol (DHCP) server.
- Static — Entered manually. Static interfaces are non-DHCP interfaces that are created by the user.
- Default — The default address that exists on the device by default, before any configurations have been made.
- Directed Broadcast — The status of the translation of a directed broadcast to physical broadcasts on the interface.
- Prec — The status if source precedence is supported on the interface.
- Redirect — The interface status of sending of Internet Control Message Protocol (ICMP) redirect messages to resend a packet through the same interface on which the packet was received.
- Status — Results of the IP address duplication check.
- Tentative — There is no final result for the IP address duplication check.
- Valid — The IP address collision check was completed, and no IP address collision was detected.
- Valid-Duplicated — The IP address duplication check was completed, and a duplicate IP address was detected.
- Duplicated — A duplicated IP address was detected for the default IP address.
- Delayed — The assignment of the IP address is delayed for 60 seconds if DHCP Client is enabled on startup in order to give time to discover DHCP address.
- Not Received — Relevant only for DHCP Address. When a DCHP Client starts a discovery process, it assigns a dummy IP address 0.0.0.0 before the real address is obtained. This dummy address has the status of Not Received.
Step 2. (Optional) To display the details of a specific interface, enter the following:
- interface-id — The interface ID on which IP addresses are defined.
Step 3. (Optional) In the Privileged EXEC mode of the switch, save the configured settings to the startup configuration file, by entering the following:
Step 4. (Optional) Press Y for Yes or N for No on your keyboard once the Overwrite file [startup-config]… prompt appears.
You should now have displayed the IP management interface details on your switch through the CLI.
Access the VLAN Interface IPv4 Address
Step 1. To access the CLI of the configured switch interface, enter the IP address in the client that you are using. In this example, PuTTY is used.
Note: Make sure that your computer is connected on the same VLAN as the switch interface. In this example, 192.168.100.66 is entered.
The CLI of the switch should be accessible.
Step 2. (Optional) To access the web-based utility of the interface, enter the IP address on your web browser.
You should now have successfully accessed the CLI or the web-based utility of the switch using the VLAN interface IPv4 address.
Note: To learn how to configure additional IPv4 routes for routing to non-directly attached subnets through the CLI of the switch, click here .
Revision History
Was this document helpful.
Contact Cisco
- (Requires a Cisco Service Contract )
S1720, S2700, S5700, and S6720 V200R011C10 Configuration Guide - Ethernet Switching
This document describes the configuration of ethernet services, including configuring link aggregation, vlans, voice vlan, vlan mapping, qinq, gvrp, mac table, stp/rstp/mstp, sep, and so on..
- About This Document
- Ethernet Switching Features Supported in This Version
- Ethernet Switching
- MAC Address Table Configuration
- Link Aggregation Configuration
- Overview of VLANs
- Understanding VLANs
- Application Scenarios for VLANs
- Summary of VLAN Configuration Tasks
- Licensing Requirements and Limitations for VLANs
- Default Settings for VLANs
- Configuring VLANs
- Maintaining VLANs
- Example for Configuring Interface-based VLAN Assignment (Statically Configured Link Type)
- Example for Configuring Interface-based VLAN Assignment (LNP Dynamically Negotiates the Link Type)
- Example for Configuring MAC Address-based Assignment (the Switch Connects to Downstream Terminals)
Example for Configuring IP Subnet-based VLAN Assignment
- Example for Configuring Protocol-based VLAN Assignment
- Example for Configuring VLANIF Interfaces to Implement Inter-VLAN Communication
- Example for Configuring VLANIF Interfaces to Implement Intra-VLAN Communication
- Example for Configuring VLANIF Interfaces to Implement Communication of Hosts on Different Network Segments in the Same VLAN
- Example for Configuring a Traffic Policy to Implement Inter-VLAN Layer 3 Isolation
- Example for Configuring an mVLAN to Implement Remote Management
- Example for Configuring Transparent Transmission of Protocol Packets in a VLAN
- Troubleshooting VLANs
- FAQ About VLANs
- VLAN Aggregation Configuration
- MUX VLAN Configuration
- VLAN Termination Configuration
- Voice VLAN Configuration
- QinQ Configuration
- VLAN Mapping Configuration
- GVRP Configuration
- VCMP Configuration
- STP/RSTP Configuration
- MSTP Configuration
- VBST Configuration
- SEP Configuration
- RRPP Configuration
- ERPS (G.8032) Configuration
- LBDT Configuration
- Layer 2 Protocol Transparent Transmission Configuration
Networking Requirements
A company has multiple services, including IPTV, VoIP, and Internet access. Each service uses a different IP subnet. To facilitate management, the company requires that packets of the same service be transmitted in the same VLAN and packets of different services in different VLANs.
As shown in Figure 5-27 , the Switch receives packets of multiple services such as data, IPTV, and voice services. User devices of these services use IP addresses on different IP subnets. The Switch needs to assign VLANs to packets of different services so that the router can transmit packets with different VLAN IDs to different servers.
Configuration Roadmap
The configuration roadmap is as follows:
- Create VLANs and add interfaces to VLANs so that the interfaces allow the IP subnet-based VLANs.
Enable IP subnet-based VLAN assignment and associate IP subnets with VLANs so that the Switch determines VLANs according to IP addresses or network segments of packets.
You do not need to perform any configuration on a simplified Layer 2 switch. To enable the router to transmit packets with different VLAN IDs to different servers, perform the following operations:
- Add the router interface connected to the Switch to all service VLANs in tagged mode.
- Add each interface of each service network to a service VLAN and configure a VLANIF interface.
For details, see the router configuration guide.
# Create VLAN 100, VLAN 200, and VLAN 300 on the Switch .
# On the Switch , configure GE 0/0/1 as the hybrid interface, add GE 0/0/1 to VLAN 100, VLAN 200, and VLAN 300 in untagged mode, and enable IP subnet-based VLAN assignment.
# On the Switch , configure GE 0/0/2 as the trunk interface, add GE 0/0/2 to VLAN 100, VLAN 200, and VLAN 300 in tagged mode,
# On the Switch , associate IP subnet 192.168.1.2/24 with VLAN 100 and set the 802.1p priority of VLAN 100 to 2.
# On the Switch , associate IP subnet 192.168.2.2/24 with VLAN 200 and set the 802.1p priority of VLAN 200 to 3.
# On the Switch , associate IP subnet 192.168.3.2/24 with VLAN 300 and set the 802.1p priority of VLAN 300 to 4.
Run the display ip-subnet-vlan vlan all command on the Switch . The following information is displayed:
Configuration Files
Switch configuration file
Related Version
S1700&S2700 V200R024C00
S1700&S2700 V200R023C00SPC500
S1700&S2700 V200R022C10SPC500
S1700&S2700 V200R022C00
S1700&S2700 V200R021C00
S1700&S2700 V200R005
S1700&S2700 V100R006C05
Related Documents
S1720, S2700, S5700, and S6720 V200R011C10 Configuration Guide - Device Management
S1720, S2700, S5700, and S6720 V200R011C10 Configuration Guide - Basic Configuration
S1720, S2700, S5700, and S6720 V200R011C10 Configuration Guide - IP Unicast Routing
Digital Signature File
digtal sigature tool
IMAGES
COMMENTS
This would indeed be the IP addressed assigned to the VLAN itself. VLANs do not really have IP addresses assigned to them. They have a network assigned to them, or a subnet, or a network range, however you want to refer to it. The address the OP supplied us is an assignable address within the range of 192.168.4.1-255.
On ArubaOS I was able to assign IP addresses to VLANs like this: #vlan 100 (vlan100)#ip address 172.16.4.3 netmask 255.255.255. (vlan100)#exit. #vlan 200 (vlan 200)#ip address 172.16.5.3 netmask 255.255.255. . And so on. I'm trying to look for the equivalent way to configure this in JunOS. I need to assign IP addresses to a couple different ...
In the CLI (host) [mynode] (config) # interface vlan <vlan > ip address < ipaddr> < ipmask> Configuring a VLAN to Receive a Dynamic Address. In a branch office, you can connect a managed device to an uplink switch or server that dynamically assigns IP addresses to connected devices. For example, you can connect the managed device to a DSL or cable modem, or a broadband remote access server (BRAS).
The IP addresses of the two routed ports must be in the same subnet (e.g 192.168.1.1/24 on the first switch and 192.168.1.2/24 on the second switch). Then configure an SVI interface on both switches (e.g interface Vlan 1) and assign IP address (e.g 10.10.10.1/24 on first switch and 10.20.20.1/24 on second switch).
Policy-based VLAN assignment (MAC addresses, IP addresses, and interfaces) VLANs are assigned based on policies such as combinations of interfaces, MAC addresses, and IP addresses. A network administrator preconfigures policies. When receiving an untagged frame that matches a configured policy, the switch adds a specified VLAN tag to the frame.
In Figure 4, VLAN 200 and VLAN 300 are assigned the IP addresses 2.1.1.1/24 and 3.1.1.1/24, respectively. Client A in VLAN 200 is able to access server B in VLAN 300 and vice-versa, provided that there is no firewall rule configured on the controller to prevent the flow of traffic between the VLANs.
All PCs have IP configurations. Three PCs have an IP configuration from the network 10.0.0.0/8, and the remaining three have an IP configuration from the network 20.0.0.0/8. The lab also has a router to provide connectivity between VLANs. Configuring VLANs on switches. We will configure two VLANs in this network: VLAN-10 and VLAN-20.
Assign an IP Address to a VLAN . A VLAN Virtual Local Area Network. In computer networking, a single Layer 2 network may be partitioned to create multiple distinct broadcast domains, which are mutually isolated so that packets can only pass between them through one or more routers; such a domain is referred to as a Virtual Local Area Network, Virtual LAN, or VLAN. on the managed device obtains ...
Note: In this example, vlan 20 is used. Step 6. Enter the IP address and the corresponding network mask of the interface: Note: In this example, ... - Delayed — The assignment of the IP address is delayed for 60 seconds if DHCP Client is enabled on startup in order to give time to discover DHCP address.
Enable IP subnet-based VLAN assignment and associate IP subnets with VLANs so that the Switch determines VLANs according to IP addresses or network segments of packets. ... Configure IP subnet-based VLAN assignment. # On the Switch, associate IP subnet 192.168.1.2/24 with VLAN 100 and set the 802.1p priority of VLAN 100 to 2.