IPs- and FDQNs on localhost with subnets on MINT 17.3?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Linux Mint 17.3 , CentOS 7, Ubuntu 16.04 LTS
Posts: 4
Rep:
IPs- and FDQNs on localhost with subnets on MINT 17.3?
Hi,
I am searching how to setup certain IPs (IPv4) with two (or more) subnets on my localhost for testing and (still) not using virtual machines.
I have a Laptop which I am carrying around all the time traveling and I wonder how it is possible to set such an environment up for testing purposes; e.g. later a test and learning of a bacula, postfix, alfresco or a private CA-SSL, all based on the IPs and FDQNs.
I would like to set up a private subnet (class A).
I am still a bit confused how I map a domain on which IP and how I map two domains on one IP.
It sounds like there is some confusion about IPs versus hosts (e.g. Fully-Qualified Domain Names).
IP addresses are what is assigned to a network interface to designate where the system is on the network and where to address it for connections. The FQDN is the product of DNS translating the IP address to a name that should be easier for folks to remember. The translation between the FQDN and the IP address is done by DNS, or you can use your system's "/etc/hosts" file to accomplish the same thing.
A base, default "/etc/hosts" file should look something like this:
Code:
# /etc/hosts: Local Host Database
#
# This file describes a number of aliases-to-address mappings for the for
# local hosts that share this file.
#
# In the presence of the domain name service or NIS, this file may not be
# consulted at all; see /etc/{host,nsswitch}.conf for the resolution order.
#
# IPv4 and IPv6 localhost aliases
127.0.0.1 localhost
::1 localhost
#
# Imaginary network.
#10.0.0.2 myname
#10.0.0.3 myfriend
#
# According to RFC 1918, you can use the following IP networks for private
# nets which will never be connected to the Internet:
#
# 10.0.0.0 - 10.255.255.255
# 172.16.0.0 - 172.31.255.255
# 192.168.0.0 - 192.168.255.255
#
# In case you want to be able to connect directly to the Internet (i.e. not
# behind a NAT, ADSL router, etc...), you need real official assigned
# numbers. Do not try to invent your own network numbers but instead get one
# from your network provider (if any) or from your regional registry (ARIN,
# APNIC, LACNIC, RIPE NCC, or AfriNIC.)
#
... and when you want to configure your system to know itself on it's "home" network, you change it to something like this (assuming the IP address on the home network is 192.168.1.101.):
Now, you are going to take your system into work and put it on the network there, which will assign it a 10.10.17.58 IP address, so now you should update your '/etc/hosts' file to look something like this:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.