Using the Switch as a Router

EX series switches support many of the standard Junos OS routing protocols, including static routing, RIP, OSPF, IS-IS, and BGP, as well as features such as VRRP. To enable inter-VLAN communication, you configure a Layer 3 (routing) logical interface on the switch for each VLAN, as discussed in the section “Configuring more VLANs.” The switch treats these just like any other interface, so you can route traffic to and from VLANs through these interfaces.

The switch maintains routing tables to compile information learned from the routing protocols and from other routing information sources. The switch creates the same routing tables (and forwarding tables) and uses them in the same way as JUNOS routers do (see Chapter 10).

Connecting to the Internet

If you have a small LAN with a single connection to the Internet, you can easily connect to your service provider's edge router by configuring a static route from the switch to the router. The static route configuration is straightforward, and the route remains in the switch's routing table until you remove it, or until it becomes inactive for some reason.

You need just a few commands to configure the static route. First, set the IP address on the switch interface that connects to the service provider:

[edit interfaces]
user@junos-switch# set ge-0/0/10 unit 0 family inet address 192.168.0.2/30

images As you can ...

Get Junos® OS For Dummies®, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.