|
|
#1 |
|
Prospect
Join Date: Feb 2007
Posts: 8
|
Multiple IP Addresses, osx 10.4.8, Mac Book Pro
Hi,
I've recently switched to a Mac from windows. One thing that I can't work out is how to assign multiple IP Addresses to the on board NIC. I know this can't be done in the gui, therefore, I assume this must be possible at the back end somehow? Thanks in advance! Cheers Graham |
|
|
|
|
|
#2 |
|
Triple-A Player
Join Date: Dec 2002
Location: Kent, United Kingdom
Posts: 105
|
It certainly can be done via the GUI!
I'm reciting this from memory (at work on a PC at the mo!) but it's something like: - Go to System Preferences > Network. - Choose 'Show network port configurations' (or something) - Find the one for built-in Ethernet - Click 'Duplicate' You can now configure each instance with different settings, and you're done.
__________________
Regards, Chris |
|
|
|
|
|
#3 |
|
Triple-A Player
Join Date: Mar 2006
Posts: 173
|
If you just need to quickly assign an IP/subnet alias to an interface, you can do it with the ifconfig command in the Terminal.
sudo ifconfig <if> alias 198.0.2.77/24 where <if> is the interface you want to add an address to (en0, en1, etc) Last edited by ElectricSheep; 02-07-2007 at 05:00 PM. |
|
|
|
|
|
#4 |
|
Prospect
Join Date: Feb 2007
Posts: 8
|
Thanks!
Hi There,
Thanks for the tips, I never knew that you could create duplicates! A windows switcher handbook would be very handy!! Cheers Graham |
|
|
|
|
|
#5 |
|
Prospect
Join Date: Feb 2007
Posts: 8
|
Does not work...
Hi,
I've added a number of IP Address via the gui, but it does not seem to work. I can't ping any of the new IP Addresses from the network utility. I've rebooted the Mac, but no change. I've changed the order of the configurations as well, so they are in order. Am I missing something else? Cheers Graham |
|
|
|
|
|
#6 |
|
Moderator
Join Date: Jan 2002
Posts: 10,677
|
Are you trying to assign them so they are simultaneously available?
Or are you attempting to have multiple static IPs that you can switch between? |
|
|
|
|
|
#7 |
|
Hall of Famer
Join Date: Sep 2004
Location: Chicago, Illinois
Posts: 3,191
|
I asked a rather similar question but have not yet received a response. Whether you situation is similar to mine, I don't know. I have multiple IPs assigned to a network card and they ARE visible on the other side of my router, but I can only ping the first IP internally. I'm still trying to figure out why. Yellow: At least in my case, I want the simultaneously available. And the ARE...but not inside my building. I'm perplexed.
Joe VanZandt |
|
|
|
|
|
#8 |
|
Moderator
Join Date: Jan 2002
Posts: 10,677
|
Hmmm.. I've never encountered multiple IPs assigned to a single NIC all appearing simultaneously.
If you don't mind me asking.. what's the point of that? |
|
|
|
|
|
#9 |
|
Hall of Famer
Join Date: Sep 2004
Location: Chicago, Illinois
Posts: 3,191
|
I want my website to be on a different IP from other functions on the server. Believe me, this actually works from the outside. I'm still puzzling out why it doesn't work internally.
Joe VanZandt |
|
|
|
|
|
#10 |
|
Triple-A Player
Join Date: Mar 2006
Posts: 173
|
The ability to have multiple IP addresses on the same physical interface is very useful if one wants to have multiple services running in jailed environments on the same physical machine. Each jailed environment can have its own IP address given to it. From the outside and from the standpoint of the service, it looks like a completely different host.
Last edited by ElectricSheep; 02-07-2007 at 12:49 PM. |
|
|
|
|
|
#11 |
|
Prospect
Join Date: Feb 2007
Posts: 8
|
Multiple IP Addresses
The reason is to have access to multiple subnets, that are physically on the same network, but are in different IP Address subnets. It's a development environment. The IP Subnets are not physically separated.
This enables me to have several development environments working on the same network switch, but I need to be able to access them from the one network connection. Therefore I need to be able to assign different IP Addresses to the one NIC, but for all of them to be usable at the same time. I get around this problem at the moment, by using XP in Parallels, which works fine. However, as I can use the Remote Desktop Connector on the Mac, the only reason to fire up XP is to remote control the servers. If I can get multiple IP Addresses to work on the Mac, I won't need to start XP. Makes me life easier (a bit!) if I can get this one sorted. Cheers Graham |
|
|
|
|
|
#12 |
|
Triple-A Player
Join Date: Mar 2006
Posts: 173
|
Try adding the addresses from the command line.
I've done it here with both wireless and wired interfaces, and they work just fine (ARP entries are correct on another machine on my LAN) It sounds like an environment that might benefit from a VLAN implementation, but you'd need a managed switch infrastructure. Last edited by ElectricSheep; 02-07-2007 at 05:07 PM. |
|
|
|
|
|
#13 |
|
League Commissioner
Join Date: Jan 2005
Posts: 8,475
|
I saw this thread, and out of curiosity, I duplicated my "Built-in Ethernet" port in Network Port Configurations, and then edited the copy. I changed the ip address to configure manually and set a local address, subnet mask, and provided the router info. I'm apple to ping that address, as well as the DHCP provided address, both from my Dual G5, and from my wife's iMac. The only thing I don't know is, how would I specify which network port to use for a given application?
|
|
|
|
|
|
#14 | |||||||||||||||||||
|
Hall of Famer
Join Date: Sep 2004
Location: Chicago, Illinois
Posts: 3,191
|
That's got to be a variant on the Freudian slip, I think. I assure you, it works perfectly well in my setup when the machine is either on the same subnet OR is external to our router. My problem is that our INTERNAL network (10.0.0.x) machines can't see it, even though they can see the initial address and all other machines on our external network and the whole rest of the internet. That's what has me bedeviled. I can't see why they can't see it! Joe VanZandt |
|||||||||||||||||||
|
|
|
|
|
#15 | |||||||||||||||||||||||
|
League Commissioner
Join Date: Jan 2005
Posts: 8,475
|
I'm thinking your problem is with the internal router, but I don't know how I'd fix it, other than restart the router. My question is, how do you assign, for example, a web server to one ip address, and an ftp server to another? Or do they each answer to whomever calls, and leave that up to DNS entries? |
|||||||||||||||||||||||
|
|
|
|
|
#16 |
|
Hall of Famer
Join Date: Sep 2004
Location: Chicago, Illinois
Posts: 3,191
|
Well, you just set the webserver up to be on the address you assign it (and list in the DNS servers) and it listens on port 80 on that address. Our FTP server is on a different IP on the same machine. They behave like two different network cards. Of course, this doesn't have heavy traffic or that might be a problem, but more moderate loads, the hardware has no problems.
I'm also thinking it must be router related, but haven't figured out exactly how yet. I'm open to good ideas! Joe VanZandt |
|
|
|
|
|
#17 | |||||||||||||||||||||||
|
League Commissioner
Join Date: Jan 2005
Posts: 8,475
|
I knew it was a bad example when I posted it! What I'm really asking is how do I browse from one address in Safari and from the other in Camino? |
|||||||||||||||||||||||
|
|
|
|
|
#18 |
|
Hall of Famer
Join Date: Sep 2004
Location: Chicago, Illinois
Posts: 3,191
|
As I am doing this on a server, that particular question has never occurred to me. If I think of a good answer, I'll post it.
Joe VanZandt |
|
|
|
|
|
#19 |
|
Triple-A Player
Join Date: Mar 2006
Posts: 173
|
Sounds like it could be a routing issue. What kind of router are you employing, and how is it configured?
|
|
|
|
|
|
#20 |
|
Prospect
Join Date: Feb 2007
Posts: 8
|
Got it sorted....!
Hi,
Well, instead of using duplicate, I used 'new' instead and that seems to work fine! I don't know why the duplicate would not play ball. Thanks for your help. Cheers Graham
|
|
|
|
![]() |
|
|