C H A P T E R 17 |
Configuring VLAN Routing |
This chapter describes how to configure the Netra CP3240 switch with some ports supporting VLANs and some supporting routing. Also, this chapter shows how to configure VLAN with RIP and OSPF.
You can configure the software to allow traffic on a VLAN to be treated as if the VLAN were a router port.
A port can be either a VLAN port or a router port, but not both. However, a VLAN port may be part of a VLAN that is itself a router port.
This chapter contains the following topics:
When a port is enabled for bridging (default) rather than routing, all normal bridge processing is performed for an inbound packet, which is then associated with a VLAN. Its MAC Destination Address (MAC DA) and VLAN ID are used to search the MAC address table. If routing is enabled for the VLAN and the MAC DA of an inbound unicast packet is that of the internal bridge-router interface, the packet will be routed. An inbound multicast packet will be forwarded to all ports in the VLAN, plus the internal bridge-router interface if it was received on a routed VLAN.
Since a port can be configured to belong to more than one VLAN, VLAN routing might be enabled for all of the VLANs on the port, or for a subset. VLAN Routing can be used to allow more than one physical port to reside on the same subnet. It could also be used when a VLAN spans multiple physical networks, or when additional segmentation or security is required.
This section provides an example of how to configure the Sun Netra CP3240 switch to support VLAN routing. The configuration of the VLAN router port is similar to that of a physical port. The main difference is that, after the VLAN has been created, you must use the show ip vlan command to determine the VLAN’s interface ID so that you can use it in the router configuration commands.
The diagram in this section shows a Layer 3 switch configured for port routing. It connects two VLANs, with two ports participating in one VLAN, and one port in the other. The script shows the commands you would use to configure Sun Netra CP3240 switch to provide the VLAN routing support shown in the diagram.
FIGURE 17-1 VLAN Routing Example Network Diagram
The following code sequence shows an example of creating two VLANs with egress frame tagging enabled.
The following code sequence shows how to enable routing for the VLANs:
The next sequence shows an example of configuring the IP addresses and subnet masks for the virtual router ports.
config interface 3/1 ip address 192.150.3.1 255.255.255.0 exit interface 3/2 ip address 192.150.4.1 255.255.255.0 exit exit |
Use the following screens to perform the same configuration using the Web Interface:
Routing Information Protocol (RIP) is one of the protocols which may be used by routers to exchange network topology information. It is characterized as an “interior” gateway protocol, and is typically used in small to medium-sized networks.
A router running RIP sends the contents of its routing table to each of its adjacent routers every 30 seconds. When a route is removed from the routing table it is flagged as unusable by the receiving routers after 180 seconds, and removed from their tables after an additional 120 seconds.
There are two versions of RIP:
The Netra CP3240 switch supports both versions of RIP. You can configure a given port to:
The following example adds support for RIPv2 to the configuration created in the base VLAN routing example. A second router, using port routing rather than VLAN routing, has been added to the network.
FIGURE 17-2 RIP for VLAN Routing Example Network Diagram
The following sequence creates the VLANs and enables VLAN routing.
This step enables RIP for the switch. The route preference will default to 15.
The next sequence configures the IP address and subnet mask for a non-virtual router port.
config interface 0/5 ip address 192.150.5.1 255.255.255.0 exit exit |
This last step enables RIP for the VLAN router ports. Authentication will default to none, and no default route entry will be created.
config interface 3/1 ip rip exit interface 3/2 ip rip exit exit |
Use the following screens to perform the same configuration using the Graphical User Interface:
For larger networks Open Shortest Path First (OSPF) is often used instead of RIP. OSPF offers several benefits to the administrator of a large and/or complex network:
The top level of the hierarchy of an OSPF network is known as an autonomous system (AS) or routing domain, and is a collection of networks with a common administration and routing strategy. The AS is divided into areas: intra-area routing is used when a source and destination address are in the same area, and inter-area routing across an OSPF backbone is used when they are not. An inter-area router communicates with border routers in each of the areas to which it provides connectivity.
The Sun Netra CP3240 switch operating as a router and running OSPF determines the best route using the assigned cost and the type of the OSPF route. The order for choosing a route if more than one type of route exists is as follows:
Note - External Type 1 is a route that is external to the AS. External Type 2 is a route that was learned from other protocols such as RIP. |
The following example adds support for OSPF to the configuration created in the base VLAN routing example. The script shows the commands you would use to configure the Sun Netra CP3240 switch as an inter-area router. Refer to VLAN Routing Example Network Diagram.
Create the VLANs and enable VLAN routing.
Enable OSPF for the VLAN and physical router ports.
config interface 3/1 ip ospf areaid 0.0.0.2 ip ospf exit interface 3/2 ip ospf areaid 0.0.0.3 ip ospf exit exit |
Set the OSPF priority and cost for the VLAN and physical router ports.
config interface 3/1 ip ospf priority 128 ip ospf cost 32 exit interface 3/2 ip ospf priority 255 ip ospf cost 64 exit exit |
Use the following screens to perform the configuration described in the previous CLI sections, using the Web interface instead.
© 2007 Diversified Technology, Inc. All Rights Reserved. © 2009 Sun Microsystems, Inc. All rights reserved.