1. vlan 생성 (cli 모드 -> edit 모드)
set vlans <vlan-name> vlan-id <vlan-id> (ex: set vlans v300 vlan-id 300)
2. 인터페이스 설정(cli 모드 -> edit 모드)
set interfaces <interface-name> unit 0 family ethernet-switching vlan members <vlan-id>
set interfaces <interface-name> unit 0 family ethernet-switching port-mode trunk
set interfaces <interface-name> unit 0 family ethernet-switching vlan members all
juniper Configure Ethernet Ports for Switching
http://kb.juniper.net/InfoCenter/index?page=content&id=KB16667&pmv=print
cli 모드에서
show configuration | match ge-0/0/5 | display set
하면 해당 인터페이스에 설정된 명세를 (description, port-mode, vlan member를 볼 수 있다)
trunk모드로 전환해야 다수의 vlan 멤버가 될 수 있다.
출처 http://www.gossamer-threads.com/lists/nsp/juniper/18789
juniper에서는 trunk 모드시에 untagged된 트래픽은 허용하지 않는 것이 기본 정책이기 때문에 이를 허용해야 하는 vlan 은 native-vlan-id로 설정해야 하고 native vlan id로 설정된 vlan은 member에 들어가면 않된다.
http://www.juniper.net/techpubs/software/junos-security/junos-security10.2/junos-security-swconfig-interfaces-and-routing/topic-47671.html
방화벽 설정 문서 (현재 edit모드에서만 작성해 놓음)
1. 외부 업링크 ip설정
delete interface ge-0/1/3 unit 0
set interfaces ge-0/1/3 unit 0 family inet address 211.xxx.xxx.xx/30
2. vlan 생성
set vlans vlan300 vlan-id 300
…
set vlans vlan315 vlan-id 315
3. 트렁크 포트 생성
set interfaces ge-0/0/5 unit 0 family ethernet-switching port-mode trunk
set interfaces ge-0/0/7 unit 0 family ethernet-switching port-mode trunk
4. vlan 할당
set interfaces ge-0/0/5 unit 0 family ethernet-switching vlan members 300
…
set interfaces ge-0/0/5 unit 0 family ethernet-switching vlan members 315
인터페이스 ge-0/0/7도 동일합니다.
5. defalut vlan에 태그 생성
set vlans default vlan-id 1
6. 5번 7번 포트에 native vlan 설정
set interface ge-0/0/5 unit 0 family ethernet-switching native-vlan 1
set interface ge-0/0/7 unit 0 family ethernet-switching native-vlan 1
7. vlan에 ip설정
set vlans default l3-interface vlan.0
set interfaces vlan unit 0 family inet address [GW IP]/24
8. 게이트웨이 설정
set routing-options static route 0.0.0.0/0 next-hop [ip]
9. ssh설정
set system service ssh root-login allow
출처: https://mashupworld.tistory.com/entry/Juniper-Router-설정 [People, Life, Story]