comp.os.linux.networking
[Top] [All Lists]

Re: 2 ip addresses on same network card

Subject: Re: 2 ip addresses on same network card
From: Jose Maria Lopez Hernandez
Date: Sat, 14 May 2005 09:28:08 +0200
Newsgroups: comp.os.linux.networking
Chris Lowth wrote:
> Strictly speaking: no, it creates sub interfaces and associates IPs with
> them.

If you do a:
iconfig eth0:1 192.168.7.2
ip addr show

2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:00:39:64:2b:81 brd ff:ff:ff:ff:ff:ff
    inet 192.168.7.1/24 brd 192.168.7.255 scope global eth0
    inet 192.168.7.2/24 brd 192.168.7.255 scope global secondary eth0:1
    inet6 fe80::200:39ff:fe64:2b81/64 scope link
       valid_lft forever preferred_lft forever

It will show you that they are just secondary addresses to the main
interface. Really both things are the same, you just view them as
one thing or the other using one tool or the other.

> Chris

Regards.

-- 

Jose Maria Lopez Hernandez
Director Tecnico de bgSEC
jkerouac@xxxxxxxxx
bgSEC Seguridad y Consultoria de Sistemas
http://www.bgsec.com
ESPAÑA

The only people for me are the mad ones -- the ones who are mad to live,
mad to talk, mad to be saved, desirous of everything at the same time,
the ones who never yawn or say a commonplace thing, but burn, burn, burn
like fabulous yellow Roman candles.
                -- Jack Kerouac, "On the Road"

<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy