Your ISP has provided you a /32 IP address for the actual public IP, which is an individual host address, and a different /30 subnet. You may configure the connection as follows:
<linux>
# Configure the network interface:
nano /etc/network/interfaces.d/eth0
{
iface eth0 inet static
address [Public IP]
netmask 255.255.255.255
gateway [Gateway IP]
up ip route add [Network IP] netmask 255.255.255.252 dev eth0
up ip route add default via [Gateway IP]
up ip route add [Public IP] dev eth0
up ip route del default
down ip route del [Public IP] dev eth0
down ip route del default via [Gateway IP]
down ip route del [Network IP] netmask 255.255.255.252 dev eth0
}</b>
Replace **[Public IP]**, **[Gateway IP]**, and **[Network IP]** with the values provided by your ISP.
2. Set up a PPPoE connection.
<linux>
# Install required packages.
apt-get install ppp pppoeconf
# Configure the PPPoE connection.
pppoeconf
# Edit the PPP configuration file.
nano /etc/ppp/peers/dsl-provider
<b># Configure the connection.
hide-password
no-accomp
usepeerdns
nodetach
persist
maxfail 0
disconnect-timeout 10
connect /bin/true
noauth
# Add the username and password provided by your ISP.
user [Username]
password [Password]
</b>
Replace **[Username]** and **[Password]** with the values provided by your ISP.
3. Configure the PPP start script.
<linux>
# Create the start script.
nano /etc/ppp/ip-up.d/myipup
<b># Add the following contents.
ip route add [Public IP] dev ppp0
</b>
Replace **[Public IP]** with the actual public IP address provided by your ISP.
4. Start the PPPoE connection.
<linux>
# Start the PPPoE connection.
pon dsl-provider
# Check the connection status.
plog
Summary
-------
This article covers the following topics:
- Understanding the key concepts related to configuring a new FTTH connection
- Explaining FTTH
- Understanding IP, PPP, PPoE, and subnet
- Configuring a WAN connection
- Establishing a PPPoE connection
- Configuring the PPP start script
- Starting the PPPoE connection
References
----------
- [PPPoE 101](https://www.giganews.com/arning/kb/article/What-is-PPPoE.html) - A basic introduction to PPPoE.
- [PPPd Manual](https://linux.die.net/man/5/ppp) - The manual explaining the configuration options for the Point-to-Point Protocol (PPP).
- [Configuring PPPoE for ISP](https://www.howtoforge.com/how-to-set-up-a-pppoe-connection-with-the-new-isp-in-ubuntu-12.04) - Setting up a PPPoE connection for ISP services.
- [Ubuntu Manual - Networking](https://ubuntu.com/server/docs/network-configuration) - Ubuntu Server Network Configuration.
- [IP Aliasing and Multiple IP addresses on One Interface](https://www.cyberciti.biz/faq/linux-multiple-ip-addresses-one-network-interface/) - IP Aliasing and Multiple IP addresses on One Interface.