[lug] how many ways to get 2 IP on 1 NIC?

D. Stimits stimits at attbi.com
Fri Aug 16 20:04:18 MDT 2002


Mark Horning wrote:
> D. Stimits wrote:
> 
>> I thought this would be simple, but I am having problems finding the 
>> answer. I was under the impression that a single NIC can have two IP 
>> addresses (versus 2 NICs on one machine). If I wanted to assign two IP 
>> addresses with two netmasks, how could I do that manually (e.g., ip, 
>> ifconfig, route)?
>>
>> D. Stimits, stimits AT attbi.com
>>
> [root at telecaster root]# ifconfig eth0:1 192.168.1.11 netmask 


That is just so darn easy, thanks!

D. Stimits, stimits AT attbi.com

[now if only win2K and 98 could do that]

> 255.255.255.0 broadcast 192.168.1.255 up
> 
> 
> [root at telecaster root]# ifconfig -a
> eth0      Link encap:Ethernet  HWaddr 00:01:02:C2:56:A1           inet 
> addr:192.168.1.10  Bcast:192.168.1.255  Mask:255.255.255.0
>          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>          RX packets:2402649 errors:0 dropped:0 overruns:0 frame:0
>          TX packets:1557258 errors:0 dropped:0 overruns:0 carrier:0
>          collisions:0 txqueuelen:100          RX bytes:3427586863 
> (3268.8 Mb)  TX bytes:104958295 (100.0 Mb)
>          Interrupt:12 Base address:0xdc00
> eth0:1    Link encap:Ethernet  HWaddr 00:01:02:C2:56:A1           inet 
> addr:192.168.1.11  Bcast:192.168.1.255  Mask:255.255.255.0
>          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>          Interrupt:12 Base address:0xdc00
> 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:11295 errors:0 dropped:0 overruns:0 frame:0
>          TX packets:11295 errors:0 dropped:0 overruns:0 carrier:0
>          collisions:0 txqueuelen:0          RX bytes:1089324 (1.0 Mb)  
> TX bytes:1089324 (1.0 Mb)
> 
> -- 
> 
> Mark Horning
> rip6 at rip6.net
> 
> 
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
> 






More information about the LUG mailing list