- [Voiceover] Let's set up an Ubuntu host as a router.
I'm assuming that you already have
a second network interface card or NECs installed
on your host either physically or virtually.
Let me open a terminal and see if we have two NECs
please note that this is our Ubuntu router VM
Type ifconfig, press enter.
The output shows eth0 and eth1
which are the network interfaces.
Eth0 and one are shorthands
for ethernet cards zero and one which is the same as saying
network interface card zero and one
or NECs zero and one.
Ethernet refers to a set of technical standards
on local area networks or LANs.
It specifies standards for NECs too
and we often call a network interface card or NEC
an ethernet card because of this reason.
By the way the network addresses starting with 10
we're using here is private.
We use these addresses only within a local area network
or LAN, which are never used as internet addresses.
Another group of popular private addresses
start with 192.168.
Eth0 has an IP address of 10.0.0.6.
The prefix inet here stands for internet.
Eth1 has an IP address of 10.0.1.4.
To turn our Ubuntu virtual machine or VM into a router
we have to ensure eth0 belongs to one network
while eth1 belongs to another.
The network address of eth1
looks slightly different from eth0
because it belongs to another network or sub-net.
In our example, the subnet mask is 255.255.255.0
which means that we use the first three digits
of an IP address as our subnet ID.
Therefore 10.0.0 is a subnet ID of 10.0.0.6
and 10.0.1 is a subnet ID of 10.0.1.4
and they belong to different networks or subnets.
Subnet here refers to a subdivided network.
We divided our local area network into two here.
One is 10 10.0.0 and the other is 10.0.1.
I'm using Microsoft Azure to provision my VMs.
I had to manually create the two subnets 10.0.0 and 10.0.1
and associate them with eth0 and eth1
respectively in my virtual network.
Azure automatically configured my second NEC or eth1.
Excellent job.
You're now well on your way to the next step
of setting up your Ubuntu to host as a router.