Juniper – How to add ip address vlan interface

20 Dec

Views: 11877

Juniper EX4200

I’m new to Juniper and it’s my first switch (EX-4200). In this article we will learn about how to add ip address vlan interface on Juniper switch EX series.

Associate a Layer 3 interface with the VLAN. Configure Layer 3 interfaces on trunk ports to allow the interface to transfer traffic between multiple VLANs. Within a VLAN, traffic is bridged, while across VLANs, traffic is routed. www.juniper.net

Here is how to add IP address vlan interface on Juniper EX 4200, firmware version 12.4R:

1. Create layer2  vlan name and vlan id:

# set vlans vlan-name vlan-id vlan-id

Example:

# set vlans vlan100 vlan-id 100

2. Then assign that vlan to an interface:

# set interfaces interface-name unit logical-unit-number family ethernet-switching vlan members vlan-name

Example:

# set interfaces ge-0/0/7 unit 0 family ethernet-switching vlan members vlan100

3. Then create a logical l3 interface and assign that interface to a vlan:

# set interfaces vlan unit logical-unit-number family inet address inet-address

Example:

# set interfaces vlan unit 100 family inet address 10.10.10.1/24

4. The link l3-interface to a vlan:

# set vlans vlan-name l3-interface vlan.logical-interface-number

Example:

# set vlans vlan100 l3-interface vlan.100

Here is the result:

# run show interfaces vlan
Physical interface: vlan, Enabled, Physical link is Up
Interface index: 129, SNMP ifIndex: 328
Type: VLAN, Link-level type: VLAN, MTU: 1518, Speed: 1000mbps
Device flags : Present Running
Link type : Full-Duplex
Link flags : None
Current address: 00:23:9c:12:5b:00, Hardware address: 00:23:9c:12:5b:00
Last flapped : Never
Input packets : 1808099
Output packets: 22785

Logical interface vlan.100 (Index 118) (SNMP ifIndex 630)
Flags: SNMP-Traps 0x0 Encapsulation: ENET2
Input packets : 959
Output packets: 19
Protocol inet
Flags: None
Addresses, Flags: Is-Preferred Is-Primary
Destination: 10.10.10/24, Local: 10.10.10.1, Broadcast: 10.10.10.255

Done!

For more detail please visit:
http://www.juniper.net/

2 Replies to “Juniper – How to add ip address vlan interface

    • Hi Jerry,

      If you mean all devices connected to the vlan100 can get IP address 10.10.10.0/24 automatically (DHCP), then the answer is no. To do the DHCP things, you must configure a DHCP server on vlan100.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.