Tranvantrivn
Intern
Bài 7: Hướng dẫn sử dụng các lệnh cơ bản trên thiết bị Juniper
1- Đặt IP cho cổng manager
Đối với thiết bị độc lập:
		PHP:
	
	set interface me0.0 family inet address <ipaddress>
	
		PHP:
	
	set interface vme0.0 family inet address <ipaddress>
	2- Update JunOS
		PHP:
	
	request system software add ftp://<username>:<password>@<ftpserver_ipaddress>/<tên file junos trên ftp server> no-copy reboot
	Ví dụ:
request system software add ftp://admin:admin123@192.168.1.1/ junos-srxsme-12.1X44-D45.2-domestic.tgz no-copy reboot
- No-copy: sau khi upgrade sẽ xóa file junos trên bộ nhớ để tiết kiệm dung lượng
 - Reboot: sau khi upgrade sẽ tự động reboot lại thiết bị.
 
3- Cấu hình InterVLAN
Tạo vlan:
		PHP:
	
	set vlans <tên vlan> vlan-id <id> l3-interface <tên interface vlan>
	set vlans vlan5 vlan-id 5 l3-interface vlan.5
Tạo interface vlan:
		PHP:
	
	set interface vlan unit <unit-id> family inet address <ip address>
	set interface vlan unit 5 family inet address 192.168.1.1/24
4- Định tuyến:
Định tuyến tĩnh:
		PHP:
	
	set routing option static route <subnet>/<prefix> next-hop <next-hop>
	set routing option static route 192.168.1.0/24 next-hop 10.1.1.1
set routing option static route 0/0 next-hop 192.168.10.1
Định tuyến OSPF:
		PHP:
	
	set protocol ospf <area-id> interface <interface>
	set protocol ospf area 0 interface ge-0/0/0
set protocol ospf are 1 interface lo0 passive
6- Rename Interface
		PHP:
	
	rename interfaces <interface-name> to <interface-name>
	rename interfaces ge-2/0/0 to ge-0/0/0
7- Các lệnh so sánh và compare
Sau thay đổi cấu hình, dùng lệnh show | compare để xem những thay đổi đã thực hiện
		PHP:
	
	show | compare
	Mỗi lần commit hệ thống sẽ tạo ra 1 bản sao cấu hình, để so sánh cấu hình hiện tại với cấu hình đã được sao lưu:
		PHP:
	
	 show | compare rollback <id>
	Cấu hình hiện tại là rollback 0, các cấu hình trước được sắp xếp theo thứ tự gần nhất là từ 1 đến 49.
Ví dụ:
show | compare rollback 1
show | compare rollback 2
8- DHCP
		PHP:
	
	set system services dhcp pool <subnet>/<prefix> address-range low <Địa chỉ cấp phát từ> high <địa chỉ cấp đến>
set system services dhcp pool <subnet>/<prefix> name-server <dns server>
set system services dhcp pool <subnet>/<prefix> router <default-gateway>
	Ví dụ:
set system services dhcp pool 172.16.7.0/24 address-range low 172.16.7.10
set system services dhcp pool 172.16.7.0/24 address-range high 172.16.7.250
set system services dhcp pool 172.16.7.0/24 name-server 8.8.8.8
set system services dhcp pool 172.16.7.0/24 router 172.16.7.1
Bài viết liên quan
			Bài viết mới