[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: from a learner



On Sun, Jan 04, 2004 at 07:58:20PM +0100, Christoph Haas said
> On Sun, Jan 04, 2004 at 07:55:23PM +0100, Christoph Haas wrote:
> > On Sun, Jan 04, 2004 at 05:28:20PM +0000, karthi keyan wrote:
> > > can I assign two IP to same system which a single
> > > ethernet card?
> > 
> > Sure. The virtual interfaces are then called something like eth:0,
> > eth:1 and so on.
> 
> Errr... typo... eth0:0, eth0:1, eth0:2...
> 
> See "man ifconfig" and "man interfaces".

If you use the "ip" tool, you can have multiple IP's on the one
interface.  ifconfig doesn't support showing or setting this, though.

rob@ooder> ip addr show dev eth0                                              ~
3: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:20:18:8a:72:c2 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.2/24 brd 192.168.0.255 scope global eth0
rob@ooder> sudo ip addr add 192.168.0.102 dev eth0                            ~
rob@ooder> ip addr show dev eth0                                              ~
3: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:20:18:8a:72:c2 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.2/24 brd 192.168.0.255 scope global eth0
    inet 192.168.0.102/32 scope global eth0

ip++

-- 
Rob Weir <rweir@ertius.org> | mlspam@ertius.org  |  Do I look like I want a CC?
Words of the day:            Montenegro clandestine Capricorn high security TWA

Attachment: signature.asc
Description: Digital signature


Reply to: