wiki.ipfire.org

The community-maintained documentation platform of IPFire

User Tools

Site Tools


devel:configure_network:start

Configure Network

IPFire 3.x has a comletely new way of configuring networks. This new set of instructions is able to configure as many networks as you like. Therefor the commands to configure this complex part of the IPFire-distribution is a little more complicated as you might know it from simple ifconfig commands.

1. Define Zones

A Zone is a network part like “green”, “orange” or “blue”. But here the zones are not limited and there is no dependence on a NIC (which are “ports”). The “ports” are later assigned to a zone. You can have as many zones as you like. For this simple startup, we want to have a Internet-zone, called “upl0” and a local network zone called “net0”:

network zone new upl0 bridge

network zone new net0 bridge

As you can see, we define two zones here which are acting as a bridge. Now we need to tell IPFire-3.x what IP-Addresses should be assigned to each zone.

2. Assign IP-Adresses

Now we need to give the zones a specific IP-Address. For better illustration, we will assign a DHCP-Address to upl0 which will be our “red” Interface and a static IP-Address for net0 which will be our “green”:

network zone upl0 config new ipv4-dhcp

network zone net0 config new ipv4-static –address=192.168.11.20 –prefix=24

3. Assign Ports to the zones

Finally we need to assign the “real” networkcards to the zones. In this testsystem, we configured 2 NICs in the vm. One should be used for upl0 and the other for net0:

network zone upl0 port attach p0

network zone net0 port attach p1

Now we are nearly ready to use our network. Just configure a DNS-Namerserver and restart the network

4. Configure DNS

The command for configuring the DNs is a simple:

network dns-server add 8.8.8.8 (Here 8.8.8.8 is the google nameserver)

Now restart the whole network:

network restart

You should now be able to ping the server and reach the Internet.


Useful Commands / Troubleshooting

Always read the manpages. Some useful commands are found below:

1. List available Network devices

 network device list

2. Show network status

 network status

3. View Logfile (view all entries since last boot)

 journalctl -ab
devel/configure_network/start.txt · Last modified: 2016/03/15 18:06 by copymaster