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: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197
Rep:
Having the right terminology helps when googling. What you are looking for is commonly referred to as "ip alias". There is a somewhat dated, but basically still valid, howto here http://www.faqs.org/docs/Linux-mini/IP-Alias.html. In recent years various distributions of linux have come up with different ways of configuring this.
Having the right terminology helps when googling. What you are looking for is commonly referred to as "ip alias". There is a somewhat dated, but basically still valid, howto here http://www.faqs.org/docs/Linux-mini/IP-Alias.html. In recent years various distributions of linux have come up with different ways of configuring this.
thanks.
but my question is not how to use many ip.
i want to know "can one ethernet card take many real ip?".
i think "ip alias" and router's mechanism is similar.
then host can't see my ip's alias, host see my one real ip.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
What makes the difference between a real IP and an aliased IP? If you assign you ethernet card another IP, it acts as it has 2 network cards, each with its own IP. Traffic for one subnet is sent on one, traffic for the other subnet is sent on the other. The same happens with the adapter with multiple IP addresses, only the same physical plug is used.
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197
Rep:
Not sure what your question is, then, or whether it might not just be a question of definition or semantics. When you set up "IP Aliasing", they are real IPs. For example, I have a server that has one interface that has a public address and multiple private addresses. We run NATing and have most of our desktops on private IPs. They can address the server on the private subnet. The server can also be accessed from the outside on its public address. Of course, this requires running a border router and a DNS server for everything to work.
There's also virtual hosting for Apache. That references the primary IP address, but the domain registration has to be set up to point to my primary IP. So, there end up being multiple domain names that resolve to the same IP address. However, if you look up the IP address, it will return my primary domain.
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197
Rep:
Not really. Numbers of IPs shouldn't be a problem. They would only cause problems for themselves or within the subnet are responsible for. If they don't own the IP range or control the DNS, they aren't going to get traffic to themselves for additional IPs.
On the other hand, within a specific subnet, a misbehaving individual can cause problems. They can take or assign a fixed IP that belongs to another device and cause routing problems. I once had someone maliciously change the IP on a public printer to the same IP as our primary server. Caused no end of trouble. I was on vacation and got called. After that, I mandated that the people setting up the printers lock them down. That was in the late 1990's.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.