OS2 World.Com Forum

Subject  :  2 IP Addresses on the Same Network Card
Author  :  klcant klcant@gmail.com
Date  :  28 Apr, 2005 on 15:17
Hopefully this is not TOO noobish of a question ... but ... can I add 2 IP addresses to the same network card?

Thanks,

KC


Subject  :  Re:2 IP Addresses on the Same Network Card
Author  :  hausmaus
Date  :  28 Apr, 2005 on 18:41

klcant (28 Apr, 2005 15:17):
Hopefully this is not TOO noobish of a question ... but ... can I add 2 IP addresses to the same network card?

Thanks,

KC


Not that I know of.

--Sean


Subject  :  Re:2 IP Addresses on the Same Network Card
Author  :  klcant klcant@gmail.com
Date  :  28 Apr, 2005 on 19:56
I found this ... can anyone tell me if this is correct?

Edit \mptn\bin\setup.cmd and add a second ifconfig line for the
interface...

Unlike the first one, this has to have the keyword 'alias' after the
interface name. See the TCP/IP command reference for more details.

Thanks!


Subject  :  Re:2 IP Addresses on the Same Network Card
Author  :  Fudeba daniel@caetano.eng.br
Date  :  28 Apr, 2005 on 20:31
Yes, it is correct. I used the ALIAS keyword many times when I was using only one NIC at my server, doing some black magic to it could see the Internet and the computers (all connected to the same hub) but the computers could not see the internet nor the internet see them.
It works like a charm.

Subject  :  Re:2 IP Addresses on the Same Network Card
Author  :  klcant klcant@gmail.com
Date  :  28 Apr, 2005 on 21:04
Please excuse my ignorance ... I have not played with O/S2 much. Does this syntex look correct?

"C:\mptn\bin\setup.cmd"
route -fh
arp -f
ifconfig lan0 192.xxx.xx.xxx netmask 255.255.255.000
ifconfig lan0 alias 10.xxx.xx.xxx netmask 255.255.000.000
rem ifconfig lan1
rem ifconfig lan2
rem ifconfig lan3
etc ...

Thanks again!


Subject  :  Re:2 IP Addresses on the Same Network Card
Author  :  FrMike mbt@gator.net
Date  :  29 Apr, 2005 on 03:51

klcant (28 Apr, 2005 21:04):
Please excuse my ignorance ... I have not played with O/S2 much. Does this syntex look correct?
...

ifconfig lan0 alias 10.xxx.xx.xxx netmask 255.255.000.000
...


Yup. You can also take advantage of a nifty feature of OS/2's implementation of TCP/IP: you can issue this command at any command prompt. For example, you can add an alias IP and later drop it. As far as that goes, you can change IP addresses on the fly, and/or switch into or out of dynamic-IP mode with DHCP. Linux also has this capability, but its syntax of the commands is somewhat different.

In Windoze, if you want to change your IP settings, you have to reboot before they take effect. (Funny, you do a lot of rebooting in Windoze!)


Also, when you are specifying the octets of an IP address or a netmask, you don't have to pad things to three digits. Therefore, 255.255.0.0 would do fine in your example.


Subject  :  Re:2 IP Addresses on the Same Network Card
Author  :  klcant klcant@gmail.com
Date  :  29 Apr, 2005 on 16:18
Very cool ... thanks all! And thanks FrMike ... I am going to give the command prompt a try!!

Powered by UltraBoard 2000 <www.ub2k.com>