root
Specialist
I. Mô hình
1. Mô hình
2. Yêu cầu
- PC trong LAN khi truy cập interface thì pfsense sẽ thực hiện load banlancing gateway trên 2 interface WAN
- Sơ đô IP
[TABLE="class: grid, width: 800"]
[TR]
[TD]Pfsense[/TD]
[TD]em0: WAN 1, IP: 192.168.10.10/24, gateway 192.168.10.254
em1: WAN 2, IP: 192.168.20.10/24, gateway 192.168.20.254
em2: LAN, IP: 10.1.1.10/24[/TD]
[/TR]
[TR]
[TD]Router R1[/TD]
[TD]f0/0: DHCP
f0/1: IP 192.168.10.254/24[/TD]
[/TR]
[TR]
[TD]Router R2[/TD]
[TD]f0/0: DHCP
f0/1: IP 192.168.20.254/24[/TD]
[/TR]
[TR]
[TD]PC[/TD]
[TD]dhcp[/TD]
[/TR]
[/TABLE]
II. Triển khai
1. Cấu hình IP, Gateway
- Pfsense: về cấu hình IP và DHCP trên pfsense các bạn xem ở bài lab 2.2 tai đây http://svuit.com/showthread.php?614-Lab-2-2-Cấu-hình-IP-và-DHCP-pfsense-bằng-web
- Router R1: Cấu hình IP và NAT để mạng bên trong ra internet
[TABLE="class: outer_border, width: 500"]
[TR]
[TD]R2(config)#interface f0/0
R2(config-if)#ip address dhcp
R2(config-if)#no shutdown
R2(config-if)#int f0/1
R2(config-if)#ip address 192.168.20.254 255.255.255.0
R2(config-if)#no shutdown
R2(config)#access-list 1 permit any
R2(config)#ip nat inside source list 1 interface f0/0 overload
R2(config)#int f0/0
R2(config-if)#ip nat outside
R2(config-if)#int f0/1
R2(config-if)#ip nat inside[/TD]
[/TR]
[/TABLE]
2. Cấu hình load balancing
- chọn system routing để bạn có thể thấy pfsense hiện đang có 2 đường kết nối WAN
- Group 2 interface WAN đó thành 1 interface WAN ảo.
- Đặt tên interface WAN ảo này (loadBalancing) và chú ý Tier của 2 interface WAN vật lý phải giống nhau
- Cấu hình Rule để các PC trong LAN ra interface bằng interface WAN ảo vừa tạo ở trên
- Vầy là cấu hình xong, bây giờ bạn có thể xem trang thái của gateway
1. Mô hình
2. Yêu cầu
- PC trong LAN khi truy cập interface thì pfsense sẽ thực hiện load banlancing gateway trên 2 interface WAN
- Sơ đô IP
[TABLE="class: grid, width: 800"]
[TR]
[TD]Pfsense[/TD]
[TD]em0: WAN 1, IP: 192.168.10.10/24, gateway 192.168.10.254
em1: WAN 2, IP: 192.168.20.10/24, gateway 192.168.20.254
em2: LAN, IP: 10.1.1.10/24[/TD]
[/TR]
[TR]
[TD]Router R1[/TD]
[TD]f0/0: DHCP
f0/1: IP 192.168.10.254/24[/TD]
[/TR]
[TR]
[TD]Router R2[/TD]
[TD]f0/0: DHCP
f0/1: IP 192.168.20.254/24[/TD]
[/TR]
[TR]
[TD]PC[/TD]
[TD]dhcp[/TD]
[/TR]
[/TABLE]
II. Triển khai
1. Cấu hình IP, Gateway
- Pfsense: về cấu hình IP và DHCP trên pfsense các bạn xem ở bài lab 2.2 tai đây http://svuit.com/showthread.php?614-Lab-2-2-Cấu-hình-IP-và-DHCP-pfsense-bằng-web
- Router R1: Cấu hình IP và NAT để mạng bên trong ra internet
[TABLE="class: outer_border, width: 500"]
[TR]
[TD]R1(config)#interface f0/0
R1(config-if)#ip address dhcp
R1(config-if)#no shutdown
R1(config-if)#int f0/1
R1(config-if)#ip address 192.168.10.254 255.255.255.0
R1(config-if)#no shutdown
R1(config)#access-list 1 permit any
R1(config)#ip nat inside source list 1 interface f0/0 overload
R1(config)#int f0/0
R1(config-if)#ip nat outside
R1(config-if)#int f0/1
R1(config-if)#ip nat inside[/TD]
[/TR]
[/TABLE]
- Router R2: Cấu hình tương tự Router R1[TR]
[TD]R1(config)#interface f0/0
R1(config-if)#ip address dhcp
R1(config-if)#no shutdown
R1(config-if)#int f0/1
R1(config-if)#ip address 192.168.10.254 255.255.255.0
R1(config-if)#no shutdown
R1(config)#access-list 1 permit any
R1(config)#ip nat inside source list 1 interface f0/0 overload
R1(config)#int f0/0
R1(config-if)#ip nat outside
R1(config-if)#int f0/1
R1(config-if)#ip nat inside[/TD]
[/TR]
[/TABLE]
[TABLE="class: outer_border, width: 500"]
[TR]
[TD]R2(config)#interface f0/0
R2(config-if)#ip address dhcp
R2(config-if)#no shutdown
R2(config-if)#int f0/1
R2(config-if)#ip address 192.168.20.254 255.255.255.0
R2(config-if)#no shutdown
R2(config)#access-list 1 permit any
R2(config)#ip nat inside source list 1 interface f0/0 overload
R2(config)#int f0/0
R2(config-if)#ip nat outside
R2(config-if)#int f0/1
R2(config-if)#ip nat inside[/TD]
[/TR]
[/TABLE]
- chọn system routing để bạn có thể thấy pfsense hiện đang có 2 đường kết nối WAN
- Group 2 interface WAN đó thành 1 interface WAN ảo.
- Đặt tên interface WAN ảo này (loadBalancing) và chú ý Tier của 2 interface WAN vật lý phải giống nhau
- Cấu hình Rule để các PC trong LAN ra interface bằng interface WAN ảo vừa tạo ở trên
- Vầy là cấu hình xong, bây giờ bạn có thể xem trang thái của gateway
Bài viết liên quan
Bài viết mới