Configuration examples
U
SER
G
UIDE
362
set eth1 ipaddr 192.168.1.254 netmask 255.255.255.0
set eth1 on
set adsl encap rfc1483-llc
set adsl pvc-number 1
set adsl pvc atm0 ipaddr 85.34.147.98
set adsl pvc atm0 netmask 255.255.255.252
set adsl pvc atm0 no-nexthop
set adsl pvc atm0 vpi 8 vci 35
set adsl pvc atm0 pcr 0
set adsl pvc atm0 default-route
set adsl pvc atm0 masquerade
set adsl on
ADSL
IP
WITH A POOL OF PUBLIC AND PRIVATE
IP
It is described a basic configuration for the ADSL interface with private IP on the LAN interface eth1
and an IP address of the pool of public addresses on the interface eth0.
In order to enable data exchange with the outside a NAT rule is set for packets from the private
LAN.
set eth0 ipaddr <PUBLIC-IP> netmask <NETMASK-IP-PUBLIC>
set eth0 on
set eth1 ipaddr <PRIVATE-IP> netmask <NETMASK-IP-PRIVATE>
set eth1 on
set adsl encap rfc1483-llc
set adsl pvc-number 1
set adsl pvc atm0 vpi 8 vci 35
set adsl pvc atm0 service UBR
set adsl pvc atm0 pcr 0
set adsl pvc atm0 default-route
set adsl pvc atm0 no-masquerade
set adsl pvc atm0 ipaddr <PTP-IP-ADDRESS>
set adsl pvc atm0 no-nexthop
set adsl pvc atm0 netmask 255.255.255.252
set adsl on
set iptables -t nat -A POSTROUTING -s <PRVAT_LAN>/N -o atm0 -j SNAT --to <PUBLIC-IP>
Practical example:
set eth0 ipaddr 80.21.88.177 netmask 255.255.255.240
set eth0 on
set eth1 ipaddr 192.168.1.254 netmask 255.255.255.0