**Servers always using STATIC IP addresses for many reasons:
- Easy identifying the server.
- Able to get access to the server any time using the same IPaddress.
- Able to apply any firewall rules related with your server's ipaddress.
- You don't want your servers to changing IPaddress all the time because many configurations have to change along with that.
External
1) eth0 : (DHCP's IP Address)
Internal
2) eth1 : IP address : 192.168.1.1/24
3) eth2 : IP address : 192.168.2.1/24
Configuring Vyatta
1) Now i will configure both external and internal ports in which the external network will get it's IPaddress from the DHCP server (ISP modem) and the internal networks will be configured with the address 192.168.1.1/24 and 192.168.2.1/24 (This addresses are the default gateway) . Also i am going to allow the DHCP requests/responses from the clients and server to pass through Vyatta router and allow the clients to get its IP addresses.
configure
set interfaces ethernet eth0 address dhcp
source nat rule 10
source nat rule 10 outbound-interface eth0
source nat rule 10 translation address masqurade
set interfaces ethernet eth0 description Outside (optional)
set interfaces ethernet eth1 address 192.168.1.1/24
set interfaces ethernet eth1 description Servers (optional)
set interfaces ethernet eth2 address 192.168.2.1/24
set interfaces ethernet eth2 description Clients (optional)
edit service dhcp-relay
set server 192.168.1.2
set service dhcp-relay interface eth1
set service dhcp-relay interface eth2
commit
save
exit
2) Now i will check if the Ethernet ports and the relay configured correct.
show interfaces
show configuration all
**In case that you want to execute the operational mode show command(s) inside the configuration mode, just add run in front of it.
run show interfaces
3) Assigned the appropriate ranges of IP address on DHCP Server and check if your clients are getting IP address automatically. Check if the clients can ping each other and get access to the internet.
4) If you want to configuring or checking your Vyatta router remotely you can enable SSH access.
Before you allowing the SSH access, you have to enable the SSH service on the router. Also it is recommended to change the SSH's default port from 22 to 2222 for security reason.
set service ssh
set service ssh port 2222
commit
save
show service ssh
5) To get access to Vyatta router through the SSH , use your root credentials.
No comments:
Post a Comment