- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- One interface two ipaddress
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2004 07:57 PM
03-23-2004 07:57 PM
One interface two ipaddress
Any help will be appreciated.
BPK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2004 10:58 PM
03-23-2004 10:58 PM
Re: One interface two ipaddress
-Karthik S S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2004 02:49 AM
03-24-2004 02:49 AM
Re: One interface two ipaddress
Its probably a good idea that they be on the same subnet and network though you can experiment prior to going production.
Example
eth0 is 192.168.0.40 mask 255.255.255.0
ifconfig eth0:1 192.168.0.41 netmask 255.255.255.0 up
I believe the up is optional.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2004 03:01 AM
03-26-2004 03:01 AM
Re: One interface two ipaddress
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2004 08:25 AM
03-26-2004 08:25 AM
Re: One interface two ipaddress
-Ameet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2004 10:30 AM
03-26-2004 10:30 AM
Re: One interface two ipaddress
In modern Linux kernels (anything in the 2.2 range or newer), the interface is never tied to an ip address, and 'IP Aliasing' is not an option, it's a given.
All IP's are 'virtual', only loosely tied to a given interface.
As for mixing and matching subnets, there is absolutely no problem. Linux automatically determines which IP should be used for a given interface, if it is the originating system, otherwise it just forwards it from one interface to the other (given netfilter and /proc/sys/net/ipv4/ip_forward of course).
An example perhaps is best. This is a machine under my desk:
[root@linux: /root]# ip addr list
1: lo:
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
2: eth0:
link/ether 00:08:02:a4:03:05 brd ff:ff:ff:ff:ff:ff
inet 192.168.3.2/24 brd 192.168.3.255 scope global eth0
inet 192.168.1.2/24 brd 192.168.1.255 scope global eth0:0
inet 192.0.0.1/24 brd 192.0.0.255 scope global eth0:1
2463: eth1:
link/ether 00:40:f4:58:97:61 brd ff:ff:ff:ff:ff:ff
inet 203.xx.xxx.22/30 brd 203.xx.xxx.23 scope global eth1
inet 203.yyy.yy.66/30 brd 203.yyy.yy.67 scope global eth1:0
3554: ipsec0:
link/ether 00:40:f4:58:97:61 brd ff:ff:ff:ff:ff:ff
inet 203.xx.xxx.22/30 brd 203.xx.xxx.23 scope global ipsec0
3600: ppp0:
link/ppp
inet 192.168.8.200 peer 192.168.8.244/32 scope global ppp0
As can be seen from 2/2463 (eth0/eth1), both have at least two IP addresses. Both on different subnet masks (eth1 being my external interfaces, slightly commented out). Neither of which is 'predominant'. It's only tools like 'ifconfig' (which are there for compatability, and 'cause everybody remembers how to use them) that the distinction of aliases etc. still exists in Linux.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2004 12:18 AM
03-29-2004 12:18 AM
Re: One interface two ipaddress
Maybe that's why Ameet thinks (thought?!) that it was not possible...
JP.