- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- multiple IPs
Operating System - Linux
1755381
Members
4056
Online
108832
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО04-19-2003 02:50 AM
тАО04-19-2003 02:50 AM
multiple IPs
hello
i want to enter multiple IPs on my RH 8.0 box. how can i do this.
i want to enter multiple IPs on my RH 8.0 box. how can i do this.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-19-2003 04:04 AM
тАО04-19-2003 04:04 AM
Re: multiple IPs
2 ip's will require 2 NIC's or use 'ip alias' and have one static and one dynamic ip:
http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/ref-guide/s1-networkscripts-interfaces.html
"...For example, a ifcfg-eth0:0 file could be configured to specify DEVICE=eth0:0 and a static IP address of 10.0.0.2, serving as an alias of an Ethernet interface already configured to receive its IP information via DHCP in ifcfg-eth0. At that point, the eth0 device is bound to a dynamic IP address, but it can always be referred to on that system via the fixed 10.0.0.2 IP address....
http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/ref-guide/s1-networkscripts-interfaces.html
"...For example, a ifcfg-eth0:0 file could be configured to specify DEVICE=eth0:0 and a static IP address of 10.0.0.2, serving as an alias of an Ethernet interface already configured to receive its IP information via DHCP in ifcfg-eth0. At that point, the eth0 device is bound to a dynamic IP address, but it can always be referred to on that system via the fixed 10.0.0.2 IP address....
Support Fatherhood - Stop Family Law
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-19-2003 08:44 AM
тАО04-19-2003 08:44 AM
Re: multiple IPs
You can define multiple "alias" interfaces on an existing interface. The syntax is:
ifconfig if:# netmask up
if is your network interface, such as eth0
# is the number opf the alias interface.
For example, on my machine:
# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:B0:D0:D0:E8:47
inet addr:10.241.16.48 Bcast:10.241.23.255 Mask:255.255.248.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:79136822 errors:0 dropped:0 overruns:0 frame:0
TX packets:53045536 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:3511096708 (3348.4 Mb) TX bytes:385305413 (367.4 Mb)
Interrupt:11 Base address:0xc000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1344229 errors:0 dropped:0 overruns:0 frame:0
TX packets:1344229 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:288508286 (275.1 Mb) TX bytes:288508286 (275.1 Mb)
I then perform (as root):
# ifconfig eth0:0 10.241.16.43 -netmask 255.255.248.0 up
Now I get:
@ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:B0:D0:D0:E8:47
inet addr:10.241.16.48 Bcast:10.241.23.255 Mask:255.255.248.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:79138493 errors:0 dropped:0 overruns:0 frame:0
TX packets:53045921 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:3511592780 (3348.9 Mb) TX bytes:385379371 (367.5 Mb)
Interrupt:11 Base address:0xc000
eth0:0 Link encap:Ethernet HWaddr 00:B0:D0:D0:E8:47
inet addr:10.241.16.43 Bcast:10.255.255.255 Mask:255.255.248.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:11 Base address:0xc000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1345176 errors:0 dropped:0 overruns:0 frame:0
TX packets:1345176 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:288605666 (275.2 Mb) TX bytes:288605666 (275.2 Mb)
You can assign aliases to both statically- and dhcp-defined interfaces.
You can use /usr/sbin/neat (also known as redhat-config-network) to assign an alias to an existing interface. It provides a GUI for doing the above, and write the results to /etc/sysconfig/network-scripts/ifcfg-eth0:0, so your alias interface will be established every time you reboot.
ifconfig if:#
if is your network interface, such as eth0
# is the number opf the alias interface.
For example, on my machine:
# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:B0:D0:D0:E8:47
inet addr:10.241.16.48 Bcast:10.241.23.255 Mask:255.255.248.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:79136822 errors:0 dropped:0 overruns:0 frame:0
TX packets:53045536 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:3511096708 (3348.4 Mb) TX bytes:385305413 (367.4 Mb)
Interrupt:11 Base address:0xc000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1344229 errors:0 dropped:0 overruns:0 frame:0
TX packets:1344229 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:288508286 (275.1 Mb) TX bytes:288508286 (275.1 Mb)
I then perform (as root):
# ifconfig eth0:0 10.241.16.43 -netmask 255.255.248.0 up
Now I get:
@ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:B0:D0:D0:E8:47
inet addr:10.241.16.48 Bcast:10.241.23.255 Mask:255.255.248.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:79138493 errors:0 dropped:0 overruns:0 frame:0
TX packets:53045921 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:3511592780 (3348.9 Mb) TX bytes:385379371 (367.5 Mb)
Interrupt:11 Base address:0xc000
eth0:0 Link encap:Ethernet HWaddr 00:B0:D0:D0:E8:47
inet addr:10.241.16.43 Bcast:10.255.255.255 Mask:255.255.248.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:11 Base address:0xc000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1345176 errors:0 dropped:0 overruns:0 frame:0
TX packets:1345176 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:288605666 (275.2 Mb) TX bytes:288605666 (275.2 Mb)
You can assign aliases to both statically- and dhcp-defined interfaces.
You can use /usr/sbin/neat (also known as redhat-config-network) to assign an alias to an existing interface. It provides a GUI for doing the above, and write the results to /etc/sysconfig/network-scripts/ifcfg-eth0:0, so your alias interface will be established every time you reboot.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP