본문 바로가기

운영체제

vyos로 Router 구축하기

728x90

OVA, OVF 이미지

- 이미 설치된 가상머신 이미지를 파일 1개로 만들어 놓은 것 

- 표준만 잘 지키면 다른 가상머신 프로그램에서도 사용 가능 

 

클라우드에서 ova 이미지 다운 후  오픈 !!

 

vyos 명령어 모를 땐

$ ? 검색


구성도

 

 

vyos 인터페이스 설정 

현재 인터페이스 

 

 

설정모드

$ configure

=> 하면 # 으로 바뀜

 

eth1설정

주소지정 

# set interfaces ethernet eth1 address 192.168.128.254

 

주석처리 

# set interfaces ethernet eth1 description inside

 

mtu설정 
# set interfaces ethernet eth1 mtu 9000

 

적용하고 저장 !!!!!!

혹시 인터페이스 잘못 넣어서 지울 때 set 대신 del!!

ex)  # del interfaces ethernet eth1 address ~~~~~  => commit 필수

 

확인

 

 

eth0 설정

# set interfaces ethernet eth0 address 200.200.200.128/24

# set interfaces ethernet eth0 desscription outside

# set interfaces ethernet eth0 mtu 9000

 

+로 추가된 것을 확인 

 

호스트에서 통신 확인=>안됨

 

==> dhcp를 제거해야함! ! 

 

# delete interfaces ethernet eth0 address dhcp

# commit 

# save

 

dhcp 사라짐 !

 

 

명령어를 모르겠으면 ? 검색하면서 확인 

 

 

 

 

라우팅 테이블 설정 

 

Linux 

# vi /etc/sysctl.conf 

//7번째줄 복사 후 1로 변경 

 

# route add -net 192.168.128.0 netmask 255.255.255.0 gw 200.200.200.128

# service iptables stop //방화벽 중지

 

 

vyos

# set protocols static route 192.168.127.0 next-hop 200.200.200.127

# commit

# save

 

 

 

피씨에서 통신 확인 

xp -> xp2

 

xp2 -> xp

 

728x90

'운영체제' 카테고리의 다른 글

리눅스 tftp 서버 구축  (0) 2021.07.11
ssl  (0) 2021.07.09
Linux 명령어 su와 sudo  (0) 2021.07.08
SAMBA server 설정과 network drive  (0) 2021.07.08
Linux - NFS (CentOS 7)  (0) 2021.07.08