Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Quick network display question on "ifconfig"
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Kethreveris
n00b
n00b


Joined: 16 Feb 2009
Posts: 20
Location: Rethwallen

PostPosted: Mon Feb 16, 2009 9:11 am    Post subject: Quick network display question on "ifconfig" Reply with quote

Earlier releases of Linux that I have used, and all Solaris releases show
virtual network interfaces with using the "ifconfig" command.

But Gentoo does not seem to display the virtual interfaces with "ifconfig".
It DOES work from the configuration files, just can't see them.

Anyone got a clue from just that information?

If not, here is the configuration that I did;

Code:
/etc/init.d# ls -li net*
6879333 lrwxrwxrwx 1 root root     6 2008-09-01 21:39 net.eth1 -> net.lo
6880238 -rwxr-xr-x 1 root root 30696 2008-06-16 19:51 net.lo


Code:
/etc/conf.d# grep -v ^# net
config_eth1=( "10.10.1.10/24"
              "10.10.0.10/24" )
routes_eth1=( "default via 10.10.0.1" )


Both IPs on "eth1" work and show up in the routing table;

Code:
/etc/conf.d# ifconfig
eth1      Link encap:Ethernet  HWaddr 00:71:12:86:2a:99
          inet addr:10.10.1.10  Bcast:10.10.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21e:68ff:fe86:2a13/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:164239 errors:0 dropped:0 overruns:0 frame:0
          TX packets:182465 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:91657975 (87.4 MiB)  TX bytes:56121595 (53.5 MiB)
          Interrupt:18
...


Code:
/etc/conf.d# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.10.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth1
10.10.0.0     0.0.0.0         255.255.255.0   U         0 0          0 eth1
...

I've been using Gentoo on my new mini servers and high-end workstation for the past 1.5 years.
In other *nix I have used, you get a separate entry for each virtual interface
Here is Solaris 10 showing 2 physical interfaces, "eri0" and "eri1". Then 2 virtual interfaces,
"(currently "eri0:1" and "eri0:2"). The rest might be confusing, as I have Solaris' IPMP setup, (Internet
Protocol Mutli-Pathing).

Code:
/> uname -a
SunOS backendos 5.10 Generic_127111-11 sun4u sparc SUNW,UltraAX-i2
/> ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
eri0: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER> mtu 1500 index 2
        inet 10.10.1.51 netmask ffffff00 broadcast 10.10.1.255
        groupname sr_ipmp
eri0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.10.1.50 netmask ffffff00 broadcast 10.10.1.255
eri0:2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.10.0.50 netmask ffffff00 broadcast 10.10.0.255
eri1: flags=69040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER,STANDBY,INACTIVE> mtu 1500 index 3
        inet 10.10.1.52 netmask ffffff00 broadcast 10.10.1.255
        groupname sr_ipmp

_________________
Kethreveris, (aka Kethrery)


Last edited by Kethreveris on Mon Feb 16, 2009 11:00 am; edited 1 time in total
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Feb 16, 2009 9:42 am    Post subject: Reply with quote

linux ifconfig is crap - it can only show one ipv4 address.
Code:
ip a dev eth1

Will show you what you need.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum