This is a final part of of the series, continuing from the implementation of a distribution layer using a Vyatta router. The previous parts are “Bringing Home the Cisco Hierarchical Internetworking Model, with Vyatta ofcourse” where Part 1 goes over setting up the Core layer, and Part 2 deals with setting up the Distribution layer.
Routers at the access layer are pretty straight forward to get up and running.
Configuring the External Interface (eth0)
In the previous setup, we set the internal interface to be on the 172.16.0.0/29 subnet. And since the internal interface of the distribution router connects to the external interface of the access router, we’ll go ahead and set the external IP here.
set interfaces ethernet eth0 address 172.16.0.2/29 commit
Configuring the Internal Interface (eth1)
We’ll now configure the internal address, however the subnet mask will not be /29. Since this tutorial is for setting up a network at home, l’m going to assume there aren’t too many people with over 30 computers at home. Although this is pretty high to begin with, its suitable.
set interfaces ethernet eth1 address 192.168.0.1/27 commit
The /27 will allow us to have a total of 30 computers. Here’s the breakdown.
Network Address: 192.168.0.0
Broadcast Address: 192.168.0.31
Hosts (Computers): 192.168.0.1 – 192.168.0.30
Subnet Mask: 255.255.255.224
I covered this step in the first part of the series. I did mention that it wasn’t required for a core router, but included the configurations since this is a home network. Below are the configurations.
set service dhcp-server set service dhcp-server shared-network-name Pool1 set service dhcp-server shared-network-name Pool1 subnet 192.168.0.0 default-router 192.168.0.1 set service dhcp-server shared-network-name Pool1 subnet 192.168.0.0 start 192.168.0.2 end 192.168.0.30 set service dhcp-server shared-network-name Pool1 subnet 192.168.0.0 exclude 192.168.0.1 set service dhcp-server shared-network-name Pool1 subnet 192.168.0.0 dns-server 22.214.171.124 set service dhcp-server shared-network-name Pool1 subnet 192.168.0.0 dns-server 126.96.36.199 commit
As mentioned earlier, the 188.8.131.52 and 184.108.40.206 address are free DNS servers from OpenDNS.
This is the last part of the configuration, and I also covered this in the first part. NAT (Network Address Translation) will enable the computers to talk to the outside world, or in our case, get on the internet.
set service nat rule 100 type masquerade set service nat rule 100 type source address 192.168.0.0/27 set service nat rule 100 type source outbound-interface eth0 commit
This ends the series on setting up a network at home using the internetworking model using Vyatta. Although, it is unlikely that you would implement this at home (because it requires three computers), it is primarily to get an understanding of how to differentiate between the different functions that routers perform at the various layers. It is also meant to show us how to get the same functionality of a Cisco environment without using Cisco equipment.